OCaml cross compiler

Luigi Santocanale luigi.santocanale at lif.univ-mrs.fr
Fri Feb 6 18:27:53 UTC 2009


Hi,

thanks for the inputs received. This is just to let you know about my 
progress.

On my Debian derivative (Ubuntu Intrepid), I upgraded to OCAML 3.11.
I also debianized a bunch of mingw32 rpms for Fedora 10 (I had installed 
the i586 version, and switched to the i686).

Then cross-compiling and installation (on Vista through NSISwrapper) an 
Ocaml program of mine was working almost very well.

> Anyway, the original poster is way outside the envelope of what we
> could possibly support, so please install a Fedora virtual machine.

I actually installed a Fedora 10 virtual machine, but I'm very slow in 
getting started. For example, I'm stuck with (maybe trivial) problems 
such as

 >>
[root at fedora10 ~]# yum install gcc
Loaded plugins: dellsysidplugin2, refresh-packagekit
fedora/metalink                                          |  11 kB 
00:00
Could not parse metalink 
https://mirrors.fedoraproject.org/metalink?repo=fedora-10.91&arch=i386 
error was
File //var/cache/yum/fedora/metalink.xml.tmp is not XML
Error: File //var/cache/yum/fedora/metalink.xml does not exist
<<

Two final observations on nsiswrapper.

I cannot completely uninstall the program.

I generated the nsis script below, by means of the make target

 >>
I686MINGW32DLLDIR=\\usr\\i686-pc-mingw32\\sys-root\\mingw\\bin
NSISWRAPPEROPTS=--installdir 'C:\Program files\VMGcalc' \
--name "VMGcalc" --outfile "VMGcalc-for-Windows.exe" \
--with-gtk \
nsisscript:
	cd ../windows ;\
	nsiswrapper $(NSISWRAPPEROPTS) \
	bin/Vmgcalc.exe \
	| awk ' {sub(/$(I686MINGW32DLLDIR)/,"bin"); print}' \
	 > script.nsis
<<

but the folders etc/ and lib/ are not removed (hence the INSTDIR folder 
is not removed itself).

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

Also,  notice the line
 >>
| awk ' {sub(/$(I686MINGW32DLLDIR)/,"bin"); print}' \
<<
in the nsisscript target.

Have a nice weekend,

	Luigi

 >>
#!Nsis Installer Command Script
#
# This is an NSIS Installer Command Script generated automatically
# by the Fedora nsiswrapper program.  For more information see:
#
#   http://fedoraproject.org/wiki/MinGW
#
# To build an installer from the script you would normally do:
#
#   makensis this_script
#
# which will generate the output file 'VMGcalc-for-Windows.exe' which is 
a Windows
# installer containing your program.

Name "VMGcalc"
OutFile "VMGcalc-for-Windows.exe"
InstallDir "C:\Program files\VMGcalc"
InstallDirRegKey HKLM SOFTWARE\VMGcalc "Install_Dir"

ShowInstDetails hide
ShowUninstDetails hide

# Uncomment this to enable BZip2 compression, which results in
# slightly smaller files but uses more memory at install time.
#SetCompressor bzip2

XPStyle on

Page components
Page directory
Page instfiles

ComponentText "Select which optional components you want to install."

DirText "Please select the installation folder."

Section "VMGcalc"
   SectionIn RO

   SetOutPath "$INSTDIR\bin\"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libatk-1.0-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libcairo-2.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libgdk-win32-2.0-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libgdk_pixbuf-2.0-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libgio-2.0-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libglib-2.0-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libgmodule-2.0-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libgobject-2.0-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libgtk-win32-2.0-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libiconv-2.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libintl-8.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libpango-1.0-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libpangocairo-1.0-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libpangowin32-1.0-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libpixman-1-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//libpng12-0.dll"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin//zlib1.dll"

   SetOutPath "$INSTDIR\bin"
   File "/usr/i686-pc-mingw32/sys-root/mingw/bin/pango-querymodules.exe"

   SetOutPath "$INSTDIR\etc"
   File /r "/usr/i686-pc-mingw32/sys-root/mingw/etc/fonts"
   File /r "/usr/i686-pc-mingw32/sys-root/mingw/etc/gtk-2.0"
   CreateDirectory "$INSTDIR\etc\pango"

   SetOutPath "$INSTDIR\lib"
   File /r "/usr/i686-pc-mingw32/sys-root/mingw/lib/gtk-2.0"
   File /r "/usr/i686-pc-mingw32/sys-root/mingw/lib/pango"

   SetOutPath "$INSTDIR\bin"
   File "bin/Vmgcalc.exe"

   ReadEnvStr $0 COMSPEC
   SetOutPath "$INSTDIR"
   nsExec::ExecToLog '$0 /C bin\pango-querymodules.exe > 
etc\pango\pango.modules'
SectionEnd

Section "Start Menu Shortcuts"
   CreateDirectory "$SMPROGRAMS\VMGcalc"
   CreateShortCut "$SMPROGRAMS\VMGcalc\Uninstall VMGcalc.lnk" 
"$INSTDIR\Uninstall VMGcalc.exe" "" "$INSTDIR\Uninstall VMGcalc.exe" 0
   CreateShortCut "$SMPROGRAMS\VMGcalc\Vmgcalc.exe.lnk" 
"$INSTDIR\bin\Vmgcalc.exe" "" "$INSTDIR\bin\Vmgcalc.exe" 0
SectionEnd

Section "Desktop Icons"
   CreateShortCut "$DESKTOP\Vmgcalc.exe.lnk" "$INSTDIR\bin\Vmgcalc.exe" 
"" "$INSTDIR\bin\Vmgcalc.exe" 0
SectionEnd

Section "Uninstall"
   Delete /rebootok "$DESKTOP\Vmgcalc.exe.lnk"
   Delete /rebootok "$SMPROGRAMS\VMGcalc\Vmgcalc.exe.lnk"
   Delete /rebootok "$SMPROGRAMS\VMGcalc\Uninstall VMGcalc.lnk"
   RMDir "$SMPROGRAMS\VMGcalc"

   Delete /rebootok "$INSTDIR\bin\Vmgcalc.exe"
   RMDir "$INSTDIR\bin"

   RMDir /r "$INSTDIR\lib\pango"

   RMDir /r "$INSTDIR\lib\gtk-2.0"

   RMDir /r "$INSTDIR\etc\pango"

   RMDir /r "$INSTDIR\etc\gtk-2.0"

   RMDir /r "$INSTDIR\etc\fonts"

   Delete /rebootok "$INSTDIR\bin\pango-querymodules.exe"
   RMDir "$INSTDIR\bin"

   Delete /rebootok "$INSTDIR\bin\\zlib1.dll"
   Delete /rebootok "$INSTDIR\bin\\libpng12-0.dll"
   Delete /rebootok "$INSTDIR\bin\\libpixman-1-0.dll"
   Delete /rebootok "$INSTDIR\bin\\libpangowin32-1.0-0.dll"
   Delete /rebootok "$INSTDIR\bin\\libpangocairo-1.0-0.dll"
   Delete /rebootok "$INSTDIR\bin\\libpango-1.0-0.dll"
   Delete /rebootok "$INSTDIR\bin\\libintl-8.dll"
   Delete /rebootok "$INSTDIR\bin\\libiconv-2.dll"
   Delete /rebootok "$INSTDIR\bin\\libgtk-win32-2.0-0.dll"
   Delete /rebootok "$INSTDIR\bin\\libgobject-2.0-0.dll"
   Delete /rebootok "$INSTDIR\bin\\libgmodule-2.0-0.dll"
   Delete /rebootok "$INSTDIR\bin\\libglib-2.0-0.dll"
   Delete /rebootok "$INSTDIR\bin\\libgio-2.0-0.dll"
   Delete /rebootok "$INSTDIR\bin\\libgdk_pixbuf-2.0-0.dll"
   Delete /rebootok "$INSTDIR\bin\\libgdk-win32-2.0-0.dll"
   Delete /rebootok "$INSTDIR\bin\\libcairo-2.dll"
   Delete /rebootok "$INSTDIR\bin\\libatk-1.0-0.dll"
   RMDir "$INSTDIR\bin\"
   RMDir "$INSTDIR"
SectionEnd

Section -post
   WriteUninstaller "$INSTDIR\Uninstall VMGcalc.exe"
SectionEnd


-- 
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