[mojosetup] Patches: Custom uninstaller filename, platform.chmod, gtk gui kludge

Gerry Jo trick at icculus.org
Thu May 31 20:09:53 EDT 2012

Attached some patches for MojoSetup, against current hg:

* uninstaller_filename.patch:

This adds a new option to Setup.Package: Setting uninstaller_filename to 
a string will use that string as the filename for the uninstall script 
in stead of the default "uninstall-<id>.sh" (for unix). If not set, the 
default will be used.

* platform_chmod.patch:

This exposes MojoPlatform_chmod to Lua as MojoSetup.platform.chmod. 
Since Lua doesn't support octal literals, the mode parameter is passed 
as a string. E.g. MojoSetup.platform.chmod("file", "0755")

The specific use I have for this is that I want to install some .desktop 
files into the install directory selected by the user so that they get 
some nice icons that can be clicked to do various things in there. 
However, Ubuntu's file manager in 12.04 doesn't allow launching an 
uninstalled .desktop file, and shows no icon for it, unless the .desktop 
file in question has execute permissions. (Also, I don't use MojoSetup's 
built-in .desktop file support because that always installs the files, 
while I want them lying around for manual use, and don't want all of 
them installed.)

This probably isn't the right way to go about things though. What I 
really want is a way to install custom/generated files with custom 
permissions (and add these to the manifest), or even better for this 
case, have MojoSetup support free .desktop files. I'm not sure how to go 
about doing this though. (Well, to be honest, I haven't looked very 
hard. The install scripts I use were originally written against a much 
older version of MojoSetup, and I haven't really kept up with all of the 
changes over the years. I'll probably look into doing things the right 
way some day =))

* gui_kludge.patch:

(This isn't intended for merging, but I wanted to bring this problem 
up). A quick edit to make the installers for DROD 4 look a little nicer 
with GTK+ 2. By default, the MojoSetup GTK2 plugin makes the installer 
window 40% of the size of the screen in both dimensions, which doesn't 
look very nice on high resolution widescreen monitors. In this patch, I 
just hardcoded some values that work for the DROD installers (w/vertical 
splash), but we probably want to calculate some more generally good 
values there =)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gui_kludge.patch
Type: text/x-patch
Size: 910 bytes
Desc: not available
URL: <http://icculus.org/pipermail/mojosetup/attachments/20120601/24509d31/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uninstaller_filename.patch
Type: text/x-patch
Size: 1289 bytes
Desc: not available
URL: <http://icculus.org/pipermail/mojosetup/attachments/20120601/24509d31/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: platform_chmod.patch
Type: text/x-patch
Size: 1564 bytes
Desc: not available
URL: <http://icculus.org/pipermail/mojosetup/attachments/20120601/24509d31/attachment-0002.bin>

More information about the mojosetup mailing list