Fix MacOS release for 2.1b1 (#1496)

This commit is contained in:
Veronica Berglyd Olsen
2023-07-31 00:50:13 +02:00
committed by GitHub
9 changed files with 25 additions and 22 deletions
+1 -7
View File
@@ -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
+1 -1
View File
@@ -189,7 +189,7 @@ def main(sysArgs=None):
errDlg = QErrorMessage()
errDlg.resize(500, 300)
errDlg.showMessage((
"<h3>A critical error has been encountered</h3>"
"<h3>A critical error was encountered</h3>"
"<p>novelWriter cannot start due to the following issues:<p>"
"<p>&nbsp;-&nbsp;%s</p>"
"<p>Shutting down ...</p>"
+2 -4
View File
@@ -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 <https://www.gnu.org/licenses/>.
"""
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()
+2
View File
@@ -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
+2
View File
@@ -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
+3
View File
@@ -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
+2
View File
@@ -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
+11 -9
View File
@@ -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:
+1 -1
View File
@@ -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 ----------------------------------------------------------------------------- #