Skip to content

Commit

Permalink
Windows installer: Use FILE /oname to avoid copying files
Browse files Browse the repository at this point in the history
  • Loading branch information
aquileia committed Aug 8, 2015
1 parent 1c3fa27 commit 4a272b3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
5 changes: 1 addition & 4 deletions SConstruct
Expand Up @@ -732,13 +732,10 @@ env.Alias('data-dist', data_tarball)
# Windows installer
#

text_builder = Builder(action = Copy("$TARGET", "$SOURCE"), single_source = True, suffix = ".txt")
env.WindowsInstaller([
wesnoth, wesnothd,
Dir(installable_subs), env["nls"] and Dir("translations") or [],
glob("*.dll"),
text_builder(env, source = Split("README.md copyright COPYING changelog players_changelog")),
"cwesnoth.cmd"
glob("*.dll")
])

#
Expand Down
16 changes: 15 additions & 1 deletion packaging/windows/Wesnoth.nsi.in
Expand Up @@ -105,7 +105,14 @@ Section "Battle for Wesnoth" BfWSection

SetOutPath "$INSTDIR"
File packaging\windows\wesnoth_editor-icon.ico


File "/oname=README.txt" README.md
File "/oname=copyright.txt" copyright
File "/oname=COPYING.txt" COPYING
File "/oname=changelog.txt" changelog
File "/oname=players_changelog.txt" players_changelog
File cwesnoth.cmd

%NSIS_INSTALL_FILES

SetOutPath "$INSTDIR"
Expand Down Expand Up @@ -221,6 +228,13 @@ Section "Uninstall"
%NSIS_UNINSTALL_FILES
Delete "$INSTDIR\wesnoth_editor-icon.ico"
RMDir /r "$INSTDIR\manual"
Delete $INSTDIR\std*.txt
Delete $INSTDIR\README.txt
Delete $INSTDIR\copyright.txt
Delete $INSTDIR\COPYING.txt
Delete $INSTDIR\changelog.txt
Delete $INSTDIR\players_changelog.txt
Delete $INSTDIR\cwesnoth.cmd

Delete "$INSTDIR\Uninstall.exe"

Expand Down

0 comments on commit 4a272b3

Please sign in to comment.