mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-02 00:29:48 +02:00
Fix extraction of export template
folder name changes in Godot 4
This commit is contained in:
parent
b72c9904b2
commit
269b70093d
@ -108,8 +108,6 @@ def main():
|
||||
description='Build and Package ScreenPlay')
|
||||
parser.add_argument('--skip-aqt', action="store_true", dest="skip_aqt",
|
||||
help="Downloads QtCreator and needed binaries Windows: C:\\aqt\\nLinux & macOS:~/aqt/.")
|
||||
parser.add_argument('--setup-godot', action="store_true", dest="setup_godot",
|
||||
help="Downloads Godot Editor.")
|
||||
args = parser.parse_args()
|
||||
|
||||
root_path = Path(util.cd_repo_root_path())
|
||||
@ -117,7 +115,7 @@ def main():
|
||||
vcpkg_path = project_source_parent_path.joinpath("vcpkg").resolve()
|
||||
vcpkg_packages_list = defines.VCPKG_BASE_PACKAGES
|
||||
|
||||
if system() != "Darwin" and args.setup_godot:
|
||||
if system() != "Darwin":
|
||||
if not setup_godot.execute():
|
||||
raise RuntimeError("Unable to download godot")
|
||||
|
||||
|
@ -35,16 +35,16 @@ def unzip_godot(exe_zip_filepath: str, export_templates_filepath: str, destinati
|
||||
util.unzip(exe_zip_filepath, destination_path)
|
||||
|
||||
# The export templates contain a templates subfolder in which the content is. This is bad because it clashes
|
||||
# with the folder structure where the version comes after: AppData\Roaming\Godot\templates\3.3.4.stable
|
||||
# Rename: AppData\Roaming\Godot\templates\templates
|
||||
# to : AppData\Roaming\Godot\templates\3.4.stable
|
||||
# with the folder structure where the version comes after: /home/eli/.local/share/godot/export_templates/
|
||||
# Rename: AppData\Roaming\Godot\export_templates\templates
|
||||
# to : AppData\Roaming\Godot\export_templates\3.4.stable
|
||||
godot_templates_dir = ""
|
||||
if sys.platform == "win32":
|
||||
godot_templates_dir = os.path.join(
|
||||
os.getenv('APPDATA'), "Godot/templates")
|
||||
os.getenv('APPDATA'), "Godot/export_templates")
|
||||
elif sys.platform == "linux":
|
||||
godot_templates_dir = os.path.join(
|
||||
str(Path.home()), ".local/share/godot/templates")
|
||||
str(Path.home()), ".local/share/godot/export_templates")
|
||||
os.makedirs(godot_templates_dir, exist_ok=True)
|
||||
export_templates_destination_version = f"{godot_templates_dir}/{defines.GODOT_VERSION}.{defines.GODOT_RELEASE_TYPE}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user