[m-rev.] for review: add windows installer generator to extras

Ralph Becket rafe at cs.mu.OZ.AU
Wed Oct 26 10:41:55 AEST 2005


Ian MacLarty, Wednesday, 26 October 2005:
> For review by anyone.
> 
> Estimated hours taken: 50
> Branches: main
> 
> Implement a Wix source file generator.  Wix is an XML language used to
> describe Windows installer packages (.msi files).

Great stuff.

> Index: extras/windows_installer_generator/README
> ===================================================================
[...]
> +
> +    % The shortcut function determines which files should have shortcuts
> +    % installed on the Desktop and/or the Programs menu.
> +    % It takes two string arguments - the directory of the file and the
> +    % name of the file.  It returns a list of shortcuts to generate for the
> +    % given file.
> +    %
> +:- type shortcut_function(L) == (func(string, string) = list(shortcut(L))).
> +
> +:- type shortcut(L)
> +	--->	shortcut(
> +                shortcut_where	:: shortcut_where,  % Where to place the
> +                                                    % shortcut.
> +                shortcut_name	:: L                % The title of the shortcut
> +                                                    % as the user will see it.
> +            ).
> +
> +:- type shortcut_where
> +	--->	programs    % Place the shortcut in the Programs menu under a
> +                        % folder with the same name as the product.
> +	;	    desktop.    % Place the shortcut on the Desktop.

something weird has happened with the indentation here.  I suspect
you've mixed up hard tabs and spaces.  All spaces is preferable.

> Index: extras/windows_installer_generator/sample/gen_merc_wxs.m
> ===================================================================
> RCS file: extras/windows_installer_generator/sample/gen_merc_wxs.m
> diff -N extras/windows_installer_generator/sample/gen_merc_wxs.m
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ extras/windows_installer_generator/sample/gen_merc_wxs.m	25 Oct 2005 15:19:01 -0000
> @@ -0,0 +1,257 @@
> +:- module gen_merc_wxs.
> +
> +:- interface.
> +
> +:- import_module io.
> +
> +:- pred main(io::di, io::uo) is det.
> +
> +:- implementation.
> +
> +:- import_module bool.
> +:- import_module list.
> +:- import_module std_util.
> +:- import_module string.
> +:- import_module term_to_xml.
> +
> +:- import_module wix.
> +
> +main(!IO) :-
> +	io.command_line_arguments(Args, !IO),
> +	( if Args = [Version, Path, GUIDGenCmd, OutFile] then
> +		Product = product(
> +			merc_group,
> +			merc_comp(Version),
> +			version_no(0, 0, 0, 0), % This is just to keep the
> +						% Wix compiler happy.
> +			merc_comp(Version),
> +			product_comments,
> +			Path,
> +			merc_comp(Version)),
> +
> +		Installer ^ wix_product_info            = Product,
> +		Installer ^ wix_language                = english_south_africa,

:-)

Mention this in NEWS and that looks fine.

-- Ralph
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list