diff --git a/docs/source/int_source.rst b/docs/source/int_source.rst index e9ae6cec..13838d82 100644 --- a/docs/source/int_source.rst +++ b/docs/source/int_source.rst @@ -4,7 +4,6 @@ Running from Source ******************* -.. _main website: https://novelwriter.io .. _GitHub: https://github.com/vkbo/novelWriter/releases .. _PyPi: https://pypi.org/project/novelWriter/ .. _Sphinx Docs: https://www.sphinx-doc.org/ @@ -25,11 +24,6 @@ by running: python pkgutils.py help -.. warning:: - - Calling ``setup.py install`` has been deprecated for a while, and this approach is no longer - actively supported in novelWriter either. - .. _a_source_depend: @@ -92,7 +86,7 @@ With the tool installed, run the following command from the root of the novelWri This should generate two files in the ``dist/`` folder at your current location. One with file extension ``.tar.gz`` and one with extension ``.whl``. The latter is the package you want to -install, here with example version number 2.0.7, but your may be different: +install, here with example version number 2.0.7, but yours may be different: .. code-block:: bash diff --git a/novelwriter/__init__.py b/novelwriter/__init__.py index 2e591ee6..4731b73b 100644 --- a/novelwriter/__init__.py +++ b/novelwriter/__init__.py @@ -189,7 +189,7 @@ def main(sysArgs=None): errDlg = QErrorMessage() errDlg.resize(500, 300) errDlg.showMessage(( - "

A critical error has been encountered

" + "

A critical error was encountered

" "

novelWriter cannot start due to the following issues:

" "

 - %s

" "

Shutting down ...

" diff --git a/novelwriter/guimain.py b/novelwriter/guimain.py index 2b536b8a..90904cc8 100644 --- a/novelwriter/guimain.py +++ b/novelwriter/guimain.py @@ -21,6 +21,7 @@ General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . """ +from __future__ import annotations import sys import logging @@ -301,9 +302,6 @@ class GuiMain(QMainWindow): # Forward Functions self.setStatus = self.mainStatus.setStatus - # Force a show of the GUI - self.show() - # Check that config loaded fine self.reportConfErr() @@ -1002,7 +1000,7 @@ class GuiMain(QMainWindow): dlgDetails = GuiProjectDetails(self) assert isinstance(dlgDetails, GuiProjectDetails) - dlgDetails.setModal(False) + dlgDetails.setModal(True) dlgDetails.show() dlgDetails.raise_() dlgDetails.updateValues() diff --git a/novelwriter/tools/lipsum.py b/novelwriter/tools/lipsum.py index 5c6d41ca..c78e20de 100644 --- a/novelwriter/tools/lipsum.py +++ b/novelwriter/tools/lipsum.py @@ -46,6 +46,8 @@ class GuiLipsum(QDialog): logger.debug("Create: GuiLipsum") self.setObjectName("GuiLipsum") + if CONFIG.osDarwin: + self.setWindowFlag(Qt.WindowType.Tool) self.mainGui = mainGui self.mainTheme = mainGui.mainTheme diff --git a/novelwriter/tools/manuscript.py b/novelwriter/tools/manuscript.py index 53671fa7..e5ffa5b0 100644 --- a/novelwriter/tools/manuscript.py +++ b/novelwriter/tools/manuscript.py @@ -69,6 +69,8 @@ class GuiManuscript(QDialog): logger.debug("Create: GuiManuscript") self.setObjectName("GuiManuscript") + if CONFIG.osDarwin: + self.setWindowFlag(Qt.WindowType.Tool) self.mainGui = mainGui self.mainTheme = mainGui.mainTheme diff --git a/novelwriter/tools/manussettings.py b/novelwriter/tools/manussettings.py index 6a031bf0..d2666e42 100644 --- a/novelwriter/tools/manussettings.py +++ b/novelwriter/tools/manussettings.py @@ -74,6 +74,8 @@ class GuiBuildSettings(QDialog): logger.debug("Create: GuiBuildSettings") self.setObjectName("GuiBuildSettings") + if CONFIG.osDarwin: + self.setWindowFlag(Qt.WindowType.Tool) self.mainGui = mainGui self.mainTheme = mainGui.mainTheme @@ -941,6 +943,7 @@ class _FormatTab(QWidget): def __init__(self, buildMain: GuiBuildSettings, build: BuildSettings): super().__init__(parent=buildMain) + self.buildMain = buildMain self.mainGui = buildMain.mainGui self.mainTheme = buildMain.mainGui.mainTheme diff --git a/novelwriter/tools/writingstats.py b/novelwriter/tools/writingstats.py index 7d224469..c2d1b892 100644 --- a/novelwriter/tools/writingstats.py +++ b/novelwriter/tools/writingstats.py @@ -69,6 +69,8 @@ class GuiWritingStats(QDialog): logger.debug("Create: GuiWritingStats") self.setObjectName("GuiWritingStats") + if CONFIG.osDarwin: + self.setWindowFlag(Qt.WindowType.Tool) self.mainGui = mainGui self.mainTheme = mainGui.mainTheme diff --git a/pkgutils.py b/pkgutils.py index f7e99955..840ffef7 100755 --- a/pkgutils.py +++ b/pkgutils.py @@ -50,8 +50,8 @@ def extractVersion(beQuiet=False): theBits = theString.partition("=") return theBits[2].strip().strip('"') - numVers = "Unknown" - hexVers = "Unknown" + numVers = "0" + hexVers = "0x0" relDate = "Unknown" initFile = os.path.join("novelwriter", "__init__.py") try: @@ -396,17 +396,15 @@ def buildQtI18nTS(sysArgs): def genMacOSPlist(): """Set necessary values for .plist file for MacOS build.""" - numVers, _, _ = extractVersion() - pkgVers = compactVersion(numVers) outDir = "setup/macos" - + numVers = extractVersion()[0].partition("-")[0] copyrightYear = datetime.datetime.now().year # These keys are no longer used but are present for compatability - pkgVersMaj, pkgVersMin = pkgVers.split(".")[:2] + pkgVersMaj, pkgVersMin = numVers.split(".")[:2] plistXML = readFile(f"{outDir}/Info.plist.template").format( - macosBundleSVers=pkgVers, + macosBundleSVers=numVers, macosBundleVers=numVers, macosBundleVersMajor=pkgVersMaj, macosBundleVersMinor=pkgVersMin, @@ -1857,7 +1855,7 @@ if __name__ == "__main__": "", " help Print the help message.", " pip Install all package dependencies for novelWriter using pip.", - " version Print the novelWriter version.", + " version Print the novelWriter version. Add -c for short version.", " build-clean Will attempt to delete 'build' and 'dist' folders.", "", "Additional Builds:", @@ -1914,7 +1912,11 @@ if __name__ == "__main__": if "version" in sys.argv: sys.argv.remove("version") numVers, _, _ = extractVersion(beQuiet=True) - print(numVers, end=None) + if "-c" in sys.argv: + sys.argv.remove("-c") + print(compactVersion(numVers), end=None) + else: + print(numVers, end=None) sys.exit(0) if "pip" in sys.argv: diff --git a/setup/macos/build.sh b/setup/macos/build.sh index 2915730c..4606e419 100755 --- a/setup/macos/build.sh +++ b/setup/macos/build.sh @@ -24,7 +24,7 @@ echo "Build Dir: $BUILD_DIR" pushd "$SRC_DIR" || exit 1 -VERSION="$(python3 pkgutils.py version)" +VERSION="$(python3 pkgutils.py version -c)" echo "novelWriter Version: $VERSION" # --- Prepare Files ----------------------------------------------------------------------------- #