Made "windows-release" target compile and install binaries for all arches.
This commit is contained in:
parent
7435f4a5d2
commit
c445a6f117
3 changed files with 26 additions and 7 deletions
|
@ -54,6 +54,7 @@ opts.AddOptions(
|
|||
PathOption('prefix', 'autotools-style installation prefix', "/usr/local", PathOption.PathAccept),
|
||||
PathOption('prefsdir', 'user preferences directory', ".wesnoth", PathOption.PathAccept),
|
||||
PathOption('destdir', 'prefix to add to all installation paths.', "", PathOption.PathAccept),
|
||||
PathOption('windows_release_dir', 'Directory where windows release will be prepared.', "", PathOption.PathAccept),
|
||||
BoolOption('prereqs','abort if prerequisites cannot be detected',True),
|
||||
('program_suffix', 'suffix to append to names of installed programs',""),
|
||||
BoolOption('python', 'Enable in-game python extensions.', True),
|
||||
|
|
|
@ -17,12 +17,30 @@ for bin in binaries:
|
|||
if "windows-release" in COMMAND_LINE_TARGETS:
|
||||
env.Tool("scanreplace", toolpath = ["../../scons"])
|
||||
env["packaging_dir"] = Dir(".").abspath
|
||||
iss = env.ScanReplace(join(env["destdir"], "Wesnoth.iss"), "Wesnoth.iss.in")
|
||||
iss = env.ScanReplace(join(env["windows_release_dir"], "Wesnoth.iss"), "Wesnoth.iss.in")
|
||||
Depends(iss, Value(env.Dictionary()))
|
||||
Alias("windows-release", iss)
|
||||
|
||||
docs = [ File(doc, "../..") for doc in Split("README COPYING COPYRIGHT") ]
|
||||
docs = [ File(doc, "../..") for doc in Split("README COPYING copyright") ]
|
||||
datadirs = [ Dir(dir, "../..") for dir in Split("data fonts images sounds translations") ]
|
||||
dlls = glob("../../*.dll")
|
||||
Alias("windows-release", env.InstallFiltered(Dir(env["destdir"]), datadirs))
|
||||
Alias("windows-release", env.Install(env["destdir"], docs + dlls))
|
||||
Alias("windows-release", env.InstallFiltered(Dir(env["windows_release_dir"]), datadirs))
|
||||
Alias("windows-release", env.Install(env["windows_release_dir"], docs + dlls))
|
||||
|
||||
release_binaries = ["wesnoth", "wesnoth_editor"]
|
||||
builds = {
|
||||
"" : "",
|
||||
"_i486" : "-march=i486",
|
||||
"_p2" : "-march=pentium2",
|
||||
"_p4" : "-march=pentium4",
|
||||
"_k6" : "-march=k6",
|
||||
"_athlon" : "-march=athlon",
|
||||
}
|
||||
for build in builds.keys():
|
||||
SConscript("../../src/SConscript",
|
||||
build_dir = "../../build/release_win" + build,
|
||||
exports = {"env":env.Clone(CXXFLAGS = builds[build])}
|
||||
)
|
||||
Import(release_binaries)
|
||||
for bin in release_binaries:
|
||||
Alias("windows-release", env.InstallAs("$windows_release_dir/%s%s$PROGSUFFIX" % (bin, build), eval(bin)))
|
||||
|
|
|
@ -10,12 +10,12 @@ AppSupportURL=http://www.wesnoth.org
|
|||
AppUpdatesURL=http://www.wesnoth.org
|
||||
DefaultDirName={pf}\Wesnoth 1.5.0
|
||||
DefaultGroupName=Wesnoth 1.5.0
|
||||
LicenseFile=$destdir\COPYING
|
||||
LicenseFile=$windows_release_dir\COPYING
|
||||
OutputBaseFilename=wesnoth-$version-windows
|
||||
OutputDir=$destdir
|
||||
OutputDir=$windows_release_dir
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
SourceDir=$destdir
|
||||
SourceDir=$windows_release_dir
|
||||
UsePreviousAppDir=no
|
||||
UsePreviousGroup=no
|
||||
WizardImageFile=$packaging_dir\WindowsInstallerGraphic.bmp
|
||||
|
|
Loading…
Add table
Reference in a new issue