Updated packaging scripts.

* New report resource locations supported.
* Removed some references to Nehrim in the installer script.
* Removed MSVC installation from installer script.
* Added deletion of masterlist repositories to uninstaller.
This commit is contained in:
WrinklyNinja
2014-05-12 00:22:55 +01:00
parent 5a307f9de0
commit 6854b5e053
2 changed files with 28 additions and 68 deletions
+6 -9
View File
@@ -16,9 +16,11 @@
# resources/l10n/zh/LC_MESSAGES/wxstd.mo
# resources/l10n/pl/LC_MESSAGES/loot.mo
# resources/l10n/pl/LC_MESSAGES/wxstd.mo
# resources/polyfill.js
# resources/script.js
# resources/style.css
# resources/report/report.html
# resources/report/require.js
# resources/report/polyfill.js
# resources/report/script.js
# resources/report/style.css
# docs/images
# docs/licenses
# docs/LOOT Metadata Syntax.html
@@ -71,17 +73,13 @@ for lang in ['es', 'ru', 'fr', 'zh_CN', 'pl', 'pt_BR']:
shutil.copy( os.path.join('..', 'resources', 'l10n', lang, 'LC_MESSAGES', 'loot.mo'), os.path.join(temp_path, 'resources', 'l10n', lang, 'LC_MESSAGES') )
shutil.copy( os.path.join('..', 'resources', 'l10n', lang, 'LC_MESSAGES', 'wxstd.mo'), os.path.join(temp_path, 'resources', 'l10n', lang, 'LC_MESSAGES') )
shutil.copy( os.path.join('..', 'resources', 'polyfill.js'), os.path.join(temp_path, 'resources') )
shutil.copy( os.path.join('..', 'resources', 'script.js'), os.path.join(temp_path, 'resources') )
shutil.copy( os.path.join('..', 'resources', 'style.css'), os.path.join(temp_path, 'resources') )
shutil.copytree( os.path.join('..', 'resources', 'report'), os.path.join(temp_path, 'resources', 'report') )
shutil.copytree( os.path.join('..', 'docs', 'images'), os.path.join(temp_path, 'docs', 'images') )
shutil.copytree( os.path.join('..', 'docs', 'licenses'), os.path.join(temp_path, 'docs', 'licenses') )
shutil.copy( os.path.join('..', 'docs', 'LOOT Metadata Syntax.html'), os.path.join(temp_path, 'docs') )
shutil.copy( os.path.join('..', 'docs', 'LOOT Readme.html'), os.path.join(temp_path, 'docs') )
# Now compress the temporary folder. (Creating a zip because I can't get pylzma to work...)
os.chdir(temp_path)
zip = zipfile.ZipFile( os.path.join('..', archive_name), 'w', zipfile.ZIP_DEFLATED )
@@ -91,6 +89,5 @@ for root, dirs, files in os.walk('.'):
zip.close()
os.chdir('..')
# And finally, delete the temporary folder.
shutil.rmtree('archive.tmp')
+22 -59
View File
@@ -268,10 +268,12 @@ FunctionEnd
;File "..\build\loot64.dll"
;Install resource files.
SetOutPath "$INSTDIR\resources"
File "..\resources\polyfill.js"
File "..\resources\script.js"
File "..\resources\style.css"
SetOutPath "$INSTDIR\resources\report"
File "..\resources\report\report.html"
File "..\resources\report\require.js"
File "..\resources\report\polyfill.js"
File "..\resources\report\script.js"
File "..\resources\report\style.css"
;Install documentation images.
SetOutPath "$INSTDIR\docs\images"
@@ -369,49 +371,6 @@ FunctionEnd
SectionEnd
Section "Microsoft Visual C++ 2013 SP1 Redist"
; Thanks to the pcsx2 installer for providing this!
; Detection made easy: Unlike previous redists, VC2013 now generates a platform
; independent key for checking availability.
; HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\VC\Runtimes\x86 for x64 Windows
; HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0\VC\Runtimes\x86 for x86 Windows
; Download from:
; http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe
ClearErrors
${If} ${RunningX64}
ReadRegDword $R0 HKLM "SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\VC\Runtimes\x86" "Installed"
${Else}
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\VisualStudio\12.0\VC\Runtimes\x86" "Installed"
${EndIf}
${If} $R0 == "1"
DetailPrint "Visual C++ 2013 Redistributable is already installed; skipping!"
${Else}
DetailPrint "Visual C++ 2013 Redistributable registry key was not found; assumed to be uninstalled."
DetailPrint "Downloading Visual C++ 2013 Redistributable Setup..."
SetOutPath $TEMP
NSISdl::download "http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe" "vcredist_x86.exe"
Pop $R0 ;Get the return value
${If} $R0 == "success"
DetailPrint "Running Visual C++ 2013 Redistributable Setup..."
Sleep 2000
HideWindow
ExecWait '"$TEMP\vcredist_x86.exe" /qb'
BringToFront
DetailPrint "Finished Visual C++ 2013 SP1 Redistributable Setup"
Delete "$TEMP\vcredist_x86.exe"
${Else}
DetailPrint "Could not contact Microsoft.com, or the file has been (re)moved!"
${EndIf}
${EndIf}
SectionEnd
;--------------------------------
;Uninstaller Section
@@ -438,9 +397,11 @@ FunctionEnd
RMDir "$INSTDIR\docs"
;Remove resource files.
Delete "$INSTDIR\resources\polyfill.js"
Delete "$INSTDIR\resources\script.js"
Delete "$INSTDIR\resources\style.css"
Delete "$INSTDIR\resources\report\report.html"
Delete "$INSTDIR\resources\report\require.js"
Delete "$INSTDIR\resources\report\polyfill.js"
Delete "$INSTDIR\resources\report\script.js"
Delete "$INSTDIR\resources\report\style.css"
;Remove language files.
Delete "$INSTDIR\resources\l10n\ru\LC_MESSAGES\loot.mo"
@@ -474,23 +435,27 @@ FunctionEnd
Delete "$LOCALAPPDATA\LOOT\LOOTDebugLog.txt"
;Trying to delete a file that doesn't exist doesn't cause an error, so delete all games' files.
;This doesn't handle user-defined games.
Delete "$LOCALAPPDATA\LOOT\Oblivion\report.html"
Delete "$LOCALAPPDATA\LOOT\Oblivion\reportdata.js"
Delete "$LOCALAPPDATA\LOOT\Oblivion\masterlist.yaml"
Delete "$LOCALAPPDATA\LOOT\Nehrim\report.html"
Delete "$LOCALAPPDATA\LOOT\Nehrim\masterlist.yaml"
Delete "$LOCALAPPDATA\LOOT\Skyrim\report.html"
Delete "$LOCALAPPDATA\LOOT\Skyrim\reportdata.js"
Delete "$LOCALAPPDATA\LOOT\Skyrim\masterlist.yaml"
Delete "$LOCALAPPDATA\LOOT\Fallout3\report.html"
Delete "$LOCALAPPDATA\LOOT\Fallout3\reportdata.js"
Delete "$LOCALAPPDATA\LOOT\Fallout3\masterlist.yaml"
Delete "$LOCALAPPDATA\LOOT\FalloutNV\report.html"
Delete "$LOCALAPPDATA\LOOT\FalloutNV\reportdata.js"
Delete "$LOCALAPPDATA\LOOT\FalloutNV\masterlist.yaml"
;Delete repositories.
RMDir /r "$LOCALAPPDATA\LOOT\Oblivion\.git"
RMDir /r "$LOCALAPPDATA\LOOT\Skyrim\.git"
RMDir /r "$LOCALAPPDATA\LOOT\Fallout3\.git"
RMDir /r "$LOCALAPPDATA\LOOT\FalloutNV\.git"
;Try deleting folders.
RMDir "$LOCALAPPDATA\LOOT\Oblivion"
RMDir "$LOCALAPPDATA\LOOT\Nehrim"
RMDir "$LOCALAPPDATA\LOOT\Skyrim"
RMDir "$LOCALAPPDATA\LOOT\Fallout3"
RMDir "$LOCALAPPDATA\LOOT\FalloutNV"
RMDir "$LOCALAPPDATA\LOOT"
;Remove uninstaller.
Delete "$INSTDIR\Uninstall.exe"
@@ -525,13 +490,11 @@ FunctionEnd
;The following user files are only removed if set to.
Delete "$LOCALAPPDATA\LOOT\settings.yaml"
Delete "$LOCALAPPDATA\LOOT\Oblivion\userlist.yaml"
Delete "$LOCALAPPDATA\LOOT\Nehrim\userlist.yaml"
Delete "$LOCALAPPDATA\LOOT\Skyrim\userlist.yaml"
Delete "$LOCALAPPDATA\LOOT\Fallout3\userlist.yaml"
Delete "$LOCALAPPDATA\LOOT\FalloutNV\userlist.yaml"
;Also try removing the folders storing them, in case they are otherwise empty.
RMDir "$LOCALAPPDATA\LOOT\Oblivion"
RMDir "$LOCALAPPDATA\LOOT\Nehrim"
RMDir "$LOCALAPPDATA\LOOT\Skyrim"
RMDir "$LOCALAPPDATA\LOOT\Fallout3"
RMDir "$LOCALAPPDATA\LOOT\FalloutNV"