diff --git a/build/build-exe-config.template.json b/build/build-exe-config.template.json index 42d3578..4f7e3ee 100644 --- a/build/build-exe-config.template.json +++ b/build/build-exe-config.template.json @@ -80,7 +80,7 @@ { "optionDest": "datas", "value": "/package.json;./" - } + } ], "nonPyinstallerOptions": { "increaseRecursionLimit": false, diff --git a/build/generate-build-exe-config.py b/build/generate-build-exe-config.py index ca33ff3..c9fba15 100644 --- a/build/generate-build-exe-config.py +++ b/build/generate-build-exe-config.py @@ -11,9 +11,16 @@ in_file.close() for option in config["pyinstallerOptions"]: if option["optionDest"] in ["datas", "filenames", "icon_file"]: + # If we wanted a relative output directory, this will go missing in abspath on windows. + relative_fix = False + if option["value"].split(";")[1] == "./": + relative_fix = True + option["value"] = os.path.abspath(parent_path + option["value"]) if not isWindows(): option["value"] = option["value"].replace(";", ":") + elif relative_fix: + option["value"] += ".\\" # Add the windows relative path. out_file = open('build-exe-config.json', 'w') out_file.write(json.dumps(config, indent=2))