Tapocheck
(Tapocheck)
June 10, 2019, 2:24pm
1
I’ve seen information about PreBuildSteps and PostBuildSteps in uproject and uplugin. But the following structure of uplugin seems doesn’t work.
{
"FileVersion": 3,
"Version": 1,
"VersionName": "5.5.5",
"EngineVersion" : "4.22.0",
"FriendlyName": "MyPlugin",
"Description": "UE4 Plugin",
"Category": "Advertising",
"Modules": [
{
"Name": "MyPlugin",
"Type": "Runtime",
"LoadingPhase" : "PreDefault",
"WhitelistPlatforms": [
"IOS",
"Android",
"Win64",
"Mac",
"Linux"
]
}
],
"EnabledByDefault": true,
"CanContainContent": true,
"IsBetaVersion": false,
"Installed": true,
"RequiresBuildPlatform": true,
"PostBuildSteps":
{
"IOS": [
"echo gooby"
],
"Android": [
"echo goodby"
]
},
"PreBuildSteps":
{
"IOS": [
"echo hello"
],
"Android": [
"echo hello"
]
}
}
ramonmelo
(Ramon Melo)
July 13, 2023, 6:57pm
2
Hi,
I had the same issue, but got it working with the following structure:
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.0",
"FriendlyName": "FriendlyName",
"Description": "",
"Category": "Other",
"CreatedBy": "",
"CreatedByURL": "",
"DocsURL": "",
"MarketplaceURL": "",
"SupportURL": "",
"CanContainContent": true,
"IsBetaVersion": true,
"IsExperimentalVersion": false,
"Installed": false,
"Modules": [
{
"Name": "ModuleName",
"Type": "Runtime",
"LoadingPhase": "Default"
}
],
"PreBuildSteps": {
"Win64": [
"echo 'PreBuildSteps...'",
"echo 'PreBuild Info: RootDir=$(RootDir)'",
"echo 'PreBuild Info: EngineDir=$(EngineDir)'",
"echo 'PreBuild Info: ProjectDir=$(ProjectDir)'",
"echo 'PreBuild Info: TargetName=$(TargetName)'",
"echo 'PreBuild Info: TargetPlatform=$(TargetPlatform)'",
"echo 'PreBuild Info: TargetConfiguration=$(TargetConfiguration)'",
"echo 'PreBuild Info: TargetType=$(TargetType)'",
"echo 'PreBuild Info: ProjectFile=$(ProjectFile)'",
"echo 'PreBuild Info: PluginDir=$(PluginDir)'",
],
"Mac": [
"echo 'PreBuildSteps...'"
],
"Linux": [
"echo 'PreBuildSteps...'"
]
}
}
The listed variables are the ones expanded by the Unreal build pipeline, and you can use them at will.
For more info check here at the Unreal source code .
You might need to double-check the Target names.
2 Likes
Darcy_vdD
(Darcy_vdD)
November 23, 2023, 7:22am
3
Casually resurrecting this, I’m to copy a file as a post build step, my command works “copy $(PluginDir)\foo\bar.exe D:\” but it only seemed to work the first time I packaged. Doesn’t seem to be doing it for any subsequent packages?
Also, do you know if there’s a “Target Name” such as $(RootDir) but for the output directory of the build?