Files
novelWriter/macos/generate_plist.py
T
Rachel Powers 0eb7185d40 feat: add a macos build script
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-01-08 19:27:12 -07:00

27 lines
985 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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)