Skip to content

Commit

Permalink
Project finished
Browse files Browse the repository at this point in the history
  • Loading branch information
mickexd committed Aug 25, 2023
0 parents commit aaa5519
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Unreal Engine Plugin Migration Tool

This is a simple Python application that provides a graphical user interface (GUI) for migrating Unreal Engine plugins using the Unreal Automation Tool (UAT). It allows you to select the engine path, the original plugin path, and the output path for the migrated plugin. Once configured, the tool runs the migration process and provides feedback through message boxes.

## Requirements

- Python 3.x
- Tkinter library (usually included with Python)
- Unreal Engine installed on your system
- All the escential libraries to compile UE projects (dotsdk, llvm, and others applicable to your engine version)

## Usage

1. Clone or download the repository to your local machine.

2. Make sure you have Python 3.x installed on your system.

3. Open a terminal/command prompt and navigate to the directory where the repository is located.

4. Run the following command to start the application:

5. The GUI window will appear, prompting you to provide the necessary paths:
- **Engine Path:** Select the root directory of your Unreal Engine installation.
- **Origin Path:** Select the original plugin file (`.uplugin`) you want to migrate.
- **Output Path:** Choose the directory where the migrated plugin will be saved.

6. After providing the paths, click the "Begin Plugin Migration" button. The tool will execute the migration process using UAT.

7. Once the migration is complete, a message box will appear:
- If the migration was successful, you will see a message indicating that the plugin was ported successfully.
- If there was an error during the migration, an error message will be displayed.

## Contributing

Contributions to this project are welcome. If you find any issues or have suggestions for improvements, feel free to create an issue or submit a pull request.

## Disclaimer

This tool is provided as-is, I'm not responsible for any potential issues or data loss that may occur during the migration process. ENJOY!


82 changes: 82 additions & 0 deletions UnrealPluginMigrationTool.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import subprocess
from tkinter import Tk, Canvas, Label, Entry, Button, filedialog, messagebox
import os


def get_engine_path():
engine_path = filedialog.askdirectory()
engine_path = engine_path.replace("/", "\\")
engine_entry.delete(0, "end")
engine_entry.insert(0, engine_path)


def get_origin_path():
origin_path = filedialog.askopenfilename(filetypes=[("Plugin Files", "*.uplugin")])
origin_path = origin_path.replace("/", "\\")
origin_entry.delete(0, "end")
origin_entry.insert(0, origin_path)


def get_output_path():
output_path = filedialog.askdirectory()
output_path = output_path.replace("/", "\\")
output_entry.delete(0, "end")
output_entry.insert(0, output_path)


def migrate_plugin():
origin = origin_entry.get()
output = output_entry.get()
engine = engine_entry.get()
engine = '"' + engine + '"'
origin = '"' + origin + '"'
output = '"' + output + '"'

command = rf"{engine}\Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -plugin={origin} -package={output}\Migrated"

try:
subprocess.run(command, shell=True)
messagebox.showinfo(
title="Migration complete", message="Your plugin was succesfully ported"
)
except Exception as e:
messagebox.showerror(title="Error", message="Error during the migration")


window = Tk()
window.title("Unreal Engine Plugin Migration Tool")
window.config(padx=50, pady=50)
canvas = Canvas(window, width=800, height=600)

engine_label = Label(window, text="Engine Path:")
engine_label.grid(column=0, row=0)

engine_entry = Entry(window, width=60)
engine_entry.grid(column=1, row=0)
engine_entry.insert(0, "Select the root of the engine folder")

engine_button = Button(window, text="Select Engine Path", command=get_engine_path)
engine_button.grid(column=2, row=0)

origin_label = Label(window, text="Origin Path:")
origin_label.grid(column=0, row=1)

origin_entry = Entry(window, width=60)
origin_entry.grid(column=1, row=1)

origin_button = Button(window, text="Select Origin Plugin", command=get_origin_path)
origin_button.grid(column=2, row=1)

output_label = Label(window, text="Output Path:")
output_label.grid(column=0, row=2)

output_entry = Entry(window, width=60)
output_entry.grid(column=1, row=2)

output_button = Button(window, text="Select Output Path", command=get_output_path)
output_button.grid(column=2, row=2)

print_button = Button(window, text="Begin Plugin Migration", command=migrate_plugin)
print_button.grid(column=1, row=3)

window.mainloop()

0 comments on commit aaa5519

Please sign in to comment.