From 6a3f20fad135299d89d17c4df41d2e8744a7bcf8 Mon Sep 17 00:00:00 2001 From: fekt Date: Thu, 24 Mar 2022 17:50:09 +0000 Subject: [PATCH 1/3] Documentation for creating SilentDragonLite MSI --- ...ite-msi-installer-for-windows-with-wixl.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 advanced/creating-silent-dragon-lite-msi-installer-for-windows-with-wixl.md diff --git a/advanced/creating-silent-dragon-lite-msi-installer-for-windows-with-wixl.md b/advanced/creating-silent-dragon-lite-msi-installer-for-windows-with-wixl.md new file mode 100644 index 0000000..a2a7e57 --- /dev/null +++ b/advanced/creating-silent-dragon-lite-msi-installer-for-windows-with-wixl.md @@ -0,0 +1,82 @@ +# Creating SilentDragonLite MSI installer for Windows with msitools and wixl +This documentation is for creating a SilentDragonLite MSI installer for Windows using msitools and wixl. Documentation for msitools is here: https://wiki.gnome.org/msitools Documentation for wixl can refer to WiX toolset as it tries to share the same syntax: https://wixtoolset.org/documentation/manual/v3/ +This was tested on Ubuntu 20.04.4 LTS +## Install msitools and wixl +``` +sudo apt-get -y install msitools wixl +``` +## Download latest SilentDragonLite Windows release and unzip +Latest releases located here: https://git.hush.is/hush/SilentDragonLite/releases Example below is for SilentDragonLite 1.5.2 +``` +wget https://git.hush.is/attachments/37c68ff3-725c-4ceb-b28a-8c131739585c +unzip 37c68ff3-725c-4ceb-b28a-8c131739585c +``` +This will unzip into a directory named SilentDragonLite-v1.5.2-win +``` +cd SilentDragonLite-v1.5.2-win +``` +## Copy silentdragon.ico to SilentDragon directory +The icon file `silentdragon.ico` is currently not included in release zip, but is required to create an MSI installer with a smaller size. Setting icon SourceFile in the .wxs file to SilentDragonLite.exe will duplicate the .exe and make the installer over 100MB instead of ~80MB. How you get this .ico file is up to you. I extracted from .exe on Windows. Maybe it will be included in .zip release in the future to make this easier for anyone trying to create a MSI file for the first time. + +## Create WiX source file (.wxs) +This is an XML file. You should name it what you want the .msi file to be named IE: `SilentDragonLite-1.5.2.wxs` +Below is a copy of the contents of the `SilentDragon-1.5.2.wxs` file Note that GUID's all need to be unique. This will create shortcuts to SilentDragon on desktop and in the start menu as well as have uninstall support from Add/Remove Programs. A tutorial that explains the basics of creating these files can be found here: https://www.firegiant.com/wix/tutorial/ +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` +## Build MSI file from WiX source file +``` +wixl -v SilentDragonLite-1.5.2.wxs +``` + +This will create a `SilentDragonLite-1.5.2.msi` file in the same directory which can then be distributed. If it created without error and is larger than 0kb, congratulations! \ No newline at end of file From 06673d1ffd13bd2a3388799614bc067c7bc1ca37 Mon Sep 17 00:00:00 2001 From: fekt Date: Thu, 24 Mar 2022 18:11:36 +0000 Subject: [PATCH 2/3] Minor typo fixes --- ...-silent-dragon-lite-msi-installer-for-windows-with-wixl.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/creating-silent-dragon-lite-msi-installer-for-windows-with-wixl.md b/advanced/creating-silent-dragon-lite-msi-installer-for-windows-with-wixl.md index a2a7e57..5c82b0f 100644 --- a/advanced/creating-silent-dragon-lite-msi-installer-for-windows-with-wixl.md +++ b/advanced/creating-silent-dragon-lite-msi-installer-for-windows-with-wixl.md @@ -20,7 +20,7 @@ The icon file `silentdragon.ico` is currently not included in release zip, but i ## Create WiX source file (.wxs) This is an XML file. You should name it what you want the .msi file to be named IE: `SilentDragonLite-1.5.2.wxs` -Below is a copy of the contents of the `SilentDragon-1.5.2.wxs` file Note that GUID's all need to be unique. This will create shortcuts to SilentDragon on desktop and in the start menu as well as have uninstall support from Add/Remove Programs. A tutorial that explains the basics of creating these files can be found here: https://www.firegiant.com/wix/tutorial/ +Below is a copy of the contents of the `SilentDragonLite-1.5.2.wxs` file Note that GUID's all need to be unique. This will create shortcuts to SilentDragon on desktop and in the start menu as well as have uninstall support from Add/Remove Programs. A tutorial that explains the basics of creating these files can be found here: https://www.firegiant.com/wix/tutorial/ ``` @@ -53,7 +53,7 @@ Below is a copy of the contents of the `SilentDragon-1.5.2.wxs` file Note that G - From 2f0ed73a79be6cc4cb5ee5663e3dfb743128ba25 Mon Sep 17 00:00:00 2001 From: fekt Date: Fri, 25 Mar 2022 21:42:47 +0000 Subject: [PATCH 3/3] Notes on work-around for corrupt cabinet file --- ...ite-msi-installer-for-windows-with-wixl.md | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/advanced/creating-silent-dragon-lite-msi-installer-for-windows-with-wixl.md b/advanced/creating-silent-dragon-lite-msi-installer-for-windows-with-wixl.md index 5c82b0f..dc9dab9 100644 --- a/advanced/creating-silent-dragon-lite-msi-installer-for-windows-with-wixl.md +++ b/advanced/creating-silent-dragon-lite-msi-installer-for-windows-with-wixl.md @@ -15,12 +15,12 @@ This will unzip into a directory named SilentDragonLite-v1.5.2-win ``` cd SilentDragonLite-v1.5.2-win ``` -## Copy silentdragon.ico to SilentDragon directory +## Copy silentdragon.ico to SilentDragonLite directory The icon file `silentdragon.ico` is currently not included in release zip, but is required to create an MSI installer with a smaller size. Setting icon SourceFile in the .wxs file to SilentDragonLite.exe will duplicate the .exe and make the installer over 100MB instead of ~80MB. How you get this .ico file is up to you. I extracted from .exe on Windows. Maybe it will be included in .zip release in the future to make this easier for anyone trying to create a MSI file for the first time. ## Create WiX source file (.wxs) This is an XML file. You should name it what you want the .msi file to be named IE: `SilentDragonLite-1.5.2.wxs` -Below is a copy of the contents of the `SilentDragonLite-1.5.2.wxs` file Note that GUID's all need to be unique. This will create shortcuts to SilentDragon on desktop and in the start menu as well as have uninstall support from Add/Remove Programs. A tutorial that explains the basics of creating these files can be found here: https://www.firegiant.com/wix/tutorial/ +Below is a copy of the contents of the `SilentDragonLite-1.5.2.wxs` file. Note that GUID's all need to be unique. This will create shortcuts to SilentDragonLite on desktop and in the start menu as well as have uninstall support from Add/Remove Programs. A tutorial that explains the basics of creating these files can be found here: https://www.firegiant.com/wix/tutorial/ ``` @@ -79,4 +79,23 @@ Below is a copy of the contents of the `SilentDragonLite-1.5.2.wxs` file Note th wixl -v SilentDragonLite-1.5.2.wxs ``` -This will create a `SilentDragonLite-1.5.2.msi` file in the same directory which can then be distributed. If it created without error and is larger than 0kb, congratulations! \ No newline at end of file +This will create a `SilentDragonLite-1.5.2.msi` file in the same directory which can then be distributed. If it created without error and is larger than 0kb, congratulations! + + +## Potential known issue and work-around if wixl generates MSI with corrupt cabinet file +There is a known issue where wixl may generate a corrupt cabinet file, causing the Windows installer to fail with a corrupt cabinet file error. This appears related to the file size of `SilentDragonLite.exe` and reported issue with gcab: https://gitlab.gnome.org/GNOME/gcab/-/issues/16 + +File size where this becomes an issue is not exactly known, but it has occurred when `SilentDragonLite.exe` was ~100 MB. There is no cabinet file corruption when compressing `SilentDragonLite.exe` to ~80 MB. UPX is used to compress the executable and then MSI is created again: https://upx.github.io/ + +### Install UPX ### +``` +sudo apt-get install upx +``` +### Compress SilentDragonLite.exe ### +``` +upx SilentDragonLite.exe --force +``` +### Re-create MSI using compressed exe ### +``` +wixl -v SilentDragonLite-1.5.2.wxs +``` \ No newline at end of file