Rand Stats

App::InstallerMaker::WiX

github:jnthn

Perl 6 WiX Installer Maker

Written an application in Perl 6? Want to give Windows users an MSI so they can easily install it? That's what this little program is here to help with.

Fair warning: it does something close to the Simplest Thing That Could Possibly Work, which may or may not meet your needs, and at the time of publication has been applied to make an installer for a single application. (If you have some luck with it, feel free to send a PR to change this description!) Please consider this tool "free as in puppy" - that is, you can freely take it and use it, and if it helps that's great, but you might need to give it some attention along the way. If you make changes that you think are useful to others, feel free to PR them.

How it works

This tool:

What this tool does not do

What you'll need

How to use it

Write a YAML configuration file like this:

# Versions of MoarVM, NQP, and Rakudo to use. Only 'rakudo' is required,
# and it will then use the same value for NQP and MoarVM. This will work
# except in the case where you want to refer to a commit/branch in the
# Rakudo repository for some reason, since these are actually used to do a
# checkout in the git repositories.
versions:
    - moar: 2017.02
    - nqp: 2017.02
    - rakudo: 2017.02

# The installation target location (currently Perl 6 is not relocatable).
install-location: C:\MyApplication

# The application to install (will be passed to `zef install`), so you can
# actually list multiple things here if you wish.) You can also pass a path
# if the project is not in the Perl 6 module ecosystem.
application: App::MyGloriousApplication

# The name of the MSI file to generate. Optional; default is output.msi.
msi: my-glorious-application.msi

# By default, the PATH will be ammended to include both bin and site bin
# directories, meaning that every binary will be exposed (including the
# bundled MoarVM/Rakudo). This may be useful if you want to make a Perl 6
# distribution with modules, for example. On the other hand, if you are
# making an installer for an application that just happens to be written in
# Perl 6, it's not so good. If this `expose-entrypoints` section is included,
# then a folder will be created and added to path, which only contains
# launch scripts for the apps mentioned below (it should match the name of
# the application's entrypoint(s)). Note that you can't include names like
# "perl6" and "moar" in here, only those of scripts installed by the
# application definition above.
expose-entrypoints:
    - myapp

# Some WiX configuration. You must generate unique GUIDs for your app. Get
# them [here](https://www.guidgenerator.com/) while supplies last! Check
# the dashes, uppercase, and braces boxes.
wix:
    guid: '{YOUR-GUID-HERE}'
    name: Your Glorious Application
    manufacturer: Your Wonderful Company
    version: 6.6.6
    language: 1033
    component-guid: '{A-DIFFERENT-GUID-HERE}'

Then run this application with that YAML file:

make-perl6-wix-installer my-glorious-app.yml

All being well, you'll get an MSI file out.