OCaml cross compiler

Luigi Santocanale luigi.santocanale at lif.univ-mrs.fr
Sun Feb 8 22:00:07 UTC 2009


Hi Richard,

I had a glance to the code of nsiswrapper.

About my remark

 >> Shouldn't the script contain something as
 >> RMDir "$INSTDIR\lib\"
 >> RMDir "$INSTDIR\etc\"

the script works for me in the following way :

$ diff /usr/bin/nsiswrapper nsiswrapper
805c805,808
< 	    $olddir = ''; # Don't double-delete directory.
---
 >
 > # LS has commented out the following line : install_dir ne install_name
 > #	    $olddir = ''; # Don't double-delete directory.
 >


For the other remark, about the awk line

>> 	| awk ' {sub(/$(I686MINGW32DLLDIR)/,"bin"); print}' \

I'll try to explain where is the problem.

Say I use the script for creating an installer for myprogram.exe, which 
requires xyz.dll (found in the PATH).

$nsiswrapper bin/myprogram.exe (--run)

Then myprogram.exe is installed in $INSTDIR\bin and xyz.dll in the 
folder $INSTDIR\usr\i686-pc-mingw32\sys-root\mingw\bin -- since the 
greatest prefix is empty.

Next, say that I do

$nsiswrapper myprogram.exe=bin/myprogram.exe (--run)

Then,  myprogram.exe is installed in $INSTDIR\bin and xyz.dll in the 
$INSTDIR -- since the greatest prefix is now 
\usr\i686-pc-mingw32\sys-root\mingw\bin.

In both cases, at execution time, myprogram.exe will not find the 
necessary dependencies (I hope this is correct).

I do not know what is the best way to correctly handle the prefix 
system. But possibly, an option that tells to install all the dlls 
somewhere or in the same directory of an .exe, such as

$nsiswrapper myprogram.exe=bin/myprogram.exe --deps-dir=bin/ (--run)

could be very handy.

Best,

	Luigi

-- 
Luigi Santocanale

LIF/CMI Marseille  				Tél: 04 91 11 35 74
http://www.cmi.univ-mrs.fr/~lsantoca/		Fax: 04 91 11 36 02				






More information about the mingw mailing list