1PageEdit
2========
3An ePub visual XHTML editor based on Sigil's Deprecated BookView.
4It uses WebEngine instead of WebKit.
5
6This app is working and fundamentally complete.
7
8It prefers Qt 5.12.6 or later.
9
10To build after cloning the repo
11
12You will need cmake version 3.0 to build:
13
14Make sure the qt tools and libraries from Qt 5.12.6 are in your path<br>
15`export PATH=~/QT512/bin:${PATH}`
16
17You build in a separate directory and not in the source directory.
18
19After checking out the PageEdit github repo into a PageEdit directory
20
21Building on macOS:
22------------------
23
24`export MACOSX_DEPLOYMENT_TARGET=10.12`<br>
25`export MYQTHOME=~/Qt512`<br>
26`export PATH=${PATH}:${MYQTHOME}/bin`<br>
27`mkdir build`<br>
28`cd build`<br>
29`cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_BUILD_TYPE=Release \`<br>
30`      -DCMAKE_CXX_FLAGS=-Wno-inconsistent-missing-override \`<br>
31`      -DCMAKE_PREFIX_PATH=${MYQTHOME}/lib/cmake \ `<br>
32`      -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/\`<br>
33`                   MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/ ../PageEdit`<br>
34`make`<br>
35`make addframeworks`<br>
36`cd bin`<br>
37`open -a /FULL_PATH_TO_THIS_DIRECTORY/PageEdit.app /FULL_PATH_TO_AN_XHTML_FILE_IN_AN_UNZIPPED_EPUB/FILENAME.xhtml`<br>
38`or simply drag and drop an xhtml file from an unzipped epub onto the PageEdit.app`<br>
39``<br>
40`or edit a set of XHtml files in epub Spine Order by loading the ePub's OPF file`<br>
41
42On Linux
43--------
44
45Make sure a minimum of Qt5.9.4(ish) is installed (with the WebEngine package) as well as cmake.<br>
46You build in a separate directory and not in the source directory.
47
48Qt5.11+ is probably a more realistic minimum to be able enjoy all of PageEdit's features.
49
50Get the PageEdit Source:
51
52`git clone https://github.com/sigil-ebook/PageEdit.git`<br>
53(or download/extract the gzipped tarball from a PageEdit Release)<br>
54`cd PageEdit`
55
56__Ubuntu__
57
58`sudo apt-get install build-essential`<br>
59`sudo apt-get install cmake`<br>
60`sudo apt-get install qtwebengine5-dev qttools5-dev qttools5-dev-tools`
61
62`mkdir build`<br>
63`cd build`<br>
64`cmake "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../<path/to/PageEdit/source>`<br>
65`make`<br>
66
67__Arch Linux__
68
69sudo pacman -S cmake qt5-webengine qt5-tools<br>
70
71`mkdir build`<br>
72`cd build`<br>
73`cmake "Unix Makefiles" -DINSTALL_BUNDLED_DICTS=0 -DCMAKE_BUILD_TYPE=Release ../<path/to/PageEdit/source>`<br>
74`make`<br>
75
76__All Flavors__:
77
78To test
79`cd bin`<br>
80`./pageedit /FULL_PATH_TO_AN_XHTML_FILE_IN_AN_UNZIPPED_EPUB/FILENAME.xhtml`
81
82`make install` (defaults to the /usr/local prefix, so use sudo if required).
83
84__NOTE__: certain features, like Inspector, will require a minimum of Qt5.11.x to function on Linux.
85
86By default, bundled hunspell dictionaries are converted to webengine spell check dictionaries (with qt tools) and installed to the QT_INSTALL_DATA/qtwebengine_dictionaries location. This location can be found using the qmake binary (of the Qt you're building PageEdit with) with the following command `-qmake -query QT_INSTALL_DATA` . If using the system Qt, this will typically be /usr/share/qt/qtwebengine_dictionaries. To disable the conversion/installation of these bundled dictionaries, use -DNSTALL_BUNDLED_DICTS=0 when configuring PageEdit with cmake. Arch Linux already includes these dictionaries with the corresponding hunspell language dictionaries. So you'll want to skip their conversion/installation on Arch and make sure you have the correct hunspell languages installed instead.
87
88On Windows:
89-----------
90
91Make sure a minimum of Qt5.12.3 (with the WebEngine component) and Visual Studio 2017 are installed. Install the x64 version of Qt5.12.3 for VS2017. Install cmake 3.0+ and make sure its bin directory is added to your path.
92
93Make sure that Qt's bin directory is also added to your PATH. Take note of the path for your Qt's prefix (the directory right above the bin directory). Open an "x64 Native Tools Command Prompt for VS2017" from the Start menu and cd to wherever you want to build.
94
95`mkdir build`<br>
96`cd build`<br>
97`cmake -G "NMake Makefiles" -DQt5_DIR="C:\path\to\your\Qt5\prefix\lib\cmake\Qt5 -DCMAKE_BUILD_TYPE=Release "C:\path\to\PageEdit's\cloned\repository"`<br>
98`nmake`<br>
99
100To test:
101`cd bin`<br>
102`PageEdit.exe \FULL_PATH_TO_AN_XHTML_FILE_IN_AN_UNZIPPED_EPUB\FILENAME.xhtml`
103
104Use `nmake deploy` to package PageEdit and all of its dependencies into a zip archive (in a newly created 'deploy' folder in the build folder)
105
106Use `nmake deployinstaller` to package PageEdit and all of its dependencies into an Inno Setup installer (must have InnoSetup installed and on the PATH for is to work).
107
108__NOTE__: if you configure PageEdit with the -DDEPLOY_SFX=1 cmake option before compiling, 'nmake deploy` will attempt to create a 7-Zip self-extracting archive. So naturally, make sure 7-Zip is installed before trying to use it.
109
110__NOTE__: as of this writing, the Official PageEdit release are built using Qt5.12.6
111
112
113## For Github repository maintainers (who am I kidding, this is to keep myself from forgetting/messing up):
114
115The upstream sigil-gumbo repository is included in PageEdit's repository (this one) as a subtree in the gumbo_subtree prefix. To pull in upstream sigil-gumbo changes (or even to safely check if there _are_ any), use the following command in the root of your local clone of the PageEdit repo:
116
117`git subtree pull --prefix gumbo_subtree https://github.com/Sigil-Ebook/sigil-gumbo.git master --squash`
118
119--squash because we don't need sigil-gumbo's entire history in the PageEdit repository. Push the changes to github master (with a commit message like "merge in upstream sigil-gumbo changes") if there are any.
120
121You can also create a remote for the upstream sigil-gumbo repo to simply the subtree pull command a bit -- BUT YOU MUST REMEMBER TO USE THE --no-tags OPTION WHEN CREATING THE REMOTE. Otherwise the --squash option may not suppress all upstream history when using the remote name. A careless `git fetch --all` could make a dog's lunch of your repo history with a very taggy remote (which sigil-gumbo is decidedly not):
122
123`git remote add --no-tags sigil-gumbo https://github.com/Sigil-Ebook/sigil-gumbo.git`
124
125After that, pulling in any upstream sigil-gumbo changes becomes:
126
127`git subtree pull --prefix gumbo_subtree sigil-gumbo master --squash`
128
129Probably safer in the long run to create a git alias specific to the PageEdit repository (without a remote added) using the full subtree pull command if you need a shortcut. From within the PageEdit repo:
130
131`git config alias.gumbo-sub-pull 'subtree pull --prefix gumbo_subtree https://github.com/Sigil-Ebook/sigil-gumbo.git master --squash'`
132
133Use any alias name you like. I chose "gumbo-sub-pull"  Then it's simply a matter of using `git gumbo-sub-pull` in the root of the PageEdit repository.
134
135
136
137