import os, sys from shutil import copytree, copy2, move, rmtree import json import createmsi build_dir = sys.argv[1] src_dir = sys.argv[2] creator_dir = os.path.join(build_dir, 'workdir/installation/MSICreatorLO') def prepare_project_dir(): instdir = os.path.join(build_dir, 'instdir') fonts_dir = os.path.join(instdir, 'share/fonts') new_fonts_dir = os.path.join(creator_dir, 'libo-fonts/share/fonts') main_dir = os.path.join(creator_dir, 'main') src_uninstaller_icon = os.path.join(src_dir, 'icon-themes/colibre/res/mainapp_48_8.png') src_ui_banner = os.path.join(src_dir, 'instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp') src_ui_background = os.path.join(src_dir, 'instsetoo_native/inc_common/windows/msi_templates/Binary/Image_2.bmp') graphics_dir = os.path.join(creator_dir, 'graphics') sdk_dir = os.path.join(creator_dir, 'main/sdk') try: move(fonts_dir, new_fonts_dir) copytree(instdir, main_dir, dirs_exist_ok=True) copy2(src_uninstaller_icon, creator_dir) os.mkdir(graphics_dir) copy2(src_ui_banner, graphics_dir) copy2(src_ui_background, graphics_dir) rmtree(sdk_dir) except FileExistsError as err: print(err) def create_creator_json(): lo_version = sys.argv[3] lo_name = sys.argv[4] uninstaller_icon = 'mainapp_48_8.png' lo_dictionary = { "upgrade_guid": "6f05ed48-a735-4155-ab60-e4cc98455262", "version": lo_version, "product_name": lo_name, "manufacturer": "The Document Foundation", "name": lo_name, "name_base": lo_name, "comments": "Testing a libo installer", "installdir": "LibreOffice Test", "startmenu_shortcut": "program/soffice.exe", "desktop_shortcut": "program/soffice.exe", "addremove_icon": uninstaller_icon, "major_upgrade": { "AllowDowngrades": "yes", "IgnoreRemoveFailure": "yes" }, "graphics": { "banner": "graphics/Banner.bmp", "background": "graphics/Image_2.bmp" }, "parts": [ { "id": "libreoffice", "title": "The LibreOffice Suite", "description": "This is a test for the LibreOffice installer", "absent": "disallow", "staged_dir": "main" }, { "id": "libreofficefonts", "title": "The LibreOffice Fonts ", "description": "This is a test for the LibreOffice Fonts", "absent": "allow", "staged_dir": "libo-fonts" } ] } lo_object = json.dumps(lo_dictionary, indent=4) with open(os.path.join(creator_dir, 'lo.json'), 'w') as lo_json: lo_json.write(lo_object) def generate_installer(): os.chdir(creator_dir) createmsi.run(['lo.json']) if __name__ == '__main__': prepare_project_dir() create_creator_json() generate_installer() tro/collabora/co-24.04.5 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/instsetoo_native
AgeCommit message (Expand)Author
2021-05-27Fix typosAndrea Gelmini
2021-05-26remove obsolete/duplicated entries from openoffice.lst.inChristian Lohmaier
2021-04-20tdf#141760 Increase a label box in Windows installer dialogRoman Kuznetsov
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein
2021-01-27packaging: remove resolve_variables_in_downloadnameChristian Lohmaier
2021-01-22Percent-encode spaces also on Linux etc.Stephan Bergmann
2021-01-07Support for signing when PRODUCTNAME contain spacesVasily Melenchuk
2020-12-21recommended gtk3 to gtk4 migration 'Enable diagnostic warnings'Caolán McNamara
2020-11-01Resolves tdf#137880 - Fix for Windows installer imageHeiko Tietze
2020-10-12Resolves tdf#137187 - More dictionaries via extensions dialogHeiko Tietze
2020-08-19Spurious space at start of generated version ini fileStephan Bergmann
2020-07-23tdf#134522 remove --with-build-version ./configure flagRene Engelhard
2020-06-11increase a radiobutton text area in Windows installer dialogRoman Kuznetsov
2020-05-15Resolves tdf#133024 - Position of text in splash screenHeiko Tietze
2020-05-14Resolves tdf#133024 - Position of text in splash screenHeiko Tietze