After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768540 - Add support for MS Windows on libraries and projects
Add support for MS Windows on libraries and projects
Status: RESOLVED OBSOLETE
Product: gnome-builder
Classification: Other
Component: templates
3.21.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on: 766621
Blocks:
 
 
Reported: 2016-07-08 01:24 UTC by Daniel Espinosa
Modified: 2018-01-11 10:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Daniel Espinosa 2016-07-08 01:24:02 UTC
Adding support for templates allow compilation under MSYS2, is good for any one, while showcase their project and GLIB/GTK+ is multiplatform.

I'll add this in my next iteration, but propose first in order to discuss what is the better way to do so. I have my own, gotten by GDA, hope it is OK.
Comment 1 Christian Hergert 2016-07-08 01:30:33 UTC
As for which "windows portability system" to support, my preference these days is mingw over msys/cygwin. Especially since we are going to be compiling on Linux (and I'd like to be able to produce windows binaries from Builder on Linux).
Comment 2 Daniel Espinosa 2016-07-12 00:57:13 UTC
Well, I have support for windows on GXml with following code at configure.ac:

dnl Check Cross Compile
dnl ******************************
dnl Check for Operating System
dnl ******************************
dnl linklibext is the shared link library extension, which varies by platform

#EXPORT_SYM_REGEX='-export-symbols-regex "^(gxml_|fnYM49765777344607__gxml).*"'
#AC_MSG_CHECKING([for platform])
#platform_win32=no
#linklibext=".so"
case "$host" in
*-mingw*)
#    AC_MSG_RESULT([Win32 - MinGW])
    platform_win32=yes
#    AC_DEFINE([USING_MINGW],[],[Using MinGW])
#    NO_UNDEFINED='-no-undefined'
#    LIBTOOL_EXPORT_OPTIONS=
#    linklibext=".dll"
#    AC_CHECK_TOOL(WINDRES, windres, windres)
#    AC_SUBST(WINDRES)
#    AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
#    AC_SUBST(DLLTOOL)
    ;;
*)
#    AC_MSG_RESULT([Unix])
#    NO_UNDEFINED=''
#    LIBTOOL_EXPORT_OPTIONS=$EXPORT_SYM_REGEX
#    ;;
esac


Now I'm trying to make it a m4 macro, but my skills are not enough, I have this code but doesn't work, any advise should be great!


m4_define([_PLATFORM_WIN_CHECK_INTERNAL],[
AC_MSG_CHECKING([for windows platform])
AS_CASE([$host],
[*mingw*],[
platform_win=yes
],[])
AC_MSG_RESULT([platform_win])
AM_CONDITIONAL(PLATFORM_WIN, [test x$platform_win = xyes])
])
Comment 3 Daniel Espinosa 2016-07-12 01:02:21 UTC
I've made it:

m4_define([_PLATFORM_WIN_CHECK_INTERNAL],[
AC_MSG_CHECKING([for windows platform])
AS_CASE([$host],
  [*mingw*],[
    platform_win=yes
  ],
  [
    platform_win=no
  ]
)
AC_MSG_RESULT([$platform_win])
AM_CONDITIONAL(PLATFORM_WIN, [test x$platform_win = xyes])
])

Just need to check it on Windows and MSYS2.
Comment 4 Daniel Espinosa 2016-07-12 15:45:12 UTC
I've finished to add Windows/MSYS2 support to Vala library projects. This is easy to be ported to C library projects, because I've added a m4 macro and make file mk to be imported to Makefile.am, making easy even for other projects to add support for Windows/MSYS2 to their own projects.

In order to show you a clean patch, I've added dependence to bug #766621. Once fixed, I've merge this work with that bug work, to provide an straight forward experience on Vala libraries build.
Comment 5 GNOME Infrastructure Team 2018-01-11 10:06:52 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-builder/issues/127.