diff --git a/docs/Building_Sigil_on_Windows.html b/docs/Building_Sigil_on_Windows.html index cf6abd53d0..2eb53c8a56 100644 --- a/docs/Building_Sigil_on_Windows.html +++ b/docs/Building_Sigil_on_Windows.html @@ -1,41 +1,44 @@ - -Building_Sigil_on_Windows -

Building Sigil on Windows

+ + +Building_Sigil_on_Windows + + +

Building Sigil on Windows

General Overview

To build Sigil on Windows, you need to get/do the following things:

-
    -
  1. Visual Studio 2017 The free Community Edition will work fine
  2. -
  3. CMake (3.0 or higher)
  4. -
  5. Inno Setup (the latest Unicode version available recommended)
  6. -
  7. Qt5.12.6/QtWebEngine (NOTE: The standard precompiled binaries will work but Sigil patches a few things)
  8. -
  9. Python 3.7.x
  10. -
  11. The Sigil source code (downloaded zipfile or a git clone)
  12. -
  13. Building Sigil
  14. -
  15. Advanced stuff
  16. - +
      +
    1. Visual Studio 2017 The free Community Edition will work fine
    2. +
    3. CMake (3.0 or higher)
    4. +
    5. Inno Setup (the latest Unicode version available recommended)
    6. +
    7. Qt5.12.7/QtWebEngine (NOTE: The standard precompiled binaries will work but Sigil patches a few things)
    8. +
    9. Python 3.7.x
    10. +
    11. The Sigil source code (downloaded zipfile or a git clone)
    12. +
    13. Building Sigil
    14. +
    15. Advanced stuff

    Visual Studio

    -

    Sigil is built with VS2017 in the latest versions of Sigil. Begin with making sure you have a working version of Visual Studio, (the free Community edition will work fine).

    -

    The instructions given here will focus on using the command-line cmake and nmake tools. But if you're more comfortable in an IDE, you should find sufficient instructions to get you going. I simply don't use the IDE. Too many fiddly bits (sign-ins and expiring licenses for free software) for my taste. But it did work the last time I tried it.

    -

    From the Start button (you're on your own if you don't have one), go to "All Programs->Visual Studio 2017" and find the command prompt you'll need for your platform. Probably "VS2017 x64 Native Tools Command Prompt" for building a 64-bit package. If you're going to be building 32-bit packages, then use the "VS2017 x86 Native Tools Command Prompt". Create a shortcut to the applicable command-prompt on your Desktop. That's what you'll be using to configure and build Sigil.

    -

    If you're going to use the Visual Studio IDE and cmake-gui, you won't need to use these command-prompts.

    +

    Sigil is built with VS2017 in the latest versions of Sigil. Begin with making sure you have a working version of Visual Studio, (the free Community edition will work fine).

    +

    The instructions given here will focus on using the command-line cmake and nmake tools. But if you're more comfortable in an IDE, you should find sufficient instructions to get you going. I simply don't use the IDE. Too many fiddly bits (sign-ins and expiring licenses for free software) for my taste. But it did work the last time I tried it.

    +

    From the Start button (you're on your own if you don't have one), go to "All Programs->Visual Studio 2017" and find the command prompt you'll need for your platform. Probably "VS2017 x64 Native Tools Command Prompt" for building a 64-bit package. If you're going to be building 32-bit packages, then use the "VS2017 x86 Native Tools Command Prompt". Create a shortcut to the applicable command-prompt on your Desktop. That's what you'll be using to configure and build Sigil.

    +

    If you're going to use the Visual Studio IDE and cmake-gui, you won't need to use these command-prompts.

    Getting CMake

    -

    CMake 3.0 or better is required. I'm using 3.12.x Download it from cmake.org and install it. Make sure CMake's "bin" directory (the one containing "cmake.exe") is added to your PATH.

    +

    CMake 3.0 or better is required. I'm using 3.12.x Download it from cmake.org and install it. Make sure CMake's "bin" directory (the one containing "cmake.exe") is added to your PATH.

    Inno Setup

    -

    Get the unicode version (5.5.9 at the time of this writing) from jrsoftware.org make sure you say yes to the Preprocessor option when installing. Also make sure the Inno Setup directory (the one containing "ISCC.exe") is added to your PATH. There is no 64-bit version of Inno Setup, but you can still use it to create 64-bit program installers.

    -

    Qt5.12.6

    -

    Download qt-opensource-windows-x86-5.12.6.exe from Qt's Website and install the msvc2017_64, or msvc2017 component (depending on the architecture you will be building Sigil for). You can install both msvc2017_64 and msvc2017 if you like. Also install the QtWebEngine component.

    -

    If you want to use the exact, patched versions of Qt5.12.6 and QtWebEngine that I've used to release Sigil, feel free to download the whole shebang from my personal repository. It's the archive named: MyQtx64-5.12.6_VS2017_WE.7z (NOTE: you're on your own with a 32-bit version).

    -

    Once you have Qt5.12.6 for Visual Studio installed, make sure its "bin" directory (the one containing "windeployqt.exe) is added to your PATH

    +

    Get the unicode version (5.5.9 at the time of this writing) from jrsoftware.org make sure you say yes to the Preprocessor option when installing. Also make sure the Inno Setup directory (the one containing "ISCC.exe") is added to your PATH. There is no 64-bit version of Inno Setup, but you can still use it to create 64-bit program installers.

    +

    Qt5.12.7

    +

    Download qt-opensource-windows-x86-5.12.7.exe from Qt's Website and install the msvc2017_64, or msvc2017 component (depending on the architecture you will be building Sigil for). You can install both msvc2017_64 and msvc2017 if you like. Also install the QtWebEngine component. NOTE: at the time of this writing, Sigil cannot be built with the precompiled version of Qt5.12.7 because of a bug in Qt. Either use Qt5.12.6, or my compiled version of Qt5.12.7 explained below (or compile Qt5.12.7 yourself and patch it with qt5.12.7_windows_qt_add_resources.patch from the Sigil Docs directory).

    +

    If you want to use the exact, patched versions of Qt5.12.7 and QtWebEngine that I've used to release Sigil, feel free to download the whole shebang from my personal repository. It's the archive named: MyQtx64-5.12.7_VS2017_WE.7z (NOTE: you're on your own with a 32-bit version).

    +

    Once you have Qt5.12.7 for Visual Studio installed, make sure its "bin" directory (the one containing "windeployqt.exe) is added to your PATH

    Getting Python 3.7

    -

    This is important. If you're going to be building the 64-bit version of Sigil, you need to install the 64-bit version of Python 3.7. If you're building a 32-bit version of Sigil then you need to install a 32-bit version of Python 3.7.

    -

    The official Windows Sigil installer uses Python 3.7 from Python.org (3.7.2 at the time of this writing). Other flavors of Python may work, but you're on your own if they don't. Download it and install it. If you install somewhere that requires special privileges to add/remove files, you may need to use an administator command prompt to install Sigil's extra Python module dependencies. I recommend installing Python to the default location ($USER/appdata) to avoid that problem. I also recommend allowing the Python installer to add Python to your PATH. This will make it easier for Sigil to locate the necessary Python pieces it needs, and will make it easy to install the extra Python modules using Pythons "pip" tool. I'm going to assume you've done so for the rest of these instructions.

    +

    This is important. If you're going to be building the 64-bit version of Sigil, you need to install the 64-bit version of Python 3.7. If you're building a 32-bit version of Sigil then you need to install a 32-bit version of Python 3.7.

    +

    The official Windows Sigil installer uses Python 3.7 from Python.org (3.7.2 at the time of this writing). Other flavors of Python may work, but you're on your own if they don't. Download it and install it. If you install somewhere that requires special privileges to add/remove files, you may need to use an administator command prompt to install Sigil's extra Python module dependencies. I recommend installing Python to the default location ($USER/appdata) to avoid that problem. I also recommend allowing the Python installer to add Python to your PATH. This will make it easier for Sigil to locate the necessary Python pieces it needs, and will make it easy to install the extra Python modules using Pythons "pip" tool. I'm going to assume you've done so for the rest of these instructions.

    Getting the extra Python module dependencies

    -

    After installing Python 3.7, I recommend making sure Python's pip/setuptools is updated to the latest version. The easiest way to do this is to open a command prompt (the shortcut to the VS2015 command prompt you made on your desktop in step 1 will work fine) and type:

    -

    python -m pip install -U pip

    +

    After installing Python 3.7, I recommend making sure Python's pip/setuptools is updated to the latest version. The easiest way to do this is to open a command prompt (the shortcut to the VS2015 command prompt you made on your desktop in step 1 will work fine) and type:

    +
    +

    python -m pip install -U pip

    Once finished, you can begin to install the extra modules needed by Sigil.

    -

    From the same command prompt you updated pip with, install the "six" module with the following command:

    -

    pip install six

    +

    From the same command prompt you updated pip with, install the "six" module with the following command:

    +
    +

    pip install six

    -

    Repeat for the next five modules:

    -

    pip install html5lib

    +

    Repeat for the next six modules:

    +
    +

    pip install html5lib

    etc...

    Installing Pillow

    -

    Other versions of Pillow may work fine, but Sigil's installer build is predicated on v5.4.1, To install that specific version, use the following pip command.

    -

    pip install Pillow==6.2.1

    +

    Other versions of Pillow may work fine, but Sigil's installer build is predicated on v6.2.1, To install that specific version, use the following pip command.

    +
    +

    pip install Pillow==6.2.1

    Installing lxml.

    -

    Version 4.3.2 comes with precompiled binary wheels for Windows. Not all versions do. So if you want to install a different version, you'll need to find out if there's precompiled binaries for Windows or not. Install a specific version with pip using the following command

    -

    pip install lxml==4.4.2

    +

    Version 4.4.2 comes with precompiled binary wheels for Windows. Not all versions do. So if you want to install a different version, you'll need to find out if there's precompiled binaries for Windows or not. Install a specific version with pip using the following command

    +
    +

    pip install lxml==4.4.2

    Installing PyQt5.

    -

    Like lxml, not all versions of PyQt5 will have compatible binaries that will work with Sigil's Qt5 and Python. Stick to version 5.12.3 and everything should work with Python 3.7 and Qt5.12.6 (the trick is to always select a version of PyQt that will work with Sigil's version of Qt and Python)

    -

    `pip install PyQt5==5.12.3 PyQt5-sip==4.19.18

    +

    Like lxml, not all versions of PyQt5 will have compatible binaries that will work with Sigil's Qt5 and Python. Stick to version 5.12.3 and everything should work with Python 3.7 and Qt5.12.7 (the trick is to always select a version of PyQt that will work with Sigil's version of Qt and Python)

    +
    +

    `pip install PyQt5==5.12.3 PyQt5-sip==4.19.18

    -

    Getting Sigil's Source Code

    -

    You can clone the Sigil Github repository (Requires a Windows git client - I use the portable version from here):

    -

    git clone https://github.com/Sigil-Ebook/Sigil.git

    +

    Getting Sigil's Source Code

    +

    You can clone the Sigil Github repository (Requires a Windows git client - I use the portable version from here):

    +
    +

    git clone https://github.com/Sigil-Ebook/Sigil.git

    -

    Or you can download a specific release's zipfile from Sigil's releases page on Github (0.9.10 at the time of this writing).

    +

    Or you can download a specific release's zipfile from Sigil's releases page on Github (1.2.0 at the time of this writing).

    I recommend the latter method, as the github repository version might not always be stable at any given moment (even though we try hard not to leave it broken).

    -

    Unzip the source code. Rename the uppermost directory to something useful like "sigil-src". Unless you like typing extra-long directory names in command-prompts--in which case, don't rename it. Remember this location, you'll need it when generating the nmake makefiles with cmake

    -

    Preparing Sigil's Source Code

    -

    To build the Sigil installer package, you'll need to copy the Visual Studio 2017 redistributable runtime installer to the <sigil-src>\installer folder (the one that contains the Sigil.iss file). These redistributable files can usually be found somewhere in Visual Studio's folder structure:

    +

    Unzip the source code. Rename the uppermost directory to something useful like "sigil-src". Unless you like typing extra-long directory names in command-prompts--in which case, don't rename it. Remember this location, you'll need it when generating the nmake makefiles with cmake

    +

    Preparing Sigil's Source Code

    +

    To build the Sigil installer package, you'll need to copy the Visual Studio 2017 redistributable runtime installer to the <sigil-src>\installer folder (the one that contains the Sigil.iss file). These redistributable files can usually be found somewhere in Visual Studio's folder structure:

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.XX.XXXXX\

    vcredist_x64.exe for 64-bit builds, and vcredist_x86.exe for 32-bit builds.

    -

    The file names are important so don't rename them. Just copy the appropriate one to the "installer" folder in Sigil's source mentioned above.

    +

    The file names are important so don't rename them. Just copy the appropriate one to the "installer" folder in Sigil's source mentioned above.

    Configuring and building Sigil (and the Sigil installer package)

    Configuring Sigil with cmake

    With all the pre-requisites met and all the necessary additions to your PATH, the only thing left to do is generate the Sigil makefiles with cmake.

    -

    Using the shortcut to the proper VSStudio command-prompt created in step 1, cd to a suitable empty directory for building Sigil (I recommend "sigil-build", or some such similar name), and issue the following command:

    -

    cmake -G "NMake Makefiles" -DWIN_INSTALLER_USE_64BIT_CRT=1 -DQt5_DIR="C:\Qt\Qt5.12.3\5.12.6\mscv2017_64\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release "C:\path\to\sigil-src"

    +

    Using the shortcut to the proper VSStudio command-prompt created in step 1, cd to a suitable empty directory for building Sigil (I recommend "sigil-build", or some such similar name), and issue the following command:

    +
    +

    cmake -G "NMake Makefiles" -DWIN_INSTALLER_USE_64BIT_CRT=1 -DQt5_DIR="C:\Qt\Qt5.12.7\5.12.7\mscv2017_64\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release "C:\path\to\sigil-src"

    -

    Leave out the -DWIN_INSTALLER_USE_64BIT_CRT=1 part if you're building a 32-bit version of Sigil with the "VS2017 x86 Native Tools Command Prompt" shortcut.

    -

    Obviously change the paths to match where you've actually installed Qt5.12.6 and the Sigil source code. For instance: using my Specially compiled version of Qt5/WebEngine, it would look like:

    -

    cmake -G "NMake Makefiles" -DWIN_INSTALLER_USE_64BIT_CRT=1 -DQt5_DIR="C:\MyQtx64_WE\Qt5.12.6\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release "C:\path\to\sigil-src"

    -

    NOTE: The -DQt5_DIR will be "C:\Qt\Qt5.12.6\5.12.6\mscv2017(_64)\lib\cmake\Qt5" if you installed the standard Qt5.12.6 to its default location

    -

    If this completes successfully, then you're ready to compile Sigil (leave the command prompt open).

    +

    Leave out the -DWIN_INSTALLER_USE_64BIT_CRT=1 part if you're building a 32-bit version of Sigil with the "VS2017 x86 Native Tools Command Prompt" shortcut.

    +

    Obviously change the paths to match where you've actually installed Qt5.12.7 and the Sigil source code. For instance: using my Specially compiled version of Qt5/WebEngine, it would look like:

    +

    cmake -G "NMake Makefiles" -DWIN_INSTALLER_USE_64BIT_CRT=1 -DQt5_DIR="C:\MyQtx64_WE\Qt5.12.7\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release "C:\path\to\sigil-src"

    +

    NOTE: The -DQt5_DIR will be "C:\Qt\Qt5.12.7\5.12.7\mscv2017(_64)\lib\cmake\Qt5" if you installed the standard Qt5.12.7 to its default location

    +

    If this completes successfully, then you're ready to compile Sigil (leave the command prompt open).

    You can also generate Visual Studio Project/Solution Files with cmake by using:

    -

    cmake -G "Visual Studio 14 2017 Win64" WIN_INSTALLER_USE_64BIT_CRT=1 -DQt5_DIR="C:\Qt\Qt5.12.6\5.12.6\mscv2017(_64)\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release "C:\path\to\sigil-src"

    +
    +

    cmake -G "Visual Studio 15 2017 Win64" WIN_INSTALLER_USE_64BIT_CRT=1 -DQt5_DIR="C:\Qt\Qt5.12.7\5.12.7\mscv2017(_64)\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release "C:\path\to\sigil-src"

    -

    Leave off "Win64" and -DWIN_INSTALLER_USE_64BIT_CRT=1 if you're building the 32-bit version of Sigil.

    -

    You can also use cmake-gui (double-click on cmake-gui in the cmake/bin directory) and avoid using the command-prompt altogether if you wish (although you're on your own in figuring out how to enter all the cmake configuration options in the gui).

    +

    Leave off "Win64" and -DWIN_INSTALLER_USE_64BIT_CRT=1 if you're building the 32-bit version of Sigil.

    +

    You can also use cmake-gui (double-click on cmake-gui in the cmake/bin directory) and avoid using the command-prompt altogether if you wish (although you're on your own in figuring out how to enter all the cmake configuration options in the gui).

    The following three cmake options are used to manually specify which Python3 you want to use when building Sigil instead of relying on the included cmake utilities to try and automatically find a suitable version. They can come in handy it you have multiple versions of Python 3 installed on your computer.

    -DPYTHON_LIBRARY=<the full path to the python3.x library (ex. python37.lib)>

    -

    -DPYTHON_INCLUDE_DIR=<the path to the directory where python3.x's header files (python.h) can be found>

    +

    -DPYTHON_INCLUDE_DIR=<the path to the directory where python3.x's header files (python.h) can be found>

    -DPYTHON_EXECUTABLE=<the full path to the python3.x binary (python.exe)>

    -

    If you don't want to build/include the bundled Python environment in the Sigil installer, use the -DPKG_SYSTEM_PYTHON=0 in the CMake configure command to disable it. NOTE: you'll have to configure an external Python interpeter for running Sigil plugins. The "Use Bundled Python" feature will be unavailable.

    +

    If you don't want to build/include the bundled Python environment in the Sigil installer, use the -DPKG_SYSTEM_PYTHON=0 in the CMake configure command to disable it. NOTE: you'll have to configure an external Python interpeter for running Sigil plugins. The "Use Bundled Python" feature will be unavailable.

    Compiling Sigil

    -

    If you generated NMake Makefiles with cmake (like I do), then compile Sigil by typing nmake (at the same command-prompt you just configured with) to begin building Sigil. If it completes without error, you're ready to build the installer package (leave the command prompt open).

    -

    If you generated Visual Studio 2017 projects/solutions, then open the Sigil.sln file in the build directory; make sure the solution configuration is set to "Release"; select the ALL_BUILD project in the Solution Explorer and build the ALL_BUILD project from the Build menu (Build->Build ALL_BUILD). Note: don't build the solution. If it completes without error, you're ready to build the installer package. It is not possible at this time build a Debug version of Sigil with Visual Studio. So make sure the solution configuration is changed to build "Release" only.

    +

    If you generated NMake Makefiles with cmake (like I do), then compile Sigil by typing nmake (at the same command-prompt you just configured with) to begin building Sigil. If it completes without error, you're ready to build the installer package (leave the command prompt open).

    +

    If you generated Visual Studio 2017 projects/solutions, then open the Sigil.sln file in the build directory; make sure the solution configuration is set to "Release"; select the ALL_BUILD project in the Solution Explorer and build the ALL_BUILD project from the Build menu (Build->Build ALL_BUILD). Note: don't build the solution. If it completes without error, you're ready to build the installer package. It is not possible at this time build a Debug version of Sigil with Visual Studio. So make sure the solution configuration is changed to build "Release" only.

    Building the Sigil installer package

    -

    If you generated NMake Makefiles and have successfully compiled Sigil, then type nmake makeinstaller (at the same command prompt you just compiled Sigil with) to build the Sigil installer package. If it completes succesfully, the Sigil installer will be placed in the sigil-build directory's "installer" folder (NOTE: that's the build directory and not the source directory). If it doesn't complete succesfully, you may have to delete the "temp_folder" in the build directory before proceeding.

    -

    If you generated Visual Studio 2017 project/solutions and have built the ALL_BUILD project successfully, then select the "makeinstaller" project in the Solution Explorer and build the makeinstaller project from the Build menu (Build->Build makeinstaller). If it completes succesfully, the Sigil installer will be placed in the sigil-build directory's "installer" folder (NOTE: that's the build directory and not the source directory). If it doesn't complete succesfully, you may have to delete the "temp_folder" in the build directory before proceeding.

    +

    If you generated NMake Makefiles and have successfully compiled Sigil, then type nmake makeinstaller (at the same command prompt you just compiled Sigil with) to build the Sigil installer package. If it completes succesfully, the Sigil installer will be placed in the sigil-build directory's "installer" folder (NOTE: that's the build directory and not the source directory). If it doesn't complete succesfully, you may have to delete the "temp_folder" in the build directory before proceeding.

    +

    If you generated Visual Studio 2017 project/solutions and have built the ALL_BUILD project successfully, then select the "makeinstaller" project in the Solution Explorer and build the makeinstaller project from the Build menu (Build->Build makeinstaller). If it completes succesfully, the Sigil installer will be placed in the sigil-build directory's "installer" folder (NOTE: that's the build directory and not the source directory). If it doesn't complete succesfully, you may have to delete the "temp_folder" in the build directory before proceeding.

    Advanced

    Environment Variables

    The following are environment variables that can be set at runtime to affect how Sigil is run after building/installing.

    SIGIL_PREFS_DIR - Changes where sigil looks for and updates its user preference data. Needs to specify a full path in a directory where the user has write privileges.

    SIGIL_USES_DARK_MODE=(0|1) - Sigil will use the Windows dark mode setting to determine if it should start in light or darkmode. Should you wish to override this behavior (or enable dark mode on systems that do not have a dark theme), use this variable appropriately.

    + - \ No newline at end of file + diff --git a/docs/Building_Sigil_on_Windows.md b/docs/Building_Sigil_on_Windows.md index 5fd3d67100..0ba5799ed7 100644 --- a/docs/Building_Sigil_on_Windows.md +++ b/docs/Building_Sigil_on_Windows.md @@ -7,7 +7,7 @@ To build Sigil on Windows, you need to get/do the following things: 1. [Visual Studio 2017](#vsstudio) The free Community Edition will work fine 2. [CMake](#cmake) (3.0 or higher) 3. [Inno Setup](#inno) (the latest Unicode version available recommended) -4. [Qt5.12.6/QtWebEngine](#qt5) (**NOTE**: The standard precompiled binaries will work but Sigil patches a few things) +4. [Qt5.12.7/QtWebEngine](#qt5) (**NOTE**: The standard precompiled binaries will work but Sigil patches a few things) 5. [Python 3.7.x](#python) 6. [The Sigil source code](#sigil) (downloaded zipfile or a git clone) 7. [Building Sigil](#build) @@ -29,12 +29,12 @@ CMake 3.0 or better is required. I'm using 3.12.x Download it from [cmake.org](h ##
    Inno Setup Get the unicode version (5.5.9 at the time of this writing) from [jrsoftware.org](http://www.jrsoftware.org/isdl.php) make sure you say yes to the Preprocessor option when installing. **Also make sure the Inno Setup directory (the one containing "ISCC.exe") is added to your PATH**. There is no 64-bit version of Inno Setup, but you can still use it to create 64-bit program installers. -## Qt5.12.6 -Download qt-opensource-windows-x86-5.12.6.exe from [Qt's Website](http://download.qt.io/archive/qt/5.12/5.12.6) and install the msvc2017_64, or msvc2017 component (depending on the architecture you will be building Sigil for). You can install both msvc2017_64 and msvc2017 if you like. Also install the QtWebEngine component. +## Qt5.12.7 +Download qt-opensource-windows-x86-5.12.7.exe from [Qt's Website](http://download.qt.io/archive/qt/5.12/5.12.7) and install the msvc2017_64, or msvc2017 component (depending on the architecture you will be building Sigil for). You can install both msvc2017_64 and msvc2017 if you like. Also install the QtWebEngine component. **NOTE:** at the time of this writing, Sigil cannot be built with the precompiled version of Qt5.12.7 because of a bug in Qt. Either use Qt5.12.6, or my compiled version of Qt5.12.7 explained below (or compile Qt5.12.7 yourself and patch it with qt5.12.7_windows_qt_add_resources.patch from the Sigil Docs directory). -If you want to use the exact, patched versions of Qt5.12.6 and QtWebEngine that I've used to release Sigil, feel free to download the whole shebang [from my personal repository](https://github.com/dougmassay/win-qtwebkit-5.212/releases/tag/v5.212-1). It's the archive named: MyQtx64-5.12.6_VS2017_WE.7z (NOTE: you're on your own with a 32-bit version). +If you want to use the exact, patched versions of Qt5.12.7 and QtWebEngine that I've used to release Sigil, feel free to download the whole shebang [from my personal repository](https://github.com/dougmassay/win-qtwebkit-5.212/releases/tag/v5.212-1). It's the archive named: MyQtx64-5.12.7_VS2017_WE.7z (NOTE: you're on your own with a 32-bit version). -Once you have Qt5.12.6 for Visual Studio installed, **make sure its "bin" directory (the one containing "windeployqt.exe) is added to your PATH** +Once you have Qt5.12.7 for Visual Studio installed, **make sure its "bin" directory (the one containing "windeployqt.exe) is added to your PATH** ## Getting Python 3.7 **This is important**. If you're going to be building the 64-bit version of Sigil, you need to install the 64-bit version of Python 3.7. If you're building a 32-bit version of Sigil then you need to install a 32-bit version of Python 3.7. @@ -54,6 +54,7 @@ Once finished, you can begin to install the extra modules needed by Sigil. + cssselect + css-parser + chardet ++ dulwich (0.19.15 recommended/verified) dulwich also requires urllib3 and certifi minimums + Pillow (v6.2.1 recommended/verified) + lxml (v4.4.2 recommended/verified) + PyQt5 (5.12.3 recommended/verified) @@ -62,7 +63,7 @@ From the same command prompt you updated pip with, install the "six" module with >`pip install six` -Repeat for the next five modules: +Repeat for the next six modules: >`pip install html5lib` @@ -82,7 +83,7 @@ Version 4.4.2 comes with precompiled binary wheels for Windows. Not all versions ### Installing PyQt5. -Like lxml, not all versions of PyQt5 will have compatible binaries that will work with Sigil's Qt5 and Python. Stick to version 5.12.3 and everything should work with Python 3.7 and Qt5.12.6 (the trick is to always select a version of PyQt that will work with Sigil's version of Qt and Python) +Like lxml, not all versions of PyQt5 will have compatible binaries that will work with Sigil's Qt5 and Python. Stick to version 5.12.3 and everything should work with Python 3.7 and Qt5.12.7 (the trick is to always select a version of PyQt that will work with Sigil's version of Qt and Python) >`pip install PyQt5==5.12.3 PyQt5-sip==4.19.18 @@ -93,7 +94,7 @@ You can clone the Sigil Github repository (Requires a Windows git client - I use >`git clone https://github.com/Sigil-Ebook/Sigil.git` -Or you can download a specific release's zipfile from Sigil's [releases page](https://github.com/Sigil-Ebook/Sigil/releases/latest) on Github (0.9.10 at the time of this writing). +Or you can download a specific release's zipfile from Sigil's [releases page](https://github.com/Sigil-Ebook/Sigil/releases/latest) on Github (1.2.0 at the time of this writing). I recommend the latter method, as the github repository version might not always be stable at any given moment (even though we try hard not to leave it broken). @@ -117,21 +118,21 @@ With all the pre-requisites met and all the necessary additions to your PATH, th Using the shortcut to the proper VSStudio command-prompt created in [step 1](#vsstudio), cd to a suitable empty directory for building Sigil (I recommend "sigil-build", or some such similar name), and issue the following command: -> `cmake -G "NMake Makefiles" -DWIN_INSTALLER_USE_64BIT_CRT=1 -DQt5_DIR="C:\Qt\Qt5.12.3\5.12.6\mscv2017_64\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release "C:\path\to\sigil-src"` +> `cmake -G "NMake Makefiles" -DWIN_INSTALLER_USE_64BIT_CRT=1 -DQt5_DIR="C:\Qt\Qt5.12.7\5.12.7\mscv2017_64\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release "C:\path\to\sigil-src"` Leave out the -DWIN_INSTALLER_USE_64BIT_CRT=1 part if you're building a 32-bit version of Sigil with the "VS2017 x86 Native Tools Command Prompt" shortcut. -Obviously change the paths to match where you've actually installed Qt5.12.6 and the Sigil source code. For instance: using my Specially compiled version of Qt5/WebEngine, it would look like: +Obviously change the paths to match where you've actually installed Qt5.12.7 and the Sigil source code. For instance: using my Specially compiled version of Qt5/WebEngine, it would look like: -`cmake -G "NMake Makefiles" -DWIN_INSTALLER_USE_64BIT_CRT=1 -DQt5_DIR="C:\MyQtx64_WE\Qt5.12.6\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release "C:\path\to\sigil-src"` +`cmake -G "NMake Makefiles" -DWIN_INSTALLER_USE_64BIT_CRT=1 -DQt5_DIR="C:\MyQtx64_WE\Qt5.12.7\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release "C:\path\to\sigil-src"` -**NOTE**: The -DQt5_DIR will be "C:\Qt\Qt5.12.6\5.12.6\mscv2017(_64)\lib\cmake\Qt5" if you installed the standard Qt5.12.6 to its default location +**NOTE**: The -DQt5_DIR will be "C:\Qt\Qt5.12.7\5.12.7\mscv2017(_64)\lib\cmake\Qt5" if you installed the standard Qt5.12.7 to its default location If this completes successfully, then you're ready to compile Sigil (leave the command prompt open). You can also generate Visual Studio Project/Solution Files with cmake by using: -> `cmake -G "Visual Studio 15 2017 Win64" WIN_INSTALLER_USE_64BIT_CRT=1 -DQt5_DIR="C:\Qt\Qt5.12.6\5.12.6\mscv2017(_64)\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release "C:\path\to\sigil-src"` +> `cmake -G "Visual Studio 15 2017 Win64" WIN_INSTALLER_USE_64BIT_CRT=1 -DQt5_DIR="C:\Qt\Qt5.12.7\5.12.7\mscv2017(_64)\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release "C:\path\to\sigil-src"` Leave off "Win64" and -DWIN_INSTALLER_USE_64BIT_CRT=1 if you're building the 32-bit version of Sigil. diff --git a/docs/Building_on_Linux.html b/docs/Building_on_Linux.html index f9ada7a02a..e8fd75a19d 100644 --- a/docs/Building_on_Linux.html +++ b/docs/Building_on_Linux.html @@ -1,56 +1,58 @@ - -Building_on_Linux -

    Building Sigil on Linux

    + + +Building_on_Linux + + +

    Building Sigil on Linux

    Systems like Ubuntu 18.04 (and its derivatives) or newer

    -

    If you're looking for instructions on how to build on systems older than Ubuntu 18.04 (systems whose repo version of Qt5 is less than 5.9.4), you should look at the Building_on_older_Linux documentation.

    +

    If you're looking for instructions on how to build on systems older than Ubuntu 18.04 (systems whose repo version of Qt5 is less than 5.9.4), you should look at the Building_on_older_Linux documentation.

    General Overview

    -

    The requirements for building Sigil on newer Linux systems like Ubuntu 18.04, Mint 19, Arch Linux, etc., should be able to be installed entirely from your system's software repositories.

    +

    The requirements for building Sigil on newer Linux systems like Ubuntu 18.04, Mint 19, Arch Linux, etc., should be able to be installed entirely from your system's software repositories.

    To build Sigil on newer Linux systems, you need to get/do the following things:

    -
      -
    1. A Linux build-toolchain with a C++11 capable compiler (gcc 4.9.x or higher recommended)
    2. -
    3. CMake (3.0 or higher)
    4. -
    5. Qt5.9.4 or higher (with QtWebEngine)
    6. -
    7. 3rd-party dependencies (an optional step)
    8. -
    9. Python 3.4 (or higher)
    10. -
    11. The Sigil source code (downloaded tarball/zipfile or a git clone)
    12. -
    13. Build/Install Sigil
    14. -
    15. Test Sigil's Plugin Framework
    16. -
    17. Advanced Stuff
    18. - +
        +
      1. A Linux build-toolchain with a C++11 capable compiler (gcc 4.9.x or higher recommended)
      2. +
      3. CMake (3.0 or higher)
      4. +
      5. Qt5.9.4 or higher (with QtWebEngine)
      6. +
      7. 3rd-party dependencies (an optional step)
      8. +
      9. Python 3.4 (or higher)
      10. +
      11. The Sigil source code (downloaded tarball/zipfile or a git clone)
      12. +
      13. Build/Install Sigil
      14. +
      15. Test Sigil's Plugin Framework
      16. +
      17. Advanced Stuff
      -

      Since I'm basically an Ubuntu/Debian guy at heart, I'll be mentioning stuff like:

      -

      sudo apt-get install

      +

      Since I'm basically an Ubuntu/Debian guy at heart, I'll be mentioning stuff like:

      +
      +

      sudo apt-get install

      -

      from here on out. You'll have to forgive me for not knowing all the yum/pacman/emerge equivalents. It's not a slight--I can assure you.

      +

      from here on out. You'll have to forgive me for not knowing all the yum/pacman/emerge equivalents. It's not a slight--I can assure you.

      Linux Build Environment

      On Ubuntu-type systems you can use:

      -

      sudo apt-get install build-essential git

      +
      +

      sudo apt-get install build-essential git

      -

      to get pretty-much everything you need to configure/compile/install C++ projects. On other flavors of Linux you need to basically make sure that you have gcc/g++ and "make" installed.

      +

      to get pretty-much everything you need to configure/compile/install C++ projects. On other flavors of Linux you need to basically make sure that you have gcc/g++ and "make" installed.

      Getting CMake

      Once again: sudo apt-get install cmake will get you what you need on Ubuntu-type systems.

      Getting Qt5

      -
      **If your repos don't provide at lease Qt5.9.4, use the [Building_on_older_Linux](./Building_on_older_Linux.md) documentation**
      -

      To get Sigil's Qt5 requirements, sudo apt-get install the following packages:

      +

      If your repos don't provide at lease Qt5.9.4, use the Building_on_older_Linux documentation
      +To get Sigil's Qt5 requirements, sudo apt-get install the following packages:

      • qtbase5-dev
      • qttools5-dev
      • qttools5-dev-tools
      • qtwebengine5-dev
      • -

      The folllowing command can be copied and pasted for convenience:

      sudo apt-get install qtbase5-dev qttools5-dev qttools5-dev-tools qtwebengine5-dev

      3rd-Party Dependencies (optional step)

      -

      Sigil will provide the extra third-party libs if you do nothing, but most (if not all) of Sigil's third-party dependencies should be avialable in your software repos. If you want to make use of them, sudo apt-get install the following packages.

      +

      Sigil will provide the extra third-party libs if you do nothing, but most (if not all) of Sigil's third-party dependencies should be avialable in your software repos. If you want to make use of them, sudo apt-get install the following packages.

      • libhunspell-dev
      • libpcre3-dev
      • libminizip-dev
      • -

      The folllowing command can be copied and pasted for convenience:

      sudo apt-get install libhunspell-dev libpcre3-dev libminizip-dev

      @@ -63,11 +65,11 @@

      Getting Python 3.4 (or higher)

    19. python3-lxml
    20. python3-six
    21. python3-css-parser (may have to use pip3 install css-parser if your distro has no package for this)
    22. - +
    23. python3-dulwich (unless your distro has very recent version (0.19.x) in its repos, you'll probably need to use pip3 install dulwich to install a new enough version that will work with Sigil. dulwich requires that the urllib3 and certifi modules be installed as well)
    24. The folllowing command can be copied and pasted for convenience:

      -

      sudo apt-get install python3-dev python3-pip python3-lxml python3-six python3-css-parser

      -

      That's all the Python 3.4 (or higher) stuff you will need to get Sigil "up and running", but if you want to make use of Sigil plugins that people are developing, you will also want to install the "standard" modules that ship with the binary version of Sigil on Windows and OS X. These should all be able to be installed with sudo apt-get install.

      +

      sudo apt-get install python3-dev python3-pip python3-lxml python3-six python3-css-parser python3-dulwich

      +

      That's all the Python 3.4 (or higher) stuff you will need to get Sigil "up and running", but if you want to make use of Sigil plugins that people are developing, you will also want to install the "standard" modules that ship with the binary version of Sigil on Windows and OS X. These should all be able to be installed with sudo apt-get install.

      The folllowing command can be copied and pasted for convenience:

      sudo apt-get install python3-tk python3-pyqt5 python3-html5lib python3-regex python3-pillow python3-cssselect python3-chardet

      -

      If you run into any that won't install with sudo apt-get install you can still use pip3 to install them.

      -

      Getting Sigil's Source Code

      +

      If you run into any that won't install with sudo apt-get install you can still use pip3 to install them.

      +

      Getting Sigil's Source Code

      You can clone the Sigil Github repository:

      -

      git clone https://github.com/Sigil-Ebook/Sigil.git

      +
      +

      git clone https://github.com/Sigil-Ebook/Sigil.git

      -

      Or you can download a specific release tarball/zipfile from Sigil's releases page on Github.

      +

      Or you can download a specific release tarball/zipfile from Sigil's releases page on Github.

      I recommend the latter method, as the github repository version might not always be stable at any given moment (even though we try hard not to leave it broken).

      -

      Unzip/untar the source code. Rename the uppermost directory ("Sigil-0.X.X" if you've download the Sigil-0.X.X-Code.zip file ) to something useful like "sigil-src". Unless you like typing mixed-case stuff in a terminal.

      +

      Unzip/untar the source code. Rename the uppermost directory ("Sigil-0.X.X" if you've download the Sigil-0.X.X-Code.zip file ) to something useful like "sigil-src". Unless you like typing mixed-case stuff in a terminal.

      Building Sigil

      -

      First off ... you don't build IN the Sigil source directory. You do all the building in a separate "build" directory. So at the same directory level as the Sigil source code directory, create a new directory called "sigil-build". The rest of the instructions will assume that both your Sigil source directory (I renamed it "sigil-src" in the previous step; adjust accordingly if you didn't) and your Sigil build directory ("sigil-build) are at the root of your user's home (~) directory.

      +

      First off ... you don't build IN the Sigil source directory. You do all the building in a separate "build" directory. So at the same directory level as the Sigil source code directory, create a new directory called "sigil-build". The rest of the instructions will assume that both your Sigil source directory (I renamed it "sigil-src" in the previous step; adjust accordingly if you didn't) and your Sigil build directory ("sigil-build) are at the root of your user's home (~) directory.

      So first off, open a terminal and cd into your sigil-build directory

      -

      cd ~/sigil-build

      +
      +

      cd ~/sigil-build

      Then issue the following command to configure Sigil for building:

      -

      cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../sigil-src

      +
      +

      cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../sigil-src

      -

      If there are no errors, you're ready to build.

      +

      If there are no errors, you're ready to build.

      The default install prefix is /usr/local. If you wish to change the install location, you can do so by adding a -DCMAKE_INSTALL_PREFIX option to the above cmake configure command like so:

      -

      cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/a/different/install/prefix -DCMAKE_BUILD_TYPE=Release ../sigil-src

      +
      +

      cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/a/different/install/prefix -DCMAKE_BUILD_TYPE=Release ../sigil-src

      You can also customize/override where the Sigil support files get installed (<CMAKE_INSTALL_PREFIX>/share by default) with the -DSHARE_INSTALL_PREFIX option (not recommended for beginners).

      -

      If cmake couldn't automatically find the necessary Python 3.4 (or higher) stuff it needs (like if you installed manually in an unusual location, or you want to use a different Python version) you may need to tell cmake specifically where things can be found. Do so with:

      -

      -DPYTHON_LIBRARY=<the full path to the python3.4 (or higher) shared library> (usually something similar to /usr/lib/libpython34.so)

      -
      -

      -DPYTHON_INCLUDE_DIR=<the full path to the directory where python3.4's (or higher) header files can be found> (ex: /usr/include/python3.4)

      -
      -

      -DPYTHON_EXECUTABLE=<the full path to the python3.4 (or higher) interpreter> (ex: /usr/lib/python3)

      +

      If cmake couldn't automatically find the necessary Python 3.4 (or higher) stuff it needs (like if you installed manually in an unusual location, or you want to use a different Python version) you may need to tell cmake specifically where things can be found. Do so with:

      +
      +

      -DPYTHON_LIBRARY=<the full path to the python3.4 (or higher) shared library> (usually something similar to /usr/lib/libpython34.so)

      +

      -DPYTHON_INCLUDE_DIR=<the full path to the directory where python3.4's (or higher) header files can be found> (ex: /usr/include/python3.4)

      +

      -DPYTHON_EXECUTABLE=<the full path to the python3.4 (or higher) interpreter> (ex: /usr/lib/python3)

      Once the cmake configure command finishes with no errors, build Sigil with:

      -

      make (or make -j4 if you have plenty of processor cores)

      +
      +

      make (or make -j4 if you have plenty of processor cores)

      Common compilation failures/Errors.

      To be determined.

      Installing Sigil

      If all goes well, install Sigil with:

      -

      sudo make install

      +
      +

      sudo make install

      -

      If you configured with the default install prefix, you can launch by entering "sigil" (no quotes) at a terminal. If you configured to install somewhere else, you may need to create a link to the sigil launch script (<CMAKE_INSTALL_PREFIX>/bin/sigil) in a directory that is on your path. There's also a .desktop file in <SIGIL_SHARE_PREFIX>/share/applications that you can create a link to on your desktop. Sigil should also appear in your Desktop Environment's menu system (under Office and/or Accessories). You may need to logout and back in for the menu entries to be visible after installing (you can also force your menus to update if you have the xdg-utils package installed by issuing the "xdg-desktop-menu forceupdate" command from a terminal)

      -

      Testing Sigil's Python plugin framework

      -

      To test if Sigil's Python 3.4+ plugin framework is fully functional, you can do the following:

      -
        -
      1. download testplugin_v013.zip from https://github.com/Sigil-Ebook/Sigil/raw/master/docs/testplugin_v014.zip
      2. +

        If you configured with the default install prefix, you can launch by entering "sigil" (no quotes) at a terminal. If you configured to install somewhere else, you may need to create a link to the sigil launch script (<CMAKE_INSTALL_PREFIX>/bin/sigil) in a directory that is on your path. There's also a .desktop file in <SIGIL_SHARE_PREFIX>/share/applications that you can create a link to on your desktop. Sigil should also appear in your Desktop Environment's menu system (under Office and/or Accessories). You may need to logout and back in for the menu entries to be visible after installing (you can also force your menus to update if you have the xdg-utils package installed by issuing the "xdg-desktop-menu forceupdate" command from a terminal)

        +

        Testing Sigil's Python plugin framework

        +

        To test if Sigil's Python 3.4+ plugin framework is fully functional, you can do the following:

        +
          +
        1. download testplugin_v013.zip from https://github.com/Sigil-Ebook/Sigil/raw/master/docs/testplugin_v014.zip
        2. open Sigil to the normal nearly blank template epub it generates when opened
        3. use Plugins->Manage Plugins menu and make sure you have a Python 3.4+ interpreter configured
        4. -
        5. use the "Add Plugin" button to navigate to and add testplugin_vXXX.zip and then hit "Okay" to exit the Manage Plugins Dialog
        6. -
        7. use Plugins->Edit->testplugin to launch the plugin and hit the "Start" button to run it
        8. +
        9. use the "Add Plugin" button to navigate to and add testplugin_vXXX.zip and then hit "Okay" to exit the Manage Plugins Dialog
        10. +
        11. use Plugins->Edit->testplugin to launch the plugin and hit the "Start" button to run it
        12. check the plugin output window for your missing or broken plugin test results
        13. -
        -

        Install any missing Python modules with your system's package management system or Python's pip3.

        +

        Install any missing Python modules with your system's package management system or Python's pip3.

        Advanced Stuff

        -

        There are several configuration and environment variable options that can tailor how Sigil is built and/or run. I've talked about a few of the cmake options already, but I'll mention them here again along with the rest--with a brief explanation of their purposes.

        +

        There are several configuration and environment variable options that can tailor how Sigil is built and/or run. I've talked about a few of the cmake options already, but I'll mention them here again along with the rest--with a brief explanation of their purposes.

        CMake options

        -DQt5_DIR=<path> Configures cmake to use a Qt5 installation other than the normal system version of Qt5 (ex. /opt/Qt5.12.3/5.12/gcc_64/lib/cmake/Qt5 - the path should alays end in /lib/cmake/Qt5)

        -DCMAKE_INSTALL_PREFIX=<path> Configures the prefix where Sigil will be installed to (default is /usr/local)

        -

        -DSHARE_INSTALL_PREFIX=<path> Configures the prefix where Sigil's support files will be installed to (default is /usr/local meaning the support files will be installed in /usr/local/share/sigil)

        -

        -DCMAKE_INSTALL_LIBDIR=(lib|lib64) Use to override GnuInstallDirs if it doesn't choose the correct lib directory for your distro.

        -

        -DUSE_SYSTEM_LIBS=(0|1) Tells cmake to try and use the system libraries when building Sigil instead of the ones bundled with Sigil in the 3rdParty directory. If a system version of a 3rd-party can't be found, Sigil falls back on the bundled version -- unless -DSYSTEM_LIBS_REQUIRED=1 is also specified (default is 0).

        -

        -DSYSTEM_LIBS_REQUIRED=(0|1) When used in conjunction with -DUSE_SYSTEM_LIBS=1, the Sigil build process will fail if all the necessary libraries can't be located on the system, instead of falling back on the bundled versions (default is 0).

        +

        -DSHARE_INSTALL_PREFIX=<path> Configures the prefix where Sigil's support files will be installed to (default is /usr/local meaning the support files will be installed in /usr/local/share/sigil)

        +

        -DCMAKE_INSTALL_LIBDIR=(lib|lib64) Use to override GnuInstallDirs if it doesn't choose the correct lib directory for your distro.

        +

        -DUSE_SYSTEM_LIBS=(0|1) Tells cmake to try and use the system libraries when building Sigil instead of the ones bundled with Sigil in the 3rdParty directory. If a system version of a 3rd-party can't be found, Sigil falls back on the bundled version -- unless -DSYSTEM_LIBS_REQUIRED=1 is also specified (default is 0).

        +

        -DSYSTEM_LIBS_REQUIRED=(0|1) When used in conjunction with -DUSE_SYSTEM_LIBS=1, the Sigil build process will fail if all the necessary libraries can't be located on the system, instead of falling back on the bundled versions (default is 0).

        -DINSTALL_BUNDLED_DICTS=(0|1) Default is 1. Can be used to enable/disable the installation of the bundled Hunspell dictionaries used for spellchecking. If this is disabled (-DINSTALL_BUNDLED_DICTS=0), then the standard system spell-check dictionary location of /usr/share/hunspell will be searched for eligible dictionaries. If additional system paths need to be searched for dictionaries, they can be added using the -DEXTRA_DICT_DIRS option. Setting this to 0 will require that you manually install the language-specific hunspell dictionaries (from your software repos) yourself (e.g. sudo apt-get install hunspell-en-us).

        -DEXTRA_DICT_DIRS=<path1>:<path2> Path(s) that should be searched for eligible spellcheck dictionaries (in addition to /usr/share/hunspell). Multiple paths should be separated by colons. This option is only relevant if -DINSTALL_BUNDLED_DICTS=0 is also specified.

        -

        -DMATHJAX_DIR=<path> If you would like use your system's MathJax implementation instead of the one that comes bundled with Sigil, use this cmake directive when first configuring. A minimum of MathJax v2.7.0 is required to work with Sigil. NOTE: if -DMATHJAX_DIR=<path> is used, Sigil will install a config script to <path>/config/local. This file is required for Sigil's Preview to be able properly render MathML. This feature was added between Sigil 0.9.12 and 0.9.13.

        +

        -DMATHJAX_DIR=<path> If you would like use your system's MathJax implementation instead of the one that comes bundled with Sigil, use this cmake directive when first configuring. A minimum of MathJax v2.7.0 is required to work with Sigil. NOTE: if -DMATHJAX_DIR=<path> is used, Sigil will install a config script to <path>/config/local. This file is required for Sigil's Preview to be able properly render MathML. This feature was added between Sigil 0.9.12 and 0.9.13.

        The following three cmake options are used to manually specify which Python3 you want to use when building Sigil instead of relying on the included cmake utilities to try and automatically find a suitable version.

        -DPYTHON_LIBRARY=<the path to the python3.x shared library>

        -

        -DPYTHON_INCLUDE_DIR=<the path to the directory where python3.x's header files can be found>

        +

        -DPYTHON_INCLUDE_DIR=<the path to the directory where python3.x's header files can be found>

        -DPYTHON_EXECUTABLE=<the path to the python3.x interpreter>

        -DBUILD_PATCHED_LIBXML2=(0|1) Some newer versions of libxml2 have a bug that causes QtWebKit to render html entities twice. Adding -DBUILD_PATCHED_LIBXML2=1 to the cmake command will clone the libxml2 git repo, checkout a specific commit, patch the source, build it and install it alongside Sigil (does not affect the system version of libxml2). Requires git, libtool, autoconf and automake packages to be installed (as well as a working internet connection). Cmake should notify of any missing programs needed. The default is to NOT build the patched version of libxml2 (-DBUILD_PATCHED_LIBXML2=0).

        Environment Variables

        -

        The following are environment variables that can be set at runtime to affect how Sigil is run after building/installing. They are commonly set by manually editing Sigil's launch script (<CMAKE_INSTALL_PREFIX>/bin/sigil).

        +

        The following are environment variables that can be set at runtime to affect how Sigil is run after building/installing. They are commonly set by manually editing Sigil's launch script (<CMAKE_INSTALL_PREFIX>/bin/sigil).

        SIGIL_PREFS_DIR - Changes where sigil looks for and updates its user preference data. Needs to specify a full path in a directory where the user has write privileges.

        SIGIL_EXTRA_ROOT - Handy for relocating the Sigil support files. For instance you can move the <CMAKE_SHARE_PREFIX>/share/sigil directory anywhere you like. You just have to set SIGIL_EXTRA_ROOT to the path where you moved <CMAKE_SHARE_PREFIX>/share/sigil to.

        -

        SIGIL_DICTIONARIES - Used to tell Sigil what directories are to be searched for Hunspell dictionary files. Multiple directories can be specified by separating the paths with a colon. i.e. SIGIL_DICTIONARIES="/usr/share/hunspell" or SIGIL_DICTIONARIES="/usr/share/hunspell:/usr/share/hunspellextra" Setting this variable at run time will override all compile-time dictionary search paths (except for any user-supplied dictionaries manually added to their preference directory's hunspell_dictionary location).

        +

        SIGIL_DICTIONARIES - Used to tell Sigil what directories are to be searched for Hunspell dictionary files. Multiple directories can be specified by separating the paths with a colon. i.e. SIGIL_DICTIONARIES="/usr/share/hunspell" or SIGIL_DICTIONARIES="/usr/share/hunspell:/usr/share/hunspellextra" Setting this variable at run time will override all compile-time dictionary search paths (except for any user-supplied dictionaries manually added to their preference directory's hunspell_dictionary location).

        FORCE_SIGIL_DARKMODE_PALETTE - If this variable is set at runtime, it tells Sigil to ignore any defined platform themes/styles (QT_QPA_PLATFORMTHEME, or QT_STYLE_OVERRIDE) and to use the dark color palette provided by Sigil (starting with Sigil v1.1).

        SIGIL_ICON_SCALE_FACTOR - Valid values: 1.0 to 3.0. The default value (with no variable set) is 1.8. Sigil scales its menu icons based on font-size. This can sometimes result in icons being a bit too large (or too small) depending on the system Qt theme. Use this variable to tweak the icon size if deemed necessary. (Only works with Sigil v0.9.7 and earlier; v0.9.8 has a preference setting to adjust icons)

        -

        The Sigil launch script also sets a SIGIL_SHARE_PREFIX environment variable, but it is automatically set to be the same as the cmake SHARE_INSTALL_PREFIX build-time option. It would be unwise to change this environment variable. Use the SIGIL_EXTRA_ROOT environment variable instead, if you need to alter the location of Sigil's support files after building Sigil.

        +

        The Sigil launch script also sets a SIGIL_SHARE_PREFIX environment variable, but it is automatically set to be the same as the cmake SHARE_INSTALL_PREFIX build-time option. It would be unwise to change this environment variable. Use the SIGIL_EXTRA_ROOT environment variable instead, if you need to alter the location of Sigil's support files after building Sigil.

        + - \ No newline at end of file + diff --git a/docs/Building_on_Linux.md b/docs/Building_on_Linux.md index e2379106ca..e4d0bcbb13 100644 --- a/docs/Building_on_Linux.md +++ b/docs/Building_on_Linux.md @@ -70,10 +70,11 @@ On Ubuntu/Debian `sudo apt-get install` (at a minimum) the following packages: + python3-lxml + python3-six + python3-css-parser (may have to use `pip3 install css-parser` if your distro has no package for this) ++ python3-dulwich (unless your distro has very recent version (0.19.x) in its repos, you'll probably need to use `pip3 install dulwich` to install a new enough version that will work with Sigil. dulwich requires that the urllib3 and certifi modules be installed as well) The folllowing command can be copied and pasted for convenience: -`sudo apt-get install python3-dev python3-pip python3-lxml python3-six python3-css-parser` +`sudo apt-get install python3-dev python3-pip python3-lxml python3-six python3-css-parser python3-dulwich` That's all the Python 3.4 (or higher) stuff you will need to get Sigil "up and running", but if you want to make use of Sigil plugins that people are developing, you will also want to install the "standard" modules that ship with the binary version of Sigil on Windows and OS X. These should all be able to be installed with `sudo apt-get install`. diff --git a/src/Misc/FilenameDelegate.cpp b/src/Misc/FilenameDelegate.cpp index 06d147144b..0fa6f25cc6 100644 --- a/src/Misc/FilenameDelegate.cpp +++ b/src/Misc/FilenameDelegate.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include "Misc/FilenameDelegate.h"