diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-04-24 17:47:32 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-04-24 17:47:32 (GMT) |
commit | 2fb37ba9d088e0027560a7d4b2b0617043569d55 (patch) | |
tree | 160b42d97d37ea42321d1ee4b2a2dd9538a5e404 | |
parent | 36a00c5338df2df1be827c014dff63bfbf16cb34 (diff) | |
download | swift-contrib-2fb37ba9d088e0027560a7d4b2b0617043569d55.zip swift-contrib-2fb37ba9d088e0027560a7d4b2b0617043569d55.tar.bz2 |
WiX updates.
Show icon in Add/Remove programs dialog.
Support upgrading.
Render COPYING file correctly.
Resolves: #1096, #1094, #1093
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | BuildTools/SCons/SConscript.boot | 2 | ||||
-rw-r--r-- | Swift/Packaging/WiX/Swift.wxs | 8 | ||||
-rw-r--r-- | Swift/QtUI/SConscript | 4 |
4 files changed, 12 insertions, 7 deletions
@@ -40,9 +40,14 @@ checker-report.xml VERSION.* cppcheck.log /build /.settings/ /nbproject/private/ 3rdParty/LibMiniUPnPc/src/miniupnpc/miniupnpcstrings.h *.sublime-workspace /xmppbench /.metadata +/Swift/Packaging/WiX/*.msi +/Swift/Packaging/WiX/*.wixpdb +/Swift/Packaging/WiX/*.wixobj +/Swift/Packaging/WiX/gen_files.wxs +/Swift/Packaging/WiX/variables.wxs diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index f7956b5..a3a5c6d 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -24,19 +24,19 @@ vars.Add(EnumVariable("target", "Choose a target platform for compilation", "nat vars.Add(BoolVariable("swift_mobile", "Build mobile Swift", "no")) if os.name != "nt" : vars.Add(BoolVariable("coverage", "Compile with coverage information", "no")) if os.name == "posix" : vars.Add(BoolVariable("valgrind", "Run tests with valgrind", "no")) if os.name == "mac" or (os.name == "posix" and os.uname()[0] == "Darwin"): vars.Add(BoolVariable("universal", "Create universal binaries", "no")) vars.Add(BoolVariable("mac105", "Link against the 10.5 frameworks", "no")) if os.name == "nt" : - vars.Add(PathVariable("vcredist", "MSVC redistributable dir", "", PathVariable.PathAccept)) + vars.Add(PathVariable("vcredist", "MSVC redistributable dir", None, PathVariable.PathAccept)) if os.name == "nt" : vars.Add(PathVariable("wix_bindir", "Path to WiX binaries", "", PathVariable.PathAccept)) if os.name == "nt" : vars.Add(PackageVariable("bonjour", "Bonjour SDK location", "yes")) vars.Add(PackageVariable("openssl", "OpenSSL location", "yes")) vars.Add(PathVariable("boost_includedir", "Boost headers location", None, PathVariable.PathAccept)) vars.Add(PathVariable("boost_libdir", "Boost library location", None, PathVariable.PathAccept)) vars.Add(PathVariable("expat_includedir", "Expat headers location", None, PathVariable.PathAccept)) vars.Add(PathVariable("expat_libdir", "Expat library location", None, PathVariable.PathAccept)) diff --git a/Swift/Packaging/WiX/Swift.wxs b/Swift/Packaging/WiX/Swift.wxs index 7ac96d5..e811746 100644 --- a/Swift/Packaging/WiX/Swift.wxs +++ b/Swift/Packaging/WiX/Swift.wxs @@ -1,21 +1,22 @@ <?xml version='1.0' encoding='utf-8'?> <!-- For a sensible tutorial on WiX, see http://wix.tramontana.co.hu/tutorial --> <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'> <?include variables.wxs ?> - <Product Name='Swift' Id='D7F276D5-BA67-421E-817B-9E7AB4B7D2BF' UpgradeCode='D7F276D5-BA67-421E-817B-9E7AB4B7D2BF' Language='1033' Codepage='1252' Version='0.0.1' Manufacturer='Swift.im'> + <Product Name='Swift' Id='*' UpgradeCode='D7F276D5-BA67-421E-817B-9E7AB4B7D2BF' Language='1033' Codepage='1252' Version='0.0.1' Manufacturer='Swift.im'> <Package Id='*' Keywords='Installer' Description="Swift Installer" Comments="Swift is available under the GPL version 3" Manufacturer="Swift.im" InstallerVersion='300' Languages='1033' Compressed='yes' SummaryCodepage='1252'/> <Media Id='1' Cabinet='Swift.cab' EmbedCab='yes'/> + <MajorUpgrade DowngradeErrorMessage="A newer version is already installed. Remove this version if you wish to downgrade." /> <!--<Upgrade Id='D7F276D5-BA67-421E-817B-9E7AB4B7D2BF'> <UpgradeVersion OnlyDetect='no' Property='PREVIOUSFOUND' Minimum='0.0.1' IncludeMinimum='yes' Maximum='2.0.0' IncludeMaximum='no'/> </Upgrade>--> <!-- This means it will upgrade any existing version up to but not including 2.0. This'll mean we can ship nightlies and we can upgrade to 2.0 from them. It also means we can 'upgrade' from e.g. 1.0 to 0.9. We want to change this so only real upgrades are allowed. The numbering scheme probably needs to therefore be major.minor.commitssinceversion --> @@ -54,13 +55,12 @@ <ComponentRef Id='Shortcuts' /> </Feature> <!--<UIRef Id='WixUI_Advanced'/>--> <!--<UIRef Id="WixUI_Minimal"/>--> <UIRef Id="WixUI_Mondo"/> <WixVariable Id='WixUILicenseRtf' Value='COPYING.rtf'/> <Icon Id="Swift.exe" SourceFile="Swift.exe" /> - - + <Property Id="ARPPRODUCTICON" Value="Swift.exe"/> <!-- The icon in the "Programs" dialog --> </Product> -</Wix>
\ No newline at end of file +</Wix> diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index 0313f1e..ea13b8d 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -279,29 +279,29 @@ if env["PLATFORM"] == "win32" : # "/DmsvccRedistributableDir=\"" + env["vcredist"] + "\"", # "/DbuildVersion=" + myenv["SWIFT_VERSION"] # ]) #myenv.Nsis("../Packaging/nsis/swift.nsi") #myenv.WiX("../Packaging/wix/swift.msi", ["../Packaging/WiX/Swift.wxs"]) if env["SCONS_STAGE"] == "build" and env.get("wix_bindir", None): def convertToRTF(env, target, source) : infile = open(source[0].abspath, 'r') outfile = open(target[0].abspath, 'w') - outfile.write('{\\rtf1\\ansi{\\fonttbl\\f0\\fswiss Helvetica;}\\f0\\pard\n') + outfile.write('{\\rtf1\\ansi{\\fonttbl\\f0\\fswiss Helvetica;}\\fs16\\f0\\pard\n') for line in infile: for char in line.decode("utf-8") : if ord(char) > 127 : # FIXME: This is incorrect, because it only works for latin1. # The correct way is \u<decimal utf16 point>? , but this is more # work outfile.write("\\'%X" % ord(char)) else : outfile.write(char) - outfile.write('\\par') + outfile.write('\\par ') outfile.write('}') outfile.close() infile.close() env.Command(["Swift/COPYING.rtf"], ["../../COPYING"], convertToRTF) wixvariables = {'VCCRTFile': env.get("vcredist", "c:\\Program Files\\Common Files\\Merge Modules") + "\\Microsoft_VC90_CRT_x86.msm"} wixincludecontent = "<Include>" for key in wixvariables: wixincludecontent += "<?define %s = \"%s\" ?>" % (key, wixvariables[key]) |