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 771057 - Add support for Visual studio
Add support for Visual studio
Status: RESOLVED FIXED
Product: libgxps
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: libgxps maintainers
libgxps maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-08 12:58 UTC by Ignacio Casal Quinteiro (nacho)
Modified: 2017-01-29 07:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add GXPS_AVAILABLE_IN_ALL macro to handle the visibility of the methods (23.77 KB, patch)
2016-09-08 12:58 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
Add version macro for 0.2.x (5.34 KB, patch)
2016-09-08 13:00 UTC, Ignacio Casal Quinteiro (nacho)
reviewed Details | Review
images: ifdef _jpeg_color_space_name (908 bytes, patch)
2016-09-08 13:00 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
path: avoid set but not used warnings (2.44 KB, patch)
2016-09-08 13:01 UTC, Ignacio Casal Quinteiro (nacho)
none Details | Review
archive: do not use deprecated method (849 bytes, patch)
2016-09-08 13:01 UTC, Ignacio Casal Quinteiro (nacho)
reviewed Details | Review
Bump libarchive to version 3.0.0 (818 bytes, patch)
2016-09-09 08:22 UTC, Ignacio Casal Quinteiro (nacho)
reviewed Details | Review
Bump glib to version 2.36 and avoid the usage of g_type_init (1.19 KB, patch)
2016-09-09 08:26 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
test-gxps: do not use deprecated api (2.57 KB, patch)
2016-09-09 08:41 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
build: add Makefile.sources providing the lists of sources (3.04 KB, patch)
2016-09-09 09:34 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
autogen: do not use gnome-autogen (1.92 KB, patch)
2016-09-09 10:26 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
Ifdef the config.h include (11.24 KB, patch)
2016-09-09 12:30 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
archive: use the right types for the parameters of the callbacks (1.12 KB, patch)
2016-09-09 13:21 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
Fix useless warnings (1.21 KB, patch)
2016-09-09 13:49 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
Add nmake scripts to build with MSVC (21.99 KB, patch)
2016-09-09 13:54 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
images: tiff and png make use or stdints so include the header (665 bytes, patch)
2016-09-09 14:21 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
nmake: add support to build with libpng support (1.28 KB, patch)
2016-09-09 14:21 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
nmake: enable cairo-pdf support if desired (734 bytes, patch)
2016-09-09 14:30 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
nmake: enable cairo-ps support if desired (752 bytes, patch)
2016-09-09 14:30 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
nmake: enable cairo-svg support if desired (789 bytes, patch)
2016-09-09 14:30 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review
archive: do not use deprecated method and bump version to 3.0.0 (1.25 KB, patch)
2016-09-13 19:04 UTC, Ignacio Casal Quinteiro (nacho)
none Details | Review
path: avoid set but not used warnings (2.61 KB, patch)
2016-09-13 19:04 UTC, Ignacio Casal Quinteiro (nacho)
committed Details | Review

Description Ignacio Casal Quinteiro (nacho) 2016-09-08 12:58:52 UTC
These set of patches will try to provide support for Visual Studio.
Clearly before even adding the visual studio or nmake scripts we need
to fix the build system to handle the visibility of the methods.
Comment 1 Ignacio Casal Quinteiro (nacho) 2016-09-08 12:58:59 UTC
Created attachment 335106 [details] [review]
Add GXPS_AVAILABLE_IN_ALL macro to handle the visibility of the methods

This is in preparation to add support for Visual studio projects
Comment 2 Ignacio Casal Quinteiro (nacho) 2016-09-08 13:00:07 UTC
Created attachment 335107 [details] [review]
Add version macro for 0.2.x
Comment 3 Ignacio Casal Quinteiro (nacho) 2016-09-08 13:00:33 UTC
Created attachment 335108 [details] [review]
images: ifdef _jpeg_color_space_name

This method is only used for debug
Comment 4 Ignacio Casal Quinteiro (nacho) 2016-09-08 13:01:03 UTC
Created attachment 335109 [details] [review]
path: avoid set but not used warnings

These variables are only used in debug
Comment 5 Ignacio Casal Quinteiro (nacho) 2016-09-08 13:01:24 UTC
Created attachment 335110 [details] [review]
archive: do not use deprecated method

archive_read_finish is deprecated and archive_read_free should be
used instead.
Comment 6 Ignacio Casal Quinteiro (nacho) 2016-09-09 08:22:27 UTC
Created attachment 335154 [details] [review]
Bump libarchive to version 3.0.0

Since we removed the usage of the deprecated api we must bump
the version of the library.
Comment 7 Ignacio Casal Quinteiro (nacho) 2016-09-09 08:26:51 UTC
Created attachment 335155 [details] [review]
Bump glib to version 2.36 and avoid the usage of g_type_init

This method is deprecated since that version.
Comment 8 Ignacio Casal Quinteiro (nacho) 2016-09-09 08:41:24 UTC
Created attachment 335156 [details] [review]
test-gxps: do not use deprecated api

See that there is no need to bump the gtk3 version since
the api that we are using is >= 3.0 which is the version
supported by the library.
Comment 9 Ignacio Casal Quinteiro (nacho) 2016-09-09 09:34:37 UTC
Created attachment 335167 [details] [review]
build: add Makefile.sources providing the lists of sources

This in preparation so we maintain one single list of sources
for the automake Makefile and the Nmake one.
Comment 10 Ignacio Casal Quinteiro (nacho) 2016-09-09 10:26:59 UTC
Created attachment 335174 [details] [review]
autogen: do not use gnome-autogen
Comment 11 Ignacio Casal Quinteiro (nacho) 2016-09-09 12:30:33 UTC
Created attachment 335182 [details] [review]
Ifdef the config.h include
Comment 12 Ignacio Casal Quinteiro (nacho) 2016-09-09 13:21:10 UTC
Created attachment 335187 [details] [review]
archive: use the right types for the parameters of the callbacks

This fixes the build on windows.
Comment 13 Ignacio Casal Quinteiro (nacho) 2016-09-09 13:49:17 UTC
Created attachment 335189 [details] [review]
Fix useless warnings
Comment 14 Ignacio Casal Quinteiro (nacho) 2016-09-09 13:54:53 UTC
Created attachment 335190 [details] [review]
Add nmake scripts to build with MSVC

This is the first version of the script that builds only
the main code. In upcoming patches I will add support
for the conditional libraries.
Comment 15 Ignacio Casal Quinteiro (nacho) 2016-09-09 14:21:17 UTC
Created attachment 335191 [details] [review]
images: tiff and png make use or stdints so include the header
Comment 16 Ignacio Casal Quinteiro (nacho) 2016-09-09 14:21:33 UTC
Created attachment 335192 [details] [review]
nmake: add support to build with libpng support
Comment 17 Ignacio Casal Quinteiro (nacho) 2016-09-09 14:30:05 UTC
Created attachment 335195 [details] [review]
nmake: enable cairo-pdf support if desired
Comment 18 Ignacio Casal Quinteiro (nacho) 2016-09-09 14:30:23 UTC
Created attachment 335196 [details] [review]
nmake: enable cairo-ps support if desired
Comment 19 Ignacio Casal Quinteiro (nacho) 2016-09-09 14:30:42 UTC
Created attachment 335197 [details] [review]
nmake: enable cairo-svg support if desired
Comment 20 Carlos Garcia Campos 2016-09-12 16:31:07 UTC
Review of attachment 335106 [details] [review]:

::: libgxps/gxps-page-private.h
@@ +63,3 @@
+ * the abi. If in the future we break the abi for some reason we could remove
+ * these exports.
+ */

Does this really break the ABI?
Comment 21 Carlos Garcia Campos 2016-09-12 16:34:52 UTC
Review of attachment 335107 [details] [review]:

Maybe this patch could be squashed in the previous one, but I still don't understand it completely

::: libgxps/gxps-version.h.in
@@ +147,3 @@
+#if GXPS_VERSION_MIN_REQUIRED < GXPS_VERSION_0_2
+#error "GXPS_VERSION_MIN_REQUIRED must be >= GXPS_VERSION_0_2"
+#endif

How is all this supposed to work? who defines GXPS_VERSION_MAX_ALLOWED? This project is still in 0.x state, so there's nothing really stable, we don't follow the even/odd rule for stable/unstable versions. Is all this really needed for windows?

@@ +157,3 @@
+# define GXPS_DEPRECATED_IN_0_2
+# define GXPS_DEPRECATED_IN_0_2_FOR(f)
+#endif

Same here, we don't have deprecated API, maybe we should add this when we deprecate api for the given version.
Comment 22 Carlos Garcia Campos 2016-09-12 16:48:43 UTC
Comment on attachment 335109 [details] [review]
path: avoid set but not used warnings

I'm not sure about this one. Those variables are not supposed to be debug only stuff, they are just not yet implemented. We could probably add FIXME or TODO comments there to make it clear the ifdefs are because it's for now only used in debug messages.
Comment 23 Carlos Garcia Campos 2016-09-12 16:51:03 UTC
Comment on attachment 335110 [details] [review]
archive: do not use deprecated method

This is not possible since we supportd libarchive 2.8
Comment 24 Carlos Garcia Campos 2016-09-12 16:52:12 UTC
Comment on attachment 335154 [details] [review]
Bump libarchive to version 3.0.0

If we do this, it should happen in the same commit we remove the use of deprecated API. The thing is, do we really need libarchive 3 for windows?
Comment 25 Carlos Garcia Campos 2016-09-12 16:54:04 UTC
Comment on attachment 335155 [details] [review]
Bump glib to version 2.36 and avoid the usage of g_type_init

I'm fine with this because 2.24 is too old, but I guess it's not really needed for windows either.
Comment 26 Ignacio Casal Quinteiro (nacho) 2016-09-12 16:58:37 UTC
(In reply to Carlos Garcia Campos from comment #20)
> Review of attachment 335106 [details] [review] [review]:
> 
> ::: libgxps/gxps-page-private.h
> @@ +63,3 @@
> + * the abi. If in the future we break the abi for some reason we could
> remove
> + * these exports.
> + */
> 
> Does this really break the ABI?

See that we were exporting everything that started with ^gxps so those methods were exported. If we do not care since we are not 1.0 we can definitely remove this patch. I basically followed what nm -D told me here. Those methods should probably been named with _gxps from the beginning.
Comment 27 Carlos Garcia Campos 2016-09-12 17:00:09 UTC
Comment on attachment 335182 [details] [review]
Ifdef the config.h include

Why? in what cases the config header is not generated, do we really support that?
Comment 28 Ignacio Casal Quinteiro (nacho) 2016-09-12 17:00:53 UTC
(In reply to Carlos Garcia Campos from comment #27)
> Comment on attachment 335182 [details] [review] [review]
> Ifdef the config.h include
> 
> Why? in what cases the config header is not generated, do we really support
> that?

On Windows we do not generate the config.h file.
Comment 29 Carlos Garcia Campos 2016-09-12 17:05:21 UTC
Comment on attachment 335190 [details] [review]
Add nmake scripts to build with MSVC

I just trust you here :-)
Comment 30 Carlos Garcia Campos 2016-09-12 17:07:15 UTC
Comment on attachment 335192 [details] [review]
nmake: add support to build with libpng support

From now on nmake dir is your territory, whatever you need to change there, just do it without asking for review.
Comment 31 Carlos Garcia Campos 2016-09-12 17:08:16 UTC
Comment on attachment 335197 [details] [review]
nmake: enable cairo-svg support if desired

I think you can squash the last commits into a single one
Comment 32 Ignacio Casal Quinteiro (nacho) 2016-09-13 08:17:52 UTC
Attachment 335106 [details] pushed as a228669 - Add GXPS_AVAILABLE_IN_ALL macro to handle the visibility of the methods
Attachment 335108 [details] pushed as 92d0f11 - images: ifdef _jpeg_color_space_name
Comment 33 Carlos Garcia Campos 2016-09-13 13:48:05 UTC
(In reply to Ignacio Casal Quinteiro (nacho) from comment #26)
> (In reply to Carlos Garcia Campos from comment #20)
> > Review of attachment 335106 [details] [review] [review] [review]:
> > 
> > ::: libgxps/gxps-page-private.h
> > @@ +63,3 @@
> > + * the abi. If in the future we break the abi for some reason we could
> > remove
> > + * these exports.
> > + */
> > 
> > Does this really break the ABI?
> 
> See that we were exporting everything that started with ^gxps so those
> methods were exported. If we do not care since we are not 1.0 we can
> definitely remove this patch. I basically followed what nm -D told me here.
> Those methods should probably been named with _gxps from the beginning.

Right, they were incorrectly exported, but not exporting them now shouldn't break the ABI, so just renamed them as _gxps
Comment 34 Carlos Garcia Campos 2016-09-13 13:48:24 UTC
(In reply to Ignacio Casal Quinteiro (nacho) from comment #28)
> (In reply to Carlos Garcia Campos from comment #27)
> > Comment on attachment 335182 [details] [review] [review] [review]
> > Ifdef the config.h include
> > 
> > Why? in what cases the config header is not generated, do we really support
> > that?
> 
> On Windows we do not generate the config.h file.

Ok, then
Comment 35 Ignacio Casal Quinteiro (nacho) 2016-09-13 18:53:24 UTC
Attachment 335155 [details] pushed as 5b55ab1 - Bump glib to version 2.36 and avoid the usage of g_type_init
Attachment 335156 [details] pushed as ac9d66e - test-gxps: do not use deprecated api
Attachment 335167 [details] pushed as 4983fea - build: add Makefile.sources providing the lists of sources
Attachment 335174 [details] pushed as 773a2ac - autogen: do not use gnome-autogen
Attachment 335182 [details] pushed as 14c3dfd - Ifdef the config.h include
Attachment 335187 [details] pushed as fe2951e - archive: use the right types for the parameters of the callbacks
Attachment 335189 [details] pushed as fa58bd6 - Fix useless warnings
Attachment 335190 [details] pushed as 4709da9 - Add nmake scripts to build with MSVC
Attachment 335191 [details] pushed as 8874b88 - images: tiff and png make use or stdints so include the header
Comment 36 Ignacio Casal Quinteiro (nacho) 2016-09-13 19:04:16 UTC
Created attachment 335469 [details] [review]
archive: do not use deprecated method and bump version to 3.0.0

archive_read_finish is deprecated and archive_read_free should be
used instead.
Comment 37 Ignacio Casal Quinteiro (nacho) 2016-09-13 19:04:35 UTC
Created attachment 335470 [details] [review]
path: avoid set but not used warnings

These variables are only used in debug
Comment 38 Ignacio Casal Quinteiro (nacho) 2017-01-25 07:21:55 UTC
Carlos, should we try to get the patch for the variables in?
Comment 39 Carlos Garcia Campos 2017-01-29 07:53:04 UTC
Comment on attachment 335470 [details] [review]
path: avoid set but not used warnings

Pushed.