diff -Naur -x djview.desktop E:\trees\djview\trunk\..\vendor\current/build_os2.cmd E:\trees\djview\trunk/build_os2.cmd
--- E:\trees\djview\trunk\..\vendor\current/build_os2.cmd	1970-01-01 01:00:00.000000000 +0100
+++ E:\trees\djview\trunk/build_os2.cmd	2016-11-21 14:14:54.000000000 +0100
@@ -0,0 +1,309 @@
+/* djview Build Script */
+/* version history */
+/* version 1.0.0 from 18.11.2016 Silvan (first edition) */
+
+/* init the version string (don't forget to change) */
+version = "1.0.0"
+version_date = "18.11.2016"
+'@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 || '\src'
+OS2Dir     = sourceDir || '\os2'
+installDir = buildDir || '\install'
+installDirT= installDir
+qErrorFile = buildDir||'\qmake.err'
+qOutFile   = buildDir||'\qmake.out'
+mErrorFile = buildDir||'\make.err'
+mOutFile   = buildDir||'\make.out'
+qt4bin = '%unixroot%\usr\lib\qt4\bin\'
+
+/* get the djview version */
+djview_version = '0.0.0'
+djview_build = ' '
+call version
+internal_build = translate(djview_version, '_', '.')
+
+/* get some info from djview_os2.pri */
+psDir = ' '
+
+title = "djview for OS/2 and OS/2-based systems build script v" || version || " from " || version_date
+say title
+say
+say "Build directory   :" buildDir
+say "Source directory  :" sourceDir
+say
+say "djview version    :" djview_version
+say "         build    :" djview_build 
+say
+
+/* translate command to all upercase */
+command = translate(command)
+
+if command = "" then signal help
+
+
+if command = "INSTALL" then do
+    if option \== "" then do
+	djview_build = option
+    end
+    select
+	when djview_build \== "" then do
+	  zipFile = installDir || '\djview-' || internal_build || '-' || djview_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 djview"
+
+    end
+    when command = "MAKE" then do
+
+        say "creating djview makefile"
+        call qmake
+
+        if qRC = 0 then do
+            say "building djview"
+	    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||'\src\djview.exe',installDir)
+
+/* copy all dll */
+        ok = SysFileTree(buildDir||'\src\*.dll', rm.,'FOS')
+        do i = 1 to rm.0
+          ok = SysCopyObject(rm.i, installDir)
+        end
+
+/* copy the readme */
+	rm.0 = 1
+	rm.1 = 'readme.os2'
+	do i = 1 to rm.0
+	cmdtorun = 'sed "s;_VERSION_;' || djview_version || ';g" ' || os2Dir || '\' || rm.i || ' | sed "s;_BUILD_;' || djview_build || ';g" >' || installDir || '\' || rm.i
+        address cmd cmdtorun
+	end
+
+/* copy different stuff */
+	rm.0 = 3
+	rm.1 = 'NEWS'
+	frmDir.1 = sourceDir
+	toDir.1 = installDir
+	rm.2 = 'COPYRIGHT'
+	frmDir.2 = sourceDir
+	toDir.2 = installDir
+	rm.3 = 'COPYING'
+	frmDir.3 = sourceDir
+	toDir.3 = 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||'\*.ts', rm.,'FO')
+        do i = 1 to rm.0
+	    fileName = filespec('N',rm.i)
+	    fileName = left(fileName,lastpos('.', fileName)-1) || '.qm'
+            cmdtorun = qt4bin || '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 */
+	ok = directory(os2Dir)
+	cmdtorun = 'zip ' || zipFile || ' *.ico'
+	address cmd cmdtorun
+	ok = directory(buildDir)
+
+    end
+
+    when command = "UNINSTALL" then do
+
+	call deleteall
+	
+    end
+
+    when command = "DIFF" then do
+
+	address cmd 'diff -Naur ' || vendorDir || ' ' || sourceDir || ' -x djview.desktop >' || diffDir || 'djview_' || djview_version || '_' || djview_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 || '/djview.pro'
+    address cmd 'qmake ' 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 djview version from there
+ */ 
+version: procedure expose djview_version djview_build srcDir
+
+    djviewVer = ' '
+    /* djview Version file */
+    Version = srcDir || "\version.h"
+
+    do until lines(Version) = 0
+        verline = linein(Version)
+        if substr(Verline,10,18) = "DJVIEW_VERSION_STR" then do
+            parse var verline . ' ' . ' ' . djviewVer
+        end
+    end
+
+    ok = stream(Version,'c','close')
+    if djviewVer \== ' ' then do
+    	djviewVer = strip(djviewVer,,'"')
+	parse var djviewVer ver '.' maj '.' min '.' djview_build
+    	djview_version = ver || '.'|| maj || '.' || min
+    end
+
+    if djview_build == '' then do
+    	djview_build = 'GA'
+    end
+
+    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 djview.desktop E:\trees\djview\trunk\..\vendor\current/djview.pro E:\trees\djview\trunk/djview.pro
--- E:\trees\djview\trunk\..\vendor\current/djview.pro	1970-01-01 01:00:00.000000000 +0100
+++ E:\trees\djview\trunk/djview.pro	2016-11-18 15:36:34.000000000 +0100
@@ -0,0 +1,5 @@
+TEMPLATE = subdirs
+
+SUBDIRS += src
+
+src.file=src/djview.pro
\ No newline at end of file
diff -Naur -x djview.desktop E:\trees\djview\trunk\..\vendor\current/os2/djvuapp_os2.ico E:\trees\djview\trunk/os2/djvuapp_os2.ico
--- E:\trees\djview\trunk\..\vendor\current/os2/djvuapp_os2.ico	1970-01-01 01:00:00.000000000 +0100
+++ E:\trees\djview\trunk/os2/djvuapp_os2.ico	2016-11-18 16:23:32.000000000 +0100
@@ -0,0 +1,5 @@
+BA(HCIØ	0`ÿÿÿCIØ00ÿÿÿå®yYU$¥oÈðõÉf0Bpµ²ÔÂ@x£jikÀ¢èøÅ;Þ|;ÈV0s3z9Çÿe€¹kŠÍ"~ÁÛÇµMVqNPBiãÿÝ³ÛÙÙÛæÈþ·À²²«xynúà­ôóãUŸC9Y(v1Š×¥u^Hš»ÎYX[SvœÒÿÒh0bnn¡¡¡uQIÊÊÊöâÌd±åTobaÒ² o,Œz;R9ŽîßÂ\Msáêð~~;·bUsbÔÿáÿá¥ÅÞÎæÒ€üùÓåÝ¹d0Ì`2'€ãSATo`vG­·€¢áó±@fúìÂ^izê¿BoÚÐËtk{u_t±Ù~iîÿîÄñÇÉœŒj.ôÖŒU7Üîà¯­±èääŠqøÖ sKÉgš¥}nýýæ_,kòïÒT%^B§µ¿k-±ìâ¢àïŸñçŸbpâáÈõôóõÍ§t¹æ+|¹q/x4åÝÓ±v<»X}v7`Û×ãùÍÓÿÁd-z.~Ëmª_Lx®jaxn2m€kx±§ÎŒÖÑÑb©×~=F ÎÌßÙÞÿÉáÊgRZ3©©©xvw]îìÇèÌ¶æðÛ»»»íÚ°ve6ÔQbîíìòä×KJã_&®uš]UgâÒ¬q5Ye/¥`VÑÆÅÙóÓz7kÝâšúçžëËúúÜw3ÄQ-îú×Å³ªýýñb8c.VñÃúñÉfT}%y¹Ü»ñâÀÓÄ·ËñÏÂÂÂI?pBŠ}~}õÛŠ___rrrQ=r³³³`)+ÃéäÔ}C¹g0LåÒÆmPtK€ñÐ¶ ìà±l³®]EmÆ¶µttÜí¥g)¶èÏœñÎ¯÷áµ¥|æõœãÞÛìÝ¹ùôÕ÷Û«hcoF0U&ãë³·[?ã×µäÌ­ûûúá×À£vWCt÷ÐðÇk³át¯÷öíBA(CIØ @ÿÿÿCIØ  ÿÿÿé¬|bßÿW,ôËK¬ª¢žE²íÌÞÑ|aýòÈq¬ÏÅáÊ«àéªGÌ}:xâüâm£Ëœ»³sH°ŒÚîîØÆzœé4ÃbIMf¶ùÞ©µÛÂgyãõÃåäàßûïâäÆŠãŸn2·€£µµµ
+×ÈÄÐêîòÙÐŸybÓüÓNxlôæ»EÄøéÚ¡ÙÒÒ~AÊž«éÎ¶ïèÌŠ³œœùõòZ(qgAq0}ûú×ª«ªâÇ€ ¶¹zäÝŽåõÕóÍ¡BÇŒ¬ªÕÅ¬ÑÅÅh£ÉîéçrX
á}núØãèÅËëe/Ä¶ŽÁÂÁðâØÞëØìí¶ßýËhóÕ¶jOåÕ«ÜÜÛÞÞ õòÓìúÇxkéÎ ûùç°sTëÃ±šŸëÝÏüå³àÕÉÀ«ñâ§ðïïåçèe,|ëÚ¯»Œ»þýôíòÁãòãYëêÜÑÒÑÓ»¬ÅãÌËËËüëŸóß³õ×§Ã±š€€§õêÃçáÅúúúéç«gJèõº{°°°±}À¥§š³o0ýùÏ÷Ðg6×××ÂŸÈúûá«ÚÈŸm8eGòãÂâÛÚïÓ¡z²ÔÊÊIžòàúÔöõ×|<lAôÝ»ñã¹íÞÈìÖš[+{_30ÂDºîÜÇªš€­íÉ	Þ÷ìÎøðëzeØúÍçÎªííìæßÔèÛÁäÍÆÊÍwbèßžûæ·éíÀÚóóòêääàßßäÚ»Æ¹žŸª€Á±¯qPòïèåÔ§äÕ²ÛÑËø÷äïËŠIuiúíÄÌÂÂ÷÷öüõÎäããÆ¬qDyfõÔË¹¯éééúâ±úÙ¢øÔ¡ìÏ®³ üüøúíßèôÄR{h}ôîÇðíË­¥œ£¶ÄšiCFÂõù÷Ò®~füüñø÷êùúÛéÜÖöÐ€BA(CIØ ÿÿÿCIXÿÿÿ
ÞõÒËîxH@·óÊÉÎ=ÈâüÓÇ«hh­œôåÀÞÙåuöíæ[¹ç°ŸÍ_!ÑáÔË6ÛÖ»£Ê»ºwšÓçÖ ²·±·éç®ìåÓ~oõ÷Õ°ŠªûÞš×Ç¹Ö³îÔ«ÇÔÚôõôçìêçÌêïœÆŒÑõÚžº¯ÄR¿îÄÀÅÖÎÌûç¶äÞÙ©¥æóÍ~Wøøçíâ·êõ×ãäâÒÈÂëáÂúýôõà°ùóÍïïïúìÀýõî~ÛëÕßÙÔªžæèŒA²íðèÆiñãÎîÌÇÂÍìÛ¶ßÞÞÜÐÈîçŸöã·ûüûêèæôÕ­êÐù÷÷÷ÚªöúÚÉÀÔÔÂ¹ßÕÐíêïðÞ°æààÒÇ·ßßã®¢¹TŒë|öòññóñóîã×ž ÓÊºõîêïÞ¶~küùøùû÷îäÐáßÛíÞ²ééé=·ôääåßÙÑßÔÍýþþ÷øÙùÙ©õäµìãÃ~iß×ÒÉŸÓÒÇÀ~mßßáêèèòòñõÓäåäîâžþþþøóÍÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÁÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿüÿÿÿÿðÿÿÿøÿÿàÀÀÀÀÀÀàààààððððððøøøøø?øÿüÿÿüÿÿÿÿÿÿÿÿÿC-ŽSE&a*E*E*EÅY*EÅ?9{Lm/*E?³9i+®ý^ŠQ
+*EË«š8 LmÞÞ^ŠQîîÐÍd3ÒÊOEÖRÚÙÄD¯.....ÏÏÒ€ÊÊ55©©©]OE4UÌÐ3ggÒ333ÒÊ5©©©©Ò©©©©©©©©©©=EÔkï<5©©©©©©©©©©©©©©h!SBGS!h©©©©©©}üMW'»Ê©©©©©©©©©©©©aGySŸÈÈŸÜBya©©©©ö7¬§l'»D€©©©©©©©©©©BëzÃqqqqÕZG2ah©}ö7¬t»')óÒ©©©©©©©©©aG¥žÃÃJ¡ºººº%%ŽâŽhŽh©}A€»'Àh©©©©©©©ŽõížVÃÃJ¡ººœº%ÿ%êBáŽŽ}}}}Ê;¶²xê©©©©©©õÎžžVÃJJ¡ºo µ¿¿ÿêBá!}}}}Êþ;<;d©©©}}©Î$žžVÃJºqºo µ¿öö}ZB©}}}}5þu;[}}}}}ŽáÛí$çžVÃJºìºoµ¿¿öö%Sa}}}}5þÐuuê}}}}}SõÛ$$çIIëJJºqo£¿¿¿¿ÿêy}}}ö5dÐuó€©}}©áûjÎíçÆÆ>zJºqo£¿¿¿¿¿%hööödÐ²<ÀÒ©}}èÂ¹>IÎIÝºº¡ºw|¿¿¿%÷%aŸ:öödÐ²<²3h}}\ß¢ÂXX¹çÆJºqKwô%ooô°qZ\öödÐN<ä©öö\Ü¢újÎ¥Æ>JJ¡°

°|oq°ôºøöêÍÐN<ä[}öö\S¢jÎí>ç>>ÃJ°¥

I°ºqõôºÕèhÍÐN±²öö\òåújí¹IV¥ëÃzI

°IKÃIôºnhÍÐ±behöö\"ØÂÂúÛ¹IV¥Çì>¥
é¡IzIzJZ\©Í±5\sŽÂXÛ¹íVÇÇÃ>>ÃéTÃIôJJìá©©ÍÐ±±²ÈŽæÂúj$žžI¥V¥¥VñT¡VÝzJÃq!}e±­hÂjÎ$žVVVžžV·ãzÃÃÃÃÃZê}e1­[cúj$$$žžçžçÝVVVVªae1Óùö}ê~újÎ$$$$$IÝžžž6Ž©ó1eh©h~újjjÎÎíÛIvÎžç6Zh,11Ê}hcÂúújjjÛÛÎÎí6©1×ð3}h©cúúÛÛ~6h}pþ}h©ª666ªªê©Qpð©0`Šp(Ñö50É#ppe	Fµ}x,pÁŒÊ©H_fögrrð3hHöf}€x©5ÍP@ÍÐÐ×(à[[ÍÍdÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿñÿÿÿáÿÿÿÁÿÿÿÿÿÀÀÀÀÀÀààààààððÿðÿÿÿÿÿÿµ
ø	ø©-Ž7©¹#ñbÙÙ5jN7©¹Ø4ð~~~ãWVÒÒÝ,?7©È;TàÝÒ!FzËËwæ¿vµ©¹¬Äæææææ¿¿æ9\+m+OÛß¿æwZ	UÐ]¿¿¿¿¿¿fOtPÌ1ìÍ9Ê/%Rââ,¿¿¿¿v9Î¶6ù«ÖÀOÍQ€/Ã­¡·¿vvÉËŸÆÚÞE«aªûÑÏ+šÉÜ­*H¿ÉÉv(çÆÚÞE«aœííS+€Ü0÷ŠæÉÜ&çyE«aªíí{ÕÛ0÷D2fÜ&Í(ä¥kGÓùEýaLû{ü\Sf0÷Ðážo)G±Âòýó$YÖlÁ>JAË0¢­á@Mä)kG6ùÅïK>«Ôh<úAß0¢á@Mé êy6eiKÔ>eh<Aw0¢[pö×ä¥6£ºÂyiÇÓK¯ùåíæ0x§ =ä ¯±6|¯¯>9æ0þMX Æ6`sSÉ,2nvÉX rrÆg°€ëCËvè  8uÆ°€³.É^cÿééé®qÊ§²ôÉ»'îî_ÉIBw"3íõŒÜwÜwdßf
+}ÉÉæf:9fËßËfÿÿÿÿÿøÿñÀÀÀÿÿ0I	deD'5"1t7uP<aj2N$O@y:vb(K/)w&SZ
+>~`;}G4M+!68\qmQ%WlRH|=F]i?r,9JU ^kV#3{BpXTc.zY_Lf[nChEo-
x*gAs
\ No newline at end of file
diff -Naur -x djview.desktop E:\trees\djview\trunk\..\vendor\current/os2/readme.os2 E:\trees\djview\trunk/os2/readme.os2
--- E:\trees\djview\trunk\..\vendor\current/os2/readme.os2	1970-01-01 01:00:00.000000000 +0100
+++ E:\trees\djview\trunk/os2/readme.os2	2016-11-18 16:33:54.000000000 +0100
@@ -0,0 +1,244 @@
+DjView4 _VERSION_ _BUILD_ ReadMe
+
+
+
+0. CONTENTS OF THIS FILE
+========================
+
+1. INTRODUCTION
+
+2. REQUIREMENTS
+
+3. INSTALLATION
+
+4. LICENSE, COPYRIGHT, DISCLAIMER
+
+5. BUGREPORTS
+
+6. CREDITS
+
+7. SUPPORT AND DONATIONS
+
+8. HISTORY
+
+
+1. INTRODUCTION
+===============
+
+Welcome to DjView4 _VERSION_ _BUILD_ port for OS/2 and OS/2 based systems.
+
+
+2. REQUIREMENTS
+===============
+
+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
+----------------------
+If some packets are already installed, please see if updates for those are
+available with "yum update xyz". Where xyz is the package name.
+
+kLIBC
+-----
+
+  1. yum install libc
+
+GCC4Core
+--------
+
+  1. yum install libgcc1 libgcc-fwd
+  2. yum install libssp
+  3. yum install libstdc++ libstdc++6
+  4. yum install libsupc++ libsupc++6
+
+Qt4 dll
+-------
+
+  1. yum install libqt4
+
+Zlib
+----
+
+  1. yum install zlib
+
+Jpeg, Tiff, Png
+---------------
+
+  1. yum install libjpeg libtiff libpng
+
+djvulibre
+---------
+
+  1. yum install djvulibre-libs
+
+cups
+----
+
+  1. yum install cups
+  2. yum install cups-filters
+
+freetype/fontconfig
+-------------------
+
+  1. yum install freetype fontconfig
+
+pthread
+-------
+
+  1. yum install pthread
+
+
+2.1.b ZIP Installation
+----------------------
+
+kLIBC
+-----
+
+  1. Download kLIBC 0.6.6 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.3.1 or better from ftp://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
+
+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, Tiff, Png
+---------------
+
+  1. Download libjpeg, libtiff and libpng from http://rpm.netlabs.org/release/00/zip
+  2. Unpack and install the dll to your libpath eg. x:\ecs\dll
+
+djvulibre
+---------
+
+  1. Download djvulibre from http://rpm.netlabs.org/release/00/zip
+  2. Unpack and install the 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 freetype and fontconfig from http://rpm.netlabs.org/release/00/zip
+  2. Unpack and install freetyp6.dll and fntcfg2.dll to your libpath eg. x:\ecs\dll
+
+pthread
+-------
+
+  1. Download pthread from http://rpm.netlabs.org/release/00/zip
+  2. Unpack and install pthr01.dll to your libpath eg. x:\ecs\dll
+ 
+
+3. INSTALLATION
+===============
+          
+To install DjView4, do the following:
+
+  1. Create a directory for DjView4.
+  2. Extract the DjView4 package to the new directory.
+  3. Create a WPS object for djview.exe.
+  4. Start djview
+  5. Enjoy the app :)
+  
+
+4. LICENSE, COPYRIGHT, DISCLAIMER
+=================================
+
+see COPYRIGHT and COPYING
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+
+4. BUGREPORTS
+=============
+
+Please create bugreports at http://svn.netlabs.org/qtapps
+Only bug reports with a reproducable bug are accepted. :-)
+
+
+6. CREDITS
+==========
+
+The port was done by:
+
+Silvan Scherrer aka _diver
+
+Thanks go to:
+
+  * Dmitry A. Kuminov
+  * Oliver Cremer
+
+They either helped me when I had some nasty questions or did some testing for
+me.
+
+
+7. SUPPORT AND DONATIONS
+========================
+
+DjView4 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.
+
+
+8. HISTORY
+==========
+
+2016-11-18
+
+  * updated to djviewlibre 3.5.27 code
+  * updated djview to 4.10.1
+
+2013-03-25
+
+  * updated to djviewlibre 3.5.25 code
+
+2011-09-27
+
+  * updated to 4.8 code level of djview
+  * updated to djviewlibre 3.5.24
+  * updated to Qt 4.7.3
+  * cups >= 1.4.8 required
+
+2010-10-13
+
+  * added printing support
+
+2010-09-02
+
+  * updated to 4.6 code level of djview
+  * updated to 3.5.23 code level of djvulibre
+
+2010-09-01
+
+  * initial port
+
diff -Naur -x djview.desktop E:\trees\djview\trunk\..\vendor\current/src/djview_os2.rc E:\trees\djview\trunk/src/djview_os2.rc
--- E:\trees\djview\trunk\..\vendor\current/src/djview_os2.rc	1970-01-01 01:00:00.000000000 +0100
+++ E:\trees\djview\trunk/src/djview_os2.rc	2016-11-21 14:07:26.000000000 +0100
@@ -0,0 +1 @@
+ICON	1	DISCARDABLE     "../os2/DjVuApp_os2.ico"
diff -Naur -x djview.desktop E:\trees\djview\trunk\..\vendor\current/src/djview.pro E:\trees\djview\trunk/src/djview.pro
--- E:\trees\djview\trunk\..\vendor\current/src/djview.pro	2015-12-26 17:57:08.000000000 +0100
+++ E:\trees\djview\trunk/src/djview.pro	2016-11-18 17:13:00.000000000 +0100
@@ -66,6 +66,12 @@
 win32 {
   RC_FILE = djview.rc
 }
+# --- os2 stuff
+os2 {
+    QT -= opengl
+    LIBS += -lpthread -ljpeg -llibcups
+    RC_FILE = djview_os2.rc
+}
 
 # --- djviewplugin logic
 greaterThan(QT_MAJOR_VERSION, 4) {
@@ -141,3 +147,13 @@
 TRANSLATIONS += djview_es.ts
 TRANSLATIONS += djview_zh_cn.ts
 TRANSLATIONS += djview_zh_tw.ts
+
+# -- needed that shadowbuild works nicely
+qtPrepareTool(LRELEASE, lrelease)
+updateqm.input = TRANSLATIONS
+updateqm.output = ${QMAKE_FILE_BASE}.qm
+updateqm.variable_out = PRE_TARGETDEPS
+updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
+updateqm.name = LRELEASE ${QMAKE_FILE_IN}
+updateqm.CONFIG += no_link
+QMAKE_EXTRA_COMPILERS += updateqm
diff -Naur -x djview.desktop E:\trees\djview\trunk\..\vendor\current/src/qdjviewexporters.cpp E:\trees\djview\trunk/src/qdjviewexporters.cpp
--- E:\trees\djview\trunk\..\vendor\current/src/qdjviewexporters.cpp	2015-12-26 17:57:08.000000000 +0100
+++ E:\trees\djview\trunk/src/qdjviewexporters.cpp	2016-11-18 17:23:02.000000000 +0100
@@ -91,6 +91,10 @@
 #include "qdjvuwidget.h"
 #include "qdjvu.h"
 
+#ifdef Q_OS_OS2
+# include <cups/cups.h>
+#endif
+
 #ifdef WIN32
 # define wdup(fh) _dup(fh)
 #else
@@ -845,6 +849,7 @@
     }
   else if (printer)
     {
+#ifndef Q_OS_OS2
       QString printerName = printer->printerName();
       // disable sigpipe
 #ifdef SIGPIPE
@@ -985,6 +990,24 @@
             closeFile();
         }
 #endif
+#else
+        char filename[512];
+        int fd = cupsTempFd(filename, 512);
+        if (fd < 0) {
+            qWarning("QPdfPrinter: Could not open temporary file to print");
+            return;
+        }
+/* we need to close the cups fd, so djview can open it again */
+        close(fd);
+        file.close();
+        file.setFileName(filename);
+        if (! file.fileName().isEmpty())
+        {
+              file.remove();
+              if (file.open(QIODevice::WriteOnly))
+                output = ::fdopen(file.handle(), "wb");
+        }
+#endif
     }
 }
 
@@ -998,6 +1021,64 @@
     ::close(outputfd);
   if (file.openMode())
     file.close();
+#ifdef Q_OS_OS2
+  if (printer)
+     {
+        QString printerName = printer->printerName();
+
+        // Set up print options.
+        QByteArray prnName;
+        QList<QPair<QByteArray, QByteArray> > options;
+        QVector<cups_option_t> cupsOptStruct;
+
+        if (!printerName.isEmpty()) {
+            prnName = printerName.toLocal8Bit();
+
+              QPrintEngine *engine = printer->printEngine();
+# define PPK_CupsOptions QPrintEngine::PrintEnginePropertyKey(0xfe00)
+# define PPK_CupsStringPageSize QPrintEngine::PrintEnginePropertyKey(0xfe03)
+      QVariant cPageSize = engine->property(PPK_CupsStringPageSize);
+      QVariant cOptions = engine->property(PPK_CupsOptions);
+      QStringList cupsOptions = cOptions.toStringList();
+
+        if (!cPageSize.toString().isEmpty()) {
+            options.append(QPair<QByteArray, QByteArray>("media", cPageSize.toString().toLocal8Bit()));
+        }
+
+        if (copies > 1) {
+            options.append(QPair<QByteArray, QByteArray>("copies", QString::number(copies).toLocal8Bit()));
+        }
+
+        if (collate) {
+            options.append(QPair<QByteArray, QByteArray>("Collate", "True"));
+        }
+
+        if (duplex) {
+            options.append(QPair<QByteArray, QByteArray>("sides", "two-sided-long-edge"));
+        }
+
+        QStringList::const_iterator it = cupsOptions.constBegin();
+        while (it != cupsOptions.constEnd()) {
+            options.append(QPair<QByteArray, QByteArray>((*it).toLocal8Bit(), (*(it+1)).toLocal8Bit()));
+            it += 2;
+        }
+
+        for (int c = 0; c < options.size(); ++c) {
+            cups_option_t opt;
+            opt.name = options[c].first.data();
+            opt.value = options[c].second.data();
+            cupsOptStruct.append(opt);
+        }
+
+        // Print the file.
+        QString title = djview->getDocumentFileName();
+        cups_option_t* optPtr = cupsOptStruct.size() ? &cupsOptStruct.first() : 0;
+        cupsPrintFile(prnName.constData(), file.fileName().toLocal8Bit().constData(),
+                title.toLocal8Bit().constData(), cupsOptStruct.size(), optPtr);
+        }
+                file.remove();
+     }
+#endif
   output = 0;
   outputfd = -1;
   printer = 0;
diff -Naur -x djview.desktop E:\trees\djview\trunk\..\vendor\current/src/qdjvu.cpp E:\trees\djview\trunk/src/qdjvu.cpp
--- E:\trees\djview\trunk\..\vendor\current/src/qdjvu.cpp	2015-12-26 17:57:08.000000000 +0100
+++ E:\trees\djview\trunk/src/qdjvu.cpp	2016-11-18 16:40:40.000000000 +0100
@@ -415,7 +415,7 @@
       qWarning("QDjVuDocument::setFileName: cannot read file");
       return false;
     }
-#if DDJVUAPI_VERSION >= 19
+#if DDJVUAPI_VERSION >= 19 && !defined(Q_OS_OS2) // as our wcrtomb() is broken
   QByteArray b = f.toUtf8();
   document = ddjvu_document_create_by_filename_utf8(*ctx, b, cache);
 #else
