DjView 4.9.5: sources, patch and binaries for Mac OS X Mountain Lion :-)

Vladimir
2013-08-04
2014-05-15
  • Vladimir
    Vladimir
    2013-08-04

    https://sourceforge.net/projects/djview-495-for-mac/

    This is DjView 4.9.5 - DjView 4.9 which was ported to QT 5.1
    and adapted for Mac OS X Mountain Lion. The advanced description
    could be found on the project page! Please test and post feedback.
    Thanks to QT 5.1, GUI is awesome. I hope you enjoy this release! :)

    Changes would be included to DjView 5.0, if the feedback is positive

     
    • Leon Bottou
      Leon Bottou
      2013-08-04

      On Sunday, August 04, 2013 12:40:48 PM Vladimir wrote:

      https://sourceforge.net/projects/djview-495-for-mac/

      This is DjView 4.9.5 - DjView 4.9 which was ported to QT 5.1
      and adapted for Mac OS X Mountain Lion. The advanced description
      could be found on the project page! Please test and post feedback.
      Thanks to QT 5.1, GUI is awesome. I hope you enjoy this release! :)

      Changes would be included to DjView 5.0, if the feedback is positive

      Thanks.
      In particular I am very happy to see a Qt-5 port.
      This is something I will have to do at some point.
      I will go carefully over your changes.
      In fact I now have them in a branch of the official git repository.
      How difficult was it?

      • L.
       
      • Vladimir
        Vladimir
        2013-08-04

        This was not really difficult, but took a plenty of time:
        many QT4 functions are not working at QT5.1, and I needed
        to lookup the QT5.1 substitute for function at every case.

        For DjView 4.9.5 , the "./configure" line is a bit different:

        ./configure --prefix=/usr/local --disable-nsdejavu PKG_CONFIG_PATH=/usr/local/bin/pkg-config QMAKE=/Applications/QT/5.1.0/clang_64/bin/qmake

        (specifying the PKG_CONFIG_PATH helps to avoid the error:
        Project ERROR: Package ddjvuapi not found
        lrelease error: process project file 'djview.pro')

        Also, I had to comment these two lines in "./configure" file:

          as_fn_error $? "Qt version $QT_VERSION is insufficient.
          Please define variable QMAKE to a suitable qmake." "$LINENO" 5
        

        Because some note gets appended to the temporary "conftest.d/conftest.sh" file (I have not find the way to block it), and if not to comment these two lines, the compilation would be stopped.

        All of changes could be found by searching for "// ~~~" character sequence (commented is QT4 version, under that there is a QT5.1 substitute)

         
        Last edit: Vladimir 2013-08-04
      • Vladimir
        Vladimir
        2013-08-04

        By the way, I have created a separate sourceforge project only for personal convenience. It will be removed after the migration would be completed (includes the new download links for source and binaries at http://djvu.sourceforge.net )

         
        • Leon Bottou
          Leon Bottou
          2013-08-04

          Another sf project with a mac focus is a good thing. The main code cannot move as fast because it must work on a variety of machines. But i can point mac users to your project.

          By the way, your binary does not contain the Qt librariew it uses. Ideally users should just have to copy the app on their drive to run it. But this won't work unless they install the right version of Qt.

          Check the old mac binary for djview. See what's inside the app directory (including scripts and instructions.)
          Regards,

          • L.

          On 13-08-04 18:01 Vladimir wrote:

          By the way, I have created a separate sourceforge project only for personal convenience. It will be removed after the migration would be completed (includes the new download links for source and binaries at http://djvu.sourceforge.net )

          DjView 4.9.5: sources, patch and binaries for Mac OS X Mountain Lion :-)

          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/djvu/discussion/103286/
          To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

           
          • Victor Ivrii
            Victor Ivrii
            2014-04-21

            I made no changes in the source.

            Yes, I always looked how "old" djview was populated. I will try to do above when I return to Toronto (10 days from now) as I need a machine without any libraries for testing

             
            • Leon Bottou
              Leon Bottou
              2014-04-21

              This is something rather annoying to test in fact.

              Another issue for recent Mac OS is the need to sign the binaries to prevent
              the Mac from complaining about security.

              Is this security feature something that Mac users disable right away, or
              something we must deal with?

              • L.

              From: Victor Ivrii [mailto:victor_ivrii@users.sf.net]
              Sent: Monday, April 21, 2014 1:18 PM
              To: [djvu:discussion]
              Subject: [djvu:discussion] Re: DjView 4.9.5: sources, patch and binaries for
              Mac OS X Mountain Lion :-)

              I made no changes in the source.

              Yes, I always looked how "old" djview was populated. I will try to do above
              when I return to Toronto (10 days from now) as I need a machine without any
              libraries for testing


              DjView 4.9.5: sources, patch and binaries for Mac OS X Mountain Lion :-)
              https://sourceforge.net/p/djvu/discussion/103286/thread/d50b1c32/?limit=25# e32b/9e1b/c717/a2b9/c61c


              Sent from sourceforge.net because you indicated interest in
              https://sourceforge.net/p/djvu/discussion/103286/

              To unsubscribe from further messages, please visit
              https://sourceforge.net/auth/subscriptions/

               
              Attachments
              • Leon Bottou
                Leon Bottou
                2014-04-23

                FYI:

                I have ported your Qt5 patches to the head of the git repository. They are a
                bit different because I want the configuration and the code to work with both
                Qt4 and Qt5. I also fixed a couple things. In particular, Qt5 no longer
                defines Q_WS_MAC. I replaced that by Q_OS_DARWIN...

                • L.
                 
  • ~MS
    ~MS
    2013-10-28

    I cannot seem to find the browser plugin in the binaries. Is it missing or am I not looking at the right place? The browser plugin is also missing in the previous versions for MacOS. Is there a reason it's not there? Thanks -MS

     
  • Victor Ivrii
    Victor Ivrii
    2014-04-20

    I compiled a working application on MacOSX 10.9.1 and Qt 5.2.1 with

    ./configure --prefix=/usr/local --disable-nsdejavu PKG_CONFIG_PATH=/usr/local/bin/pkg-config QMAKE=/Users/victor/Qt5.2.1/5.2.1/clang_64/bin/qmake

    (it is where Qt5.2.1 installed files by a default). However it is not portable as it does not contain libraries and binaries other than djview inside (in contrast to precompiled version in djvulibre. This problem (inability to create a portable application) has been perplexing for years!

     
    Last edit: Victor Ivrii 2014-04-20
    • Leon Bottou
      Leon Bottou
      2014-04-20

      On Sunday, April 20, 2014 09:02:56 AM Victor Ivrii wrote:

      I compiled working application on MacOSX 10.9.1 and Qt 5.2.1 with

      ./configure --prefix=/usr/local --disable-nsdejavu
      PKG_CONFIG_PATH=/usr/local/bin/pkg-config
      QMAKE=/Users/victor/Qt5.2.1/5.2.1/clang_64/bin/qmake

      (it is where Qt5.2.1 installed files by a default). However it is not
      portable as it does not contain libraries and binaries other than djview
      inside (in contrast to precompiled version in djvulibre. This problem
      (inability to create a portable application) has been perplexing for years!

      Did you have to make changes to the source?

      To create a portable executable, you have to see how the DjView bundle is
      structured in the official binary. Make only creates some of these files.
      The other files have to be populated by hand.
      Here are my recollections of the process.
      See also the attached file.

      Copy the djvulibre "share" directory into
      DjView.app/Contents/share/djvu/

      Copy all the .qm translation files as
      DjView.app/Contents/Resources/${LANG}.lproj/qt_${LANG}.qm
      DjView.app/Contents/Resources/${LANG}.lproj/djview_${LANG}.qm

      Copy this from an old DjView binary
      DjView.app/Contents/fixlib.sh [likely to work]
      DjView.app/Contents/Info.plist [edit version numbers]
      DjView.app/Contents/Resources/DjVu.icns
      DjView.app/Contents/Resources/DjVuApp.icns
      DjView.app/Contents/Resources/qt.conf [likely to work]

      Copy all the required Qt5 plugins into
      DjView.app/Contents/plugins/
      The exact list is to be determined experimentally.
      You usually need all imageformats and codecs.
      You may need network stuff

      Put all the needed libraries into
      DjView.app/Contents/lib/
      The exact list is to be determined experimentally.

      and then run the script on all executables
      and libraries (all binaries in fact).
      $ DjView.app/Contents/fixlib.sh \ DjView.app/Contents/MacOS/ \ DjView.app/Contents/lib/ \ DjView.app/Contents/bin/ \ DjView.app/Contents/plugins//* \

      This script patches them to make sure they are
      searched in the right directories
      It may need editing for Qt5.

       
      Attachments
  • whatnot
    whatnot
    2014-04-27

    to whom it may concern,

    I apologise for gatecrashing your party, and excuse my total ignorance, but it's my last resort.

    I have been trying to view files in DjVu format for probably over two years now, I have tried a plethora of plugins, addons, stand-alone viewers, I have tried everything short of paying money to no effect.

    As far as 'djview4-4.9.5-binary' is concerned, 'DjView cannot be opened because of a problem. Check with the developer to make sure DjView works with this version of Mac OS X. You may need to reinstall the application. Be sure to install any available updates for the application and Mac OS X.'

    when it comes to stand-alone viewers, the best result I've had so far was opening a file to see it all white, while the browser plugin results in Java security alert. It's ridiculous.

    I don't know what kind of deal it is, but for some reason almost all digital collections in Polish institutions that are available online are presented in this obscure format with out-of-date links to viewing options.

    I suppose I will keep trying, but as far as I'm concerned, I'm wasting my time.

     
    • Janusz
      Janusz
      2014-04-27

      Polish digital libraries use DjVu because it is a very good format.

      Our fork of djview

      https://bitbucket.org/mrudolf/djview-poliqarp

      works on Mac but have to be compiled locally because the author has neither the money nor motivation to pay for the privilige of signing the package as an official developer.

      "All white" probably means that you have downloaded only the index of unbundled documents. One of the ways to download the whole document is to use djvu-wget:

      https://bitbucket.org/jwilk/djvu-misc/

      You can also try to get some help from the Polish digital library staff asking your questions ("Zadaj pytanie") on the forum

      http://fbc.pionier.net.pl/qa/

      Regards

      Janusz

       
  • Leon Bottou
    Leon Bottou
    2014-04-28

    I guess it is really time to make a new binary for MacOS.
    We need somebody with a mac, xcode, and signing authority.
    Let's wait until Victor returns to Toronto...

    • L.
     
  • Victor Ivrii
    Victor Ivrii
    2014-05-02

    I compiled on MacOSX 10.7.8 and Qt5.2.1 It works

    However if I try on the same Mac use binary compiled on 10.9 it crashes with complain that /usr/local/lib/libtiff.5.dylib not found (that mac has only libtiff.3.dylib) even if in Content I create lib and copy /usr/local/lib/libtiff.5.dylib there. So "populating" does not work so far

     
    Last edit: Victor Ivrii 2014-05-02
    • Leon Bottou
      Leon Bottou
      2014-05-02

      On Friday, May 02, 2014 06:37:54 AM Victor Ivrii wrote:

      I compiled on MacOSX 10.7.8 and Qt5. It works

      However if I try on the same Mac use binary compiled on 10.9 it crashes with
      complain that /usr/local/lib/libtiff.5.dylib not found (that mac has only
      libtiff.3.dylib) even if in Content I create lib and copy
      /usr/local/lib/libtiff.5.dylib there. So "populating" does not work so far

      Populating is not sufficient. You have to use the "fixlib.sh" script to store
      the proper library path in the executable and libraries that need it.

      See my comment
      http://sourceforge.net/p/djvu/discussion/103286/thread/d50b1c32/#614e/e4f9
      and/or the Mac deployment instructions for Qt
      http://qt-project.org/doc/qt-5/macosx-deployment.html

      • L.
       
  • ~MS
    ~MS
    2014-05-14

    Hello, I asked this question earlier. There is no browser plugin for MacOS in DjView. The only DjVu browser plugin I could find on Mac is the one developed by Caminova and it really doesn't play nice with quite a few things. DjVuLibre does not have one either.

    Is this something that is in the works? Any insights would be very helpful. thanks -MS

     
    • Leon Bottou
      Leon Bottou
      2014-05-14

      This is a sore point.

      Djview was first written as a browser plugin for unix than changed into a
      portable viewer for unix, windows, and osx. When used as a browser plugin on
      unix, the executable djview runs as a different process and "embeds" itself
      into the browser window. This is very hard to do under osx because this part
      of osx has almost no documentation.

      There is an experimental code that produces a netscape plugin (npdjvu.so)
      instead of an executable. This has worked under unix and windows at some
      point. It has not been developed because this is less robust under unix,
      and because netscape plugins under windows are limited to firefox (internet
      explorer wants activex plugins.) It has never worked on the mac because
      netscape plugins on the mac are really strange things going back to macos9.
      But this could be a base for a native safari plugin. Unfortunately, nobody
      has volunteered. I could assist on the djview things, but not the mac
      things.

      • L.

      From: ~MS [mailto:ms3811@users.sf.net]
      Sent: Wednesday, May 14, 2014 3:55 PM
      To: [djvu:discussion]
      Subject: [djvu:discussion] DjView 4.9.5: sources, patch and binaries for Mac
      OS X Mountain Lion :-)

      Hello, I asked this question earlier. There is no browser plugin for MacOS
      in DjView. The only DjVu browser plugin I could find on Mac is the one
      developed by Caminova and it really doesn't play nice with quite a few
      things. DjVuLibre does not have one either.

      Is this something that is in the works? Any insights would be very helpful.
      thanks -MS


      DjView 4.9.5: sources, patch and binaries for Mac OS X Mountain Lion :-)
      https://sourceforge.net/p/djvu/discussion/103286/thread/d50b1c32/?limit=50# dde5


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/djvu/discussion/103286/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      Attachments
  • ~MS
    ~MS
    2014-05-14

    Leon, thanks for the prompt and detailed reply.

    Would it at all be possible to develop a Javascript based viewer for DjVu? I am thinking something similar to the PDF.js project. This would alleviate OS/Browser dependencies and provide users a streamlined experience. The site serving the documents could host the application, allowing users to view djvu documents without having to download and install any plugins.

    If this is a possibility, I might be willing to support the project.

    -MS

     
    Last edit: ~MS 2014-05-15
    • Leon Bottou
      Leon Bottou
      2014-05-15

      On Wednesday, May 14, 2014 11:10:25 PM ~MS wrote:

      Leon, thanks for the prompt and detailed reply.

      Would it at all be possible to develop a Javascript based viewer for DjVu? I
      thinking something similar to the PDF.js project. This would alleviate
      OS/Browser dependencies and provide users a streamlined experienced. The
      site serving the documents could host the application, allowing users to
      view djvu documents without having to download and install any plugins.

      If this is a possibility, I might be willing to support the project.

      -MS

      Yes. This would be in fact a much better idea,
      and it could follow the code base of the java viewer
      which is significantly simpler than djvulibre+djview
      and only needs a refresh of the annotation code.

      http://javadjvu.foxtrottechnologies.com/
      http://sourceforge.net/projects/javadjvu/

      Foxtrotttechnologies is Bill Riemers consulting business.
      He was the author of JavaDjVu in fact...

      • L.
       
  • If I had the time, I would try writing a basic HTML5 viewer to get a project going. But I don't. If you start with javadjvu as a reference, I recommend simply looking at the core DjVu library. Most of the rest is rather ackwardly written because I needed to make something that could work in extremely old versions of Java. I've seen an open source project that converts java to javascript, in fact I even ran the code through it once. But I never tested the results... But again, that may be useful to get one started.

    Bill