Download

Unreal Project Copy / Rename Tool

Hey guys,

After spending a bunch of time trying to figure out how to copy / move / rename / update references of Unreal C++ / Blueprint Projects I thought this might be a good opportunity to write a little tool to help me automate this process. Couple of flu filled evenings later I have something to share.

Unreal 4 Project Copy / Rename Tool - aka "kopiarka"

This is a small utility that allows you to take one Unreal 4 project and copy/rename/update file references from one directory to another.

It can also be used to move/rename any other directories or files but it may not behave 100% due to how it renames contents of ascii files.

The primary motivation for this tool was to be able to quickly work on one project to create a baseline, copy the baseline to a new project, and keep iterating without having to create a ton of git branches in a single project.

Release 1.0.0 Download

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Install Java 1.8 or greater

Instructions: https://www.java.com/en/download/hel…ws+10&j=8&n=20

Configuration

The project comes with an application.properties that needs to be updated prior to execution and placed along side the jar file in the same directory you will be running it from.

Sample properties

[FONT=courier new]# ------------------

REQUIRED PARAMS

------------------

no trailing slashes

project.source.directory=c:\OldProject

NOTE: project names should be as unique as possible due to the way this tool manipulates strings.

for example if your project is called UAnim any references to your classes / code / configs that contain that term will be replaced … regardless if you needed it not to be replaced

project.source.name=OldProject

no trailing slashes

project.target.directory=c:\NewProject

NOTE: project names should be as unique as possible due to the way this tool manipulates strings.

for example if your project is called UAnim any references to your classes / code / configs that contain that term will be replaced … regardless if you needed it not to be replaced

project.target.name=NewProject

directories to include in the copy, specifically excluding any auto generated ones. comma separated.

whitelist.directories=Config,Content,Source

extensions of binary files you want to copy. binary files are not examined internally for old project references. comma separated.

whitelist.extension.binary=uasset,umap,png,jpg,jpeg,wav

extensions of ascii files you want to copy. ascii files are examined and modified during the copy with new project names. comma separated.

whitelist.extension.ascii=ini,cpp,h,uproject,sln,cs,gitignore,md,txt

------------------

OPTIONAL PARAMS

------------------

this parameter tries to delete the target directory before copying

if parameter is omitted defaults to false

config.force.delete=false

Installing and Running

  1. Download the latest release ( zip )
  2. Extract zip file to a location on your hard drive
  3. Update application.properties with your folder / project details
  4. Run the application using java -jar ue4-kopiarka.jar

Sample console output

[FONT=courier new]C:\projects\kopiarka arget>java -jar ue4-kopiarka.jar

. ____ _ __ _ _
/\ / __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ’ / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
’ |
| .__|| ||| |_, | / / / /
=========|
|==============|/=////
:: Spring Boot :: (v2.0.5.RELEASE)

11:54:47.450 [main] INFO c.j.u.UnrealProjectCopyApplication - Starting UnrealProjectCopyApplication on UNICRON with PID 19672 (C:\projects\kopiarka arget\ue4-kopiarka.jar started by zinczukw in C:\projects\kopiarka arget)
11:54:47.455 [main] INFO c.j.u.UnrealProjectCopyApplication - No active profile set, falling back to default profiles: default
11:54:47.523 [main] INFO o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@510f3d34: startup date [Wed Nov 28 11:54:47 EST 2018]; root of context hierarchy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (jar:file:/C:/projects/kopiarka/target/ue4-kopiarka.jar!/BOOT-INF/lib/spring-core-5.0.9.RELEASE.jar!/) to method java.lang.ClassLoader.defineClass(java.lang.String,byte],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
11:54:48.023 [main] INFO c.j.unreal.service.CopyService - ------------
11:54:48.023 [main] INFO c.j.unreal.service.CopyService - STARTED
11:54:48.025 [main] INFO c.j.unreal.service.CopyService - ------------
11:54:48.033 [main] INFO c.j.unreal.service.CopyService - FORCE DELETE ENABLED - Trying to delete: C:\UE4Projects\PunchKick03Testing
11:54:48.430 [main] INFO c.j.unreal.service.CopyService - Processing dir: C:\UE4Projects\PunchKick02
11:54:48.596 [main] INFO c.j.unreal.service.CopyService - Size of dir: 5 GB
11:54:48.596 [main] INFO c.j.unreal.service.CopyService - Copying contents to dir: C:\UE4Projects\PunchKick03Testing
11:54:48.599 [main] INFO c.j.unreal.service.CopyService - This can take a bit depending on the size of your project … DO NOT PANIC … and if you do just delete the target directory and start again !
File Copy Progress: 100% ===================] 1352/1352 (0:00:01 / 0:00:00)
11:54:49.806 [main] INFO c.j.unreal.service.CopyService - WHEW ! we made it
11:54:49.807 [main] INFO c.j.unreal.service.CopyService - New dir location: C:\UE4Projects\PunchKick03Testing
11:54:49.958 [main] INFO c.j.unreal.service.CopyService - Size of new dir: 5 GB
11:54:49.959 [main] INFO c.j.unreal.service.CopyService - ------------
11:54:49.960 [main] INFO c.j.unreal.service.CopyService - FINISHED
11:54:49.960 [main] INFO c.j.unreal.service.CopyService - ------------
11:54:49.963 [main] INFO o.s.c.a.AnnotationConfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@510f3d34: startup date [Wed Nov 28 11:54:47 EST 2018]; root of context hierarchy

Let me know if you have any questions and feel free to contribute if you find any issues or missing features.