Hi, there,
is there a way to let me give a name to my game being packaged. thus i could run the WindowsNoEditor/ProjectName/Binaries/Win64/SpecifiedGameName.exe through WindowsNoEditor/SpecifiedGameName.exe.
Thank you!
Hi, there,
is there a way to let me give a name to my game being packaged. thus i could run the WindowsNoEditor/ProjectName/Binaries/Win64/SpecifiedGameName.exe through WindowsNoEditor/SpecifiedGameName.exe.
Thank you!
Hello JohnWondle,
To change the actual exe name, you would need to change the name of your project. This can be done by editing the name of the .uproject file. If this is a blueprint only project, it should be as simple as that. If your project includes code however, you will need to go and edit the appropriate parts of the source code to match with the new name. You would then need to regenerate your project files and compile.
Change the name of your target.cs file, or create a new one, an empty child of the other one.
For example if you have SpecifiedGameName.Target.cs, create a new one called MyNewName.Target.cs with this content:
using UnrealBuildTool;
using System.Collections.Generic;
public class MyNewNameTarget : SpecifiedGameNameTarget
{
public MyNewNameTarget (TargetInfo Target) : base(Target)
{
}
}
then change it also in your project settings, or the BuildTarget
value in DefaultGame.ini
Now when you package your game you have to use the argument -target=MyNewName
But if you choose to rename SpecifiedGameName.Target.cs to MyNewName.Target.cs instead, the argument -target might not be needed.
Nope, it doesn’t work
Same, doesn’t work for me too.
Doing such a project refactor just to rename the output .exe file seems ridiculously redundant.
Such refactor solution isn’t good even if it works, since it won’t support names with spaces
I’ve*1 managed to do this on a cpp project by:
maybe it was too much (i wonder if creating a new module was necessary or not) but it worked.
*1 with the help of Daekesh on discord. thanks
Thank you so much for your message nande! It worked pretty fine for me.
It was a hell of a headache for me.
And especially thanks to Daekesh by extension!
This seemed to work for me (5.3) and didn’t require changing any of the the module names or adding new modules:
.uproject
file to the new name. This change the name of the directory that the game data is stored in. You should not need to edit anything in it.Source
folder, rename the two .Target.cs
files. Edit the files to make the classes match the file names. These will control the name of the executable. You can still reference your old module names. Those are not user-facing so it should not matter what they are called.Binaries/Win64
, Intermediate
, and Saved
folders. Regenerate the project files and rebuild. NOTE: deleting Saved
will reset your editor preferences. You may be able to only delete as subset of those, but this is the safest option. I had some errors referencing the old name if I didn’t delete those.When you rebuild, it should use the new name.
It’s more than a little insane that its this cumbersome to change the name of the .exe that gets built
At least with us we will start an engine project before we have a name chosen … really choosing the name is about the last thing we have any interest in doing and its subject to change really at any time.
ZERO reason the .exe name should be so tightly bound with so much