Update Debian and Ubuntu builds (#2191)
This commit is contained in:
@@ -40,7 +40,7 @@ documentation.
|
||||
|
||||
## Implementation
|
||||
|
||||
novelWriter is written with Python 3 (3.10+) using Qt6 and PyQt6 (6.0+), and is released on
|
||||
novelWriter is written with Python 3 (3.10+) using Qt6 and PyQt6 (6.4+), and is released on
|
||||
Linux, Windows and macOS. It can in principle run on any Operating System that also supports Qt,
|
||||
PyQt and Python.
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ The project storage is suitable for version control software, and also well suit
|
||||
synchronisation tools. All text is saved as plain text files, and your project data as standard
|
||||
data formats in XML and JSON. See :ref:`a_storage` for more details.
|
||||
|
||||
Any operating system that has Python 3 and the Qt 5 libraries should be able to run novelWriter.
|
||||
Any operating system that has Python 3 and the Qt 6 libraries should be able to run novelWriter.
|
||||
It runs fine on Linux, Windows and MacOS, and users have tested it on other platforms as well.
|
||||
See :ref:`a_started` for more details.
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ In the Main section you must at least define the ``name`` and ``icontheme`` sett
|
||||
setting must match the icon theme's folder name.
|
||||
|
||||
The Palette values correspond to the Qt enum values for ``QPalette::ColorRole``, see the
|
||||
`Qt documentation <https://doc.qt.io/qt-5.15/qpalette.html#ColorRole-enum>`_ for more details. The
|
||||
`Qt documentation <https://doc.qt.io/qt-6/qpalette.html#ColorRole-enum>`_ for more details. The
|
||||
colour values are RGB numbers on the format ``r, g, b`` where each is an integer from ``0`` to
|
||||
``255``. Omitted values are not loaded and will use default values. If the ``helptext`` colour is
|
||||
not defined, it is computed as a colour between the ``window`` and ``windowtext`` colour.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
File Locations
|
||||
**************
|
||||
|
||||
.. _QStandardPaths: https://doc.qt.io/qt-5/qstandardpaths.html
|
||||
.. _QStandardPaths: https://doc.qt.io/qt-6/qstandardpaths.html
|
||||
|
||||
novelWriter will create a few files on your system outside of the application folder itself. These
|
||||
file locations are described in this chapter.
|
||||
|
||||
@@ -136,12 +136,9 @@ document when reaching the end. There is also a switch that will try to match th
|
||||
when the replacement is made. That is, it will try to keep the word upper, lower, or capitalised to
|
||||
match the word being replaced.
|
||||
|
||||
The regular expression search is somewhat dependant on which version of Qt your system has. If you
|
||||
have Qt 5.13 or higher, there is better support for Unicode symbols in the search.
|
||||
|
||||
.. seealso::
|
||||
For more information on the capabilities of the Regular Expression option, see the Qt
|
||||
documentation for the `QRegularExpression <https://doc.qt.io/qt-5/qregularexpression.html>`_
|
||||
documentation for the `QRegularExpression <https://doc.qt.io/qt-6/qregularexpression.html>`_
|
||||
class.
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -45,7 +45,7 @@ instance `en_GB` for British English.
|
||||
|
||||
## Qt GUI Localisation
|
||||
|
||||
You will need the translation tool Qt 5 Linguist on your system.
|
||||
You will need the translation tool Qt Linguist on your system.
|
||||
|
||||
For Ubuntu/Debian, run:
|
||||
|
||||
@@ -53,7 +53,7 @@ For Ubuntu/Debian, run:
|
||||
sudo apt install qttools5-dev-tools
|
||||
```
|
||||
|
||||
See also [Qt Linguist Manual: Translators](https://doc.qt.io/qt-5/linguist-translators.html).
|
||||
See also [Qt Linguist Manual: Translators](https://doc.qt.io/qt-6/linguist-translators.html).
|
||||
|
||||
|
||||
### Workflow
|
||||
@@ -94,7 +94,7 @@ TS file format. On Debian/Ubuntu it is provided by the package `pyqt6-dev-tools`
|
||||
|
||||
### Edit the Translation File in Qt Linguist
|
||||
|
||||
The `i18n/nw_XX.ts` file can be edited with the Qt Linguist application provided by Qt 5. This is
|
||||
The `i18n/nw_XX.ts` file can be edited with the Qt Linguist application provided by Qt. This is
|
||||
by far easier than manually editing the `.ts` file.
|
||||
|
||||
Please select "English" and "United Kingdom" as the _source_ language if prompted by Qt Linguist.
|
||||
|
||||
@@ -47,9 +47,9 @@ __license__ = "GPLv3"
|
||||
__author__ = "Veronica Berglyd Olsen"
|
||||
__maintainer__ = "Veronica Berglyd Olsen"
|
||||
__email__ = "code@vkbo.net"
|
||||
__version__ = "2.7a0"
|
||||
__hexversion__ = "0x020700a0"
|
||||
__date__ = "2025-01-10"
|
||||
__version__ = "2.7a1"
|
||||
__hexversion__ = "0x020700a1"
|
||||
__date__ = "2025-01-15"
|
||||
__status__ = "Stable"
|
||||
__domain__ = "novelwriter.io"
|
||||
|
||||
@@ -202,14 +202,14 @@ def main(sysArgs: list | None = None) -> GuiMain | None:
|
||||
"At least Python 3.10 is required, found %s" % CONFIG.verPyString
|
||||
)
|
||||
errorCode |= 0x04
|
||||
if CONFIG.verQtValue < 0x060000:
|
||||
if CONFIG.verQtValue < 0x060400:
|
||||
errorData.append(
|
||||
"At least Qt6 version 6.0 is required, found %s" % CONFIG.verQtString
|
||||
"At least Qt6 version 6.4 is required, found %s" % CONFIG.verQtString
|
||||
)
|
||||
errorCode |= 0x08
|
||||
if CONFIG.verPyQtValue < 0x060000:
|
||||
if CONFIG.verPyQtValue < 0x060400:
|
||||
errorData.append(
|
||||
"At least PyQt6 version 6.0 is required, found %s" % CONFIG.verPyQtString
|
||||
"At least PyQt6 version 6.4 is required, found %s" % CONFIG.verPyQtString
|
||||
)
|
||||
errorCode |= 0x10
|
||||
|
||||
|
||||
@@ -534,7 +534,7 @@ class Config:
|
||||
self._dShortDateTime = self._dLocale.dateTimeFormat(QLocale.FormatType.ShortFormat)
|
||||
|
||||
langList = [
|
||||
(self._qtLangPath, "qtbase"), # Qt 5.x
|
||||
(self._qtLangPath, "qtbase"), # Qt
|
||||
(str(self._nwLangPath), "nw"), # novelWriter
|
||||
]
|
||||
for lngPath, lngBase in langList:
|
||||
|
||||
+16
-33
@@ -633,7 +633,7 @@ def copySourceCode(dst: Path) -> None:
|
||||
# Copy Package Files
|
||||
##
|
||||
|
||||
def copyPackageFiles(dst: Path, setupPy: bool = False, useCfg: bool = False) -> None:
|
||||
def copyPackageFiles(dst: Path, setupPy: bool = False) -> None:
|
||||
"""Copy files needed for packaging."""
|
||||
|
||||
copyFiles = ["LICENSE.md", "CREDITS.md", "pyproject.toml"]
|
||||
@@ -655,24 +655,10 @@ def copyPackageFiles(dst: Path, setupPy: bool = False, useCfg: bool = False) ->
|
||||
))
|
||||
print("Wrote: setup.py")
|
||||
|
||||
if useCfg:
|
||||
# This is needed for Ubuntu up to 22.04
|
||||
text = readFile(SETUP_DIR / "launchpad_setup.cfg")
|
||||
text = text.replace("setup/description_pypi.md", "data/description_short.txt")
|
||||
writeFile(dst / "setup.cfg", text)
|
||||
print("Wrote: setup.cfg")
|
||||
|
||||
writeFile(dst / "pyproject.toml", (
|
||||
"[build-system]\n"
|
||||
"requires = [\"setuptools\"]\n"
|
||||
"build-backend = \"setuptools.build_meta\"\n"
|
||||
))
|
||||
print("Wrote: pyproject.toml")
|
||||
else:
|
||||
text = readFile(CURR_DIR / "pyproject.toml")
|
||||
text = text.replace("setup/description_pypi.md", "data/description_short.txt")
|
||||
writeFile(dst / "pyproject.toml", text)
|
||||
print("Wrote: pyproject.toml")
|
||||
text = readFile(CURR_DIR / "pyproject.toml")
|
||||
text = text.replace("setup/description_pypi.md", "data/description_short.txt")
|
||||
writeFile(dst / "pyproject.toml", text)
|
||||
print("Wrote: pyproject.toml")
|
||||
|
||||
return
|
||||
|
||||
@@ -683,7 +669,7 @@ def copyPackageFiles(dst: Path, setupPy: bool = False, useCfg: bool = False) ->
|
||||
|
||||
def makeDebianPackage(
|
||||
signKey: str | None = None, sourceBuild: bool = False, distName: str = "unstable",
|
||||
buildName: str = "", oldSetuptools: bool = False, forLaunchpad: bool = False
|
||||
buildName: str = "", forLaunchpad: bool = False
|
||||
) -> str:
|
||||
"""Build a Debian package."""
|
||||
print("")
|
||||
@@ -743,7 +729,7 @@ def makeDebianPackage(
|
||||
print("Copying or generating additional files ...")
|
||||
print("")
|
||||
|
||||
copyPackageFiles(outDir, setupPy=True, useCfg=oldSetuptools)
|
||||
copyPackageFiles(outDir, setupPy=True)
|
||||
|
||||
# Copy/Write Debian Files
|
||||
# =======================
|
||||
@@ -830,22 +816,20 @@ def buildForLaunchpad(args: argparse.Namespace) -> None:
|
||||
print("==================")
|
||||
print("")
|
||||
|
||||
if args.first:
|
||||
bldNum = "0"
|
||||
if args.build:
|
||||
bldNum = str(args.build)
|
||||
else:
|
||||
bldNum = input("Build number [0]: ")
|
||||
if bldNum == "":
|
||||
bldNum = "0"
|
||||
bldNum = "0"
|
||||
|
||||
distLoop = [
|
||||
("22.04", "jammy", True),
|
||||
("24.04", "noble", False),
|
||||
("24.10", "oracular", False),
|
||||
("24.04", "noble"),
|
||||
("24.10", "oracular"),
|
||||
("25.04", "plucky"),
|
||||
]
|
||||
|
||||
print("Building Ubuntu packages for:")
|
||||
print("")
|
||||
for distNum, codeName, _ in distLoop:
|
||||
for distNum, codeName in distLoop:
|
||||
print(f" * Ubuntu {distNum} {codeName.title()}")
|
||||
print("")
|
||||
|
||||
@@ -855,14 +839,13 @@ def buildForLaunchpad(args: argparse.Namespace) -> None:
|
||||
print("")
|
||||
|
||||
dputCmd = []
|
||||
for distNum, codeName, oldSetup in distLoop:
|
||||
for distNum, codeName in distLoop:
|
||||
buildName = f"ubuntu{distNum}.{bldNum}"
|
||||
dCmd = makeDebianPackage(
|
||||
signKey=signKey,
|
||||
sourceBuild=True,
|
||||
distName=codeName,
|
||||
buildName=buildName,
|
||||
oldSetuptools=oldSetup,
|
||||
forLaunchpad=True,
|
||||
)
|
||||
dputCmd.append(dCmd)
|
||||
@@ -1579,7 +1562,7 @@ if __name__ == "__main__":
|
||||
)
|
||||
)
|
||||
cmdBuildUbuntu.add_argument("--sign", action="store_true", help="Sign the package.")
|
||||
cmdBuildUbuntu.add_argument("--first", action="store_true", help="Set build number to 0.")
|
||||
cmdBuildUbuntu.add_argument("--build", type=int, help="Set build number.")
|
||||
cmdBuildUbuntu.set_defaults(func=buildForLaunchpad)
|
||||
|
||||
# Build AppImage
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ classifiers = [
|
||||
]
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
"pyqt5>=5.15",
|
||||
"pyqt6>=6.4",
|
||||
"pyenchant>=3.0.0",
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
pyqt6>=6.0
|
||||
pyqt6>=6.4
|
||||
pyenchant>=3.0.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<novelWriterXML appVersion="2.7a0" hexVersion="0x020700a0" fileVersion="1.5" fileRevision="4" timeStamp="2025-01-10 01:59:38">
|
||||
<project id="e2be99af-f9bf-4403-857a-c3d1ac25abea" saveCount="2149" autoCount="281" editTime="95624">
|
||||
<novelWriterXML appVersion="2.7a1" hexVersion="0x020700a1" fileVersion="1.5" fileRevision="4" timeStamp="2025-01-15 23:35:34">
|
||||
<project id="e2be99af-f9bf-4403-857a-c3d1ac25abea" saveCount="2152" autoCount="281" editTime="95820">
|
||||
<name>Sample Project</name>
|
||||
<author>Jane Smith</author>
|
||||
</project>
|
||||
|
||||
@@ -2,14 +2,14 @@ Source: novelwriter
|
||||
Maintainer: Veronica Berglyd Olsen <code@vkbo.net>
|
||||
Section: text
|
||||
Priority: optional
|
||||
Build-Depends: dh-python, python3-setuptools, python3-all, debhelper (>= 9), python3 (>=3.10), python3-pyqt5 (>= 5.15), python3-enchant (>= 2.0)
|
||||
Build-Depends: dh-python, python3-setuptools, python3-all, debhelper (>= 9), python3 (>=3.10), python3-pyqt6 (>= 6.4), python3-pyqt6.qtsvg (>= 6.4), python3-enchant (>= 2.0)
|
||||
Standards-Version: 4.5.1
|
||||
Homepage: https://novelwriter.io
|
||||
X-Python3-Version: >= 3.10
|
||||
|
||||
Package: novelwriter
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, ${python3:Depends}, python3 (>=3.10), python3-pyqt5 (>= 5.15), python3-enchant (>= 2.0)
|
||||
Depends: ${misc:Depends}, ${python3:Depends}, python3 (>=3.10), python3-pyqt6 (>= 6.4), python3-pyqt6.qtsvg (>= 6.4), python3-enchant (>= 2.0)
|
||||
Description: A markdown-like text editor for planning and writing novels
|
||||
novelWriter is a plain text editor designed for writing novels assembled from
|
||||
many smaller text documents. It uses a minimal formatting syntax inspired by
|
||||
|
||||
@@ -1 +1 @@
|
||||
pyqt5 python3-pyqt5
|
||||
pyqt6 python3-pyqt6
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
[metadata]
|
||||
name = novelWriter
|
||||
version = attr: novelwriter.__version__
|
||||
author = Veronica Berglyd Olsen
|
||||
author_email = code@vkbo.net
|
||||
description = A markdown-like text editor for planning and writing novels
|
||||
url = https://novelwriter.io
|
||||
long_description = file: setup/description_pypi.md
|
||||
long_description_content_type = text/markdown
|
||||
license_files = LICENSE.md
|
||||
license = GNU General Public License v3
|
||||
classifiers =
|
||||
Programming Language :: Python :: 3 :: Only
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: 3.12
|
||||
Programming Language :: Python :: 3.13
|
||||
Programming Language :: Python :: Implementation :: CPython
|
||||
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
||||
Development Status :: 5 - Production/Stable
|
||||
Operating System :: OS Independent
|
||||
Intended Audience :: End Users/Desktop
|
||||
Natural Language :: English
|
||||
Topic :: Text Editors
|
||||
project_urls =
|
||||
Bug Tracker = https://github.com/vkbo/novelWriter/issues
|
||||
Documentation = https://docs.novelwriter.io
|
||||
Source Code = https://github.com/vkbo/novelWriter
|
||||
|
||||
[options]
|
||||
zip_safe = False
|
||||
python_requires = >=3.10
|
||||
include_package_data = True
|
||||
packages = find_namespace:
|
||||
install_requires =
|
||||
pyqt5>=5.15
|
||||
pyenchant>=3.0.0
|
||||
|
||||
[options.packages.find]
|
||||
include = novelwriter*
|
||||
|
||||
[options.entry_points]
|
||||
gui_scripts =
|
||||
novelwriter = novelwriter:main
|
||||
|
||||
[bdist_wheel]
|
||||
universal = 0
|
||||
@@ -25,4 +25,4 @@ echo " Building Linux Packages"
|
||||
echo "================================================================================"
|
||||
echo ""
|
||||
python3 pkgutils.py build-deb --sign
|
||||
python3 pkgutils.py build-ubuntu --sign --first
|
||||
python3 pkgutils.py build-ubuntu --sign
|
||||
|
||||
Reference in New Issue
Block a user