diff -Naur -x qpdfview.desktop E:\trees\qpdfview\trunk\..\vendor\current/build_os2.cmd E:\trees\qpdfview\trunk/build_os2.cmd --- E:\trees\qpdfview\trunk\..\vendor\current/build_os2.cmd 1970-01-01 01:00:00.000000000 +0100 +++ E:\trees\qpdfview\trunk/build_os2.cmd 2013-10-16 14:54:30.000000000 +0200 @@ -0,0 +1,358 @@ +/* qpdfview Build Script */ +/* version history */ +/* version 0.1.0 from 25.03.2013 Silvan (first edition) */ +/* version 0.1.1 from 25.04.2013 Silvan (new poppler lib) */ +/* version 0.1.2 from 29.05.2013 Silvan (application version from qpdfview.pri) */ +/* version 0.1.3 from 17.06.2013 Silvan (added .ps support) */ +/* version 0.1.4 from 08.08.2013 Silvan (new poppler lib) */ +/* version 0.1.5 from 20.08.2013 Silvan (added diff option) */ +/* version 0.1.6 from 15.10.2013 Silvan (copy all help*.html) */ +/* version 0.2.0 from 16.10.2013 Silvan (get some info form qpdfview_os2.pri) */ + +/* init the version string (don't forget to change) */ +version = "0.2.0" +version_date = "16.10.2013" +'@echo off' + +parse arg command option +parse source . . scriptFile + +/* init the required vars */ +qRC = 0 +mRC = 0 +buildDir = strip(directory(),'T','\') /* Make sure we have no trailing backslash */ +sourceDir = FixDir(filespec('D', scriptFile) || filespec('P', scriptFile)) +vendorDir = sourceDir || '\..\vendor\current' +diffDir = sourceDir || '\..\' +srcDir = sourceDir +OS2Dir = sourceDir +installDir = buildDir || '\install' +installDirT= installDir || '\data' +qErrorFile = buildDir||'\qmake.err' +qOutFile = buildDir||'\qmake.out' +mErrorFile = buildDir||'\make.err' +mOutFile = buildDir||'\make.out' + +/* get the Qpdfview version */ +Qpdfview_version = '0.0.0' +Qpdfview_build = ' ' +call version +internal_build = translate(Qpdfview_version, '_', '.') + +/* get some info from qpdfview_os2.pri */ +popplerDir = ' ' +psDir = ' ' +djvuDir = ' ' +tiffDir = ' ' +call getpri + +title = "Qpdfview for eCS (OS/2) build script v" || version || " from " || version_date +say title +say +say "Build directory :" buildDir +say "Source directory :" sourceDir +say +say "Qpdfview version :" Qpdfview_version +say " build :" Qpdfview_build +say +say "Using poppler from:" popplerDir +say " djvu from :" djvuDir +say " ps from :" psDir +say " tiff from :" tiffDir +say + +/* translate command to all upercase */ +command = translate(command) + +if command = "" then signal help + + +if command = "INSTALL" then do + if option \== "" then do + Qpdfview_build = option + end + select + when Qpdfview_build \== "" then do + zipFile = installDir || '\qpdfview-' || internal_build || '-' || Qpdfview_build || '.zip' + end + otherwise do + signal help + end + end +end + +/* now we translate also the option */ +option = translate(option) + +if sourceDir \== buildDir then do + say "Shadow build in progress ..." + say +end + +say "Executing command: "command option + +select + when command = "MAKE" & option = "CLEAN" then do + + say "cleaning the tree" + call make 'distclean' + + say "please execute this script again with 'make' to build Qpdfview" + + end + when command = "MAKE" then do + + say "creating Qpdfview makefile" + call qmake + + if qRC = 0 then do + say "building Qpdfview" + if option = "" then do + call make + end + else do + call make 'debug' + end + end + + end + + when command = "INSTALL" then do + +/* first delete everything */ + call deleteall + +/* create the installDir,and the translation subdir */ + ok = SysMkDir(installDir) + ok = SysMkDir(installDirT) + +/* copy the exe */ + ok = SysCopyObject(buildDir||'\Qpdfview.exe',installDir) + +/* copy all dll */ + ok = SysFileTree(buildDir||'\*.dll', rm.,'FOS') + do i = 1 to rm.0 + ok = SysCopyObject(rm.i, installDir) + end + +/* copy the readme */ + rm.0 = 1 + rm.1 = 'install.os2' + do i = 1 to rm.0 + cmdtorun = 'sed "s;_VERSION_;' || Qpdfview_version || ';g" ' || os2Dir || '\' || rm.i || ' | sed "s;_BUILD_;' || Qpdfview_build || ';g" >' || installDir || '\' || rm.i + address cmd cmdtorun + end + +/* copy different stuff */ + rm.0 = 5 + rm.1 = 'CHANGES' + frmDir.1 = os2Dir + toDir.1 = installDir + rm.2 = 'help*.html' + frmDir.2 = os2Dir || '\miscellaneous' + toDir.2 = installDirT + rm.3 = '*.dll' + frmDir.3 = popplerDir || '\poppler\.libs' + toDir.3 = installDir + rm.4 = '*.dll' + frmDir.4 = popplerDir || '\qt4\src\.libs' + toDir.4 = installDir + rm.5 = '*.dll' + frmDir.5 = tiffDir || '\libtiff\.libs' + toDir.5 = installDir + do i = 1 to rm.0 + cmdtorun = 'copy ' || frmDir.i || '\' || rm.i || ' ' || toDir.i + address cmd cmdtorun + end + +/* create the qm files from ts files */ + ok = SysFileTree(srcDir||'\translations\*.ts', rm.,'FO') + do i = 1 to rm.0 + fileName = filespec('N',rm.i) + fileName = left(fileName,lastpos('.', fileName)-1) || '.qm' + cmdtorun = 'lrelease ' || rm.i || ' -qm ' || installDirT || '\' || fileName + address cmd cmdtorun + end + +/* zip all dynamic stuff */ + ok = directory(installDir) + cmdtorun = 'zip -r ' || zipFile || ' * -x *.zip' + address cmd cmdtorun + ok = directory(buildDir) + +/* zip all icons */ + + end + + when command = "UNINSTALL" then do + + call deleteall + + end + + when command = "DIFF" then do + + address cmd 'diff -Naur ' || vendorDir || ' ' || sourceDir || ' -x qpdfview.desktop > ' || diffDir || Qpdfview_version || '_' || Qpdfview_build || '.diff' + + end + + otherwise do + say 'Unknown parameter "'command'" - aborting...' + exit 1 + end +end + +/* cleanup the mess */ +error: + +if qRC = 0 & mRC = 0 then do + ok = SysFileDelete(mOutFile) + ok = SysFileDelete(mErrorFile) + ok = SysFileDelete(qOutFile) + ok = SysFileDelete(qErrorFile) +end +else do + if mRC <> 0 then do + say "Alarm! Make errors occured! Look at "mOutFile" and "mErrorFile + end + if qRC <> 0 then do + say "Alarm! qMake errors occured! Look at "qOutFile" and "qErrorFile + end +end + +exit 0 + +qmake: + sourceFile = sourceDir || '/qpdfview.pro' + address cmd 'qmake "CONFIG+=without_pkgconfig" "CONFIG+=without_dbus" "CONFIG+=without_magic" ' sourceFile ' 2>'qErrorFile' 1>'qOutFile + + qRC = RC + if qRC <> 0 then do + call beep 880, 20 + say "Alarm! qmake RC="RC + end +return + +make: + makeparm = arg(1) + address cmd 'make 'makeparm' 2>'mErrorFile' 1>'mOutFile + mRC = RC + if mRC <> 0 then do + call beep 880, 20 + say "Alarm! make RC="RC + end +return + + +deleteall: /* delete installDir (including subdirs) except zip files */ + + say "Delete all files except *zip in " installDir + ok = SysFileTree(installDir||'\*', rm.,'FOS') + do i = 1 to rm.0 + if translate(right(rm.i, 3)) \== 'ZIP' then do + ok = SysFileDelete(rm.i) + end + end + + say "Delete zip file " zipFile + ok = SysFileDelete(zipFile) + + say "Removing subdirs from " || installDir + ok = SysFileTree(installDir||'\*', rm.,'OS') + do i = 1 to rm.0 + ok = SysRmDir(rm.i) + end + + call SysSleep(5) +return + +/** + * Fixes the directory path by a) converting all slashes to back + * slashes and b) ensuring that the trailing slash is present if + * the directory is the root directory, and absent otherwise. + * + * @param dir the directory path + * @param noslash + * optional argument. If 1, the path returned will not have a + * trailing slash anyway. Useful for concatenating it with a + * file name. + */ +FixDir: procedure expose (Globals) + parse arg dir, noslash + noslash = (noslash = 1) + dir = translate(dir, '\', '/') + if (right(dir, 1) == '\' &, + (noslash | \(length(dir) == 3 & (substr(dir, 2, 1) == ':')))) then + dir = substr(dir, 1, length(dir) - 1) + return dir + +/** + * reads the version.cpp and gets the Qpdfview version from there + */ +version: procedure expose Qpdfview_version Qpdfview_build srcDir + + QpdfviewVer = ' ' + /* Qpdfview Version file */ + Version = srcDir || "\qpdfview.pri" + + do until lines(Version) = 0 + verline = linein(Version) + if substr(Verline,30,19) = "APPLICATION_VERSION" then do + parse var verline . ' '. ' ' QpdfviewVer + end + end + + ok = stream(Version,'c','close') + if QpdfviewVer \== ' ' then do + QpdfviewVer = strip(QpdfviewVer,,'"') + parse var QpdfviewVer ver '.' maj '.' min '.' Qpdfview_build + Qpdfview_version = ver || '.'|| maj || '.' || min + end + + if Qpdfview_build == '' then do + Qpdfview_build = 'GA' + end + + return + +/** + * reads the qpdfview_os2.pri and some values from there + */ +getpri: procedure expose popplerDir djvuDir psDir tiffDir srcDir + + /* Qpdfview_os2.pri file */ + priFile = srcDir || "\qpdfview_os2.pri" + + do until lines(priFile) = 0 + verline = linein(priFile) + verline = strip(verline,,' ') + if substr(Verline,1,8) = "PDF_ROOT" then do + parse var verline . ' '. ' ' popplerDir + end + if substr(Verline,1,9) = "DJVU_ROOT" then do + parse var verline . ' '. ' ' djvuDir + end + if substr(Verline,1,7) = "PS_ROOT" then do + parse var verline . ' '. ' ' psDir + end + if substr(Verline,1,9) = "TIFF_ROOT" then do + parse var verline . ' '. ' ' tiffDir + end + end + + ok = stream(priFile,'c','close') + popplerDir = FixDir(popplerDir) + djvuDir = FixDir(djvuDir) + psDir = FixDir(psDir) + tiffDir = FixDir(tiffDir) + return + +help: + say "Parameters:" + say " make" + say " make debug" + say " make clean" + say " install build (build overwrites what this script finds)" + say " uninstall" + say " diff (creates a diff from vendor to trunk)" +exit 255 diff -Naur -x qpdfview.desktop E:\trees\qpdfview\trunk\..\vendor\current/install.os2 E:\trees\qpdfview\trunk/install.os2 --- E:\trees\qpdfview\trunk\..\vendor\current/install.os2 1970-01-01 01:00:00.000000000 +0100 +++ E:\trees\qpdfview\trunk/install.os2 2013-10-15 16:58:10.000000000 +0200 @@ -0,0 +1,303 @@ +Qpdfview _VERSION_ _BUILD_ installation + + +0. CONTENTS OF THIS FILE +======================== + +1. INTRODUCTION + +2. REQUIREMENTS + +3. INSTALLATION + +4. BUGREPORTS + +5. CREDITS + +6. SUPPORT AND DONATIONS + +7. HISTORY + + +1. INTRODUCTION +=============== + +Welcome to Qpdfview _VERSION_ _BUILD_ port for OS/2 and eComStation. + + +2. REQUIREMENTS +=============== + +The following requirements need to be installed. + + +2.1 kLIBC, GCC4Core, Qt4, Zlib, cups +------------------------------------ + +The installation of these products can be done either by RPM or ZIP files. + +2.1.a RPM installation +---------------------- + +kLIBC +----- + + 1. yum install libc + +GCC4Core +-------- + + 1. yum install libgcc4* + 2. yum install gcc-stack-protector + 3. yum install gcc-stdc++-shared-library + 4. yum install gcc-supc++-shared-library + +Qt4 dll +------- + + 1. yum install libqt4 + 2. Install the xsystray plugin as noted in the readme.os2 and also in + readme.xsystray + +Zlib +---- + + 1. yum install zlib + +Jpeg +---- + + 1. yum install libjpeg + +djvulibre +--------- + + not available as a rpm at this time of writing + +cups +---- + + not available as a rpm at this time of writing + +freetype/fontconfig +------------------- + + not available as a rpm at this time of writing + +ghstscript +---------- + + not available as a rpm at this time of writing + +pthread +------- + + 1. yum install pthread + + +2.1.b ZIP Installation +---------------------- + +kLIBC +----- + + 1. Download kLIBC 0.6.5 or better (see http://svn.netlabs.org/libc for more + information) + 2. Install the files to your libpath eg x:\ecs\dll + +GCC4Core +-------- + + 1. Download GCC4Core 1.2.1 or better from http://ftp.netlabs.org/pub/gcc + 2. Install the files to your libpath eg. x:\ecs\dll + +Qt4 dll +------- + + 1. Download Qt4 4.7.3 or better (see http://svn.netlabs.org/qt4 for more + information) + 2. Install the files according to the readme + 3. Install the xsystray plugin as noted in the readme.os2 and also in + readme.xsystray + +Zlib +---- + + 1. Download zlib from http://rpm.netlabs.org/release/00/zip + 2. Unpack and install z.dll to your libpath eg. x:\ecs\dll + +Jpeg +---- + + 1. Download jpeg from http://rpm.netlabs.org/release/00/zip + 2. Unpack and install jpeg.dll to your libpath eg. x:\ecs\dll + +djvulibre +--------- + + 1. Download djvulibre from ftp://ftp.netlabs.org/pub/unixos2/djvulibre-3_5_25.zip + 2. Unpack and install djvu.dll to your libpath eg. x:\ecs\dll + +cups +---- + + 1. Go to eCUPS wiki to see how to install eCUPS (http://svn.netlabs.org/ecups) + 2. Install eCUPS according to the above wiki + +freetype/fontconfig +------------------- + + 1. Download MZFNTCFGFT_RUNTIME as zip or wpi from + ftp://ftp.netlabs.org/incoming/mozilla + 2. Unpack and install it to your libpath eg. x:\ecs\dll + +ghostscript +----------- + + 1. Download ghostscript as zip from ftp://ftp.netlabs.org/pub/unixos2/gs871os2.zip + 2. Unpack and install the gsdll23.dll to your libpath eg. x:\ecs\dll + (note this ghostscript it right now not compatible with P. Smedley's port) + +pthread +------- + + 1. Download pthread from http://rpm.netlabs.org/release/00/zip + 2. Unpack and install z.dll to your libpath eg. x:\ecs\dll + + +3. INSTALLATION +=============== + +To install qpdfview, do the following: + + 1. Create a directory for qpdfview. + 2. Extract the qpdfview package to the new directory. + 3. Create a WPS object for qdpfview.exe. + 4. Start qdpfview + 5. Happy using it + 6. If you want to use qpdfview from within a browser, you have to copy + popp*.dll and tiff.dll to the libpath eg. x:\ecs\dll + +If you have tried to open a file and not all requirements have been there at +this try, Qt screwed his plugin cache. +To overcome that delete %HOME%/.config/Trolltech.ini. It will be created again +when a Qt app starts. + +Optional: to have special fonts working you need poppler-data pack. + + - extract the 4 directories from the package found on http://poppler.freedesktop.org + to your %unixroot%/usr/local/share/poppler or to the dir where lucide.exe is installed + - if you also want japanese fonts working, take care that the "Times New Roman WT J" font + is installed. This font is used as a fallback + + +4. BUGREPORTS +============= + +Please create bugreports at http://svn.netlabs.org/qtapps +Only bug reports with a reproducable bug are accepted. :-) + + +5. CREDITS +========== + +The port was done by: + +Silvan Scherrer aka _diver + +Thanks go to: + + * Dmitriy Kuminov + +They either helped me when I had some nasty questions or did some testing for +me. + + +6. SUPPORT AND DONATIONS +======================== + +qpdfview port is based on volunteer work. If you would like to support further +development, you can do so in one of the following ways: + + + * Donate to the Qt4 project: see qt.netlabs.org for more information + + * Contribute to the project: Besides actual development, this also includes + maintaining the documentation and the project web site as well as help + for users. + + +7. HISTORY +========== + +2013-10-15 + + * udated to latest qpdfview 0.4.6 source + +2013-08-14 + + * updated to latest qpdfview 0.4.4.99 source + * updated to latest poppler 0.24.0 + +2013-06-17 + + * added .ps and .eps file support + +2013-05-27 + + * updated to latest qpdfview 0.4.3 source + +2013-05-14 + + * updated to latest qpdfview 0.4.3 beta source + +2013-04-25 + + * updated to latest poppler 0.22.3 + +2013-04-19 + + * updated to latest qpdfview 0.4.2 beta source + +2013-03-25 + + * updated to latest qpdfview 0.4.1 source + +2013-03-20 + + * updated to latest qpdfview 0.4.1 beta source + +2013-02-19 + + * updated to latest qpdfview 0.4.0 source + +2013-02-12 + + * updated to latest qpdfview 0.4.0 beta1 source + +2013-02-06 + + * updated to latest qpdfview 0.3.7 source + +2013-01-14 + + * updated to latest poppler 0.22.0 + +2012-12-13 + + * updated to latest qpdfview 0.3.7 beta 1 source + +2012-11-27 + + * updated to latest qpdfview source + +2012-10-29 + + * created install.os2 + * updated qpdfview to contain a icon (thx Herwig) + +2012-10-24 + + * first public port + + diff -Naur -x qpdfview.desktop E:\trees\qpdfview\trunk\..\vendor\current/qpdfview_os2.pri E:\trees\qpdfview\trunk/qpdfview_os2.pri --- E:\trees\qpdfview\trunk\..\vendor\current/qpdfview_os2.pri 1970-01-01 01:00:00.000000000 +0100 +++ E:\trees\qpdfview\trunk/qpdfview_os2.pri 2013-10-16 14:55:40.000000000 +0200 @@ -0,0 +1,38 @@ +# define destdir +PLUGIN_DESTDIR = lib + +# define the djvu part +DJVU_ROOT = e:/trees/djvulibre/trunk +DJVU_PLUGIN_LIBS += -L$$DJVU_ROOT/libdjvu/.libs +DJVU_PLUGIN_LIBS += djvulibre +DJVU_PLUGIN_INCLUDEPATH += $$DJVU_ROOT +DJVU_PLUGIN = qpdfdjvu +DJVU_PLUGIN_NAME = $$DJVU_PLUGIN".dll" + +# define the poppler part +PDF_ROOT = e:/trees/poppler/trunk +PDF_PLUGIN_DEFINES += HAS_POPPLER_14 HAS_POPPLER_18 HAS_POPPLER_20 HAS_POPPLER_22 HAS_POPPLER_24 +PDF_PLUGIN_LIBS += -L$$PDF_ROOT/qt4/src/.libs +PDF_PLUGIN_LIBS += popplerqt4 +PDF_PLUGIN_INCLUDEPATH += $$PDF_ROOT/qt4/src +PDF_PLUGIN = qpdfpdf +PDF_PLUGIN_NAME = $$PDF_PLUGIN".dll" + +# define the ps part +PS_ROOT = e:/trees/libspectre/trunk +PS_PLUGIN_LIBS += -L$$PS_ROOT/libspectre/.libs -Le:/trees/ghostscript/trunk/gs8.71/bin +PS_PLUGIN_LIBS += spectre gs +PS_PLUGIN_INCLUDEPATH += $$PS_ROOT +PS_PLUGIN = qpdfps +PS_PLUGIN_NAME = $$PS_PLUGIN".dll" + +# define the cups part +CUPS_LIBS += cups + +# define the vendor part +DEF_FILE_VENDOR = bww bitwise works GmbH +DEF_FILE_VERSION = $$APPLICATION_VERSION +DEF_FILE_DESCRIPTION = eCS (OS/2) port of qpdfview by Adam Reichold + +# define tiff, as copied to qpdfview package +TIFF_ROOT = e:/trees/libtiff/trunk diff -Naur -x qpdfview.desktop E:\trees\qpdfview\trunk\..\vendor\current/synctex/synctex_parser_utils.c E:\trees\qpdfview\trunk/synctex/synctex_parser_utils.c --- E:\trees\qpdfview\trunk\..\vendor\current/synctex/synctex_parser_utils.c 2013-03-24 14:30:12.000000000 +0100 +++ E:\trees\qpdfview\trunk/synctex/synctex_parser_utils.c 2013-03-20 17:08:22.000000000 +0100 @@ -57,6 +57,10 @@ #define SYNCTEX_WINDOWS 1 #endif +#if defined(__OS2__) +#define SYNCTEX_OS2 1 +#endif + #ifdef _WIN32_WINNT_WINXP #define SYNCTEX_RECENT_WINDOWS 1 #endif @@ -121,7 +125,7 @@ last_component = next+1; } } -# ifdef SYNCTEX_WINDOWS +# if defined(SYNCTEX_WINDOWS) || defined (SYNCTEX_OS2) /* On Windows, the '\' is also a path separator. */ while((next = strstr(last_component,"\\"))){ last_component = next+1; @@ -207,7 +211,7 @@ if(!strlen(name)) { return synctex_NO; } -# if SYNCTEX_WINDOWS +# if defined(SYNCTEX_WINDOWS) || defined(SYNCTEX_OS2) if(strlen(name)>2) { return (name[1]==':' && SYNCTEX_IS_PATH_SEPARATOR(name[2]))?synctex_YES:synctex_NO; } diff -Naur -x qpdfview.desktop E:\trees\qpdfview\trunk\..\vendor\current/synctex/synctex_parser_utils.h E:\trees\qpdfview\trunk/synctex/synctex_parser_utils.h --- E:\trees\qpdfview\trunk\..\vendor\current/synctex/synctex_parser_utils.h 2013-03-24 14:30:12.000000000 +0100 +++ E:\trees\qpdfview\trunk/synctex/synctex_parser_utils.h 2013-03-20 17:11:20.000000000 +0100 @@ -64,7 +64,7 @@ #define FALSE 0 #define TRUE !FALSE -# if _WIN32 +# if defined(_WIN32) || defined(__OS2__) # define SYNCTEX_CASE_SENSITIVE_PATH FALSE # define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c || '\\' == c) # else @@ -72,7 +72,7 @@ # define SYNCTEX_IS_PATH_SEPARATOR(c) ('/' == c) # endif -# if _WIN32 +# if defined(_WIN32) || defined(__OS2__) # define SYNCTEX_IS_DOT(c) ('.' == c) # else # define SYNCTEX_IS_DOT(c) ('.' == c)