[Mono-list] Application installation on Windows
Andreas Färber
andreas.faerber at web.de
Thu Aug 31 10:09:02 EDT 2006
Hi Robert,
Am 31.08.2006 um 15:12 schrieb Robert Jordan:
> That's quite easy:
>
> 1) lookup the string value
>
> $version = HKLM_LOCAL_MACHINE\Software\Novell\Mono\DefaultCLR
>
> 2) lookup the string value
>
> $monoprefix =
>
> HKLM_LOCAL_MACHINE\Software\Novell\Mono\$version\SdkInstallRoot
>
>
> 3) (optional) detect whether $mono-prefix\bin\mono.exe exists.
>
> If one of the steps above failed, Mono is not properly
> installed or too old.
With this info it's really very easy! Thanks!
Someone should add it to the Wiki please.
>> b) How should the shortcut be constructed? (assume Mono will be on
>> the user's path? or determine absolute Mono path somehow?)
>
> Usually the tool (1) which generates the MSI is able to create
> icons almost automagically.
>
> The shortcut target is
>
> $monopath\bin\mono.exe
>
> The shortcut's command line
>
> $installdir\yourapp.exe
>
> The shortcut's icon
>
> $installdir\yourapp.exe
So in short we should use the absolute path as determined above. Okay!
> (1) I can't really recommend one, but have a look at WiX:
>
> http://wix.sourceforge.net/
>
> Despite of its very misleading name (for Germans ;-),
> it's a nice toolkit.
I have in fact been using WiX for my .NET installation packages and
can definitely recommend it!
(Not sure though what you mean by creating icons almost
automagically, it just specifies the icon to be displayed.)
>> Another thing is that with Microsoft .NET there's a library
>> InstallUtilLib.dll that can be used as part of a Windows Installer
>> package to run managed Installer classes (e.g. for Firewall
>> configuration) - Installer classes are apparently not available in
>> Mono, no equivalent to InstallUtilLib provided and no workaround
>> published.
>
> This can't be provided, because this would require that
> MS.NET is installed on the machine. Otherwise the MSI engine
> won't be able to execute the custom actions implemented
> by your assemblies.
Why would that be the case? A replacement would not require
Microsoft .NET but rather Mono. So having determined that Mono is
installed I should be able to run managed code using Mono either way!
In that case it would in theory seem possible for the Mono Project to
provide a native Windows DLL that loads Mono as outlined on the
Embedding page, reflects on the assembly's classes and runs an
Installer class.
A workaround might have been to invoke ...\mono.exe ...
\MyInstallers.exe and run the Installers from the Main method, but
that does not seem possible so that apparently I can't reuse
Installer classes written for .NET at all and would have to duplicate
the code as a standalone app to do the same using Mono? Is this for
licensing reasons, or has nobody yet seen the need to implement the
Installer classes in Mono?
Andreas
More information about the Mono-list
mailing list