Added windows build support
This commit is contained in:
@@ -1,38 +1,26 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"enginePath": "/home/yann/Apps/UE_5.5/",
|
"enginePath": "D:/Devel/UE_5.7",
|
||||||
"projectPath": "/home/yann/Projects/unreal/NpcChatbot/",
|
"projectPath": "E:/unreal/AeroSyncFS/",
|
||||||
"projectName": "NpcChatbot",
|
|
||||||
"engineVersion": "5.5"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"enginePath": "/home/yann/Apps/UE_5.5/",
|
|
||||||
"projectPath": "/home/yann/Projects/unreal/jsbsim/UnrealEngine/",
|
|
||||||
"projectName": "UEReferenceApp",
|
|
||||||
"engineVersion": "5.5"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"enginePath": "/home/yann/Apps/UE_5.5/",
|
|
||||||
"projectPath": "/run/media/yann/Devel/Unreal/AeroSyncUFS",
|
|
||||||
"projectName": "MiniFS",
|
"projectName": "MiniFS",
|
||||||
"engineVersion": "5.5"
|
"engineVersion": "5.7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"enginePath": "/home/yann/Apps/UE_5.5/",
|
"enginePath": "D:/Devel/UE_5.7",
|
||||||
"projectPath": "/run/media/yann/Devel/Unreal/CyberneticRequiem",
|
"projectPath": "E:/unreal/CyberneticRequiem/",
|
||||||
"projectName": "CyberneticRequiem",
|
"projectName": "CyberneticRequiem",
|
||||||
"engineVersion": "5.5"
|
"engineVersion": "5.7"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"enginePath": "/home/yann/Apps/UE_5.5/",
|
"enginePath": "D:/Devel/UE_5.5",
|
||||||
"projectPath": "/run/media/yann/Devel/Unreal/DVRSimulator",
|
"projectPath": "E:/unreal/DVRSimulator/",
|
||||||
"projectName": "DVRSimulator",
|
"projectName": "DVRSimulator",
|
||||||
"engineVersion": "5.5"
|
"engineVersion": "5.5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"enginePath": "/home/yann/Apps/UE_5.5/",
|
"enginePath": "D:/Devel/UE_5.5",
|
||||||
"projectPath": "/run/media/yann/Devel/Unreal/GunSpinningVR",
|
"projectPath": "E:/novelab/unreal/SNCF_Regiolis",
|
||||||
"projectName": "GSPVR",
|
"projectName": "SNCF_Regiolis",
|
||||||
"engineVersion": "5.5"
|
"engineVersion": "5.5"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
2
ui.go
2
ui.go
@@ -28,7 +28,7 @@ func NewProjectRow(project Project) fyne.CanvasObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
icon := canvas.NewImageFromResource(projectIcon)
|
icon := canvas.NewImageFromResource(projectIcon)
|
||||||
icon.SetMinSize(fyne.NewSize(48, 48))
|
icon.SetMinSize(fyne.NewSize(64, 64))
|
||||||
|
|
||||||
nameLabel := widget.NewLabel(projectName + " / Unreal Engine " + project.Version)
|
nameLabel := widget.NewLabel(projectName + " / Unreal Engine " + project.Version)
|
||||||
nameLabel.Alignment = fyne.TextAlignLeading
|
nameLabel.Alignment = fyne.TextAlignLeading
|
||||||
|
|||||||
54
utils.go
54
utils.go
@@ -71,33 +71,67 @@ func CleanUnrealProject(project Project) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GenerateUnrealSolution(project Project) {
|
func GenerateUnrealSolution(project Project) {
|
||||||
var buildCmd string
|
var cmd *exec.Cmd
|
||||||
|
|
||||||
|
projectFile := project.ProjectPath + "/" + project.ProjectName + ".uproject"
|
||||||
|
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "linux":
|
case "linux":
|
||||||
buildCmd = project.EnginePath + "/Engine/Build/BatchFiles/Linux/GenerateProjectFiles.sh"
|
buildCmd := project.EnginePath + "/Engine/Build/BatchFiles/Linux/GenerateProjectFiles.sh"
|
||||||
|
cmd = exec.Command(buildCmd, projectFile, "-game")
|
||||||
|
|
||||||
case "darwin":
|
case "darwin":
|
||||||
buildCmd = project.EnginePath + "/Engine/Build/BatchFiles/Mac/GenerateProjectFiles.sh"
|
buildCmd := project.EnginePath + "/Engine/Build/BatchFiles/Mac/GenerateProjectFiles.sh"
|
||||||
|
cmd = exec.Command(buildCmd, projectFile, "-game")
|
||||||
|
|
||||||
|
case "windows":
|
||||||
|
editor := project.EnginePath + "\\Engine\\Binaries\\Win64\\UnrealEditor.exe"
|
||||||
|
cmd = exec.Command(
|
||||||
|
editor,
|
||||||
|
projectFile,
|
||||||
|
"-projectfiles",
|
||||||
|
"-progress",
|
||||||
|
"-waitmutex",
|
||||||
|
"-NoHotReloadFromIDE",
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fmt.Println("Generate Project is not yet supported on Windows")
|
fmt.Println("Generate Project is not supported on this platform:", runtime.GOOS)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
projectCmd := project.ProjectPath + "/" + project.ProjectName + ".uproject"
|
|
||||||
cmd := exec.Command(buildCmd, projectCmd, "-game")
|
|
||||||
|
|
||||||
logToOutput(cmd)
|
logToOutput(cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
func BuildUnrealSolution(project Project) {
|
func BuildUnrealSolution(project Project) {
|
||||||
|
var cmd *exec.Cmd
|
||||||
|
projectFile := project.ProjectPath + "/" + project.ProjectName + ".uproject"
|
||||||
|
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
case "linux":
|
case "linux":
|
||||||
cmd := exec.Command("make", "-C", project.ProjectPath, project.ProjectName)
|
cmd = exec.Command("make", "-C", project.ProjectPath, project.ProjectName)
|
||||||
logToOutput(cmd)
|
|
||||||
|
case "windows":
|
||||||
|
buildBatch := project.EnginePath + "\\Engine\\Build\\BatchFiles\\Build.bat"
|
||||||
|
target := project.ProjectName + "Editor"
|
||||||
|
platform := "Win64"
|
||||||
|
config := "Development"
|
||||||
|
|
||||||
|
cmd = exec.Command(
|
||||||
|
buildBatch,
|
||||||
|
target,
|
||||||
|
platform,
|
||||||
|
config,
|
||||||
|
"-Project="+projectFile,
|
||||||
|
"-WaitMutex",
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fmt.Println("Build Project is not yet supported on Windows")
|
fmt.Println("Build Project is not yet supported on this platform:", runtime.GOOS)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logToOutput(cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
func RunUnrealProject(project Project) {
|
func RunUnrealProject(project Project) {
|
||||||
|
|||||||
Reference in New Issue
Block a user