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 339172 - Windows Port of Evince
Windows Port of Evince
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
git master
Other Windows
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-20 12:54 UTC by Alan Horkan
Modified: 2019-09-16 15:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Evince running on Windows XP (266.81 KB, image/png)
2008-12-19 18:50 UTC, Hib Eris
  Details
Make_use_of_gconf_optional (3.51 KB, patch)
2008-12-19 18:54 UTC, Hib Eris
none Details | Review
13 patches to port Evince to Windows (10.61 KB, patch)
2008-12-19 19:00 UTC, Hib Eris
needs-work Details | Review
All 13 patches (10.61 KB, application/x-compressed-tar)
2008-12-19 19:04 UTC, Hib Eris
  Details
patch-1-Make_use_of_gconf_optional (3.54 KB, patch)
2009-02-04 23:45 UTC, Hib Eris
committed Details | Review
patch-2-Make_screensaver_code_compile_for_w32 (4.13 KB, patch)
2009-02-04 23:49 UTC, Hib Eris
committed Details | Review
patch-3-Make_session_manager_code_compile_for_w32 (12.50 KB, patch)
2009-02-04 23:50 UTC, Hib Eris
committed Details | Review
patch-6-Add_application-x-ext-pdf_mime_type_for_pdf_backend (643 bytes, patch)
2009-02-04 23:53 UTC, Hib Eris
committed Details | Review
patch-8-Disable_gnome-icon-theme_check_for_cross_compilers (811 bytes, patch)
2009-02-05 00:00 UTC, Hib Eris
none Details | Review
patch-9-Include_gdkxh_only_with_X11 (503 bytes, patch)
2009-02-05 00:08 UTC, Hib Eris
committed Details | Review
patch-8-Drop-gnome-icon-theme-dependency.patch (73.87 KB, patch)
2009-03-16 15:16 UTC, Hib Eris
none Details | Review
patch-10-Use-g_file_make_symbolic_link-to-create-symlinks.patch (1.87 KB, patch)
2009-03-16 15:39 UTC, Hib Eris
committed Details | Review
patch-11-Remove_left_over_GtkPrinter_from_ev-windowc (1.03 KB, patch)
2009-06-03 18:10 UTC, Hib Eris
committed Details | Review
patch-12-Make_use_of_gtk+-unix-print_optional (7.87 KB, patch)
2009-06-03 18:10 UTC, Hib Eris
none Details | Review
patch-13-Disable_comics_backend_on_native_windows_builds (1.07 KB, patch)
2009-06-03 18:10 UTC, Hib Eris
committed Details | Review
patch-14-Add_dependency_on_libdocument_for_libmisc (590 bytes, patch)
2009-06-03 18:11 UTC, Hib Eris
none Details | Review
patch-14-Add_dependency_on_libdocument-libview_for_libmisc (639 bytes, patch)
2009-06-04 16:10 UTC, Hib Eris
committed Details | Review
patch-12a-printing-Do-not-disable-printing-when-cairo-printi.patch (2.11 KB, patch)
2009-06-09 08:39 UTC, Hib Eris
committed Details | Review
patch-12b-printing-Make-use-of-gtk-unix-print-optional.patch (9.12 KB, patch)
2009-06-09 08:39 UTC, Hib Eris
none Details | Review
patch-15-build-Only-fail-on-missing-GConf-when-requested-ex.patch (1.42 KB, patch)
2009-06-09 08:44 UTC, Hib Eris
committed Details | Review
patch-16-build-Only-fail-on-missing-gnome-keyring-when-requ.patch (1.46 KB, patch)
2009-06-09 08:45 UTC, Hib Eris
committed Details | Review
patch-17-windows-Make-evince-relocatable-on-windows-stock.patch (1.48 KB, patch)
2009-06-09 08:48 UTC, Hib Eris
committed Details | Review
patch-18-windows-Make-evince-relocatable-on-windows-backe.patch (3.32 KB, patch)
2009-06-09 08:48 UTC, Hib Eris
needs-work Details | Review
patch-19-windows-Make-evince-relocatable-on-windows-GUI.patch (4.60 KB, patch)
2009-06-09 08:49 UTC, Hib Eris
committed Details | Review
patch-20-windows-Make-previewer-relocatable-on-windows-GU.patch (1.99 KB, patch)
2009-06-09 08:49 UTC, Hib Eris
committed Details | Review
patch-18-windows-Make-evince-relocatable-on-windows-backe.patch-v2 (3.33 KB, patch)
2009-06-09 15:20 UTC, Hib Eris
committed Details | Review
patch-21-windows-build-Add-mwindows-flag-for-true-Windows.patch (1.17 KB, patch)
2009-06-11 08:33 UTC, Hib Eris
reviewed Details | Review
0001-Add-zlib-to-linker-flags-to-avoid-undefined-symbols-.patch (817 bytes, patch)
2009-06-11 14:28 UTC, Hib Eris
committed Details | Review
patch-21-windows-build-Add-mwindows-flag-for-true-Windows-v2.patch (1.64 KB, patch)
2009-06-14 14:48 UTC, Hib Eris
committed Details | Review
Source of evince installer (1.57 KB, text/plain)
2009-09-02 15:42 UTC, Adam J Richardson
  Details
evince.msi.wxs (1.16 KB, text/plain)
2009-09-25 14:34 UTC, Hib Eris
  Details
evince.wxs (46.50 KB, text/plain)
2009-09-25 14:34 UTC, Hib Eris
  Details
License.rtf (676 bytes, application/rtf)
2009-09-25 14:38 UTC, Hib Eris
  Details

Description Alan Horkan 2006-04-20 12:54:44 UTC
Even though I think I know what the answer will be I had to at least ask otherwise you could say no one ever asked for a windows port of Evince.  

There are many organisations which will continue to use Microsoft Windows and users will not be able to choose a Free Software Operating system but despite that would like to be able to choose more Free Software like Evince.  

Windows users could use Adobe Acrobat but it has lots of added extras and is misconfigured to be slow by default and could do with some competition.  Also Evince includes features Acrobat doesn't have (like comics archives, and the few comic archve readers I've seen on Windows were crap).  

Having Evince on windows as a good fast alternative to Acrobat would help lessen the potential impact of Microsoft Metro (also known as XPS, XML Paper System).  


(I fully expect the Evince developers to say they do not have the time and resources to do a windows port but I do hope you will avoid making Evince unnecessarily difficult to port.)
Comment 1 Alan Horkan 2006-05-31 23:40:39 UTC
I'm thinking maybe I should put a modest bounty of €50 on this as a gesture.  (Still have no choice of Operating System at my day job, so any chance to choose Free Software would alleviate the suffering.)  
Does the Gnome Foundation accept dontations with strings attached?  
Comment 2 Alan Horkan 2008-04-30 08:35:10 UTC
Annoyed once more by Microsoft I'm reminded of this bug report I filed long ago and now that I'm no longer an impoverished student I'm willing to put €50 bounty towards this effort (possibly more depending on the response and proposals) and perhaps others who have expressed interested might chip in? 

Comment 3 Carlos Garcia Campos 2008-04-30 10:18:17 UTC
Well, now should be easier than before, since evince has fewer gnome dependencies. 
Comment 4 Hib Eris 2008-12-19 18:50:31 UTC
Created attachment 125018 [details]
Evince running on Windows XP

Hi there,

I have ported Evince to Windows XP, cross compiling it on Ubuntu with mingw32.

I have 13 patches for this. Is there someone willing to review and apply these?
Comment 5 Hib Eris 2008-12-19 18:54:13 UTC
Created attachment 125020 [details] [review]
Make_use_of_gconf_optional
Comment 6 Hib Eris 2008-12-19 19:00:58 UTC
Created attachment 125025 [details] [review]
13 patches to port Evince to Windows

The first 7 patches are actually not specific to Windows, but required for Windows none the less.
The last 6 patches are Windows specific.
Comment 7 Hib Eris 2008-12-19 19:04:42 UTC
Created attachment 125026 [details]
All 13 patches

Whoops, I did not set the mime type of my attachment correctly. Once more...

The first 7 patches are actually not specific to Windows, but required for
Windows none the less.
The last 6 patches are Windows specific.
Comment 8 Nickolay V. Shmyrev 2008-12-28 21:42:29 UTC
Thanks for the patches.
Comment 9 Alan Horkan 2009-01-15 01:40:06 UTC
Cool.  Thanks for the Christmas present!  
Between jobs at the moment and a bit short of cash but I'll be happy to scrape together the €50 I promised for Mr. Hib Ebris*.    
mailto:alanhorkan@gmail.com and I'll see about getting the money to you through Paypal or something.  (* Not promising the money immediately but reaffirming my best intentions to pay soonish and confirming my offer is still valid). 
Comment 10 Carlos Garcia Campos 2009-01-16 10:05:23 UTC
Hib, 

sorry for the late reply, thanks you very much. Some comments:

 * patch-1-Make_use_of_gconf_optional

I've noticed that gedit has now offical win32 support and I haven't seen anything special for gconf in its configure script. Anyway, I wonder whether we can get rid of gconf dependency at all, we are only using it for a single boolean key, so we might use the metata file for this. 

 * patch-2-Make_screensaver_support_optional

New version of totem-screensaver.c already has ifdefs for GDK_WINDOWING_X11, so I guess updating the files from totem sources would be enough.

 * patch-3-Make_session_manager_support_optional

EggSMClient has support for win32, so it would be better to copy the required files from libegg instead of disabling the session stuff. 

 * patch-4-include_gdkx_only_for_dbus_support

Committed

 * patch-5-Fix_mime_type_handling

Committed

 * patch-6-Add_application-x-ext-pdf_mime_type_for_pdf_backend

Does it work? I don't see any reference to application/x-ext-pdf in shared-mime-info packages.

 * patch-7-Check_for_localtime_r

Committed

 * patch-8-Disable_gconf-icon-theme_check_for_cross_compilers

I guess you mean gnome-icon-theme :-P I don't remeber why evince depends on g-i-t, we could probably copy the required icons and remove the dependency. I'm not sure. 

 * patch-9-Do_no_use_gdk_x11_window_set_user_time_on_w32

We can use GDK_WINDOWING_X11 here. Committed using it instead. 

 * patch-10-Do_not_use_symlinks_on_w32

I think it's better to completely remove the Open a copy feature for non UNIX platforms untill we have a portable implementation. 

 * patch-11-Disable_printing_on_w32

We are already working on using GtkPrintOperation which has win32 support. See bug #557112

 * patch-12-Build_DLLs_on_w32
 * patch-13-Make_evince_relocatable_on_w32

I guess these depend on all others, so let's fix all pending issues first. 

Good job Hib, thank you very much for the patches. 
Comment 11 Wouter Bolsterlee (uws) 2009-01-16 11:42:12 UTC
(In reply to comment #10)
>  * patch-1-Make_use_of_gconf_optional
> 
> I've noticed that gedit has now offical win32 support and I haven't seen
> anything special for gconf in its configure script. Anyway, I wonder whether we
> can get rid of gconf dependency at all, we are only using it for a single
> boolean key, so we might use the metata file for this. 

This would be a regression for deployments that have mandatory GConf keys mandating that PDF restrictions should be honored.
Comment 12 Hib Eris 2009-02-03 23:25:21 UTC
(In reply to comment #10)

Thank you for looking through my patches.

>  * patch-6-Add_application-x-ext-pdf_mime_type_for_pdf_backend
> 
> Does it work? I don't see any reference to application/x-ext-pdf in
> shared-mime-info packages.

I've added this because it is a fall back mime type that is hard coded in glib/gio/gcontenttype.c in case no mime-type can be found for .pdf files.

When I ran evince on wine, the application/x-ext-pdf mime-type was what was returned by gio for pdf files. Without the addition from the patch, evince looks for a plugin to handle the given mime type and cannot find any.

So, I guess this patch is needed for systems that do not have a proper mime type configuration. At least it is needed for my wine install. I am not sure that it is needed on windows.

Comment 13 Hib Eris 2009-02-03 23:46:36 UTC
(In reply to comment #10)

>  * patch-1-Make_use_of_gconf_optional
> 
> I've noticed that gedit has now offical win32 support and I haven't seen
> anything special for gconf in its configure script. Anyway, I wonder whether we
> can get rid of gconf dependency at all, we are only using it for a single
> boolean key, so we might use the metata file for this. 

You are right, I think, gconf can work on win32, so an evince port to win32 can depend on it. I did not use it because a) gconf is not part of the gtk windows binary package, b) gconf has dependencies on orbit and other things I do not understand, c) i did not find a gconf win32 binary, d) I failed to cross compile gconf on Ubuntu. Maybe not the best reasons, but as you noted, for only a single boolean key, that only added restrictions, I did not find it worth looking into it any deeper. 

For now, adding a configure option to disable gconf seems like a practical solution to me.

 
Comment 14 Alberto Ruiz 2009-02-03 23:57:42 UTC
Gconf is ported for windows[0]. You could install it (and its dependencies) from those zip files on your cross compilation environment.

However I would recommend not to depend on it for the crazy amount of dependencies that it brings and the real pain than it is to create an installer with a sane gconf defaults setup for windows (and a pain to maintain as well).

[0] http://ftp.gnome.org/pub/gnome/binaries/win32/GConf/2.22/
Comment 15 Hib Eris 2009-02-04 23:45:35 UTC
Created attachment 127971 [details] [review]
patch-1-Make_use_of_gconf_optional

Note:
To get some more overview here, I will post all my (possibly improved) patches separately. With this I obsolete my original patches.

First patch is for disabling gconf. As there is a desire to keep the gconf dependency on Unix to avoid regressions, I think it is best to make gconf optional at compile time. This will allow the windows version to not depend on gconf as gconf on windows is troublesome. To me, this patch look ready to go in. Please review it.
Comment 16 Hib Eris 2009-02-04 23:49:07 UTC
Created attachment 127972 [details] [review]
patch-2-Make_screensaver_code_compile_for_w32

As suggested, to fix the screensaver on windows we can pull in new code from totem. This is a better alternative to my orignal patch-2.
Comment 17 Hib Eris 2009-02-04 23:50:25 UTC
Created attachment 127973 [details] [review]
patch-3-Make_session_manager_code_compile_for_w32

As suggested, to fix the session manager on windows we can pull in new code from
libegg. This is a better alternative to my orignal patch-3.
Comment 18 Hib Eris 2009-02-04 23:53:20 UTC
Created attachment 127974 [details] [review]
patch-6-Add_application-x-ext-pdf_mime_type_for_pdf_backend

Patch 4 and 5 have already been committed to svn.

This is patch-6. The reason for this patch is explained above in comment 12.
Comment 19 Hib Eris 2009-02-05 00:00:53 UTC
Created attachment 127975 [details] [review]
patch-8-Disable_gnome-icon-theme_check_for_cross_compilers

This patch needs some discussion:

At the moment, evince checks at compile time for installed gnome icons. However, these icons are needed at run time, not at compile time, so it does not make all to much sense to check for them at compile time. In a cross compiling environment it makes even less sense and only stands in the way for a successful build.
This patch disables the compile time check. In all cases it is left up to the packagers to make sure icons are available at run time.
Comment 20 Wouter Bolsterlee (uws) 2009-02-05 00:05:34 UTC
(In reply to comment #19)
> This patch disables the compile time check. In all cases it is left up to the
> packagers to make sure icons are available at run time.

What happens at run time if those icons are not available? Does Evince even run?
Comment 21 Hib Eris 2009-02-05 00:08:03 UTC
Created attachment 127976 [details] [review]
patch-9-Include_gdkxh_only_with_X11

(patch 7 is already committed to svn).

A changed version for patch 9 is committed to svn. Unfortunately, that patch missed one IFDEF. This new patch-9 will correct this.

I will rework patches 10 - 13 later. First lets get these in.
Comment 22 Hib Eris 2009-02-05 00:13:16 UTC
(In reply to comment #20)
> (In reply to comment #19)
> > This patch disables the compile time check. In all cases it is left up to the
> > packagers to make sure icons are available at run time.
> 
> What happens at run time if those icons are not available? Does Evince even
> run?

It does run, and it just fails to display some icons (e.g. rotate-left and rotate-right). Running evince on wine I get console warnings:

(evince.exe:8): Gtk-WARNING **: Could not find the icon 'object-rotate-left'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
	http://icon-theme.freedesktop.org/releases

(evince.exe:8): Gtk-WARNING **: Error loading theme icon 'object-rotate-left' for stock: Icon 'object-rotate-left' not present in theme

(evince.exe:8): Gtk-WARNING **: Error loading theme icon 'object-rotate-right' for stock: Icon 'object-rotate-right' not present in theme
Comment 23 Carlos Garcia Campos 2009-02-05 09:02:57 UTC
(In reply to comment #15)
> Created an attachment (id=127971) [edit]
> patch-1-Make_use_of_gconf_optional
> 

Committed a slightly different patch. Thanks. 

Comment 24 Carlos Garcia Campos 2009-02-05 09:08:59 UTC
(In reply to comment #16)
> Created an attachment (id=127972) [edit]
> patch-2-Make_screensaver_code_compile_for_w32
>

Applied. Thanks. 
Comment 25 Carlos Garcia Campos 2009-02-05 09:46:45 UTC
(In reply to comment #17)
> Created an attachment (id=127973) [edit]
> patch-3-Make_session_manager_code_compile_for_w32
> 

Applied with some minor changes. Thanks. 
Comment 26 Carlos Garcia Campos 2009-02-05 10:04:25 UTC
(In reply to comment #18)
> Created an attachment (id=127974) [edit]
> patch-6-Add_application-x-ext-pdf_mime_type_for_pdf_backend
> 

Committed. Thanks
Comment 27 Carlos Garcia Campos 2009-02-05 10:11:46 UTC
(In reply to comment #21)
> Created an attachment (id=127976) [edit]
> patch-9-Include_gdkxh_only_with_X11
> 

Committed too. Thanks.
Comment 28 Hib Eris 2009-02-05 10:59:30 UTC
Regarding icons (patch 8):

As far as I can see, evince is only depending on gnome-icon-theme for 3 icons: 'object-rotate-left', 'object-rotate-right' and 'x-office-presentation'.

Maybe these can be added to evince and the dependency on gnome-icon-theme can be dropped completely from configure.ac.


Comment 29 Alberto Ruiz 2009-02-05 11:12:14 UTC
I don't think the dependency should be dropped, these icons might change in the future and you don't want to keep copying them if you don't want to lose consistency with the theme.

In any case, I think is worth making them theme based and fall back to a copy within the project if they're not present.
Comment 30 Hib Eris 2009-02-05 11:41:28 UTC
(In reply to comment #29)
> I don't think the dependency should be dropped, these icons might change in the
> future and you don't want to keep copying them if you don't want to lose
> consistency with the theme.
> 
> In any case, I think is worth making them theme based and fall back to a copy
> within the project if they're not present.

From what I understand from the code in shell/ev-stock-icons.c, these icons are already 'theme-based', so evince only uses it's own icons when there is no theme providing them. Can anyone with more knowledge on icon themes confirm this understanding?

If so, theme consistency is preserved without the dependency and icons copied in will only serve as a fall back.


Comment 31 Christian Persch 2009-02-05 13:05:52 UTC
+ dnl check for win32 platform
+ AC_MSG_CHECKING([for Win32 platform])
+ case "$host" in
+   *-*-mingw*|*-*-cygwin*)
+     platform_win32=yes
+     AC_CHECK_TOOL(WINDRES, windres)
+     ;;
+   *)
+     platform_win32=no
+     ;;
+ esac
+ AC_MSG_RESULT([$platform_win32])
+ AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")

Why this weird check, instead of just using the gdk target from the gdk .pc file?

GDK_TARGET="$($PKG_CONFIG --variable target gdk-2.0)"
if test "$GDK_TARGET" = "win32";
 ...
fi 

?
Comment 32 Carlos Garcia Campos 2009-02-05 13:59:54 UTC
(In reply to comment #31)
> + dnl check for win32 platform
> + AC_MSG_CHECKING([for Win32 platform])
> + case "$host" in
> +   *-*-mingw*|*-*-cygwin*)
> +     platform_win32=yes
> +     AC_CHECK_TOOL(WINDRES, windres)
> +     ;;
> +   *)
> +     platform_win32=no
> +     ;;
> + esac
> + AC_MSG_RESULT([$platform_win32])
> + AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
> 
> Why this weird check, instead of just using the gdk target from the gdk .pc
> file?

I just copied it from gedit. 

> GDK_TARGET="$($PKG_CONFIG --variable target gdk-2.0)"
> if test "$GDK_TARGET" = "win32";
>  ...
> fi 

I didn't know this pkg-config gdk variabe. 



Comment 33 Ignacio Casal Quinteiro (nacho) 2009-02-06 17:20:01 UTC
Hi, I was thinking on making the win32 package if nobody is doing it yet, could you add the gedit-dirs.ch functions you need to the code?
Comment 34 Ignacio Casal Quinteiro (nacho) 2009-02-08 11:44:14 UTC
(In reply to comment #31)
> + dnl check for win32 platform
> + AC_MSG_CHECKING([for Win32 platform])
> + case "$host" in
> +   *-*-mingw*|*-*-cygwin*)
> +     platform_win32=yes
> +     AC_CHECK_TOOL(WINDRES, windres)
> +     ;;
> +   *)
> +     platform_win32=no
> +     ;;
> + esac
> + AC_MSG_RESULT([$platform_win32])
> + AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
> 
> Why this weird check, instead of just using the gdk target from the gdk .pc
> file?
> 
> GDK_TARGET="$($PKG_CONFIG --variable target gdk-2.0)"
> if test "$GDK_TARGET" = "win32";
>  ...
> fi 
> 
> ?
> 
About this, you are going to need to distinguish between win32 platform (mingw or cynwin) and win32 os (just mingw). In case you use EGG_SMCLIENT.
Check latest patches in gedit about this.

Comment 35 Carlos Garcia Campos 2009-02-09 17:09:42 UTC
(In reply to comment #34)
> About this, you are going to need to distinguish between win32 platform (mingw
> or cynwin) and win32 os (just mingw). In case you use EGG_SMCLIENT.
> Check latest patches in gedit about this.
> 

I've just fixed it. Thanks. 
Comment 36 Anton Shuster 2009-03-01 12:40:43 UTC
Hello all,

This is really exciting. Is there a way I can try compiling this on a Windows machine? If yes, what do I need and what commands/flags do I have to use?

If no, how do I cross-compile this on a Linux machine?

Thanks a lot,
--Anton
Comment 37 Hib Eris 2009-03-01 20:49:14 UTC
Anton, the windows port is not completely ready yet, so you'll have to wait a bit more.

There are 2 issues that stalled progress:

1. Printing.
   At the moment evince uses gtk-unix-print, which is not portable. There is some work being done on it in Bug 557112.

2. Opening multiple views on one document.
   I am working on this, but a proper solution needs quite a few changes to the code. I just posted patches doing the ground work for this in Bug 573641.

A minor third open issue is the dependency on gnome-icon-print, but that is not really a problem, just a bit of work.





Comment 38 Hib Eris 2009-03-16 15:16:18 UTC
Created attachment 130753 [details] [review]
patch-8-Drop-gnome-icon-theme-dependency.patch

This patch is in git's patch format, I hope you can copy with this.

This patch copies some png/svg files from gnome-icon-theme, to function as a backup when gnome-icon-theme is not installed.
Comment 39 Hib Eris 2009-03-16 15:39:58 UTC
Created attachment 130756 [details] [review]
patch-10-Use-g_file_make_symbolic_link-to-create-symlinks.patch

This patch is a bit cheating...

Instead of using POSIX' symlink (), it uses g_file_make_symbolic_link () from Glib's gio. That function is a bit more portable, as it compiles nicely on windows. Unfortunately, when you run it (on windows), it still fails (gracefully though). 

As a consequence, when a user tries to open a second view of a document, it will fail somewhat gracefully on windows.

I would suggest to apply this patch now. A better working solution on windows requires quite some changes to EvWindow and EvView, that can be better dealt with after EvView is cleaned up.
Comment 40 Carlos Garcia Campos 2009-04-10 13:59:48 UTC
(In reply to comment #39)
> Created an attachment (id=130756) [edit]
> patch-10-Use-g_file_make_symbolic_link-to-create-symlinks.patch

Applied in trunk (rev3597). Thanks!


Comment 41 Hib Eris 2009-06-03 18:10:00 UTC
Created attachment 135896 [details] [review]
patch-11-Remove_left_over_GtkPrinter_from_ev-windowc

It is time for some new patches towards evince windows build.
Comment 42 Hib Eris 2009-06-03 18:10:30 UTC
Created attachment 135897 [details] [review]
patch-12-Make_use_of_gtk+-unix-print_optional
Comment 43 Hib Eris 2009-06-03 18:10:54 UTC
Created attachment 135899 [details] [review]
patch-13-Disable_comics_backend_on_native_windows_builds
Comment 44 Hib Eris 2009-06-03 18:11:27 UTC
Created attachment 135900 [details] [review]
patch-14-Add_dependency_on_libdocument_for_libmisc
Comment 45 Hib Eris 2009-06-04 16:10:16 UTC
Created attachment 135953 [details] [review]
patch-14-Add_dependency_on_libdocument-libview_for_libmisc

Correction for patch-14.
Comment 46 Carlos Garcia Campos 2009-06-05 15:48:36 UTC
(In reply to comment #41)
> Created an attachment (id=135896) [edit]
> patch-11-Remove_left_over_GtkPrinter_from_ev-windowc

Applied to git master. Thanks!
Comment 47 Carlos Garcia Campos 2009-06-05 16:06:50 UTC
(In reply to comment #43)
> Created an attachment (id=135899) [edit]
> patch-13-Disable_comics_backend_on_native_windows_builds
> 

applied to git master. Thanks. 
Comment 48 Carlos Garcia Campos 2009-06-05 16:15:04 UTC
(In reply to comment #45)
> Created an attachment (id=135953) [edit]
> patch-14-Add_dependency_on_libdocument-libview_for_libmisc
> 
> Correction for patch-14.
> 

applied in git master. Thanks!
Comment 49 Hib Eris 2009-06-09 08:39:07 UTC
Created attachment 136191 [details] [review]
patch-12a-printing-Do-not-disable-printing-when-cairo-printi.patch

First part of new patch to make gtk-unix-print optional.
Comment 50 Hib Eris 2009-06-09 08:39:48 UTC
Created attachment 136192 [details] [review]
patch-12b-printing-Make-use-of-gtk-unix-print-optional.patch

Second part.
Comment 51 Hib Eris 2009-06-09 08:44:11 UTC
Created attachment 136195 [details] [review]
patch-15-build-Only-fail-on-missing-GConf-when-requested-ex.patch

The requirement to add --disable-gconf to the ./configure options when gconf is not available, makes it more difficult then nescessary to successfully build evince.

This patch loosens this by asuming you do not want to use gconf if it is not available. It will issue a warning though.
Comment 52 Hib Eris 2009-06-09 08:45:36 UTC
Created attachment 136196 [details] [review]
patch-16-build-Only-fail-on-missing-gnome-keyring-when-requ.patch

The requirement to add --disable-keyring to the ./configure options when gnome-keyring is not available, makes it more difficult then necessary to successfully build evince.

This patch loosens this by assuming you do not want to use gnome-keyring if it is not available. It will issue a warning though.
Comment 53 Hib Eris 2009-06-09 08:48:13 UTC
Created attachment 136198 [details] [review]
patch-17-windows-Make-evince-relocatable-on-windows-stock.patch

On Windows, the location of the program should not be hard coded into the binary.
This and the following patches will make Evince relocatable on windows.
Comment 54 Hib Eris 2009-06-09 08:48:36 UTC
Created attachment 136199 [details] [review]
patch-18-windows-Make-evince-relocatable-on-windows-backe.patch
Comment 55 Hib Eris 2009-06-09 08:49:02 UTC
Created attachment 136200 [details] [review]
patch-19-windows-Make-evince-relocatable-on-windows-GUI.patch
Comment 56 Hib Eris 2009-06-09 08:49:24 UTC
Created attachment 136201 [details] [review]
patch-20-windows-Make-previewer-relocatable-on-windows-GU.patch
Comment 57 Carlos Garcia Campos 2009-06-09 09:45:36 UTC
(In reply to comment #49)
> Created an attachment (id=136191) [edit]
> patch-12a-printing-Do-not-disable-printing-when-cairo-printi.patch
> 
> First part of new patch to make gtk-unix-print optional.
> 

applied to git master. Thanks!
Comment 58 Carlos Garcia Campos 2009-06-09 10:03:37 UTC
patch-15-build-Only-fail-on-missing-GConf-when-requested-ex.patch
patch-16-build-Only-fail-on-missing-gnome-keyring-when-requ.patch

Applied to git master. Thanks!
Comment 59 Carlos Garcia Campos 2009-06-09 12:55:56 UTC
(In reply to comment #53)
> Created an attachment (id=136198) [edit]
> patch-17-windows-Make-evince-relocatable-on-windows-stock.patch
> 
> On Windows, the location of the program should not be hard coded into the
> binary.
> This and the following patches will make Evince relocatable on windows.
> 

committed a simpler version fo the patch. Thanks!
Comment 60 Carlos Garcia Campos 2009-06-09 13:16:08 UTC
patch-19-windows-Make-evince-relocatable-on-windows-GUI.patch
patch-20-windows-Make-previewer-relocatable-on-windows-GU.patch

applied to git master. Thanks!
Comment 61 Carlos Garcia Campos 2009-06-09 13:29:55 UTC
(In reply to comment #54)
> Created an attachment (id=136199) [edit]
> patch-18-windows-Make-evince-relocatable-on-windows-backe.patch
> 

Since backendsdir is used more than once, I think it's better to use a global variable making backends_dir() return a const gchar *. It should be freed in _ev_backends_manager_shutdown(). 
Comment 62 Hib Eris 2009-06-09 15:20:35 UTC
Created attachment 136214 [details] [review]
patch-18-windows-Make-evince-relocatable-on-windows-backe.patch-v2
Comment 63 Carlos Garcia Campos 2009-06-09 17:56:03 UTC
(In reply to comment #62)
> Created an attachment (id=136214) [edit]
> patch-18-windows-Make-evince-relocatable-on-windows-backe.patch-v2
> 

committed a slightly modified version. Thanks!
Comment 64 Hib Eris 2009-06-11 08:33:06 UTC
Created attachment 136320 [details] [review]
patch-21-windows-build-Add-mwindows-flag-for-true-Windows.patch

This patch will make Evince a windows application on MS Windows, instead of a console application. So when started, it will no longer open both a console and a GUI, just the GUI.

With this patch the Windows port itself is done.

What is left to do, is 1) find a good reproducible method to build binaries and 2) package them into an installer.

For 1) we can probably use Fridrich Štrba's repositories http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_10.3/noarch/ that use OpenSuse's build service. Fridrich will create a cross compile package when the next Evince version is released.

For 2) I am currently learning how to create .msi packages with Windows Installer Toolkit and working on improving wine's msi.dll to do this on unix.
Of course, just creating a zip file would be so much easier, but where is the fun in that!
Comment 65 Alberto Ruiz 2009-06-11 09:12:17 UTC
Hib, you are my damn hero!
Comment 66 Hib Eris 2009-06-11 14:28:00 UTC
Created attachment 136337 [details] [review]
0001-Add-zlib-to-linker-flags-to-avoid-undefined-symbols-.patch

I got this patch from Fridrich Strba. It will make the impress backend work on windows as well.

With this, we have the pdf, impress, tiff and pixbuf backends working.

Unfortunately, the postscript backend is not working yet, due to difficulties to cross compile ghostscript.
Comment 67 Jody Goldberg 2009-06-11 15:53:21 UTC
I've included evince in the gnumeric win32 jhbuild scripts and nsis packaging.
To date things were failing, but I'll rerun things with all the recent patches and see if it gets further.

The goal was to provide an evince based print preview mechanism on win32 given the absence of working preview mechanisms on that platform.  However, that would require more gtk work.   However, this is an excellent step in that directly, thank you.
Comment 68 Carlos Garcia Campos 2009-06-12 12:23:29 UTC
(In reply to comment #64)
> Created an attachment (id=136320) [edit]
> patch-21-windows-build-Add-mwindows-flag-for-true-Windows.patch
> 

+if OS_WIN32                                                                                                                                                 
+evince_previewer_LDFLAGS = -mwindows                                                                                                                        
+endif                                                                                                                                                       
+   

chpe has removed OS_WIN32 (66bfa43ef9b730f8e76d789985bb17001d782d13), so I guess it should be PLATFORM_WIN32 instead, or should we add it again? chpe?
Comment 69 Christian Persch 2009-06-12 13:03:49 UTC
Hmm. I removed it only because I had removed all occurrences of it from the Makefile.am's. It's fine to re-add it, maybe with a more descriptive name like PLATFORM_WIN32_NATIVE or so.

BTW, I have one question that will help me simplify the configure logic: is this 'native win32', os_win32=yes in configure, the same as "pkg-config --variable target gdk-2.0" returning win32? Or is that something else?
Comment 70 Hib Eris 2009-06-14 14:48:09 UTC
Created attachment 136560 [details] [review]
patch-21-windows-build-Add-mwindows-flag-for-true-Windows-v2.patch

(In reply to comment #68)
> +if OS_WIN32                                                                    
> +evince_previewer_LDFLAGS = -mwindows                                           
> +endif                                                                          
> +   
> 
> chpe has removed OS_WIN32 (66bfa43ef9b730f8e76d789985bb17001d782d13), so I
> guess it should be PLATFORM_WIN32 instead, or should we add it again? chpe?

There is a difference between PLATFORM_WIN32 and OS_WIN32: PLATFORM_WIN32 includes Cygwin, whereas OS_WIN32 only includes Mingw (as far as I understand).

But from looking at Cygwin documentation I think we should include the -mwindows flag for Cygwin also, thus using PLATFORM_WIN32 in this case is more correct than using OS_WIN32.

This new patch uses PLATFORM_WIN32.
Comment 71 Hib Eris 2009-06-14 15:15:26 UTC
(In reply to comment #69)
> BTW, I have one question that will help me simplify the configure logic: is
> this 'native win32', os_win32=yes in configure, the same as "pkg-config
> --variable target gdk-2.0" returning win32? Or is that something else?

The target gdk-2.0 variable can only be used when gdk is installed, so the native win32 check is more general.

The os_win32 variable is now used in configure.ac only to set some defaults for the native win32 platform. I do not think it makes sense to replace those uses by a GDK_TARGET variable, as that variable represents GDK properties, not platform properties.

The other way around, it is not possible to replace the GDK_TARGET variable with the os_win32 variable, as the GDK_TARGET is multi-value (x11, quartz, win32), while the os_win32 is binary (yes/no).

So I would just leave things a they are.



Comment 72 Carlos Garcia Campos 2009-06-15 08:50:17 UTC
(In reply to comment #70)
> Created an attachment (id=136560) [edit]
> patch-21-windows-build-Add-mwindows-flag-for-true-Windows-v2.patch
> 
> (In reply to comment #68)
> > +if OS_WIN32                                                                    
> > +evince_previewer_LDFLAGS = -mwindows                                           
> > +endif                                                                          
> > +   
> > 
> > chpe has removed OS_WIN32 (66bfa43ef9b730f8e76d789985bb17001d782d13), so I
> > guess it should be PLATFORM_WIN32 instead, or should we add it again? chpe?
> 
> There is a difference between PLATFORM_WIN32 and OS_WIN32: PLATFORM_WIN32
> includes Cygwin, whereas OS_WIN32 only includes Mingw (as far as I understand).
> 
> But from looking at Cygwin documentation I think we should include the
> -mwindows flag for Cygwin also, thus using PLATFORM_WIN32 in this case is more
> correct than using OS_WIN32.
> 
> This new patch uses PLATFORM_WIN32.
> 

Applied to git master too. Thanks!
Comment 73 Carlos Garcia Campos 2009-06-15 08:56:49 UTC
(In reply to comment #66)
> Created an attachment (id=136337) [edit]
> 0001-Add-zlib-to-linker-flags-to-avoid-undefined-symbols-.patch

applied too. Thanks!
Comment 74 Christian Persch 2009-06-15 11:17:52 UTC
Shouldn't that have been -mconsole instead of -mwindows for the thumbnailer? I've looked at gnumeric and that's what it uses for its command line progs, too.
Comment 75 Paolo Melchiorre 2009-07-15 08:10:50 UTC
Can you put there [1] a build preview for windows like gedit 2.27?

[1] http://ftp.gnome.org/pub/gnome/binaries/win32/
Comment 76 Adam J Richardson 2009-08-27 14:20:42 UTC
Hib, can you direct me to the correct Poppler DLLs? evince.exe wants libpoppler-glib-4.dll, but the only one I can find is libpoppler-glib-2.dll.

Since I aim to deploy this at work, I'll be working on an NSIS installer (later though). I can upload it when it's done, if anyone is interested and no one else has done it by then.

Thanks for your efforts. :)
Comment 77 Hib Eris 2009-08-27 14:45:13 UTC
Adam,

Some experimental builds of evince and poppler can be found at

http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_10.3/noarch/

You will need to unpack the rpms and get the files out of it. You probably also need to unpack gtk, glib, libtiff, zlib, cairo and maybe other packages. You'll have to figure out what's needed yourself. Maybe you can find out from the dependencies of the rpm packages.

I am working on producing a cross compiled MSI installer with WiX (Windows Installer Xml Toolkit), mono and wine. Progress is slow in this area, so if you manage to produce a working NSIS installer for evince, that would be very nice.
Comment 78 Adam J Richardson 2009-09-02 15:41:09 UTC
Here's a link to my installer, but I guess I missed a library somewhere because evince.exe crashes on loading a PDF. It's a start, anyway. Installer source to follow.

http://dreamtrack.dnsalias.com/downloads/evince_2.27.3.exe
Comment 79 Adam J Richardson 2009-09-02 15:42:50 UTC
Created attachment 142332 [details]
Source of evince installer
Comment 80 Paolo Melchiorre 2009-09-24 11:11:18 UTC
@Adam

I installed your build and it crash me too.


@all

In the release note of Gnome 2.28 [1] I read:
"Evince has also been ported to and is available for Microsoft Windows® platforms."

It's not true because there's not a working build of Evince 2.28 for Windows like Gedit [2].

I hope Windows user can use Evince 2.28 in the next day.

See you.

[1] http://library.gnome.org/misc/release-notes/2.28/index.html.en#rnusers.evince
[2] http://ftp.gnome.org/pub/gnome/binaries/win32/gedit/2.28/
Comment 81 Adam J Richardson 2009-09-24 12:40:25 UTC
@Paolo

Thanks for the confirmation. It's not what I'd call "my build", I just worked out a few dependencies and created an installer. The script is attached right here, you can see how simple it is. Feel free to improve it, as I don't have time to work on it right now.

I think evince.exe works for Hib and a few others. In that sense there is a Windows build available. :P
Comment 82 Hib Eris 2009-09-24 13:43:56 UTC
Hi all,

I fully agree with you that 'a Windows build is available' is not completely true. Getting all dependencies working is difficult and takes more time then it should. I am working on fixing that.

In the mean time, I did take a look at Adam's installer (http://dreamtrack.dnsalias.com/downloads/evince_2.27.3.exe), and it works for me sometimes (running it under Wine).

It works for me for pdf documents containing text only. If there are pictures in the document, evince crashes. I traced this down to a buggy libpoppler build with jpeg support. I am not completely sure what the problem is yet, but I am working on it.

So expect a working version soon!
Comment 83 Carlos Garcia Campos 2009-09-25 13:11:27 UTC
The windows installer is now available here:

http://download.gnome.org/binaries/win32/evince/2.28/evince-2.28.0.msi

Thanks Hib!

I'm going to close this bug now.
Comment 84 Hib Eris 2009-09-25 14:34:02 UTC
Created attachment 143999 [details]
evince.msi.wxs

I had to use WindowsXP to create the installer. I am attaching the sources for it here. I do not think they will work for anyone, but if you are interested, you can take a look.

My goal is to get these installer sources to work on Linux. When that works, then I will integrate the creation of an installer into evince' Makefile. I already have this working partially.
Comment 85 Hib Eris 2009-09-25 14:34:39 UTC
Created attachment 144000 [details]
evince.wxs
Comment 86 Hib Eris 2009-09-25 14:38:14 UTC
Created attachment 144002 [details]
License.rtf

Some commands to create the installer:

mono "C:\Program Files\Windows Installer XML v3\bin\candle.exe" -dwixdistdir=wixdistdir evince.wxs 

mono "C:\Program Files\Windows Installer XML v3\bin\candle.exe" -dwixdistdir=wixdistdir evince.msi.wxs 

mono "C:\Program Files\Windows Installer XML v3\bin\light.exe" -o evince-2.28.0.msi -ext "H:\newinst\WixUIExtension.dll" -dWixUILicenseRtf="H:\newinst\License.rtf" -sval evince.msi.wixobj evince.wixobj


To generate the orignal evince.wxs, I used this. After that I made some minor manual changes to it: 

mono "C:\Program Files\Windows Installer XML v3\bin\heat.exe" dir wixdistdir -gg -sfrag -sreg -cg evince -dr evince -srd -var var.wixdistdir -o evince.wxs
Comment 87 Paolo Melchiorre 2009-09-25 14:59:51 UTC
@Hib
Thanks. Your installer work well.

For builds installer from gnu/linux can you try to use nsis.sourceforge.net ?

Some icon on evince.exe are missing, can you add every icon on the build ?
Comment 88 Alberto Ruiz 2009-09-25 15:03:46 UTC
I would highly discourage an nsis installer just for the sake of building the installer under Linux, .msi are a lot easier to manage ande deploy for sysadmins in big deployments.

The installer could be built under Linux using mono under wine given that we fix the remaining wine bugs (which may be fixed already, I'm not sure).
Comment 89 Paolo Melchiorre 2009-09-25 15:20:52 UTC
ok for the .msi but you can provide nsis installer too?

It works well for final user and it can be build form gnu/linux and Hib can integrate the creation of an installer into evince' Makefile.
Comment 90 Hib Eris 2009-09-25 15:57:48 UTC
@Alberto: there still seem to be some bugs with wine that is why I had to use WindowsXP to build the installer. Under Linux I can only build an installer with Wine that runs flawless on Wine, but crashes on Windows. So I still have to do some bug hunting there, but I am getting there.

@Paulo: I personally have no intention to make a nsis installer for the reasons mentioned by Alberto. I was under the impression that msi packages are just as useful for end users as nsis installers. Am I mistaken in this?
Comment 91 Adam J Richardson 2009-10-01 10:54:19 UTC
> .msi are a lot easier to manage ande deploy for sysadmins in big deployments

How are they easier to manage and deploy? I have no experience of large projects, so I don't know, but are there really problems managing a simple text file?

What I do is include the .nsi in my DARCS repositories. DARCS just thinks it's another source file to be versioned, copied, patched, etc.
Comment 92 Paolo Melchiorre 2009-10-01 11:07:44 UTC
I've tested msi installer into Windows XP:
- there's not icon (es: evince.ico) in top of the window or in windows menu
- some icon in menu are missing
- language other than english are missing
- print function not working

This function are present in GNU/Linux version I think it must be present in the Windows version.
Comment 93 Adam J Richardson 2009-10-01 12:02:44 UTC
The MSI version loads my PDFs without crashing. :) 

I do have a few bugs to report though, I'll start separate threads for them.

I guess the missing icons and start menu shortcuts do have relevance here.
Comment 94 Adam J Richardson 2009-10-01 15:31:19 UTC
I had an idea about the NSIS installer. Since the MSI version seems to work quite well, I can use the deployed evince to make up the equivalent NSIS installer for those who want it. :) 

I don't have a virgin Windows box to test this on right now, so YMMV. It should work unless I've done something stupid...

http://dreamtrack.dnsalias.com/downloads/evince_v2.28.0.exe [evince]
http://dreamtrack.dnsalias.com/downloads/evince_v2.28.0.nsi [NSIS script]
Comment 95 smaragdus 2015-10-26 00:22:50 UTC
Evince is no longer ported to Windows? The latest Windows version is 2.32.0.145 and it is well behind the current Linux ones.
Comment 96 André Klapper 2019-09-16 13:14:54 UTC
See the "Windows" section on https://wiki.gnome.org/Apps/Evince/Downloads
Comment 97 smaragdus 2019-09-16 15:20:23 UTC
@André Klapper

The first link (https://bitbucket.org/msys2/mingw-packages/src) is dead anyway.