Author: loonycyborg
Date: Thu May 22 14:06:00 2008
New Revision: 26768

URL: http://svn.gna.org/viewcvs/wesnoth?rev=26768&view=rev
Log:
SCons recipe: added windows-release target.

Added:
    trunk/packaging/windows/Wesnoth.iss.in
    trunk/scons/scanreplace.py
Modified:
    trunk/packaging/windows/SConscript

Modified: trunk/packaging/windows/SConscript
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/packaging/windows/SConscript?rev=26768&r1=26767&r2=26768&view=diff
==============================================================================
--- trunk/packaging/windows/SConscript (original)
+++ trunk/packaging/windows/SConscript Thu May 22 14:06:00 2008
@@ -13,3 +13,14 @@
         res = []
     locals()[bin + "_res"] = res
     Export(bin + "_res")
+
+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")
+    Depends(iss, Value(env.Dictionary()))
+    Alias("windows-release", iss)
+    
+    docs = [ File(doc, "../..") for doc in Split("README COPYING COPYRIGHT") ]
+    datadirs = [ Dir(dir, "../..") for dir in Split("data fonts images sounds 
translations") ]
+    Alias("windows-release", env.Install(env["destdir"], docs + datadirs))

Added: trunk/packaging/windows/Wesnoth.iss.in
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/packaging/windows/Wesnoth.iss.in?rev=26768&view=auto
==============================================================================
--- trunk/packaging/windows/Wesnoth.iss.in (added)
+++ trunk/packaging/windows/Wesnoth.iss.in Thu May 22 14:06:00 2008
@@ -1,0 +1,86 @@
+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+[Setup]
+AppName=Battle for Wesnoth
+AppVerName=Battle for Wesnoth 1.5.0
+AppPublisher=David White
+AppPublisherURL=http://www.wesnoth.org
+AppSupportURL=http://www.wesnoth.org
+AppUpdatesURL=http://www.wesnoth.org
+DefaultDirName={pf}\Wesnoth 1.5.0
+DefaultGroupName=Wesnoth 1.5.0
+LicenseFile=$destdir\COPYING
+OutputBaseFilename=wesnoth-$version-windows
+OutputDir=$destdir
+Compression=lzma
+SolidCompression=yes
+SourceDir=$destdir
+UsePreviousAppDir=no
+UsePreviousGroup=no
+WizardImageFile=$packaging_dir\WindowsInstallerGraphic.bmp
+WizardSmallImageFile=$packaging_dir\windows_installer_w_881.bmp
+
+[Languages]
+Name: "english"; MessagesFile: "compiler:Default.isl"
+
+[Tasks]
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: 
"{cm:AdditionalIcons}"; Flags: unchecked
+
+[Files]
+Source: "*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs 
createallsubdirs; Components: "Main"
+
+[Icons]
+Name: "{group}\Battle for Wesnoth (Fullscreen, Safe Mode)"; Filename: 
"{app}\wesnoth.exe"; Parameters: "--fullscreen"; WorkingDir: "{app}"; 
Components: "Main"
+Name: "{group}\Battle for Wesnoth (Fullscreen)"; Filename: 
"{app}\wesnoth_i486.exe"; Parameters: "--fullscreen"; WorkingDir: "{app}"; 
Components: "Processor\486"
+Name: "{group}\Battle for Wesnoth (Fullscreen)"; Filename: 
"{app}\wesnoth_p2.exe"; Parameters: "--fullscreen"; WorkingDir: "{app}"; 
Components: "Processor\P2"
+Name: "{group}\Battle for Wesnoth (Fullscreen)"; Filename: 
"{app}\wesnoth_p4.exe"; Parameters: "--fullscreen"; WorkingDir: "{app}"; 
Components: "Processor\P4"
+Name: "{group}\Battle for Wesnoth (Fullscreen)"; Filename: 
"{app}\wesnoth_k6.exe"; Parameters: "--fullscreen"; WorkingDir: "{app}"; 
Components: "Processor\K6"
+Name: "{group}\Battle for Wesnoth (Fullscreen)"; Filename: 
"{app}\wesnoth_athlon.exe"; Parameters: "--fullscreen"; WorkingDir: "{app}"; 
Components: "Processor\Athlon"
+Name: "{group}\Battle for Wesnoth (Windowed, Safe Mode)"; Filename: 
"{app}\wesnoth.exe"; Parameters: "--windowed"; WorkingDir: "{app}"; Components: 
"Main";
+Name: "{group}\Battle for Wesnoth (Windowed)"; Filename: 
"{app}\wesnoth_i486.exe"; Parameters: "--windowed"; WorkingDir: "{app}"; 
Components: "Processor\486"
+Name: "{group}\Battle for Wesnoth (Windowed)"; Filename: 
"{app}\wesnoth_p2.exe"; Parameters: "--windowed"; WorkingDir: "{app}"; 
Components: "Processor\P2"
+Name: "{group}\Battle for Wesnoth (Windowed)"; Filename: 
"{app}\wesnoth_p4.exe"; Parameters: "--windowed"; WorkingDir: "{app}"; 
Components: "Processor\P4"
+Name: "{group}\Battle for Wesnoth (Windowed)"; Filename: 
"{app}\wesnoth_k6.exe"; Parameters: "--windowed"; WorkingDir: "{app}"; 
Components: "Processor\K6"
+Name: "{group}\Battle for Wesnoth (Windowed)"; Filename: 
"{app}\wesnoth_athlon.exe"; Parameters: "--windowed"; WorkingDir: "{app}"; 
Components: "Processor\Athlon"
+Name: "{group}\Map Editor (Safe Mode)"; Filename: "{app}\editor.exe"; 
WorkingDir: "{app}"; Components: "Main"
+Name: "{group}\Map Editor"; Filename: "{app}\editor_i486.exe"; WorkingDir: 
"{app}"; Components: "Processor\486"
+Name: "{group}\Map Editor"; Filename: "{app}\editor_p2.exe"; WorkingDir: 
"{app}"; Components: "Processor\P2"
+Name: "{group}\Map Editor"; Filename: "{app}\editor_p4.exe"; WorkingDir: 
"{app}"; Components: "Processor\P4"
+Name: "{group}\Map Editor"; Filename: "{app}\editor_k6.exe"; WorkingDir: 
"{app}"; Components: "Processor\K6"
+Name: "{group}\Map Editor"; Filename: "{app}\editor_athlon.exe"; WorkingDir: 
"{app}"; Components: "Processor\Athlon"
+Name: "{group}\Multiplayer Server (Safe Mode)"; Filename: 
"{app}\wesnothd.exe"; WorkingDir: "{app}"; Components: "Main"
+Name: "{group}\Multiplayer Server"; Filename: "{app}\wesnothd_i486.exe"; 
WorkingDir: "{app}"; Components: "Processor\486"
+Name: "{group}\Multiplayer Server"; Filename: "{app}\wesnothd_p2.exe"; 
WorkingDir: "{app}"; Components: "Processor\P2"
+Name: "{group}\Multiplayer Server"; Filename: "{app}\wesnothd_p4.exe"; 
WorkingDir: "{app}"; Components: "Processor\P4"
+Name: "{group}\Multiplayer Server"; Filename: "{app}\wesnothd_k6.exe"; 
WorkingDir: "{app}"; Components: "Processor\K6"
+Name: "{group}\Multiplayer Server"; Filename: "{app}\wesnothd_athlon.exe"; 
WorkingDir: "{app}"; Components: "Processor\Athlon"
+Name: "{group}\Manual"; Filename: "{app}\manual_html\manual.en.html"; 
WorkingDir: "{app}"; Components: "Main"
+Name: "{group}\Uninstall Battle for Wesnoth"; Filename: "{uninstallexe}"
+Name: "{userdesktop}\Battle for Wesnoth"; Filename: "{app}\wesnoth_i486.exe"; 
Tasks: desktopicon; WorkingDir: "{app}"; Components: "Processor\486"
+Name: "{userdesktop}\Battle for Wesnoth"; Filename: "{app}\wesnoth_p2.exe"; 
Tasks: desktopicon; WorkingDir: "{app}"; Components: "Processor\P2"
+Name: "{userdesktop}\Battle for Wesnoth"; Filename: "{app}\wesnoth_p4.exe"; 
Tasks: desktopicon; WorkingDir: "{app}"; Components: "Processor\P4"
+Name: "{userdesktop}\Battle for Wesnoth"; Filename: "{app}\wesnoth_k6.exe"; 
Tasks: desktopicon; WorkingDir: "{app}"; Components: "Processor\K6"
+Name: "{userdesktop}\Battle for Wesnoth"; Filename: 
"{app}\wesnoth_athlon.exe"; Tasks: desktopicon; WorkingDir: "{app}"; 
Components: "Processor\Athlon"
+Name: "{userdesktop}\Battle for Wesnoth (Safe Mode)"; Filename: 
"{app}\wesnoth.exe"; Tasks: desktopicon; WorkingDir: "{app}"; Components: "Main"
+
+[Run]
+Filename: "{app}\wesnoth_i486.exe"; Description: "Launch Battle for Wesnoth"; 
Flags: nowait postinstall skipifsilent; WorkingDir: "{app}"; Components: 
"Processor\486"
+Filename: "{app}\wesnoth_p2.exe"; Description: "Launch Battle for Wesnoth"; 
Flags: nowait postinstall skipifsilent; WorkingDir: "{app}"; Components: 
"Processor\P2"
+Filename: "{app}\wesnoth_p4.exe"; Description: "Launch Battle for Wesnoth"; 
Flags: nowait postinstall skipifsilent; WorkingDir: "{app}"; Components: 
"Processor\P4"
+Filename: "{app}\wesnoth_k6.exe"; Description: "Launch Battle for Wesnoth"; 
Flags: nowait postinstall skipifsilent; WorkingDir: "{app}"; Components: 
"Processor\K6"
+Filename: "{app}\wesnoth_athlon.exe"; Description: "Launch Battle for 
Wesnoth"; Flags: nowait postinstall skipifsilent; WorkingDir: "{app}"; 
Components: "Processor\Athlon"
+
+[Types]
+Name: "full"; Description: "Wesnoth complete installation"; Flags: iscustom
+
+[Components]
+Name: "Main"; Description: "Main Application"; Types: full; Flags: fixed
+Name: "Processor"; Description: "Processor Optimization"; Types: full; Flags: 
fixed
+Name: "Processor\All"; Description: "All CPU's"; Types: full; Flags: fixed
+Name: "Processor\486"; Description: "Intel 486"; Types: full; Flags: exclusive
+Name: "Processor\P2"; Description: "Intel Pentium 2"; Types: full; Flags: 
exclusive
+Name: "Processor\P4"; Description: "Intel Pentium 4"; Types: full; Flags: 
exclusive
+Name: "Processor\K6"; Description: "AMD K6"; Types: full; Flags: exclusive
+Name: "Processor\Athlon"; Description: "AMD Athlon"; Types: full; Flags: 
exclusive
+

Added: trunk/scons/scanreplace.py
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/scons/scanreplace.py?rev=26768&view=auto
==============================================================================
--- trunk/scons/scanreplace.py (added)
+++ trunk/scons/scanreplace.py Thu May 22 14:06:00 2008
@@ -1,0 +1,18 @@
+# vi: syntax=python:et:ts=4
+# Shamelessly stolen from scons wiki
+# http://www.scons.org/wiki/ReplacementBuilder
+
+from string import Template
+
+def replace_action(target, source, env):
+       open(str(target[0]), 'w').write(Template(open(str(source[0]), 
'r').read()).safe_substitute(env))
+
+def replace_string(target, source, env):
+    return "building '%s' from '%s'" % (str(target[0]), str(source[0]))
+
+def generate(env, **kw):
+    action = env.Action(replace_action, replace_string)
+    env['BUILDERS']['ScanReplace'] = env.Builder(action=action, 
src_suffix='.in', single_source=True)
+
+def exists(env):
+    return True


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to