feat: add a macos build script

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2022-11-30 15:14:37 -07:00
parent a671878e26
commit 0eb7185d40
6 changed files with 257 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
import os
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
SETTINGS = {
"MACOSX_BUNDLE_COPYRIGHT": "© 20182022, Veronica Berglyd Olsen <code@vkbo.net>",
"MACOSX_BUNDLE_IDENTIFIER": "io.novelwriter.novelWriter",
"MACOSX_BUNDLE_NAME": "novelWriter",
"MACOSX_BUNDLE_EXACUTABLE_NAME": "novelwriter",
"MACOSX_BUNDLE_ICON_FILE": "novelwriter.icns",
"MACOSX_BUNDLE_INFO_STRING": "novelWriter: A markdown-like text editor for planning and writing novels.",
"MACOSX_BUNDLE_SHORT_VERSION": "2.0.1", # Must be purely numerical
"MACOSX_BUNDLE_VERSION": "2.0.1", # Must be purely numerical
}
if __name__ == "__main__":
template_filename = os.path.join(SCRIPT_DIR, "Info.plist.in")
with open(template_filename, "r") as tmfile:
template = tmfile.read()
plist = template.format(**SETTINGS)
plist_filename = os.path.join(SCRIPT_DIR, "Info.plist")
with open(plist_filename, "w") as plistfile:
plistfile.write(plist)