FAQ Does my application need an installer?
The truth is, most traditional Unity applications wonāt need one. For gaming applications, you will probably end up uploading to a store like Steam, which already handles packaging and distribution.
Having an installer is mostly useful for enterprise applications, which are nowadays increasingly created with Unity.
You can read more about the benefits of MSI for this use case here.
Does having an installer remove the Windows Security popup that can appear when running a Unity application on a different computer?
Having an installer does not solve the issue that Microsoft SmartScreen might notify its users with a message that your app is potentially unsafe. The general advice on how to solve this is, that you should both:
Code-sign your application by purchasing a certificate from a Certificate Authority.
Get your application out to enough users so SmartScreen eventually considers it safe.
(According to this thread , the message can still pop up even when youāve code-signed your application. So it seems signing alone is not enough.)
Technical Details
General
This asset is distributed as an embedded package in Packages/com.doji.wix/
Platforms
Windows Installer is a technology thatās specific to the Windows platform. As such, it is only available for the āWindows Standaloneā build target
Prerequisites for development/build environment:
Operating System: Windows (Mac & Linux not supported)
(The asset includes a wizard, making the process of installing these prerequisites a breeze!)
Limitations:
Single self-contained .msi files are only supported up to a size of 2GB. Larger installers can be created, but will result in an installer package that consists of more than a single file. For more information see here.
Known Issues
If you are using the latest .NET 8 make sure to update to the latest version of this asset. Older versions do not support .NET 8
Feedback and constructive comments are very welcome!
few questions,
if user runs updated installer next time, does it remember the correct folder? (to overwrite old version)
Does the installer still give the regular unknown app warning?
Do you know if msi installer triggers virus false positives more easily compared to plain full exe?
Would it be possible to setup it as a web installer? (it downloads content from url or something)
Hey, @mgear , thanks for your interest. These are great questions!
Prompting the user for a custom folder during installation is currently not supported. The application will always be installed in Program Files (Program Files (x86) in case youāre doing a 32 bit build), so itās always the same folder. But I can see how customizing the install location would be valuable. Iāve focused on silent installs for the first release, but I will definitely consider adding the ability to simply enable certain standard UI components (e.g. license texts or the custom install locations you mentioned).
As far as Iām aware, having an .msi installer changes nothing in regards to Windows telling a user when they are executing a file that comes from untrusted sources as outlined here . As outlined in the post you should sign your application. You could argue that when you use an .msi installer youāre in an even worse position, because now you technically have to sign both the installer as well as the main executable.
Thatās an interesting question. There is currently no built-in support for downloading content during installation. I will explore whether thatās something that could be easily added. My gut feeling is, that if you want to have a small base application with potentially large amounts of content loaded in afterwards on demand, you might be better off using something like Unityās Addressable Asset System.
A small update is available that fixes some minor issues.
v1.0.1 (March 30, 2022)
Fixed: 64 bit applications are now correctly installed to %programfiles% and 32 bit applications to %programfiles(x86)%.
Fixed: āOpen Documentationā now actually opens the online documentation in the browser.
Changed: The default installer name now contains the architecture it was built for.
No worries, I fully agree and this is valuable feedback
Iām currently working on the customizable UI which lets you add your own images, (as well as a license text and the user-controlled install directory). Should have something to show end of this week, hopefully live on the Asset Store next week. Stay tuned!
Added an installer UI that guides the user through the installation, which can be enabled on demand and configured through the settings window.
Added the option to customize the UI by providing your own images.
Added the option to show an end user license agreement that the user has to accept in order to install the application.
Added the option to allow the user to change the installation directory.
Updated the settings window to show more useful information about the project data that is used to generate the installer (e.g. Company Name, Product Name and Version from PlayerSettings). It also allows to overwrite some of these values if necessary.
Added: If an icon for the application has been set in the PlayerSettings (Project Settings ā Player), it will automatically be used as the icon that is displayed for the application in āAdd/Remove Programsā.
Fixed: The āPackage Nameā and āManufacturerā property could display stale information in certain cases.
Fixed: Overriding the āManufacturerā property" could throw errors in certain cases.
Added: Desktop Shortcuts. The installer UI can now be configured to show a dialog where the user is able to choose, whether a desktop shortcut should be created during installation. Alternatively, a desktop shortcut can also be created without requiring user permission.
Hey @juienkay Iām interested in purchasing this, but have a few questions that I didnāt see answered.
If I publish an update for my app, when they download the updated msi file, will that correctly overwrite the previous version? My app is small, so when thereās an update available, I just automatically download and open the new installer file.
Iāve been using InnoSetup, but Iām looking for a solution thatās a bit more integrated into the Unity pipeline.
Does the version number match the unity app version number, or does that need to be set manually?
Yes, the default behaviour is, that new versions will overwrite previously installed versions. All you have to do is increment the version number in Unity. So yes, the installer just uses the Unity version number.
Yes, thereās a setting to automatically create an installer each build. You can also kick off the process from script in case you use custom build scripts of your own and only want to do that for release builds. (More on that here)
ā¦This might be a stretch, but I figured it wouldnāt hurt to ask: You wouldnāt have something in the works for MacOS too, would you?
My current pipeline for Mac/PC deployment is to develop and build on PC, transfer the project to Mac, build, and package, then transfer it back to the PC for pushing to the web server. Kinda a nightmare, and Iām looking for any way to streamline the whole process.
Yeah, sorry I donāt have anything planned in that regards. I actually assumed Unity allows to do a Mac build completely from PC. But then again, Iāve never developed for Mac, so Iām really the wrong person to ask.
it seems that some of the prerequisites are not yet set up. Did you follow the instructions here to install WiX on your machine? The wizard should automatically pop up when first importing the asset leading you through the installation.
EDIT: For future reference, if the above error appears, restarting your machine should fix the issue.
Added: Support for installer packages larger than 2GB.
Fixed: Desktop shortcuts could be created in cases where they shouldnāt be, i.e. even if the associated property in the settings windows had been set to āDonāt createā.
This is really handy to get us started! We have a fairly specific used case, so I am currently trying to make modifications to the plugin ourselves, but the two features we are missing so far:
WiX in a custom directory: Remove all hardcoded Assets/Wix/ paths
Skip company name in default install directory - just one directory in program files
Custom binary name - rather than it being explicitly the application name + .exe, specifying it as a function argument, and storing it in BuildInfo
Permissions - our application has a self-updater, but after the installation is complete, it doesnāt have write permissions to the directory so it canāt update itself
Add registry entry - allow us to set up deep linking for our tool automatically