diff options
author | Sebastien Blaisot <sebastien@blaisot.org> | 2017-08-10 11:08:30 +0200 |
---|---|---|
committer | Sebastien Blaisot <sebastien@blaisot.org> | 2017-08-10 12:19:43 +0200 |
commit | 045622f3325f431fa8f4952797500826145f5ebb (patch) | |
tree | 5e7d890ec2ab90b67b81b7442921af2de4dec01d | |
parent | 822675b78fb73576d1b23e7bc4addc0af2c63c69 (diff) |
(wix) improve productID autogeneration
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | build/wix/ProductID.wxi.in | 4 | ||||
-rw-r--r-- | build/wix/mixxx.wxs (renamed from build/wix/mixxx.wxs.tmpl) | 34 | ||||
-rw-r--r-- | src/SConscript | 9 |
4 files changed, 32 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore index c92d3226d4..6c45e0e8d2 100644 --- a/.gitignore +++ b/.gitignore @@ -49,7 +49,7 @@ build/wix/subdirs/*.wxs # The following 2 files are autogenerated by scons at release time # based on .tmpl template file for the second one. build/wix/bundle/bundleloc.wxs -build/wix/mixxx.wxs +build/wix/ProductID.wxi *.obj *.pdb diff --git a/build/wix/ProductID.wxi.in b/build/wix/ProductID.wxi.in new file mode 100644 index 0000000000..216e182e0a --- /dev/null +++ b/build/wix/ProductID.wxi.in @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<Include> + <?define ProductID=@PRODUCT_ID@ ?> +</Include> diff --git a/build/wix/mixxx.wxs.tmpl b/build/wix/mixxx.wxs index c261e7bce2..a0a8064f63 100644 --- a/build/wix/mixxx.wxs.tmpl +++ b/build/wix/mixxx.wxs @@ -14,6 +14,13 @@ <!-- ==================================================================================== + Includes + --> + + <?include ProductID.wxi ?> + + <!-- + ==================================================================================== Defines & Variables --> @@ -54,7 +61,7 @@ <!-- The upgrade code must never change as long as the product lives! --> <!-- Product IDs must be autogenerated (*) or else major upgrades will not work --> - <Product Id="==SCONS-GENERATED-PRODUCTID==" + <Product Id="$(var.ProductID)" Name="!(loc.ApplicationName)" Language="!(loc.Language)" Version="$(var.VersionNumber)" @@ -105,7 +112,7 @@ Type="raw" Win64="yes" /> <?endif?> - </Property> + </Property> <!-- This will search if mixxx is already installed in another bitWidth --> <Property Id="OTHERBITWIDTHINSTALLED"> @@ -377,6 +384,7 @@ <ComponentGroupRef Id='keyboardComp' /> <ComponentGroupRef Id='controllersComp' /> <ComponentGroupRef Id='skinsComp' /> + <?if $(var.PDB) = "yes" ?> <Feature Id="PDBFeature" Title="!(loc.FeaturePDBTitle)" @@ -387,6 +395,7 @@ <ComponentGroupRef Id='mainPDBCompGroup' /> </Feature> <?endif?> + <Feature Id="DesktopShortcutFeature" Title="!(loc.FeatureDesktopShortcutTitle)" Description="!(loc.FeatureDesktopShortcutDescription)" @@ -395,6 +404,7 @@ Level="3"> <ComponentRef Id="DesktopShortcutComp" /> </Feature> + </Feature> <!-- A feature block for translations --> @@ -423,20 +433,20 @@ <WixVariable Id="WixUIBannerBmp" Value="images\banner.bmp" /> <WixVariable Id="WixUIDialogBmp" Value="images\dialog.bmp" /> -<UI Id="MyWixUI_FeatureTree"> - <UIRef Id="WixUI_FeatureTree" /> - <UIRef Id="WixUI_ErrorProgressText" /> + <UI Id="MyWixUI_FeatureTree"> + <UIRef Id="WixUI_FeatureTree" /> + <UIRef Id="WixUI_ErrorProgressText" /> - <DialogRef Id="WarningDlg" /> + <DialogRef Id="WarningDlg" /> - <Publish Dialog="WarningDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish> - <Publish Dialog="WarningDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish> + <Publish Dialog="WarningDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish> + <Publish Dialog="WarningDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish> - <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="WarningDlg"><![CDATA[( NOT MyWarningText1 = " " ) OR ( NOT MyWarningText2 = " ") OR ( NOT MyWarningText3 = " ")]]></Publish> - <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg"><![CDATA[( MyWarningText1 = " " ) AND ( MyWarningText2 = " " ) AND ( MyWarningText3 = " " )]]></Publish> + <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="WarningDlg"><![CDATA[( NOT MyWarningText1 = " " ) OR ( NOT MyWarningText2 = " ") OR ( NOT MyWarningText3 = " ")]]></Publish> + <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg"><![CDATA[( MyWarningText1 = " " ) AND ( MyWarningText2 = " " ) AND ( MyWarningText3 = " " )]]></Publish> - <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WarningDlg"><![CDATA[( NOT MyWarningText1 = " " ) OR ( NOT MyWarningText2 = " ") OR ( NOT MyWarningText3 = " ")]]></Publish> -</UI> + <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WarningDlg"><![CDATA[( NOT MyWarningText1 = " " ) OR ( NOT MyWarningText2 = " ") OR ( NOT MyWarningText3 = " ")]]></Publish> + </UI> </Product> </Wix> diff --git a/src/SConscript b/src/SConscript index 74b118ffd6..2a3341d9fa 100644 --- a/src/SConscript +++ b/src/SConscript @@ -691,10 +691,12 @@ def BuildRelease(target, source, env): # Generating random ProductID (should change on every run) # and put it in mixxx.wxs using the template ProductID = str(uuid.uuid1()).upper() - with open("build/wix/mixxx.wxs.tmpl", "rt") as fin: - with open("build/wix/mixxx.wxs", "wt") as fout: + with open("build/wix/ProductID.wxi.in", "rt") as fin: + with open("build/wix/ProductID.wxi", "wt") as fout: for line in fin: - fout.write(line.replace('==SCONS-GENERATED-PRODUCTID==', ProductID)) + fout.write(line.replace('@PRODUCT_ID@', ProductID)) + fin.close() + fout.close() # The default language defaultLanguage="en-us" @@ -916,7 +918,6 @@ def BuildRelease(target, source, env): os.remove(file) for file in glob.glob('build\wix\subdirs\*.wxs'): os.remove(file) - os.remove("build/wix/mixxx.wxs") os.remove(exe_name) else: |