[axelitus2005 gmail com: Compiling Planner for Windows]



I'm forwarding these two messages that I got about building Planner
on Windows. They were addressed only to me and not to the list.

They contain quite a few proposed fixes to the build instructions or
files for Windows.

Regards,
Maurice.

----- Forwarded message from Axel Pardemann <axelitus2005 gmail com> -----

Date: Fri, 30 Dec 2011 22:54:13 -0600
From: Axel Pardemann <axelitus2005 gmail com>
To: griffon26 kfk4ever com
Subject: Compiling Planner for Windows
X-Spam-Status: No, score=-0.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_FONT_FACE_BAD, HTML_MESSAGE,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1

Hi there Maurice. Well as the subject says I'm trying to compile the new
version of planner (0.14.6) for Windows. I have followed your guide
http://live.gnome.org/Planner/Windows but couldn't manage to get a working
copy of planner running in Windows. I'm a linux newbie so I don't know my
ways around it very good. The code seems to build, the installer gets
created but when I try to run Planner I get the error "planner.exe is not a
valid Win32 application."

Here's what I've done so far:

Step 1) Completed. Downloaded mingw-get-inst-20111118.exe from
http://sourceforge.net/projects/mingw. Installed to C:\MinGW with option
"MSYS Basic System".
Step 2) Downloaded and installed HTML Help Compiler from
http://www.microsoft.com/download/en/details.aspx?DisplayLang=en&id=21138 (
htmlhelp.exe<http://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=00535334-c8a6-452f-9aa0-d597d16580cc&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f0%2fa%2f9%2f0a939ef6-e31c-430f-a3df-dfae7960d564%2fhtmlhelp.exe>).
Installed to C:\hhc and added to PATH.
Step 3) Created directory c:\MinGW\msys\1.0\dev
Step 4) Downloaded the following packages (versions matched for
gtk2-runtime-2.24.8-2011-12-03<http://sourceforge.net/projects/gtk-win/files/GTK%2B%20Runtime%20Environment/GTK%2B%202.24/gtk2-runtime-2.24.8-2011-12-03-ash.exe/download>)
from http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies (see step
17 for GTK versions)

   - cairo_1.10.2-2_win32.zip
   - cairo-dev_1.10.2-2_win32.zip
   - expat_2.0.1-1_win32.zip
   - fontconfig_2.8.0-2_win32.zip
   - fontconfig-dev_2.8.0-2_win32.zip
   - freetype_2.4.2-1_win32.zip
   - freetype-dev_2.4.2-1_win32.zip
   - gettext-runtime_0.18.1.1-2_win32.zip
   - gettext-runtime-dev_0.18.1.1-2_win32.zip
   - gettext-tools_0.18.1.1-2_win32.zip
   - gettext-tools-dev_0.18.1.1-2_win32.zip
   - libiconv-1.9.1.bin.woe32.zip
   - libpng_1.4.3-1_win32.zip
   - libpng-dev_1.4.3-1_win32.zip
   - libxml2_2.7.7-1_win32.zip
   - libxml2-dev_2.7.7-1_win32.zip
   - pkg-config_0.26-1_win32.zip
   - zlib_1.2.5-2_win32.zip
   - zlib-dev_1.2.5-2_win32.zip

Step 5) Downloaded the following packages (versions matched for
gtk2-runtime-2.24.8-2011-12-03<http://sourceforge.net/projects/gtk-win/files/GTK%2B%20Runtime%20Environment/GTK%2B%202.24/gtk2-runtime-2.24.8-2011-12-03-ash.exe/download>)
from http://ftp.gnome.org/pub/gnome/binaries/win32 (see step 17 for GTK
versions)

   - atk_1.32.0-2_win32.zip
   - atk-dev_1.32.0-2_win32.zip
   - gdk-pixbuf_2.24.0-1_win32.zip
   - gdk-pixbuf-dev_2.24.0-1_win32.zip
   - glib_2.28.8-1_win32.zip
   - glib-dev_2.28.8-1_win32.zip
   - gtk+_2.24.8-1_win32.zip
   - gtk+-dev_2.24.8-1_win32.zip
   - libart-lgpl_2.3.21-1_win32.zip
   - libart-lgpl-dev_2.3.21-1_win32.zip
   - libglade_2.6.4-1_win32.zip
   - libglade-dev_2.6.4-1_win32.zip
   - libgnomecanvas_2.30.1-1_win32.zip
   - libgnomecanvas-dev_2.30.1-1_win32.zip
   - pango_1.29.4-1_win32.zip
   - pango-dev_1.29.4-1_win32.zip

Step 6) Downloaded libxslt-1.1.26.win32.zip from
ftp://ftp.zlatkovic.com/libxml/
Step 7) Made a copy of C:\MinGW\msys\1.0\dev\bin\libxml2-2.dll and named it
libxml2.dll
Step 8) Add the two lines at the end of C:\MinGW\msys\1.0\etc\profile
Step 9) Downloaded libxml-2.0.pc and libexslt.pc and saved them to
C:\MinGW\msys\1.0\dev\lib\pkgconfig (actually there was already the
file libxml-2.0.pc
for the new version of libxml so I didn't replace it)
Step 10) Downloaded docbook-xsl-1.76.1 from
http://sourceforge.net/projects/docbook/files/docbook-xsl/1.76.1/ and
extracted it into C:\MinGW\msys\1.0\dev\src
Note: I modified the docs/user-guide/C/Makefile.win32 file accordingly to
update the path.
Step 11) Downloaded docbook-xml from
http://www.oasis-open.org/docbook/xml/4.5/docbook-xml-4.5.zip (as latest
version 5.0 is not entirely backwards compatible) and extracted it into
C:\MinGW\msys\1.0\dev\src\docbook-xml-4.5
Note: I modified the docs/user-guide/C/Makefile.win32 file accordingly to
update the path.
Step 12) Downloaded and install git from
http://code.google.com/p/msysgit/downloads/list. I used the full installer
for official Git
1.7.8<http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.8-preview20111206.exe&can=2&q=>
.
During install I selected "checkout as-is, commit as-is" and Git Bash only.
Step 13) Didn't install TortoiseGit as I have been using git for some time
now and I know my way through the command line.
Step 14) Cloned the planner sources at git://git.gnome.org/planner into
C:\MinGW\msys\1.0\dev\src\planner
Used command from the Git Bash: git clone
git://git.gnome.org/planner/c/MinGW/msys/1.0/dev/src/planner
Step 15) Opened a new MSYS shell prompt (Start->Programs->MinGW->MinGW
Shell), went to /dev/src/planner and ran:
$ make -f Makefile.win32 install

At this point I began having real trouble :S as the gcc compiler started to
complain about things. I fixed a lot of things that broke down the
compiler, they are explained in the fixes.txt file attached to this email.
For purpose of speed I've compiled a fixes-without-gtk2.zip containing all
fixed files just to be dropped on top of the original planner folder
(excluding the gtk2 installer which must be manually copied to the
installer folder).

After "fixing" the files the compiler runs "without" error (doesn't
complain and seems to compile everything to the end, the planner.exe file
is generated, the chm help file too, and so on).

Step 16) Downloaded the latest Nullsoft scriptable install system (2.46)
and installed it in the default location (C:\Program Files\NSIS).

Step 17) Downloaded the GTK+ for Windows Runtime Environment 2.24.8 (build
date: 2011-12-03) from http://gtk-win.sourceforge.net/ and saved it in
C:\MinGW\msys\1.0\dev\src\planner\installer
[image: gtk2-re.jpg]<http://sourceforge.net/projects/gtk-win/files/GTK%2B%20Runtime%20Environment/GTK%2B%202.24/gtk2-runtime-2.24.8-2011-12-03-ash.exe/download>
Step 18) In the MSYS shell, went to /dev/src/planner and ran:
$ make -f Makefile.win32 createinstaller

The installer seems to be created correctly. I install it and everything
works fine until I try to open the planner.exe and I receive the error:
"planner.exe is not a valid Win32 application."

I've uploaded a zip file containing all my files to my dropbox public
folder: http://dl.dropbox.com/u/9321770/planner-compilation.zip (It's about
85mb in size).

I would appreciate any help that you could give me :)

Thanks
Axel



* Makefile Flag error fix
File: libplanner/Makefile.win32
	- L27: Flag -mno-cygwin is not understood. Delete flag
	- L64, L72, L80, L89: Flag -avoid-version is not understood. Delete flag
	- L157: Flag --out-implib,libplanner-1.dll.a is not understood. Change to -Wl,--out-implib=libplanner-1.dll.a

* Missing sentinel error fix
File: libplanner/mrp-paths-win32.c
	- L56, L69, L82, L95, L108, L121, L134, L147, L160, L173: function call g_build_filename() must end its parameter list with NULL. Example:
		glade_dir = g_build_filename (module_dir, GLADEDIR, NULL);

* Makefile Flag error fix
File: src/Makefile.win32
	- L11, L27: Flag -mno-cygwin is not understood. Delete flag
	- L11, L218: Flag --no-undefined is not understood. Change to -Wl,--no-undefined
	- L124, L129, L132, L135, L139: Flag -avoid-version is not understood. Delete flag

* Missing sentinel error fix
File: src/planner-main.c
	- L80: function call g_build_filename() must end its parameter list with NULL. Example:
		filename = g_build_filename (module_dir, "share/icons", NULL);

* Implicit function declaration error fix
File: src/planner-util-win32.c
	- L45, L72: Remove the implicit function call _() from the text passed to the gtk_message_dialog_new() function (Leave only the "string"). Example: 
		dialog = gtk_message_dialog_new (parent,
			GTK_DIALOG_DESTROY_WITH_PARENT,
			GTK_MESSAGE_ERROR,
			GTK_BUTTONS_CLOSE,
			"Unable to open '%s'", url);

* EXE build command error fix (as the file planner.a is not created)
File: src/Makefile.win32
	- L218: Change to this:
		$(CC) -shared $(OBJECTS) $(LIBS) $(SUBSYSTEM) -Wl,--out-implib=planner.a -Wl,-Map -Wl,planner.map -Wl,--cref -Wl,--no-undefined -export-all -Wl,--output-def -Wl,planner.def -o planner.exe

* Installer build error fix
File installer/planner-installer.nsi
	- L48: Change to correct gtk2 environment file. Example:
		!define GTK_INSTALLER_EXE			"gtk2-runtime-2.24.8-2011-12-03-ash.exe"

* Update docbook package version
File: docs/user-guide/C/Makefile.win32
	- L47: Updated docbkx412 to docbook-5.0b5. Example:
		SGML_CATALOG_FILES=$(PREFIX)/src/docbook-5.0b5/docbook.cat \

* Update docbook-xsl package version
File: docs/user-guide/C/Makefile.win32
	- L51: Updated docbook-xsl-1.76.0 to docbook-xsl-1.76.1. Example:
		--nonet $(PREFIX)/src/docbook-xsl-1.76.1/htmlhelp/htmlhelp.xsl planner.xml



----- End forwarded message -----
----- Forwarded message from Axel Pardemann <axelitus2005 gmail com> -----

Date: Fri, 30 Dec 2011 23:33:51 -0600
From: Axel Pardemann <axelitus2005 gmail com>
To: griffon26 kfk4ever com
Subject: Re: Compiling Planner for Windows
X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1

I got it now! I successfully compiled Planner 0.14.6 for Windows! :D

The problem is this line in the fixes.txt file:
* EXE build command error fix (as the file planner.a is not created)

File: src/Makefile.win32
	- L218: Change to this:
		$(CC) -shared $(OBJECTS) $(LIBS) $(SUBSYSTEM)
-Wl,--out-implib=planner.a -Wl,-Map -Wl,planner.map -Wl,--cref
-Wl,--no-undefined -export-all -Wl,--output-def -Wl,planner.def -o
planner.exe


inserting the -shared option before $(OBJECTS) allow for the creation
of planner.a file (which without this options gets not created I don't
know why) but corrupts the generated .exe file. After the first run
which generated the planner.a file I deleted the planner.exe file,
removed the -shared option and ran it again. This time the planner.exe
file was working! :D


It would be nice if it could be done just with one command run, but I
don't know how to fix this...


Thanks and I hope this would help to publish an updated Windows
version to download!


Axel

----- End forwarded message -----

-- 
Maurice van der Pot

Gnome Planner Developer  griffon26 kfk4ever com  http://live.gnome.org/Planner

Attachment: pgp75QOe6fOBD.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]