Re: [anjuta-list] How to: Configure multiple compile targets
- From: "Arnel A. Borja" <kyoushuu yahoo com>
- To: anjuta-list gnome org
- Subject: Re: [anjuta-list] How to: Configure multiple compile targets
- Date: Wed, 24 Oct 2012 12:16:27 +0800
On Monday, 22 October, 2012 10:29 PM, BSquared wrote:
Hello,
I am looking for some documentation or guidance in setting up multiple
targets (ie. Linux, win32 and mac) in Anjuta. I believe I have to
provide separate PKG_CONFIG_PATH variables and toolchains.
I don't think it matters, but the the project is GTK+ coded in Vala.
Thank you.
Regards,
Brian
_______________________________________________
anjuta-list mailing list
anjuta-list gnome org
https://mail.gnome.org/mailman/listinfo/anjuta-list
Go to "Build -> Configure Project..." in the menu. Select one of the
configurations as sacrifice for Windows :D (I used Optimized).
In "Configure Options:", add "'PKG_CONFIG_LIBDIR='
'PKG_CONFIG_PATH=/home/kyoushuu/Devel/MinGW/lib/pkgconfig:/home/kyoushuu/Devel/MinGW/share/pkgconfig'
--build=x86_64-pc-linux-gnu --host=i686-w64-mingw32". Set appropriate
values for PKG_CONFIG_PATH, --build and --host. Make sure to add the
environment variables to "Configure Options" instead of "Environment
Variables"; otherwise your other configurations will be affected and
they will be all compile for Windows, "Environment Variables" are global.
In my computer, I use a 64-bit Ubuntu so --build is x86_64-pc-linux-gnu,
should be i686-pc-linux-gnu if you're using 32-bit.
I use 32-bit MinGW-w64 cross-compilers (from package mingw-w64 in
Ubuntu), so --host is i686-w64-mingw32 (x86_64-w64-mingw32 if 64-bit; it
depends on your cross-compiler).
I set PKG_CONFIG_LIBDIR as empty to prevent Linux include and lib
directories to be used in cross-compilation.
My MinGW binaries (from OpenSUSE Build Service:
https://build.opensuse.org/project/show?project=windows%3Amingw%3Awin32
; I compiled some packages in my own copy like libgee) are installed in
/home/kyoushuu/Devel/MinGW; PKG_CONFIG_LIBDIR should be something like
"$prefix/lib/pkgconfig:$prefix/share/pkgconfig", so it is set to
"/home/kyoushuu/Devel/MinGW/lib/pkgconfig:/home/kyoushuu/Devel/MinGW/share/pkgconfig".
Make sure that *.pc files in lib/pkgconfig and share/pkgconfig have the
prefix variables set properly; for example:
================================================================================
prefix=/home/kyoushuu/Devel/MinGW
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
targets=win32
gtk_binary_version=3.0.0
gtk_host=i686-w64-mingw32
Name: GTK+
Description: GTK+ Graphical UI Library
Version: 3.6.1
Requires: gdk-3.0 atk cairo cairo-gobject gdk-pixbuf-2.0 gio-2.0
Requires.private: atk
Libs: -L${libdir} -lgtk-3
Cflags: -I${includedir}/gtk-3.0 -mms-bitfields
================================================================================
These values are "fixed" by Windows, but in Linux they should be set
properly.
Then click "Execute" button in the dialog. Then "Build -> Build Project"
in the menu.
You need Wine to run Windows binaries. Add $prefix/bin to the PATH
environment variable of Wine, for example my PATH environment variable
is
"C:\windows\system32;C:\windows;C:\windows\system32\wbem;Z:\home\kyoushuu\Devel\MinGW\bin".
Use regedit (type wine regedit in terminal) to change the value;
environment variables are in
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session
Manager\Environment".
Then go to "Run -> Program Parameters...". Set "Program" to the path of
the compiled exe file (something like
$projectdir/$configure_name/src/program.exe"). Click "Apply" button.
Then "Run -> Execute" in menu.
I only included steps for Windows, because I don't have a Mac (even the
cross-compilers).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]