diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | build/wix/bundle/bundle.wxs | 19 | ||||
-rw-r--r-- | src/SConscript | 30 |
3 files changed, 30 insertions, 20 deletions
diff --git a/.gitignore b/.gitignore index c62fdd96b9..e3b5ccd0eb 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ res/developer_skins *.mst *.cab build/wix/subdirs/*.wxs +build/wix/bundle/bundleloc.wxs *.obj *.pdb diff --git a/build/wix/bundle/bundle.wxs b/build/wix/bundle/bundle.wxs index a89b2c533b..9e00d284d0 100644 --- a/build/wix/bundle/bundle.wxs +++ b/build/wix/bundle/bundle.wxs @@ -46,24 +46,7 @@ /> <!-- LOCALIZATION --> - <Payload Id="thm-ca-ES" Compressed="yes" Name="1027\thm.wxl" SourceFile="..\Localization\mixxx_ca-ES.wxl" /> - <Payload Id="thm-cs-CZ" Compressed="yes" Name="1029\thm.wxl" SourceFile="..\Localization\mixxx_cs-CZ.wxl" /> - <Payload Id="thm-de-DE" Compressed="yes" Name="1031\thm.wxl" SourceFile="..\Localization\mixxx_de-DE.wxl" /> - <Payload Id="thm-en-us" Compressed="yes" Name="1033\thm.wxl" SourceFile="..\Localization\mixxx_en-us.wxl" /> - <Payload Id="thm-es-ES" Compressed="yes" Name="1034\thm.wxl" SourceFile="..\Localization\mixxx_es-ES.wxl" /> - <Payload Id="thm-et-EE" Compressed="yes" Name="1061\thm.wxl" SourceFile="..\Localization\mixxx_et-EE.wxl" /> - <Payload Id="thm-fr-FR" Compressed="yes" Name="1036\thm.wxl" SourceFile="..\Localization\mixxx_fr-FR.wxl" /> - <Payload Id="thm-it-IT" Compressed="yes" Name="1040\thm.wxl" SourceFile="..\Localization\mixxx_it-IT.wxl" /> - <Payload Id="thm-nl-NL" Compressed="yes" Name="1043\thm.wxl" SourceFile="..\Localization\mixxx_nl-NL.wxl" /> - <Payload Id="thm-pl-PL" Compressed="yes" Name="1045\thm.wxl" SourceFile="..\Localization\mixxx_pl-PL.wxl" /> - <Payload Id="thm-pt-BR" Compressed="yes" Name="1046\thm.wxl" SourceFile="..\Localization\mixxx_pt-BR.wxl" /> - <Payload Id="thm-pt-PT" Compressed="yes" Name="2070\thm.wxl" SourceFile="..\Localization\mixxx_pt-PT.wxl" /> - <Payload Id="thm-ro-RO" Compressed="yes" Name="1048\thm.wxl" SourceFile="..\Localization\mixxx_ro-RO.wxl" /> - <Payload Id="thm-ru-RU" Compressed="yes" Name="1049\thm.wxl" SourceFile="..\Localization\mixxx_ru-RU.wxl" /> - <Payload Id="thm-sv-SE" Compressed="yes" Name="1053\thm.wxl" SourceFile="..\Localization\mixxx_sv-SE.wxl" /> - <Payload Id="thm-tr-TR" Compressed="yes" Name="1055\thm.wxl" SourceFile="..\Localization\mixxx_tr-TR.wxl" /> - <Payload Id="thm-zh-CN" Compressed="yes" Name="2052\thm.wxl" SourceFile="..\Localization\mixxx_zh-CN.wxl" /> - <Payload Id="thm-zh-TW" Compressed="yes" Name="1028\thm.wxl" SourceFile="..\Localization\mixxx_zh-TW.wxl" /> + <PayloadGroupRef Id='BundleLoc' /> <!-- END LOCALIZATION --> </BootstrapperApplicationRef> diff --git a/src/SConscript b/src/SConscript index 5a0e2cfc6b..acbf774a69 100644 --- a/src/SConscript +++ b/src/SConscript @@ -794,12 +794,16 @@ def BuildRelease(target, source, env): print "Using Command: " + command subprocess.check_call(command) + bundlelocfile = open("build/wix/bundle/bundleloc.wxs", "w") + bundlelocfile.write("<?xml version='1.0' encoding='windows-1252'?>\n") + bundlelocfile.write("<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>\n") + bundlelocfile.write(" <Fragment Id='FragmentBundleLoc'>\n") + bundlelocfile.write(" <PayloadGroup Id='BundleLoc'>\n") + for file in glob.glob('build\wix\Localization\mixxx_*.wxl'): doc = minidom.parse(file) wixloc = doc.getElementsByTagName("WixLocalization")[0] culture = wixloc.getAttribute("Culture") - if culture == defaultLanguage: - continue strings = doc.getElementsByTagName("String") LCID = None for string in strings: @@ -811,6 +815,15 @@ def BuildRelease(target, source, env): print "LCID not found, skipping file " + file continue + bundlelocfile.write("<Payload Id=\"thm-%(culture)s\" Compressed=\"yes\" Name=\"%(LCID)s\\thm.wxl\" SourceFile=\"..\\Localization\\mixxx_%(culture)s.wxl\" />\n" %\ + {'culture': culture, + 'LCID': LCID} + ) + + # Do not build localized MSI if it's default language + if culture == defaultLanguage: + continue + print "*** Building package transform for locale %(culture)s LangID %(LCID)s" % \ {'culture': culture, 'LCID': LCID} @@ -850,6 +863,11 @@ def BuildRelease(target, source, env): print "Using Command: " + command subprocess.check_call(command) + bundlelocfile.write(" </PayloadGroup>\n") + bundlelocfile.write(" </Fragment>\n") + bundlelocfile.write("</Wix>\n") + bundlelocfile.close() + # Everything is OK, now rename the msi to final name if os.path.isfile(exe_name): os.remove(exe_name) @@ -864,6 +882,14 @@ def BuildRelease(target, source, env): 'package_name': exe_name} print "Using Command: " + command subprocess.check_call(command) + # bundle localisation references + command = '"%(wix)s\\candle.exe" -ext WixUtilExtension -ext WixBalExtension -nologo -dWINLIBPATH=%(winlibpath)s -dPlatform=%(arch)s -dMSIPackage=%(package_name)s -arch %(arch)s -out build\\wix\\bundle\\bundleloc.wixobj build\\wix\\bundle\\bundleloc.wxs' % \ + {'wix': wix_path, + 'winlibpath': build.winlib_path, + 'arch': winArch, + 'package_name': exe_name} + print "Using Command: " + command + subprocess.check_call(command) command = '"%(wix)s\\light.exe" -cc .\ -nologo -sw1076 -spdb -ext WixUtilExtension -ext WixBalExtension -dMSIPackage=%(msi_name)s -cultures:%(deflang)s -loc build\wix\Localization\mixxx_%(deflang)s.wxl -out %(package_name)s build\\wix\\bundle\\*.wixobj' % \ {'wix': wix_path, 'deflang': defaultLanguage, |