GNOME Bugzilla – Bug 771057
Add support for Visual studio
Last modified: 2017-01-29 07:53:14 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.
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
Created attachment 335107 [details] [review] Add version macro for 0.2.x
Created attachment 335108 [details] [review] images: ifdef _jpeg_color_space_name This method is only used for debug
Created attachment 335109 [details] [review] path: avoid set but not used warnings These variables are only used in debug
Created attachment 335110 [details] [review] archive: do not use deprecated method archive_read_finish is deprecated and archive_read_free should be used instead.
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.
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.
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.
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.
Created attachment 335174 [details] [review] autogen: do not use gnome-autogen
Created attachment 335182 [details] [review] Ifdef the config.h include
Created attachment 335187 [details] [review] archive: use the right types for the parameters of the callbacks This fixes the build on windows.
Created attachment 335189 [details] [review] Fix useless warnings
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.
Created attachment 335191 [details] [review] images: tiff and png make use or stdints so include the header
Created attachment 335192 [details] [review] nmake: add support to build with libpng support
Created attachment 335195 [details] [review] nmake: enable cairo-pdf support if desired
Created attachment 335196 [details] [review] nmake: enable cairo-ps support if desired
Created attachment 335197 [details] [review] nmake: enable cairo-svg support if desired
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?
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 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 on attachment 335110 [details] [review] archive: do not use deprecated method This is not possible since we supportd libarchive 2.8
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 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.
(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 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?
(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 on attachment 335190 [details] [review] Add nmake scripts to build with MSVC I just trust you here :-)
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 on attachment 335197 [details] [review] nmake: enable cairo-svg support if desired I think you can squash the last commits into a single one
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
(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
(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
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
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.
Created attachment 335470 [details] [review] path: avoid set but not used warnings These variables are only used in debug
Carlos, should we try to get the patch for the variables in?
Comment on attachment 335470 [details] [review] path: avoid set but not used warnings Pushed.