diff --git a/.gitignore b/.gitignore index 4fcd636..884144c 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ *.old *.db *.local.* +/etc/*.ini +/etc/*.log diff --git a/etc/reshacker.exe b/etc/reshacker.exe new file mode 100644 index 0000000..f3d4e57 Binary files /dev/null and b/etc/reshacker.exe differ diff --git a/etc/rhash.exe b/etc/rhash.exe new file mode 100644 index 0000000..414157c Binary files /dev/null and b/etc/rhash.exe differ diff --git a/etc/setup/setup.manifest b/etc/setup/setup.manifest new file mode 100644 index 0000000..542ddcc --- /dev/null +++ b/etc/setup/setup.manifest @@ -0,0 +1,2 @@ + +Nullsoft Install System \ No newline at end of file diff --git a/etc/setup/setup.nsi b/etc/setup/setup.nsi index 5310d7a..ef4b7cc 100644 --- a/etc/setup/setup.nsi +++ b/etc/setup/setup.nsi @@ -61,6 +61,16 @@ !include `StdUtils.nsh` +;-------------------------------- +;Manifest +;-------------------------------- + +!packhdr "$%TEMP%\~exehead.tmp" `"..\reshacker.exe" -addoverwrite "$%TEMP%\~exehead.tmp", "$%TEMP%\~exehead.tmp", "setup.manifest", 24,1,1033` + +!delfile "..\reshacker.log" +!delfile "..\reshacker.ini" + + ;-------------------------------- ;Installer Attributes ;-------------------------------- @@ -82,7 +92,7 @@ InstallDirRegKey HKLM "${MyRegPath}" "InstallLocation" SetCompressor /SOLID LZMA SetCompressorDictSize 64 -!packhdr "$%TEMP%\exehead.tmp" '"${X264_UPX_PATH}\upx.exe" --brute "$%TEMP%\exehead.tmp"' +#!packhdr "$%TEMP%\exehead.tmp" '"${X264_UPX_PATH}\upx.exe" --brute "$%TEMP%\exehead.tmp"' ;-------------------------------- diff --git a/etc/setup/wrapper.nsi b/etc/setup/wrapper.nsi index 6452cc6..493ed5f 100644 --- a/etc/setup/wrapper.nsi +++ b/etc/setup/wrapper.nsi @@ -65,7 +65,7 @@ OutFile "${X264_OUTPUT_FILE}" BrandingText "${X264_DATE} / Build #${X264_BUILD}" Icon "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico" ChangeUI all "${NSISDIR}\Contrib\UIs\sdbarker_tiny.exe" -ShowInstDetails show +ShowInstDetails nevershow AutoCloseWindow true InstallDir "" @@ -94,6 +94,7 @@ SubCaption 4 " " ReserveFile "${NSISDIR}\Plugins\System.dll" ReserveFile "${NSISDIR}\Plugins\StdUtils.dll" +ReserveFile "${NSISDIR}\Plugins\SelfDel.dll" ;-------------------------------- @@ -128,6 +129,12 @@ Section "-LaunchTheInstaller" InitPluginsDir SetOutPath "$PLUGINSDIR" + ${StdUtils.TestParameter} $R0 "Update" + ${If} "$R0" == "true" + SetFileAttributes "$EXEPATH" FILE_ATTRIBUTE_NORMAL + SelfDel::del /RMDIR + ${EndIf} + SetOverwrite on File "/oname=${InstallerFileName}" "${X264_SOURCE_FILE}" @@ -194,6 +201,7 @@ Section "-LaunchTheInstaller" SetDetailsPrint listonly SetErrorLevel 1 + SetOutPath "$TEMP" Abort "Aborted." ; -------- @@ -202,4 +210,5 @@ Section "-LaunchTheInstaller" Delete /REBOOTOK "${InstallerFileName}" SetErrorLevel 0 + SetOutPath "$TEMP" SectionEnd