caj2pdf / caj-convert

command-line caj conversion utility using the genuine/original libreaderex, code originally posted at https://github.com/caj2pdf/caj2pdf/issues/63
8 stars 4 forks source link

Blank pages created #1

Closed ghost closed 3 years ago

ghost commented 3 years ago

See https://github.com/caj2pdf/caj2pdf/issues/63#issuecomment-880253362.

HinTak commented 3 years ago

The readerex versioning is a mess - I mentioned earlier of two 64-bit 2.3.3982.0 , differing by at least 2 of the 3 dependent DLLs being unsigned/unsigned. The export table is also substantially different too. After unpacking every installer I have, I found two different 32-bit 2.3.3982.0 too; they differ by one more export on one, and also different dependency: one depends on libeay32.dll, the other depends on libcrypto-1_1.dll . So the version build number is almost meaningless.

I can verify that the earlier attached 2.0.2358.0 zip can still be downloaded from official location "http://viewer.d.cnki.net/CAJViewer 7.0.2.self.exe".

The archive has moved to https://github.com/HinTak/ReaderEx-Archive - and I have also removed/reset all commits except mine. I am very uncomfortable taking others' binary commits, and I do not want to encourage others to use DLLs from not-official places, so it is just as well not have a README.

There is a technical reason for the removal of mac os dylib too - Windows DLLs does not have the capability to record dependent dll locations (and windows happily load DLLs from current directory). Linux is either explicit location wth dlopen, or system locations; it is possible to record explicit locations with rpath, but usage is not common; and certainly not used in the case of the linux lib. On Mac OS X, it is different - it is very common to record where dependent libraries should be loaded, to hard-coded framework locations. I have not look at the mac os x libreaderex.dylib at all, but it is meaningless to copy it, since it is highly likely it has hard-coded dependent library locations - and you must copy all its dependencies, to your system to the exact location they are expected to be loaded from, to work. Apple provides tools for edit these loader attributes. But if hosting copies of genuine DLLs is a problem, hosting modified DLLs or providing instructions on how to modify the libraries (to be re-locate'able) is worse. So it needs to be removed, without leaving any trace behind.

Anway, you can get at the current content of https://github.com/HinTak/ReaderEx-Archive yourself from the official source, from the log:

$ git log | grep cnki.net
    d6aacbf10cf3f4be725417ce62822836  viewer.d.cnki.net/CAJViewer 7.3.self.exe
    59af4cbd210a0ede67c713343f7a6fe3  viewer.d.cnki.net/CAJViewer 7.2.self.exe
    695cdf9d83abdd6eeb85a06aeac35901  viewer.d.cnki.net/CAJViewer 7.1.2.self.exe
    5096bde08d39585f1a70115311c69db9  viewer.d.cnki.net/CAJViewer 7.0.2_Eng.self.exe
    d25fd37e8b27094d126d756ebedd3486  viewer.d.cnki.net/CAJViewer 7.0.2.self.exe
    22906e92c46dce2e230bf20d8f92d51e  viewer.d.cnki.net/CAJViewer 7.0.1.sfx.exe
    64c9693ab17cc80673fe77eca978d243  download.cnki.net/E-Study Setup.exe
    64c9693ab17cc80673fe77eca978d243  download.cnki.net/E-Study Setup.exe
    618dac24f2373cea5258db1254d8e726  mall.cnki.net/Reference/Soft/CNKI工具书.rar
    60e91413bcbdaf375d5b172f3770879c  download.cnki.net/cnkiexpress/cnkiexpress_0.0.11_amd64.deb
    10340dcf5eb0835f18e74fca2c16033f  download.cnki.net/cnkiexpress/cnkiexpress_0.0.3_amd64.deb
    088477d741a53dc3b900290911d2769e  download.cnki.net/CAJViewer 7.2_big5.self.zip
    ce7b074747da8b3c8289a2b4564e4fb2  download.cnki.net/CAJViewer 7.2.self_工具书版.exe
    a4abb433ae89a61c7a13c2262897c5ed  download.cnki.net/CAJViewer(Cloud).self(1.2.1.57).exe
    ce8c498816ff81fc018b1ac60c34a31d  download.cnki.net/CAJViewer 7.2.0.117.self.exe
    e45b45af6e09a3d11f2baed48147a473  download.cnki.net/CAJViewer 7.3.141.self.exe
    2a895505e07c93f7c2419896a5f352b4  download.cnki.net/CAJViewer 7.3.133.self.exe
    $ md5sum download.cnki.net/cnkiexpress/*
    b4f9a52cf3366266445981f96a3d88ff  download.cnki.net/cnkiexpress/全球学术快报 Setup 0.0.3.exe
    09a1b9b553abb6127900d328ca8895db  download.cnki.net/cnkiexpress/全球学术快报 Setup 0.0.11.exe

Those are md5sums. prepend "http://" or "https://", and change space " " to "%20" (some browser would do it anyway) to get them independently. 7za, cabextract and innoextract on linux are used to unpack them. winedump -j export ..., winedump -j import ... to look at the export tables (ordinals, etc) and import tables (i.e. dependencies).

HinTak commented 3 years ago

This one is getting long and side-tracked; so started new https://github.com/caj2pdf/caj-convert/issues/2 , and closing this.

HinTak commented 3 years ago

On Monday, 19 July 2021, 16:01:42 BST, Adam Gao @.***> wrote:

Version 7.0.2 should have a dll named CAJ2PDF.DLL, could you upload it or provide a link to the original installer? Thanks.

http://viewer.d.cnki.net/CAJViewer%207.0.2.self.exe (and other older versions under viewer.d.cndi.net - you need to search google for valid names than blindly type it in) - for the purpose of this issue though, there is no point in looking at versions earlier than 7.2, as even the early 7.2's are buggy...