From d28b3c872439dc406d7ba0ae011b65a8cb5aebca Mon Sep 17 00:00:00 2001 From: kojogyaase Date: Fri, 5 Jul 2024 21:19:50 -0400 Subject: [PATCH] add:linux support --- README.md | 1 + UnrealPluginMigrationTool.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de935e9..097c3af 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ It allows you to select the *.uplugin of your preference and recompile it to any - Handling of third-party plugin dependencies. - Command line tool integration for batch processing. + ## Usage 1. Download the latest version of the app on https://github.com/mickexd/UnrealEnginePluginMigrationTool/releases and open the application 2. Select the `.uplugin` file you want to migrate. diff --git a/UnrealPluginMigrationTool.py b/UnrealPluginMigrationTool.py index da8ec18..23be503 100644 --- a/UnrealPluginMigrationTool.py +++ b/UnrealPluginMigrationTool.py @@ -1,6 +1,7 @@ +import os import flet as ft import subprocess - +from sys import platform def main(page: ft.Page): page.title = "Unreal Plugin Migration Tool" @@ -62,7 +63,12 @@ def plugin_migration(): engine = rf'"{directory_path.value}"' plugin = rf'"{selected_file.value}"' destination = rf'"{save_file_path.value}"' - command = rf"{engine}\Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -plugin={plugin} -package={destination}\Migrated" + + if platform == "linux" or platform == "linux2": + command = rf"{engine}/Engine/Build/BatchFiles/RunUAT.sh BuildPlugin -plugin={plugin} -package={destination}\Migrated" + else: + command = rf"{engine}\Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -plugin={plugin} -package={destination}\Migrated" + try: result = subprocess.run(command, shell=True) if result.returncode == 0: