diff --git a/.gitignore b/.gitignore
index bb2fab7..12a2548 100755
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,10 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
+*.rsuser
*.suo
*.user
*.userosscache
@@ -10,6 +13,9 @@
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
+# Mono auto generated files
+mono_crash.*
+
# Build results
[Dd]ebug/
[Dd]ebugPublic/
@@ -17,19 +23,21 @@
[Rr]eleases/
x64/
x86/
-build/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
+[Ll]og/
-# JetBrains IDE folder
-.idea/
-
-# Visual Studio 2015 cache/options directory
+# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
@@ -43,18 +51,28 @@ TestResult.xml
[Rr]eleasePS/
dlldata.c
-# DNX
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
project.lock.json
+project.fragment.lock.json
artifacts/
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
*_i.c
*_p.c
-*_i.h
+*_h.h
*.ilk
*.meta
*.obj
+*.iobj
*.pch
*.pdb
+*.ipdb
*.pgc
*.pgd
*.rsp
@@ -64,6 +82,7 @@ artifacts/
*.tlh
*.tmp
*.tmp_proj
+*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
@@ -79,9 +98,12 @@ _Chutzpah*
ipch/
*.aps
*.ncb
+*.opendb
*.opensdf
*.sdf
*.cachefile
+*.VC.db
+*.VC.VC.opendb
# Visual Studio profiler
*.psess
@@ -89,6 +111,9 @@ ipch/
*.vspx
*.sap
+# Visual Studio Trace Files
+*.e2e
+
# TFS 2012 Local Workspace
$tf/
@@ -109,6 +134,14 @@ _TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
# NCrunch
_NCrunch_*
.*crunch*.local.xml
@@ -140,45 +173,70 @@ publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
-# TODO: Comment the next line if you want to checkin your web deploy settings
+# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
-**/packages/*
+**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
-!**/packages/build/
+!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
-#!**/packages/repositories.config
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
-# Windows Azure Build Output
+# Microsoft Azure Build Output
csx/
*.build.csdef
-# Windows Store app package directory
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
-!*.[Cc]ache/
+!?*.[Cc]ache/
# Others
ClientBin/
-[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
+*.jfm
*.pfx
*.publishsettings
-node_modules/
orleans.codegen.cs
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
# RIA/Silverlight projects
Generated_Code/
@@ -189,21 +247,30 @@ _UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
+*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
+*.rptproj.rsuser
+*- Backup*.rdl
# Microsoft Fakes
FakesAssemblies/
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
+node_modules/
# Visual Studio 6 build log
*.plg
@@ -211,6 +278,9 @@ FakesAssemblies/
# Visual Studio 6 workspace options file
*.opt
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
@@ -218,3 +288,146 @@ FakesAssemblies/
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+##
+## Visual studio for Mac
+##
+
+
+# globs
+Makefile.in
+*.userprefs
+*.usertasks
+config.make
+config.status
+aclocal.m4
+install-sh
+autom4te.cache/
+*.tar.gz
+tarballs/
+test-results/
+
+# Mac bundle stuff
+*.dmg
+*.app
+
+# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
+# General
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
+# Windows thumbnail cache files
+Thumbs.db
+ehthumbs.db
+ehthumbs_vista.db
+
+# Dump file
+*.stackdump
+
+# Folder config file
+[Dd]esktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+##
+## Visual Studio Code
+##
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
diff --git a/Documentation/Screenshot_1.png b/Documentation/Screenshot_1.png
new file mode 100644
index 0000000..f65c304
Binary files /dev/null and b/Documentation/Screenshot_1.png differ
diff --git a/Documentation/Screenshot_2.PNG b/Documentation/Screenshot_2.PNG
new file mode 100644
index 0000000..0223f67
Binary files /dev/null and b/Documentation/Screenshot_2.PNG differ
diff --git a/Documentation/Screenshot_3.PNG b/Documentation/Screenshot_3.PNG
new file mode 100644
index 0000000..d8ce268
Binary files /dev/null and b/Documentation/Screenshot_3.PNG differ
diff --git a/Documentation/Screenshot_4.PNG b/Documentation/Screenshot_4.PNG
new file mode 100644
index 0000000..daae4dd
Binary files /dev/null and b/Documentation/Screenshot_4.PNG differ
diff --git a/LICENSE.md b/LICENSE.md
index 4f8f0ea..6472d65 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,7 +1,7 @@
The MIT License (MIT)
-Copyright (c) 2016 Satheesh
+Copyright (c) 2021 Satheesh
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 1c4cd71..51aa8e0 100644
--- a/README.md
+++ b/README.md
@@ -1,41 +1,38 @@
Unreal Engine 4 Binary Builder
======================
+
+
This is a small app designed to create binary build of [Unreal Engine 4](https://www.unrealengine.com/) from [GitHub source](https://github.com/EpicGames/UnrealEngine).
-![](https://img.shields.io/twitter/follow/ryanjon2040.svg?style=popout) ![](https://img.shields.io/github/last-commit/ryanjon2040/UE4-Binary-Builder.svg?style=popout) ![](https://img.shields.io/github/license/ryanjon2040/UE4-Binary-Builder.svg?style=popout) ![](https://img.shields.io/github/downloads/ryanjon2040/UE4-Binary-Builder/total.svg?style=popout)
+![https://twitter.com/ryanjon2040](https://img.shields.io/twitter/follow/ryanjon2040.svg?style=popout)
+
+![](https://img.shields.io/github/last-commit/ryanjon2040/UE4-Binary-Builder.svg?style=popout)
+![](https://img.shields.io/github/license/ryanjon2040/UE4-Binary-Builder.svg?style=popout) ![](https://img.shields.io/github/downloads/ryanjon2040/UE4-Binary-Builder/total.svg?style=popout)
![](https://img.shields.io/github/languages/code-size/ryanjon2040/UE4-Binary-Builder.svg?style=flat) ![](https://img.shields.io/github/repo-size/ryanjon2040/UE4-Binary-Builder.svg?style=flat)
-![Screenshot](https://i.imgur.com/z9u42gI.png)
-Through this app you can also zip the final rocket build for distribution.
-![Screenshot](https://i.imgur.com/oOKw8uy.png)
+# How to use (Compiling Engine)
-# How to use
+###### Step I
+- Download the latest release of Unreal Binary Builder.
-Step I: Prepare the UE4 source
-1. Clone the UE4 source from github
-2. Run Setup.bat/.sh from the cloned folder, follow the instruction and resolve any error at this step
-3. Run GenerateProjectFile.bat/.sh, make sure no error occured at this step
-4. Open UE4.sln with Visual Studio
-5. Rebuild these 2 project under Application group: AutomationTool and AutomationToolLauncher
+###### Step II
+- Clone or Download UE4 source from github.
-Choose one of these options. Either download or build:
+###### Step III
+- Open Unreal Binary Builder.
+- Click *Browse* and select **root folder** of your downloaded Engine (where **_Setup.bat_** and **_GenerateProjectFiles.bat_** exists).
-Step II: (a) Download UE4 Binary Builder
-1. Download [latest release](https://github.com/ryanjon2040/UE4-Binary-Builder/releases/latest).
-2. Unzip to your preferred location and start `Unreal Binary Builder.exe`.
+![Screenshot](Documentation/Screenshot_1.png)
-Step II: (b) Build UE4 Binary Builder
-1. Clone this git.
-2. Open the sln file with Visual Studio, switch to Release configuration and press F5 to build and start or build the application and start manually from bin folder.
+- Once the root folder is selected, click **Start**.
+- If **Continue to Engine Build** is enabled, then _Unreal Binary Builder_ will automatically continue to compile the Engine with given options under **Compile** tab.
-Step III: Build Engine
-1. Select your target engine version.
-2. Choose AutomationToolLauncher.exe by browsing to Engine\Binaries\DotNET folder.
-3. (a) [Optional] Click Post Build Settings, choose a location to save the zip and enable your preferred options.
-3. (b) Choose your settings and build.
+###### Step IV
+- Click **_Compile_** tab and set options for the Engine.
+![Screenshot](Documentation/Screenshot_2.png)
# Troubleshoot
@@ -53,8 +50,13 @@ On Windows, just change the ownership to Users then try again. To change ownersh
-# Credits
-
-[Material Design In XAML](https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit) by [ButchersBoy](https://github.com/ButchersBoy)
+#### Dependencies
+[HandyControl](https://github.com/HandyOrg/HandyControl) by [HandyOrg](https://github.com/HandyOrg)
+[DotNetZip](https://github.com/haf/DotNetZip.Semverd) by [Henrik](https://github.com/haf)/Dino Chiesa
+[GameAnalytics](https://github.com/GameAnalytics/GA-SDK-C-SHARP) by [Game Analytics](https://gameanalytics.com/)
+[Json.NET](https://github.com/JamesNK/Newtonsoft.Json) by [Newtonsoft](https://www.newtonsoft.com/json)
+[Sentry.NET](https://github.com/getsentry/sentry-dotnet) by [Sentry](https://sentry.io/)
+[AutoGrid](https://github.com/SpicyTaco/SpicyTaco.AutoGrid) by [SpicyTaco](https://github.com/SpicyTaco)
[LogViewer](https://stackoverflow.com/a/16745054) by [Federico Berasategui](https://stackoverflow.com/users/643085/federico-berasategui)
+Icons made by Freepik from www.flaticon.com
\ No newline at end of file
diff --git a/UE4BinaryBuilder_WPF.sln b/UE4BinaryBuilder_WPF.sln
deleted file mode 100644
index 524cc84..0000000
--- a/UE4BinaryBuilder_WPF.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.28307.329
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unreal Binary Builder", "Unreal Binary Builder\Unreal Binary Builder.csproj", "{EF664300-FF7C-44AC-880D-D0A4FAC9F36F}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {EF664300-FF7C-44AC-880D-D0A4FAC9F36F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EF664300-FF7C-44AC-880D-D0A4FAC9F36F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EF664300-FF7C-44AC-880D-D0A4FAC9F36F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EF664300-FF7C-44AC-880D-D0A4FAC9F36F}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {6887BFB1-1DC5-47ED-9956-32536E559C00}
- EndGlobalSection
-EndGlobal
diff --git a/Unreal Binary Builder/App.config b/Unreal Binary Builder/App.config
deleted file mode 100644
index 4c56e16..0000000
--- a/Unreal Binary Builder/App.config
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- False
-
-
- True
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- Development;Shipping
-
-
- False
-
-
- Engine/Build/InstalledEngineBuild.xml
-
-
- False
-
-
- False
-
-
-
-
-
- True
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
-
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- False
-
-
- 0
-
-
- False
-
-
- False
-
-
-
-
-
- False
-
-
-
-
\ No newline at end of file
diff --git a/Unreal Binary Builder/App.xaml b/Unreal Binary Builder/App.xaml
deleted file mode 100644
index fa1500b..0000000
--- a/Unreal Binary Builder/App.xaml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Unreal Binary Builder/App.xaml.cs b/Unreal Binary Builder/App.xaml.cs
deleted file mode 100644
index 1664118..0000000
--- a/Unreal Binary Builder/App.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Windows;
-
-namespace Unreal_Binary_Builder
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- private void Application_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
- {
- MessageBox.Show("An unhandled exception just occurred: " + e.Exception.Message, "Exception", MessageBoxButton.OK, MessageBoxImage.Error);
- e.Handled = true;
- }
- }
-}
diff --git a/Unreal Binary Builder/ConverterNamespace.cs b/Unreal Binary Builder/ConverterNamespace.cs
deleted file mode 100644
index 5d2d91e..0000000
--- a/Unreal Binary Builder/ConverterNamespace.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Credits to qqbenq (https://stackoverflow.com/users/1552016/qqbenq) for this implementation
- * Link: https://stackoverflow.com/a/19210037
-**/
-
-using System;
-using System.Windows.Data;
-
-namespace ConverterNamespace
-{
- public class BooleanAndConverter : IMultiValueConverter
- {
- public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- foreach (object value in values)
- {
- if ((value is bool) && (bool)value == false)
- {
- return false;
- }
-
- if (value is int)
- {
- int index = (int)value;
- return (index > 0);
- }
- }
- return true;
- }
- public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotSupportedException("BooleanAndConverter is a OneWay converter.");
- }
- }
-
- public class BooleanAndNotConverter : IMultiValueConverter
- {
- public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- foreach (object value in values)
- {
- if ((value is bool) && (bool)value == true)
- {
- return false;
- }
-
- if (value is int)
- {
- int index = (int)value;
- return (index > 0);
- }
- }
- return true;
- }
- public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotSupportedException("BooleanAndConverter is a OneWay converter.");
- }
- }
-}
\ No newline at end of file
diff --git a/Unreal Binary Builder/LogViewer.xaml b/Unreal Binary Builder/LogViewer.xaml
deleted file mode 100644
index 585be89..0000000
--- a/Unreal Binary Builder/LogViewer.xaml
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Unreal Binary Builder/MainWindow.xaml b/Unreal Binary Builder/MainWindow.xaml
deleted file mode 100755
index 8ff026f..0000000
--- a/Unreal Binary Builder/MainWindow.xaml
+++ /dev/null
@@ -1,203 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Unreal Binary Builder/MainWindow.xaml.cs b/Unreal Binary Builder/MainWindow.xaml.cs
deleted file mode 100755
index a9b9403..0000000
--- a/Unreal Binary Builder/MainWindow.xaml.cs
+++ /dev/null
@@ -1,742 +0,0 @@
-using GameAnalyticsSDK.Net;
-using Microsoft.Win32;
-using System;
-using System.Diagnostics;
-using System.IO;
-using System.Text.RegularExpressions;
-using System.Windows;
-using System.Windows.Threading;
-using Unreal_Binary_Builder.Properties;
-
-namespace Unreal_Binary_Builder
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow : Window
- {
- private static readonly string PRODUCT_VERSION = "2.6.1";
-
- private static readonly string AUTOMATION_TOOL_NAME = "AutomationToolLauncher";
- private static readonly string DEFAULT_BUILD_XML_FILE = "Engine/Build/InstalledEngineBuild.xml";
- private string AutomationExePath = Settings.Default.AutomationPath;
- private Process AutomationToolProcess;
-
- private int NumErrors = 0;
- private int NumWarnings = 0;
-
- private int CompiledFiles = 0;
- private int CompiledFilesTotal = 0;
-
- private bool bIsBuilding = false;
- private bool bLastBuildSuccess = false;
-
- private readonly Stopwatch StopwatchTimer = new Stopwatch();
- private readonly DispatcherTimer DispatchTimer = new DispatcherTimer();
-
- private string LogMessage = "";
-
- private string FinalBuildPath = null;
- private PostBuildSettings postBuildSettings = new PostBuildSettings();
-
- public MainWindow()
- {
- InitializeComponent();
- GameAnalyticsCSharp.InitializeGameAnalytics(PRODUCT_VERSION, this);
-
- AutomationToolPath.Text = AutomationExePath;
- ProcessedFilesLabel.Content = "[Compiled: 0. Total: 0]";
-
- if (File.Exists(AutomationExePath) && Path.GetFileNameWithoutExtension(AutomationExePath) == AUTOMATION_TOOL_NAME)
- {
- BuildRocketUE.IsEnabled = true;
- }
-
- EngineVersionSelection.SelectedIndex = Settings.Default.EngineSelection;
-
- bHostPlatformOnly.IsChecked = Settings.Default.SettingHostPlatformOnly;
- bHostPlatformEditorOnly.IsChecked = Settings.Default.SettingHostPlatformEditorOnly;
- bWithWin64.IsChecked = Settings.Default.bWithWin64;
- bWithWin32.IsChecked = Settings.Default.bWithWin32;
- bWithMac.IsChecked = Settings.Default.bWithMac;
- bWithLinux.IsChecked = Settings.Default.bWithLinux;
- bWithLinuxAArch64.IsChecked = Settings.Default.bWithLinuxAArch64;
- bWithHTML5.IsChecked = Settings.Default.bWithHTML5;
- bWithAndroid.IsChecked = Settings.Default.bWithAndroid;
- bWithIOS.IsChecked = Settings.Default.bWithIOS;
- bWithTVOS.IsChecked = Settings.Default.bWithTVOS;
- bWithSwitch.IsChecked = Settings.Default.bWithSwitch;
- bWithPS4.IsChecked = Settings.Default.bWithPS4;
- bWithXboxOne.IsChecked = Settings.Default.bWithXboxOne;
- bWithLumin.IsChecked = Settings.Default.bWithLumin;
-
- bWithDDC.IsChecked = Settings.Default.bWithDDC;
- bHostPlatformDDCOnly.IsChecked = Settings.Default.bHostPlatformDDCOnly;
- bSignExecutables.IsChecked = Settings.Default.bSignExes;
- bEnableSymStore.IsChecked = Settings.Default.bSymStore;
- bCleanBuild.IsChecked = Settings.Default.bCleanBuild;
- bWithFullDebugInfo.IsChecked = Settings.Default.bWithFullDebugInfo;
- bWithServer.IsChecked = Settings.Default.bWithServer;
- bWithClient.IsChecked = Settings.Default.bWithClient;
- bWithHoloLens.IsChecked = Settings.Default.bWithHoloLens;
- bCompileDatasmithPlugins.IsChecked = Settings.Default.CompileDatasmithPlugin;
- bVS2019.IsChecked = Settings.Default.VS2019;
-
- GameConfigurations.Text = Settings.Default.GameConfigurations;
- CustomBuildXMLFile.Text = Settings.Default.CustomBuildXML;
-
- bShutdownWindows.IsChecked = Settings.Default.bShutdownWindows;
- bShutdownIfSuccess.IsChecked = Settings.Default.bShutdownIfSuccess;
-
- CustomOptions.Text = Settings.Default.CustomOptions;
- AnalyticsOverride.Text = Settings.Default.AnalyticsType;
-
- ChangeStatusLabel("Idle.");
- AddLogEntry(string.Format("Welcome to UE4 Binary Builder v{0}", PRODUCT_VERSION));
-
- DispatchTimer.Tick += new EventHandler(DispatchTimer_Tick);
- DispatchTimer.Interval = new TimeSpan(0, 0, 1);
-
- CustomOptions.IsEnabled = CustomBuildXMLFile.Text != DEFAULT_BUILD_XML_FILE && CustomBuildXMLFile.Text != string.Empty;
- }
-
- public void AddLogEntry(string InMessage, bool bIsError = false)
- {
- if (InMessage != null)
- {
- LogEntry logEntry = new LogEntry();
- logEntry.Message = InMessage;
- logEntry.DateTime = DateTime.Now;
-
- LogViewer.EMessageType InMessageType = bIsError ? LogViewer.EMessageType.Error : LogViewer.EMessageType.Info;
-
- if (bIsError == false)
- {
- const string StepPattern = @"\*{6} \[(\d+)\/(\d+)\]";
- const string WarningPattern = @"warning|\*\*\* Unable to determine ";
- const string DebugPattern = @".+\*\s\D\d\D\d\D\s\w+|.+\*\sFor\sUE4";
- const string ErrorPattern = @"Error_Unknown|ERROR|exited with code 1";
- const string ProcessedFilesPattern = @"\w.+\.(cpp|cc|c|h|ispc)";
-
- Regex StepRgx = new Regex(StepPattern, RegexOptions.IgnoreCase);
- Regex WarningRgx = new Regex(WarningPattern, RegexOptions.IgnoreCase);
- Regex DebugRgx = new Regex(DebugPattern, RegexOptions.IgnoreCase);
- Regex ErrorRgx = new Regex(ErrorPattern, RegexOptions.IgnoreCase);
- Regex ProcessedFilesRgx = new Regex(ProcessedFilesPattern, RegexOptions.IgnoreCase);
-
- if (StepRgx.IsMatch(InMessage))
- {
- GroupCollection captures = StepRgx.Match(InMessage).Groups;
- ChangeStepLabel(captures[1].Value, captures[2].Value);
- CompiledFiles = 0;
- }
-
- if (ProcessedFilesRgx.IsMatch(InMessage))
- {
- CompiledFiles++;
- CompiledFilesTotal++;
- Dispatcher.Invoke(() => { ProcessedFilesLabel.Content = $"[Compiled: {CompiledFiles}. Total: {CompiledFilesTotal}]"; });
- }
-
- if (WarningRgx.IsMatch(InMessage))
- {
- NumWarnings++;
- InMessageType = LogViewer.EMessageType.Warning;
- }
- else if (ErrorRgx.IsMatch(InMessage))
- {
- NumErrors++;
- InMessageType = LogViewer.EMessageType.Error;
- }
- else if (DebugRgx.IsMatch(InMessage))
- {
- InMessageType = LogViewer.EMessageType.Debug;
- }
- }
-
- LogControl.AddLogEntry(logEntry, InMessageType);
- LogMessage += InMessage + "\r\n";
- }
- }
-
- private void DispatchTimer_Tick(object sender, EventArgs e)
- {
- ChangeStatusLabel(string.Format("Building... Time Elapsed: {0:hh\\:mm\\:ss}", StopwatchTimer.Elapsed));
- }
-
- private void ChangeStatusLabel(string InStatus)
- {
- StatusLabel.Content = $"Status: {InStatus}";
- }
-
- private void ChangeStepLabel(string current, string total)
- {
- Dispatcher.Invoke(() => { StepLabel.Content = $"Step: [{current}/{total}] "; });
- }
-
- private string GetConditionalString(bool? bCondition)
- {
- return (bool)bCondition ? "true" : "false";
- }
-
- private void SaveAllSettings()
- {
- Settings.Default.AutomationPath = AutomationExePath;
-
- Settings.Default.EngineSelection = EngineVersionSelection.SelectedIndex;
- Settings.Default.SettingHostPlatformOnly = (bool)bHostPlatformOnly.IsChecked;
- Settings.Default.SettingHostPlatformEditorOnly = (bool)bHostPlatformEditorOnly.IsChecked;
- Settings.Default.bWithWin64 = (bool)bWithWin64.IsChecked;
- Settings.Default.bWithWin32 = (bool)bWithWin32.IsChecked;
- Settings.Default.bWithMac = (bool)bWithMac.IsChecked;
- Settings.Default.bWithLinux = (bool)bWithLinux.IsChecked;
- Settings.Default.bWithLinuxAArch64 = (bool)bWithLinuxAArch64.IsChecked;
- Settings.Default.bWithHTML5 = (bool)bWithHTML5.IsChecked;
- Settings.Default.bWithAndroid = (bool)bWithAndroid.IsChecked;
- Settings.Default.bWithIOS = (bool)bWithIOS.IsChecked;
- Settings.Default.bWithTVOS = (bool)bWithTVOS.IsChecked;
- Settings.Default.bWithSwitch = (bool)bWithSwitch.IsChecked;
- Settings.Default.bWithPS4 = (bool)bWithPS4.IsChecked;
- Settings.Default.bWithXboxOne = (bool)bWithXboxOne.IsChecked;
- Settings.Default.bWithLumin = (bool)bWithLumin.IsChecked;
-
- Settings.Default.bWithDDC = (bool)bWithDDC.IsChecked;
- Settings.Default.bHostPlatformDDCOnly = (bool)bHostPlatformDDCOnly.IsChecked;
- Settings.Default.bSignExes = (bool)bSignExecutables.IsChecked;
- Settings.Default.bSymStore = (bool)bEnableSymStore.IsChecked;
- Settings.Default.bCleanBuild = (bool)bCleanBuild.IsChecked;
- Settings.Default.bWithFullDebugInfo = (bool)bWithFullDebugInfo.IsChecked;
- Settings.Default.bWithServer = (bool)bWithServer.IsChecked;
- Settings.Default.bWithClient = (bool)bWithClient.IsChecked;
- Settings.Default.bWithHoloLens = (bool)bWithHoloLens.IsChecked;
- Settings.Default.CompileDatasmithPlugin = (bool)bCompileDatasmithPlugins.IsChecked;
- Settings.Default.VS2019 = (bool)bVS2019.IsChecked;
-
- Settings.Default.GameConfigurations = GameConfigurations.Text;
- Settings.Default.CustomBuildXML = CustomBuildXMLFile.Text;
-
- Settings.Default.bShutdownWindows = (bool)bShutdownWindows.IsChecked;
- Settings.Default.bShutdownIfSuccess = (bool)bShutdownIfSuccess.IsChecked;
-
- Settings.Default.CustomOptions = CustomOptions.Text;
- Settings.Default.AnalyticsType = AnalyticsOverride.Text;
-
- Settings.Default.Save();
- }
-
- private void AboutBtn_Ok_Click(object sender, RoutedEventArgs e)
- {
- AboutDialog.IsOpen = false;
- GameAnalyticsCSharp.AddDesignEvent("AboutDialog:Close");
- }
-
- private void AboutMenu_Click(object sender, RoutedEventArgs e)
- {
- AboutDialog.IsOpen = true;
- GameAnalyticsCSharp.AddDesignEvent("AboutDialog:Open");
- }
-
- private void GetSourceCodeMenu_Click(object sender, RoutedEventArgs e)
- {
- GameAnalyticsCSharp.AddDesignEvent("GetSourceCode:Open");
- Process.Start("https://github.com/ryanjon2040/UE4-Binary-Builder");
- }
-
- private void AutomationToolProcess_OutputDataReceived(object sender, DataReceivedEventArgs e)
- {
- AddLogEntry(e.Data);
- }
-
- private void AutomationToolProcess_ErrorDataReceived(object sender, DataReceivedEventArgs e)
- {
- NumErrors++;
- AddLogEntry(e.Data, true);
- }
-
- private void AutomationToolProcess_Exited(object sender, EventArgs e)
- {
- DispatchTimer.Stop();
- StopwatchTimer.Stop();
- bLastBuildSuccess = AutomationToolProcess.ExitCode == 0;
- AddLogEntry(string.Format("AutomationToolProcess exited with code {0}\n", AutomationToolProcess.ExitCode.ToString()));
-
- Dispatcher.Invoke(() =>
- {
- BuildRocketUE.Content = "Start Build";
- ChangeStatusLabel(string.Format("Build finished with code {0}. {1} errors, {2} warnings. Time elapsed: {3:hh\\:mm\\:ss}", AutomationToolProcess.ExitCode, NumErrors, NumWarnings, StopwatchTimer.Elapsed));
- });
-
- bIsBuilding = false;
- AutomationToolProcess.Close();
- AutomationToolProcess.Dispose();
- AutomationToolProcess = null;
- NumErrors = 0;
- NumWarnings = 0;
- AddLogEntry("==========================BUILD FINISHED==========================");
- AddLogEntry(string.Format("Compiled approximately {0} files.", CompiledFilesTotal));
- AddLogEntry(string.Format("Took {0:hh\\:mm\\:ss}", StopwatchTimer.Elapsed));
- AddLogEntry(string.Format("Build ended at {0}", DateTime.Now.ToString("dddd, dd MMMM yyyy HH:mm:ss")));
- StopwatchTimer.Reset();
- Dispatcher.Invoke(() =>
- {
- OnBuildFinished(bLastBuildSuccess);
- });
- }
-
- private void WriteToLogFile()
- {
- string LogFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "UnrealBinaryBuilderLog.log");
- File.WriteAllText(LogFile, LogMessage);
- }
-
- private void OnBuildFinished(bool bBuildSucess)
- {
- if (bBuildSucess)
- {
- if (postBuildSettings.CanSaveToZip())
- {
- if (FinalBuildPath == null)
- {
- FinalBuildPath = Path.GetFullPath(AutomationExePath).Replace(@"\Engine\Binaries\DotNET", @"\LocalBuilds\Engine").Replace(Path.GetFileName(AutomationExePath), "");
- GameAnalyticsCSharp.LogEvent("Final Build Path was null. Fixed.", GameAnalyticsSDK.Net.EGAErrorSeverity.Info);
- }
- AddLogEntry(string.Format("Creating ZIP file. Target Engine Directory is {0}", FinalBuildPath));
- postBuildSettings.PrepareToSave();
- postBuildSettings.SaveToZip(this, FinalBuildPath, postBuildSettings.ZipPath.Text);
- AddLogEntry("Saving zip file to " + postBuildSettings.ZipPath.Text);
- WriteToLogFile();
- return;
- }
- }
-
- WriteToLogFile();
- TryShutdown();
- }
-
- public void TryShutdown()
- {
- if (bShutdownWindows.IsChecked == true)
- {
- if (bShutdownIfSuccess.IsChecked == true)
- {
- if (bLastBuildSuccess)
- {
- GameAnalyticsCSharp.AddDesignEvent("Shutdown:BuildState:Success");
- Internal_ShutdownWindows();
- }
- else
- {
- GameAnalyticsCSharp.AddDesignEvent("Shutdown:BuildState:Failed");
- }
- }
- else
- {
- GameAnalyticsCSharp.AddDesignEvent("Shutdown:Started");
- Internal_ShutdownWindows();
- }
- }
- }
-
- private void Internal_ShutdownWindows()
- {
- Process.Start("shutdown", "/s /t 2");
- Application.Current.Shutdown();
- }
-
- private void AutomationToolBrowse_Click(object sender, RoutedEventArgs e)
- {
- OpenFileDialog NewFileDialog = new OpenFileDialog
- {
- Filter = "exe file (*.exe)|*.exe"
- };
-
- ChangeStatusLabel(string.Format("Waiting for {0}.exe", AUTOMATION_TOOL_NAME));
- if (NewFileDialog.ShowDialog() == true)
- {
- AutomationExePath = NewFileDialog.FileName;
- AutomationToolPath.Text = AutomationExePath;
- if (Path.GetFileNameWithoutExtension(AutomationExePath) == AUTOMATION_TOOL_NAME)
- {
- BuildRocketUE.IsEnabled = true;
- ChangeStatusLabel("Idle.");
- FinalBuildPath = Path.GetFullPath(AutomationExePath).Replace(@"\Engine\Binaries\DotNET", @"\LocalBuilds\Engine").Replace(Path.GetFileName(AutomationExePath), "");
- AddLogEntry(string.Format("Binary build can be found at: {0}", FinalBuildPath));
- }
- else
- {
- GameAnalyticsCSharp.AddDesignEvent($"AutomationTool:IncorrectName:{Path.GetFileNameWithoutExtension(AutomationExePath)}");
- ChangeStatusLabel("Error. Invalid automation tool file selected.");
- MessageBox.Show("This is not Automation Tool Launcher. Please select AutomationToolLauncher.exe", "", MessageBoxButton.OK, MessageBoxImage.Error);
- }
-
- return;
- }
-
- ChangeStatusLabel("Idle.");
- }
-
- private void CustomBuildXMLBrowse_Click(object sender, RoutedEventArgs e)
- {
- OpenFileDialog NewFileDialog = new OpenFileDialog
- {
- Filter = "xml file (*.xml)|*.xml"
- };
-
- ChangeStatusLabel("Waiting for custom build file...");
- if (NewFileDialog.ShowDialog() == true)
- {
- CustomBuildXMLFile.Text = NewFileDialog.FileName;
- CustomOptions.IsEnabled = true;
- GameAnalyticsCSharp.AddDesignEvent($"BuildXML:Custom:{NewFileDialog.FileName}");
- }
-
- ChangeStatusLabel("Idle.");
- }
-
- private void ResetDefaultBuildXML_Click(object sender, RoutedEventArgs e)
- {
- CustomBuildXMLFile.Text = DEFAULT_BUILD_XML_FILE;
- CustomOptions.IsEnabled = false;
- GameAnalyticsCSharp.AddDesignEvent("BuildXML:ResetToDefault");
- }
-
- private string PrepareCommandline()
- {
- string BuildXMLFile = CustomBuildXMLFile.Text;
- if (BuildXMLFile != DEFAULT_BUILD_XML_FILE)
- {
- BuildXMLFile = string.Format("\"{0}\"", CustomBuildXMLFile.Text);
- }
-
- if (GameConfigurations.Text == "")
- {
- GameConfigurations.Text = "Development;Shipping";
- GameAnalyticsCSharp.AddDesignEvent("CommandLine:GameConfiguration:Reset");
- }
-
- string CommandLineArgs = string.Format("BuildGraph -target=\"Make Installed Build Win64\" -script={0} -set:WithDDC={1} -set:SignExecutables={2} -set:EmbedSrcSrvInfo={3} -set:GameConfigurations={4} -set:WithFullDebugInfo={5} -set:HostPlatformEditorOnly={6} -set:AnalyticsTypeOverride={7}",
- BuildXMLFile,
- GetConditionalString(bWithDDC.IsChecked),
- GetConditionalString(bSignExecutables.IsChecked),
- GetConditionalString(bEnableSymStore.IsChecked),
- GameConfigurations.Text,
- GetConditionalString(bWithFullDebugInfo.IsChecked),
- GetConditionalString(bHostPlatformEditorOnly.IsChecked),
- AnalyticsOverride.Text);
-
- if (bWithDDC.IsChecked == true && bHostPlatformDDCOnly.IsChecked == true)
- {
- CommandLineArgs += " -set:HostPlatformDDCOnly=true";
- }
-
- if (bHostPlatformOnly.IsChecked == true)
- {
- CommandLineArgs += " -set:HostPlatformOnly=true";
- GameAnalyticsCSharp.AddDesignEvent("CommandLine:HostOnly");
- }
- else
- {
- CommandLineArgs += string.Format(" -set:WithWin64={0} -set:WithWin32={1} -set:WithMac={2} -set:WithAndroid={3} -set:WithIOS={4} -set:WithTVOS={5} -set:WithLinux={6} -set:WithLumin={7}",
- GetConditionalString(bWithWin64.IsChecked),
- GetConditionalString(bWithWin32.IsChecked),
- GetConditionalString(bWithMac.IsChecked),
- GetConditionalString(bWithAndroid.IsChecked),
- GetConditionalString(bWithIOS.IsChecked),
- GetConditionalString(bWithTVOS.IsChecked),
- GetConditionalString(bWithLinux.IsChecked),
- GetConditionalString(bWithLumin.IsChecked));
-
- if (SupportHTML5())
- {
- CommandLineArgs += string.Format(" -set:WithHTML5={0}",
- GetConditionalString(bWithHTML5.IsChecked));
- }
-
- if (SupportConsoles())
- {
- CommandLineArgs += string.Format(" -set:WithSwitch={0} -set:WithPS4={1} -set:WithXboxOne={2}",
- GetConditionalString(bWithSwitch.IsChecked),
- GetConditionalString(bWithPS4.IsChecked),
- GetConditionalString(bWithXboxOne.IsChecked));
- }
-
- if (SupportLinuxAArch64())
- {
- CommandLineArgs += string.Format(" -set:WithLinuxAArch64={0}", GetConditionalString(bWithLinuxAArch64.IsChecked));
- }
- }
-
- if (IsEngineSelection425OrAbove())
- {
- CommandLineArgs += string.Format(" -set:CompileDatasmithPlugins={0} -set:VS2019={1}",
- GetConditionalString(bCompileDatasmithPlugins.IsChecked),
- GetConditionalString(bVS2019.IsChecked));
- }
-
- if (EngineVersionSelection.SelectedIndex > 1)
- {
- CommandLineArgs += string.Format(" -set:WithServer={0} -set:WithClient={1} -set:WithHoloLens={2}",
- GetConditionalString(bWithServer.IsChecked),
- GetConditionalString(bWithClient.IsChecked),
- GetConditionalString(bWithHoloLens.IsChecked));
- }
-
- if (BuildXMLFile != DEFAULT_BUILD_XML_FILE && CustomOptions.Text != string.Empty)
- {
- CommandLineArgs += string.Format(" {0}", CustomOptions.Text);
- AddLogEntry("Using custom options...");
- GameAnalyticsCSharp.AddDesignEvent("CommandLine:UsingCustomOptions");
- }
-
- if (bCleanBuild.IsChecked == true)
- {
- CommandLineArgs += " -Clean";
- GameAnalyticsCSharp.AddDesignEvent("CommandLine:CleanEnabled");
- }
-
- return CommandLineArgs;
- }
-
- private void BuildRocketUE_Click(object sender, RoutedEventArgs e)
- {
- bLastBuildSuccess = false;
-
- if (bIsBuilding)
- {
- GameAnalyticsCSharp.AddDesignEvent("Build:AutomationTool:Killed");
- AutomationToolProcess.Kill();
- return;
- }
-
- if (FinalBuildPath == null && string.IsNullOrWhiteSpace(AutomationExePath) == false)
- {
- FinalBuildPath = Path.GetFullPath(AutomationExePath).Replace(@"\Engine\Binaries\DotNET", @"\LocalBuilds\Engine").Replace(Path.GetFileName(AutomationExePath), "");
- }
-
- if (Directory.Exists(FinalBuildPath))
- {
- MessageBoxResult MessageResult = MessageBox.Show($"Looks like an Engine build is already available at {FinalBuildPath}. Would you like to skip compiling the Engine and start zipping the existing build?\n\nPress Yes to Skip Engine build and start zipping (if enabled).\nPress No to continue with Engine Build.\nPress Cancel to do nothing.", "Zip Binary Version", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
- switch (MessageResult)
- {
- case MessageBoxResult.Yes:
- GameAnalyticsCSharp.AddDesignEvent("Build:EngineExists:FinishBuild");
- // We don't want the system to shutdown since user is interacting.
- bool? bOriginalShutdownState = bShutdownWindows.IsChecked;
- bShutdownWindows.IsChecked = false;
- OnBuildFinished(true);
- bShutdownWindows.IsChecked = bOriginalShutdownState;
- return;
- case MessageBoxResult.Cancel:
- GameAnalyticsCSharp.AddDesignEvent("Build:EngineExists:Exit");
- return;
- default:
- GameAnalyticsCSharp.AddDesignEvent("Build:EngineExists:IgnoreAndContinue");
- break;
- }
- }
-
- if (EngineVersionSelection.SelectedIndex == 0)
- {
- MessageBox.Show("Please select your Engine version to build. If you are unsure about the version number look into the following file:\n\n/Engine/Source/Runtime/Launch/Resources/Version.h\n\nAnd check ENGINE_MAJOR_VERSION and ENGINE_MINOR_VERSION.", "Select Engine Version.", MessageBoxButton.OK, MessageBoxImage.Exclamation);
- return;
- }
-
- ChangeStatusLabel("Preparing to build...");
-
- if (postBuildSettings.ShouldSaveToZip() && postBuildSettings.DirectoryIsWritable() == false)
- {
- GameAnalyticsCSharp.AddDesignEvent("Build:ZipEnabled:InvalidSetting");
- MessageBox.Show(string.Format("You chose to save Engine build as a zip file but below directory is either not available or not writable.\n\n{0}", postBuildSettings.ZipPath.Text), "Error", MessageBoxButton.OK, MessageBoxImage.Error);
- return;
- }
-
- if (CustomBuildXMLFile.Text != DEFAULT_BUILD_XML_FILE)
- {
- if (CustomBuildXMLFile.Text == string.Empty)
- {
- GameAnalyticsCSharp.LogEvent("Empty Build XML.", GameAnalyticsSDK.Net.EGAErrorSeverity.Error);
- ChangeStatusLabel("Error. Empty build xml file.");
- MessageBox.Show(string.Format("Build XML cannot be empty.\n\nIf you don't have a custom build file, press \"Reset to default\" to use default InstalledEngineBuild.xml", CustomBuildXMLFile.Text), "Error", MessageBoxButton.OK, MessageBoxImage.Error);
- return;
- }
-
- if (File.Exists(CustomBuildXMLFile.Text) == false)
- {
- GameAnalyticsCSharp.LogEvent("BuildXML does not exist.", GameAnalyticsSDK.Net.EGAErrorSeverity.Error);
- ChangeStatusLabel("Error. Build xml does not exist.");
- MessageBox.Show(string.Format("Build XML {0} does not exist!", CustomBuildXMLFile.Text), "Error", MessageBoxButton.OK, MessageBoxImage.Error);
- return;
- }
- }
-
- if (SupportHTML5() == false && bWithHTML5.IsChecked == true)
- {
- GameAnalyticsCSharp.AddDesignEvent($"Build:HTML5:IncorrectEngine:{GetEngineName()}");
- bWithHTML5.IsChecked = false;
- MessageBox.Show("HTML5 support was removed from Unreal Engine 4.24 and higher. You had it enabled but since it is of no use, I disabled it.");
- }
-
- if (SupportConsoles() == false && (bWithSwitch.IsChecked == true || bWithPS4.IsChecked == true || bWithXboxOne.IsChecked == true))
- {
- GameAnalyticsCSharp.AddDesignEvent($"Build:Console:IncorrectEngine:{GetEngineName()}");
- bWithSwitch.IsChecked = bWithPS4.IsChecked = bWithXboxOne.IsChecked = false;
- MessageBox.Show("Console support was removed from Unreal Engine 4.25 and higher. You had it enabled but since it is of no use, I disabled it.");
- }
-
- if (MessageBox.Show("You are going to build a binary version of Unreal Engine 4. This is a long process and might take time to finish. Are you sure you want to continue? ", "Build Binary Version", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
- {
- if (bWithDDC.IsChecked == true)
- {
- MessageBoxResult MessageResult = MessageBox.Show("Building Derived Data Cache (DDC) is one of the slowest aspect of the build. You can skip this step if you want to. Do you want to continue with DDC enabled?\n\nPress Yes to continue with build\nPress No to continue without DDC\nPress Cancel to stop build", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning);
-
- switch (MessageResult)
- {
- case MessageBoxResult.No:
- bWithDDC.IsChecked = false;
- GameAnalyticsCSharp.AddDesignEvent("Build:DDC:AutoDisabled");
- break;
- case MessageBoxResult.Cancel:
- GameAnalyticsCSharp.AddDesignEvent("Build:DDC:Exit");
- return;
- default:
- GameAnalyticsCSharp.AddDesignEvent("Build:DDC:IgnoreAndContinue");
- break;
- }
- }
-
- CompiledFiles = CompiledFilesTotal = 0;
- ProcessedFilesLabel.Content = "[Compiled: 0. Total: 0]";
-
- LogControl.ClearAllLogs();
- AddLogEntry(string.Format("Welcome to UE4 Binary Builder v{0}", PRODUCT_VERSION));
- BuildRocketUE.Content = "Stop Build";
-
- string CommandLineArgs = PrepareCommandline();
-
- ProcessStartInfo AutomationStartInfo = new ProcessStartInfo
- {
- FileName = AutomationExePath,
- Arguments = CommandLineArgs,
- UseShellExecute = false,
- CreateNoWindow = true,
- RedirectStandardError = true,
- RedirectStandardOutput = true
- };
-
- DispatchTimer.Start();
- StopwatchTimer.Start();
-
- AutomationToolProcess = new Process();
- AutomationToolProcess.StartInfo = AutomationStartInfo;
- AutomationToolProcess.EnableRaisingEvents = true;
- AutomationToolProcess.OutputDataReceived += new DataReceivedEventHandler(AutomationToolProcess_OutputDataReceived);
- AutomationToolProcess.ErrorDataReceived += new DataReceivedEventHandler(AutomationToolProcess_ErrorDataReceived);
- AutomationToolProcess.Exited += new EventHandler(AutomationToolProcess_Exited);
- AutomationToolProcess.Start();
- AutomationToolProcess.BeginErrorReadLine();
- AutomationToolProcess.BeginOutputReadLine();
-
- bIsBuilding = true;
- ChangeStatusLabel("Building...");
- GameAnalyticsCSharp.AddDesignEvent("Build:Started");
- }
- }
-
- private void UnrealBinaryBuilderWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
- {
- if (bIsBuilding)
- {
- if (MessageBox.Show("AutomationTool is still running. Would you like to stop it and exit?", "Build in progress", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
- {
- if (AutomationToolProcess != null)
- {
- GameAnalyticsCSharp.AddDesignEvent("Build:AutomationTool:Killed:ExitProgram");
- AutomationToolProcess.Kill();
- }
- }
- else
- {
- e.Cancel = true;
- return;
- }
- }
-
- GameAnalyticsCSharp.EndSession();
- SaveAllSettings();
-
- postBuildSettings.Close();
- postBuildSettings = null;
- Application.Current.Shutdown();
- }
-
- private void PostBuildSettings_Click(object sender, RoutedEventArgs e)
- {
- GameAnalyticsCSharp.AddDesignEvent("PostBuildSettings:Open");
- postBuildSettings.Owner = this;
- postBuildSettings.ShowDialog();
- }
-
- private void EngineVersionSelection_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
- {
- bWithServer.IsEnabled = bWithClient.IsEnabled = bWithServerLabel.IsEnabled = bWithClientLabel.IsEnabled = EngineVersionSelection.SelectedIndex > 1;
- bWithHTML5.IsEnabled = bWithHTML5Label.IsEnabled = SupportHTML5();
- bWithLinuxAArch64.IsEnabled = bWithLinuxAArch64Label.IsEnabled = SupportLinuxAArch64();
- bWithSwitch.IsEnabled = bWithSwitchLabel.IsEnabled = bWithPS4.IsEnabled = bWithPS4Label.IsEnabled = bWithXboxOne.IsEnabled = bWithXboxOneLabel.IsEnabled = SupportConsoles();
- bCompileDatasmithPlugins.IsEnabled = bCompileDatasmithPluginsLabel.IsEnabled = bVS2019.IsEnabled = bVS2019Label.IsEnabled = IsEngineSelection425OrAbove();
- }
-
- private bool SupportHTML5()
- {
- return EngineVersionSelection.SelectedIndex < 3;
- }
-
- private bool SupportLinuxAArch64()
- {
- return EngineVersionSelection.SelectedIndex >= 3;
- }
-
- private bool SupportConsoles()
- {
- return EngineVersionSelection.SelectedIndex <= 3;
- }
-
- private bool IsEngineSelection425OrAbove()
- {
- return EngineVersionSelection.SelectedIndex >= 4;
- }
-
- private string GetEngineName()
- {
- string ReturnString = "Unknown";
- switch (EngineVersionSelection.SelectedIndex)
- {
- case 1:
- ReturnString = "4.22";
- break;
- case 2:
- ReturnString = "4.23";
- break;
- case 3:
- ReturnString = "4.24";
- break;
- case 4:
- ReturnString = "4.25";
- break;
- }
-
- return ReturnString;
- }
-
- private void CopyCommandLine_Click(object sender, RoutedEventArgs e)
- {
- GameAnalyticsCSharp.AddDesignEvent("CommandLine:CopyToClipboard");
- Clipboard.SetText(PrepareCommandline());
- MessageBox.Show("Commandline copied to clipboard!");
- }
-
- private void CancelZipping_Click(object sender, RoutedEventArgs e)
- {
- postBuildSettings.CancelTask(this);
- }
- }
-}
diff --git a/Unreal Binary Builder/PostBuildSettings.xaml b/Unreal Binary Builder/PostBuildSettings.xaml
deleted file mode 100644
index 26aac50..0000000
--- a/Unreal Binary Builder/PostBuildSettings.xaml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Unreal Binary Builder/PostBuildSettings.xaml.cs b/Unreal Binary Builder/PostBuildSettings.xaml.cs
deleted file mode 100644
index 0cb9045..0000000
--- a/Unreal Binary Builder/PostBuildSettings.xaml.cs
+++ /dev/null
@@ -1,362 +0,0 @@
-using Ionic.Zip;
-using Ionic.Zlib;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Security.AccessControl;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Forms;
-using Unreal_Binary_Builder.Properties;
-
-namespace Unreal_Binary_Builder
-{
- ///
- /// Interaction logic for PostBuildSettings.xaml
- ///
- public partial class PostBuildSettings : Window
- {
- Task ZippingTask = null;
- static CancellationTokenSource ZipCancelTokenSource = new CancellationTokenSource();
- CancellationToken ZipCancelToken = ZipCancelTokenSource.Token;
-
- public PostBuildSettings()
- {
- InitializeComponent();
-
- Settings DefaultSettings = Settings.Default;
- bZipBuild.IsChecked = DefaultSettings.bZipBuild;
- ZipPath.Text = DefaultSettings.ZipPath;
- bIncludePDB.IsChecked = DefaultSettings.bIncludePDB;
- bIncludeDEBUG.IsChecked = DefaultSettings.bIncludeDEBUG;
- bIncludeDocumentation.IsChecked = DefaultSettings.bIncludeDocumentation;
- bIncludeExtras.IsChecked = DefaultSettings.bIncludeExtras;
- bIncludeSource.IsChecked = DefaultSettings.bIncludeSource;
- bIncludeFeaturePacks.IsChecked = DefaultSettings.bIncludeFeaturePacks;
- bIncludeSamples.IsChecked = DefaultSettings.bIncludeSamples;
- bIncludeTemplates.IsChecked = DefaultSettings.bIncludeTemplates;
- bFastCompression.IsChecked = DefaultSettings.bFastCompression;
- }
-
- public bool CanSaveToZip()
- {
- return ShouldSaveToZip() && DirectoryIsWritable();
- }
-
- public bool ShouldSaveToZip()
- {
- return (bool)bZipBuild.IsChecked && !string.IsNullOrEmpty(ZipPath.Text);
- }
-
- public bool DirectoryIsWritable()
- {
- DirectoryInfo ZipDirectory = new FileInfo(ZipPath.Text).Directory;
- bool bDirectoryExists = (ZipDirectory != null) && ZipDirectory.Exists;
- bool bHasWriteAccess = false;
- if(bDirectoryExists)
- {
- try
- {
- AuthorizationRuleCollection collection = Directory.GetAccessControl(ZipDirectory.FullName).GetAccessRules(true, true, typeof(System.Security.Principal.NTAccount));
- foreach (FileSystemAccessRule rule in collection)
- {
- if (rule.AccessControlType == AccessControlType.Allow)
- {
- bHasWriteAccess = true;
- break;
- }
- }
- }
- catch (Exception)
- {
-
- }
- }
-
- return bDirectoryExists && bHasWriteAccess;
- }
-
- public void PrepareToSave()
- {
- ZipCancelTokenSource.Dispose();
- ZipCancelTokenSource = new CancellationTokenSource();
- ZipCancelToken = ZipCancelTokenSource.Token;
- }
-
- public async void SaveToZip(MainWindow mainWindow, string InBuildDirectory, string ZipLocationToSave)
- {
- Dispatcher.Invoke(() =>
- {
- GameAnalyticsCSharp.AddProgressStart("Zip", "Progress");
- mainWindow.ZipProgressDialog.IsOpen = true;
- mainWindow.TotalResult.Content = "";
- mainWindow.CurrentFileSaving.Content = "Waiting...";
- mainWindow.FileSaveState.Content = "State: Preparing...";
- });
-
- CompressionLevel CL = (bool)bFastCompression.IsChecked ? CompressionLevel.BestSpeed : CompressionLevel.BestCompression;
-
- ZippingTask = Task.Run(() =>
- {
- using (var zipFile = new ZipFile { CompressionLevel = CL })
- {
- Dispatcher.Invoke(() => { mainWindow.FileSaveState.Content = "State: Finding files..."; });
- string[] files = Directory.GetFiles(InBuildDirectory, "*", SearchOption.AllDirectories).ToArray();
- ZipCancelToken.ThrowIfCancellationRequested();
-
- List filesToAdd = new List();
-
- int SkippedFiles = 0;
- int AddedFiles = 0;
- int TotalFiles = files.Length;
-
- long TotalSize = 0;
- long TotalSizeToZip = 0;
- long SkippedSize = 0;
- string TotalSizeInString = "0B";
- string TotalSizeToZipInString = "0B";
- string SkippedSizeToZipInString = "0B";
- Dispatcher.Invoke(() => { mainWindow.FileSaveState.Content = "State: Preparing files for zipping..."; });
- foreach (string file in files)
- {
- bool bSkipFile = false;
- Dispatcher.Invoke(() =>
- {
- string CurrentFilePath = Path.GetFullPath(file).ToLower();
- if (bIncludePDB.IsChecked == false && Path.GetExtension(file).ToLower() == ".pdb")
- {
- bSkipFile = true;
- }
-
- if (bIncludeDEBUG.IsChecked == false && Path.GetExtension(file).ToLower() == ".debug")
- {
- bSkipFile = true;
- }
-
- if (bIncludeDocumentation.IsChecked == false && CurrentFilePath.Contains(@"\source\") == false && CurrentFilePath.Contains(@"\documentation\"))
- {
- bSkipFile = true;
- }
-
- if (bIncludeExtras.IsChecked == false && CurrentFilePath.Contains(@"\extras\redist\") == false && CurrentFilePath.Contains(@"\extras\"))
- {
- bSkipFile = true;
- }
-
- if (bIncludeSource.IsChecked == false && CurrentFilePath.Contains(@"\source\developer\"))
- {
- bSkipFile = true;
- }
-
- if (bIncludeSource.IsChecked == false && CurrentFilePath.Contains(@"\source\editor\"))
- {
- bSkipFile = true;
- }
-
- if (bIncludeSource.IsChecked == false && CurrentFilePath.Contains(@"\source\programs\"))
- {
- bSkipFile = true;
- }
-
- if (bIncludeSource.IsChecked == false && CurrentFilePath.Contains(@"\source\runtime\"))
- {
- bSkipFile = true;
- }
-
- if (bIncludeSource.IsChecked == false && CurrentFilePath.Contains(@"\source\thirdparty\"))
- {
- bSkipFile = true;
- }
-
- if (bIncludeFeaturePacks.IsChecked == false && CurrentFilePath.Contains(@"\featurepacks\"))
- {
- bSkipFile = true;
- }
-
- if (bIncludeSamples.IsChecked == false && CurrentFilePath.Contains(@"\samples\"))
- {
- bSkipFile = true;
- }
-
- if (bIncludeTemplates.IsChecked == false && CurrentFilePath.Contains(@"\source\") == false && CurrentFilePath.Contains(@"\content\editor") == false && CurrentFilePath.Contains(@"\templates\"))
- {
- bSkipFile = true;
- }
-
- });
-
- TotalSize += new FileInfo(file).Length;
- TotalSizeInString = BytesToString(TotalSize);
- if (bSkipFile)
- {
- SkippedFiles++;
- SkippedSize += new FileInfo(file).Length;
- SkippedSizeToZipInString = BytesToString(SkippedSize);
- }
- else
- {
- filesToAdd.Add(file);
- AddedFiles++;
- TotalSizeToZip += new FileInfo(file).Length;
- TotalSizeToZipInString = BytesToString(TotalSizeToZip);
- }
-
- Dispatcher.Invoke(() => { mainWindow.CurrentFileSaving.Content = string.Format("Total: {0}. Added: {1}. Skipped: {2}", TotalFiles, AddedFiles, SkippedFiles); });
- ZipCancelToken.ThrowIfCancellationRequested();
- }
-
- Dispatcher.Invoke(() =>
- {
- mainWindow.TotalResult.Content = string.Format("Total Size: {0}. To Zip: {1}. Skipped: {2}", TotalSizeInString, TotalSizeToZipInString, SkippedSizeToZipInString);
- mainWindow.FileSaveState.Content = "State: Verifying...";
- mainWindow.OverallProgressbar.Maximum = filesToAdd.Count;
- });
-
- foreach (string file in filesToAdd)
- {
- ZipCancelToken.ThrowIfCancellationRequested();
- zipFile.AddFile(file, Path.GetDirectoryName(file).Replace(InBuildDirectory, string.Empty));
- }
-
- long ProcessedSize = 0;
- string ProcessSizeInString = "0B";
-
- Dispatcher.Invoke(() =>
- {
- mainWindow.OverallProgressbar.IsIndeterminate = false;
- mainWindow.FileProgressbar.IsIndeterminate = false;
- });
-
- zipFile.SaveProgress += (o, args) =>
- {
- ZipCancelToken.ThrowIfCancellationRequested();
- if (args.EventType == ZipProgressEventType.Saving_BeforeWriteEntry)
- {
- Dispatcher.Invoke(() =>
- {
- mainWindow.FileSaveState.Content = "State: Begin Writing...";
- mainWindow.CurrentFileSaving.Content = string.Format("Saving File: {0} ({1}/{2})", Path.GetFileName(args.CurrentEntry.FileName), (args.EntriesSaved + 1), (args.EntriesTotal));
- mainWindow.OverallProgressbar.Value = args.EntriesSaved + 1;
- });
- }
- else if (args.EventType == ZipProgressEventType.Saving_EntryBytesRead)
- {
- Dispatcher.Invoke(() =>
- {
- mainWindow.FileSaveState.Content = "State: Writing...";
- mainWindow.FileProgressbar.Value = (int)((args.BytesTransferred * 100) / args.TotalBytesToTransfer);
- });
- }
- else if (args.EventType == ZipProgressEventType.Saving_AfterWriteEntry)
- {
- ProcessedSize += new FileInfo(Path.Combine(InBuildDirectory, args.CurrentEntry.FileName)).Length;
- ProcessSizeInString = BytesToString(ProcessedSize);
- Dispatcher.Invoke(() => { mainWindow.TotalResult.Content = string.Format("Total Size: {0}. To Zip: {1}. Skipped: {2}. Processed: {3}", TotalSizeInString, TotalSizeToZipInString, SkippedSizeToZipInString, ProcessSizeInString); });
- }
- else if (args.EventType == ZipProgressEventType.Saving_Started)
- {
- Dispatcher.Invoke(() =>
- {
- mainWindow.CurrentFileSaving.Content = "";
- mainWindow.FileSaveState.Content = string.Format("State: Saving zip file to LOCATION_HERE", TotalFiles);
- });
- }
- else if (args.EventType == ZipProgressEventType.Saving_Completed)
- {
- Dispatcher.Invoke(() =>
- {
- GameAnalyticsCSharp.AddProgressEnd("Zip", "Progress");
- mainWindow.ZipProgressDialog.IsOpen = false;
- mainWindow.TryShutdown();
- });
- }
- };
-
-
- zipFile.UseZip64WhenSaving = Zip64Option.Always;
- zipFile.Save(ZipLocationToSave);
- Dispatcher.Invoke(() => { mainWindow.AddLogEntry($"Done zipping. File location: {ZipLocationToSave}"); });
- }
- }, ZipCancelToken);
-
- try
- {
- await ZippingTask;
- }
- catch (OperationCanceledException e)
- {
- Dispatcher.Invoke(() =>
- {
- mainWindow.CurrentFileSaving.Content = "";
- mainWindow.FileSaveState.Content = "Operation canceled.";
- mainWindow.AddLogEntry($"{nameof(OperationCanceledException)} with message: {e.Message}");
- mainWindow.ZipProgressDialog.IsOpen = false;
- });
- }
- finally
- {
- Dispatcher.Invoke(() =>
- {
- mainWindow.CancelZipping.Content = "Cancel Zipping";
- mainWindow.CancelZipping.IsEnabled = true;
- });
- }
- }
-
- public void CancelTask(MainWindow mainWindow)
- {
- GameAnalyticsCSharp.AddProgressEnd("Zip", "Progress", true);
- mainWindow.CancelZipping.Content = "Canceling. Please wait...";
- mainWindow.CancelZipping.IsEnabled = false;
- ZipCancelTokenSource.Cancel();
- }
-
- static string BytesToString(long byteCount)
- {
- string[] suf = { "B", "KB", "MB", "GB", "TB" };
- if (byteCount == 0)
- {
- return "0" + suf[0];
- }
- long bytes = Math.Abs(byteCount);
- int place = Convert.ToInt32(Math.Floor(Math.Log(bytes, 1024)));
- double num = Math.Round(bytes / Math.Pow(1024, place), 1);
- return (Math.Sign(byteCount) * num).ToString() + suf[place];
- }
-
- private void SetZipPathLocation_Click(object sender, RoutedEventArgs e)
- {
- SaveFileDialog SFD = new SaveFileDialog();
- SFD.DefaultExt = ".zip";
- SFD.Filter = "Zip File (.zip)|*.zip";
- DialogResult SaveDialogResult = SFD.ShowDialog();
- if (SaveDialogResult == System.Windows.Forms.DialogResult.OK)
- {
- ZipPath.Text = SFD.FileName;
- }
- }
-
- private void PostBuildSettingsWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
- {
- Settings DefaultSettings = Settings.Default;
- DefaultSettings.bZipBuild = (bool)bZipBuild.IsChecked;
- DefaultSettings.ZipPath = ZipPath.Text;
- DefaultSettings.bIncludePDB = (bool)bIncludePDB.IsChecked;
- DefaultSettings.bIncludeDEBUG = (bool)bIncludeDEBUG.IsChecked;
- DefaultSettings.bIncludeDocumentation = (bool)bIncludeDocumentation.IsChecked;
- DefaultSettings.bIncludeExtras = (bool)bIncludeExtras.IsChecked;
- DefaultSettings.bIncludeSource = (bool)bIncludeSource.IsChecked;
- DefaultSettings.bIncludeFeaturePacks = (bool)bIncludeFeaturePacks.IsChecked;
- DefaultSettings.bIncludeSamples = (bool)bIncludeSamples.IsChecked;
- DefaultSettings.bIncludeTemplates = (bool)bIncludeTemplates.IsChecked;
- DefaultSettings.bFastCompression = (bool)bFastCompression.IsChecked;
-
- DefaultSettings.Save();
-
- e.Cancel = true;
- Visibility = Visibility.Collapsed;
- }
- }
-}
diff --git a/Unreal Binary Builder/Properties/AssemblyInfo.cs b/Unreal Binary Builder/Properties/AssemblyInfo.cs
deleted file mode 100644
index f29084e..0000000
--- a/Unreal Binary Builder/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Created by Satheesh (ryanjon2040)")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("YetiTech Studios")]
-[assembly: AssemblyProduct("Unreal Binary Builder")]
-[assembly: AssemblyCopyright("Copyright © 2019")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
-//in your source files, set the to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Unreal Binary Builder/Properties/Resources.Designer.cs b/Unreal Binary Builder/Properties/Resources.Designer.cs
deleted file mode 100644
index 25cc1c0..0000000
--- a/Unreal Binary Builder/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Unreal_Binary_Builder.Properties
-{
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Unreal_Binary_Builder.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/Unreal Binary Builder/Properties/Resources.resx b/Unreal Binary Builder/Properties/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/Unreal Binary Builder/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/Unreal Binary Builder/Properties/Settings.Designer.cs b/Unreal Binary Builder/Properties/Settings.Designer.cs
deleted file mode 100644
index aefb5d4..0000000
--- a/Unreal Binary Builder/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,566 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Unreal_Binary_Builder.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string AutomationPath {
- get {
- return ((string)(this["AutomationPath"]));
- }
- set {
- this["AutomationPath"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool SettingHostPlatformOnly {
- get {
- return ((bool)(this["SettingHostPlatformOnly"]));
- }
- set {
- this["SettingHostPlatformOnly"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bWithWin64 {
- get {
- return ((bool)(this["bWithWin64"]));
- }
- set {
- this["bWithWin64"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bWithWin32 {
- get {
- return ((bool)(this["bWithWin32"]));
- }
- set {
- this["bWithWin32"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bWithMac {
- get {
- return ((bool)(this["bWithMac"]));
- }
- set {
- this["bWithMac"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bWithLinux {
- get {
- return ((bool)(this["bWithLinux"]));
- }
- set {
- this["bWithLinux"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bWithLinuxAArch64 {
- get {
- return ((bool)(this["bWithLinuxAArch64"]));
- }
- set {
- this["bWithLinuxAArch64"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bWithHTML5 {
- get {
- return ((bool)(this["bWithHTML5"]));
- }
- set {
- this["bWithHTML5"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bWithAndroid {
- get {
- return ((bool)(this["bWithAndroid"]));
- }
- set {
- this["bWithAndroid"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bWithIOS {
- get {
- return ((bool)(this["bWithIOS"]));
- }
- set {
- this["bWithIOS"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bWithTVOS {
- get {
- return ((bool)(this["bWithTVOS"]));
- }
- set {
- this["bWithTVOS"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bWithSwitch {
- get {
- return ((bool)(this["bWithSwitch"]));
- }
- set {
- this["bWithSwitch"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bWithDDC {
- get {
- return ((bool)(this["bWithDDC"]));
- }
- set {
- this["bWithDDC"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bSignExes {
- get {
- return ((bool)(this["bSignExes"]));
- }
- set {
- this["bSignExes"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bSymStore {
- get {
- return ((bool)(this["bSymStore"]));
- }
- set {
- this["bSymStore"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bCleanBuild {
- get {
- return ((bool)(this["bCleanBuild"]));
- }
- set {
- this["bCleanBuild"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bWithPS4 {
- get {
- return ((bool)(this["bWithPS4"]));
- }
- set {
- this["bWithPS4"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bWithXboxOne {
- get {
- return ((bool)(this["bWithXboxOne"]));
- }
- set {
- this["bWithXboxOne"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bWithLumin {
- get {
- return ((bool)(this["bWithLumin"]));
- }
- set {
- this["bWithLumin"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("Development;Shipping")]
- public string GameConfigurations {
- get {
- return ((string)(this["GameConfigurations"]));
- }
- set {
- this["GameConfigurations"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bWithFullDebugInfo {
- get {
- return ((bool)(this["bWithFullDebugInfo"]));
- }
- set {
- this["bWithFullDebugInfo"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("Engine/Build/InstalledEngineBuild.xml")]
- public string CustomBuildXML {
- get {
- return ((string)(this["CustomBuildXML"]));
- }
- set {
- this["CustomBuildXML"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bShutdownWindows {
- get {
- return ((bool)(this["bShutdownWindows"]));
- }
- set {
- this["bShutdownWindows"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bShutdownIfSuccess {
- get {
- return ((bool)(this["bShutdownIfSuccess"]));
- }
- set {
- this["bShutdownIfSuccess"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string CustomOptions {
- get {
- return ((string)(this["CustomOptions"]));
- }
- set {
- this["CustomOptions"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bHostPlatformDDCOnly {
- get {
- return ((bool)(this["bHostPlatformDDCOnly"]));
- }
- set {
- this["bHostPlatformDDCOnly"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bWithServer {
- get {
- return ((bool)(this["bWithServer"]));
- }
- set {
- this["bWithServer"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bWithClient {
- get {
- return ((bool)(this["bWithClient"]));
- }
- set {
- this["bWithClient"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bWithHoloLens {
- get {
- return ((bool)(this["bWithHoloLens"]));
- }
- set {
- this["bWithHoloLens"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bZipBuild {
- get {
- return ((bool)(this["bZipBuild"]));
- }
- set {
- this["bZipBuild"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string ZipPath {
- get {
- return ((string)(this["ZipPath"]));
- }
- set {
- this["ZipPath"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bIncludePDB {
- get {
- return ((bool)(this["bIncludePDB"]));
- }
- set {
- this["bIncludePDB"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bIncludeDEBUG {
- get {
- return ((bool)(this["bIncludeDEBUG"]));
- }
- set {
- this["bIncludeDEBUG"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bIncludeDocumentation {
- get {
- return ((bool)(this["bIncludeDocumentation"]));
- }
- set {
- this["bIncludeDocumentation"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bIncludeExtras {
- get {
- return ((bool)(this["bIncludeExtras"]));
- }
- set {
- this["bIncludeExtras"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bIncludeSource {
- get {
- return ((bool)(this["bIncludeSource"]));
- }
- set {
- this["bIncludeSource"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bIncludeFeaturePacks {
- get {
- return ((bool)(this["bIncludeFeaturePacks"]));
- }
- set {
- this["bIncludeFeaturePacks"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bIncludeSamples {
- get {
- return ((bool)(this["bIncludeSamples"]));
- }
- set {
- this["bIncludeSamples"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool bIncludeTemplates {
- get {
- return ((bool)(this["bIncludeTemplates"]));
- }
- set {
- this["bIncludeTemplates"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool bFastCompression {
- get {
- return ((bool)(this["bFastCompression"]));
- }
- set {
- this["bFastCompression"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("0")]
- public int EngineSelection {
- get {
- return ((int)(this["EngineSelection"]));
- }
- set {
- this["EngineSelection"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool CompileDatasmithPlugin {
- get {
- return ((bool)(this["CompileDatasmithPlugin"]));
- }
- set {
- this["CompileDatasmithPlugin"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool VS2019 {
- get {
- return ((bool)(this["VS2019"]));
- }
- set {
- this["VS2019"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("")]
- public string AnalyticsType {
- get {
- return ((string)(this["AnalyticsType"]));
- }
- set {
- this["AnalyticsType"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool SettingHostPlatformEditorOnly {
- get {
- return ((bool)(this["SettingHostPlatformEditorOnly"]));
- }
- set {
- this["SettingHostPlatformEditorOnly"] = value;
- }
- }
- }
-}
diff --git a/Unreal Binary Builder/Properties/Settings.settings b/Unreal Binary Builder/Properties/Settings.settings
deleted file mode 100644
index dd83f68..0000000
--- a/Unreal Binary Builder/Properties/Settings.settings
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
-
-
-
-
- False
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- False
-
-
- True
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- Development;Shipping
-
-
- False
-
-
- Engine/Build/InstalledEngineBuild.xml
-
-
- False
-
-
- False
-
-
-
-
-
- True
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
-
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- False
-
-
- 0
-
-
- False
-
-
- False
-
-
-
-
-
- False
-
-
-
\ No newline at end of file
diff --git a/Unreal Binary Builder/Unreal Binary Builder.csproj b/Unreal Binary Builder/Unreal Binary Builder.csproj
deleted file mode 100644
index b9cb986..0000000
--- a/Unreal Binary Builder/Unreal Binary Builder.csproj
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {EF664300-FF7C-44AC-880D-D0A4FAC9F36F}
- WinExe
- Unreal_Binary_Builder
- Unreal Binary Builder
- v4.6.1
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- true
- true
-
-
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- application.ico
-
-
-
- ..\packages\DotNetZip.1.14.0\lib\net40\DotNetZip.dll
-
-
- ..\packages\GameAnalytics.Mono.SDK.3.1.0\lib\net45\GameAnalytics.Mono.dll
-
-
- ..\packages\MaterialDesignColors.1.2.7\lib\net45\MaterialDesignColors.dll
-
-
- ..\packages\MaterialDesignThemes.3.2.0\lib\net45\MaterialDesignThemes.Wpf.dll
-
-
- ..\packages\NLog.4.7.5\lib\net45\NLog.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- Designer
- MSBuild:Compile
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
-
-
- LogViewer.xaml
-
-
- MainWindow.xaml
- Code
-
-
- Designer
- MSBuild:Compile
-
-
-
-
- PostBuildSettings.xaml
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
-
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Unreal Binary Builder/application.ico b/Unreal Binary Builder/application.ico
deleted file mode 100644
index 7738da8..0000000
Binary files a/Unreal Binary Builder/application.ico and /dev/null differ
diff --git a/Unreal Binary Builder/packages.config b/Unreal Binary Builder/packages.config
deleted file mode 100644
index 18f4e9c..0000000
--- a/Unreal Binary Builder/packages.config
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/UnrealBinaryBuilder.sln b/UnrealBinaryBuilder.sln
new file mode 100644
index 0000000..8385372
--- /dev/null
+++ b/UnrealBinaryBuilder.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30611.23
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnrealBinaryBuilder", "UnrealBinaryBuilder\UnrealBinaryBuilder.csproj", "{C24EF65C-2110-430F-A587-02324C761DA2}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnrealBinaryBuilderUpdater", "UnrealBinaryBuilderUpdater\UnrealBinaryBuilderUpdater.csproj", "{AB93DC86-D5D9-4C35-AAE4-78997B084053}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C24EF65C-2110-430F-A587-02324C761DA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C24EF65C-2110-430F-A587-02324C761DA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C24EF65C-2110-430F-A587-02324C761DA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C24EF65C-2110-430F-A587-02324C761DA2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AB93DC86-D5D9-4C35-AAE4-78997B084053}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AB93DC86-D5D9-4C35-AAE4-78997B084053}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AB93DC86-D5D9-4C35-AAE4-78997B084053}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AB93DC86-D5D9-4C35-AAE4-78997B084053}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {32EB3FA9-CFBF-4FDC-B971-ADB71C2152FC}
+ EndGlobalSection
+EndGlobal
diff --git a/UnrealBinaryBuilder/App.xaml b/UnrealBinaryBuilder/App.xaml
new file mode 100644
index 0000000..a0261c1
--- /dev/null
+++ b/UnrealBinaryBuilder/App.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/UnrealBinaryBuilder/App.xaml.cs b/UnrealBinaryBuilder/App.xaml.cs
new file mode 100644
index 0000000..05930f3
--- /dev/null
+++ b/UnrealBinaryBuilder/App.xaml.cs
@@ -0,0 +1,26 @@
+using Sentry;
+using System.Windows;
+using System.Windows.Threading;
+
+namespace UnrealBinaryBuilder
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ public App()
+ {
+ DispatcherUnhandledException += App_DispatcherUnhandledException;
+ SentrySdk.Init("https://23f478ac8a004c5782a7f6597c0b0325@o502371.ingest.sentry.io/5584682");
+ }
+
+ void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
+ {
+ SentrySdk.CaptureException(e.Exception);
+
+ // If you want to avoid the application from crashing:
+ //e.Handled = true;
+ }
+ }
+}
diff --git a/UnrealBinaryBuilder/AssemblyInfo.cs b/UnrealBinaryBuilder/AssemblyInfo.cs
new file mode 100644
index 0000000..427f202
--- /dev/null
+++ b/UnrealBinaryBuilder/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/UnrealBinaryBuilder/Classes/BuilderSettings.cs b/UnrealBinaryBuilder/Classes/BuilderSettings.cs
new file mode 100644
index 0000000..99e93de
--- /dev/null
+++ b/UnrealBinaryBuilder/Classes/BuilderSettings.cs
@@ -0,0 +1,428 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+using UnrealBinaryBuilder.UserControls;
+using System.Diagnostics;
+
+namespace UnrealBinaryBuilder.Classes
+{
+ public class BuilderSettingsJson
+ {
+ // Application settings
+ public string Theme { get; set; } // Valid settings are Dark, Light, Violet
+ public bool bCheckForUpdatesAtStartup { get; set; }
+ public bool bEnableDDCMessages { get; set; }
+ public bool bEnableEngineBuildConfirmationMessage { get; set; }
+ public bool bShowHTML5DeprecatedMessage { get; set; }
+ public bool bShowConsoleDeprecatedMessage { get; set; }
+
+ public int EngineVersionIndex { get; set; }
+ public string SetupBatFile { get; set; }
+ public string AutomationToolPath { get; set; }
+ public string CustomBuildFile { get; set; }
+ public string GameConfigurations { get; set; }
+ public string CustomOptions { get; set; }
+ public string AnalyticsOverride { get; set; }
+
+ public bool GitDependencyAll { get; set; }
+ public List GitDependencyPlatforms { get; set; }
+ public int GitDependencyThreads { get; set; }
+ public int GitDependencyMaxRetries { get; set; }
+ public string GitDependencyProxy { get; set; }
+ public bool GitDependencyEnableCache { get; set; }
+ public string GitDependencyCache { get; set; }
+ public double GitDependencyCacheMultiplier { get; set; }
+ public int GitDependencyCacheDays { get; set; }
+
+ public bool bHostPlatformOnly { get; set; }
+ public bool bHostPlatformEditorOnly { get; set; }
+ public bool bWithWin64 { get; set; }
+ public bool bWithWin32 { get; set; }
+ public bool bWithMac { get; set; }
+ public bool bWithLinux { get; set; }
+ public bool bWithLinuxAArch64 { get; set; }
+ public bool bWithAndroid { get; set; }
+ public bool bWithIOS { get; set; }
+ public bool bWithHTML5 { get; set; }
+ public bool bWithTVOS { get; set; }
+ public bool bWithSwitch { get; set; }
+ public bool bWithPS4 { get; set; }
+ public bool bWithXboxOne { get; set; }
+ public bool bWithLumin { get; set; }
+ public bool bWithHoloLens { get; set; }
+
+ public bool bWithDDC { get; set; }
+ public bool bHostPlatformDDCOnly { get; set; }
+ public bool bSignExecutables { get; set; }
+ public bool bEnableSymStore { get; set; }
+ public bool bWithFullDebugInfo { get; set; }
+ public bool bCleanBuild { get; set; }
+ public bool bWithServer { get; set; }
+ public bool bWithClient { get; set; }
+ public bool bCompileDatasmithPlugins { get; set; }
+ public bool bVS2019 { get; set; }
+ public bool bShutdownPC { get; set; }
+ public bool bShutdownIfBuildSuccess { get; set; }
+ public bool bContinueToEngineBuild { get; set; }
+
+ public bool bZipEngineBuild { get; set; }
+ public bool bZipEnginePDB { get; set; }
+ public bool bZipEngineDebug { get; set; }
+ public bool bZipEngineDocumentation { get; set; }
+ public bool bZipEngineExtras { get; set; }
+ public bool bZipEngineSource { get; set; }
+ public bool bZipEngineFeaturePacks { get; set; }
+ public bool bZipEngineSamples { get; set; }
+ public bool bZipEngineTemplates { get; set; }
+ public bool bZipEngineFastCompression { get; set; }
+ public string ZipEnginePath { get; set; }
+ }
+
+ public class GitPlatform
+ {
+ public GitPlatform(string InName, bool bInclude)
+ {
+ Name = InName;
+ bIsIncluded = bInclude;
+ }
+
+ public string Name { get; set; }
+ public bool bIsIncluded { get; set; }
+ }
+
+ public static class BuilderSettings
+ {
+ private static readonly string PROGRAM_SAVED_PATH_BASE = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
+ private static readonly string PROGRAM_SAVED_PATH = Path.Combine(PROGRAM_SAVED_PATH_BASE, "UnrealBinaryBuilder");
+
+ private static readonly string PROGRAM_SETTINGS_PATH_BASE = Path.Combine(PROGRAM_SAVED_PATH, "Saved");
+ private static readonly string PROGRAM_SETTINGS_FILE_NAME = "Settings.json";
+
+ private static readonly string PROGRAM_LOG_PATH_BASE = Path.Combine(PROGRAM_SAVED_PATH, "Logs");
+ private static readonly string PROGRAM_LOG_FILE_NAME = "UnrealBinaryBuilder.log";
+
+ private static readonly string PROGRAM_SETTINGS_PATH = Path.Combine(PROGRAM_SETTINGS_PATH_BASE, PROGRAM_SETTINGS_FILE_NAME);
+ private static readonly string PROGRAM_LOG_PATH = Path.Combine(PROGRAM_LOG_PATH_BASE, PROGRAM_LOG_FILE_NAME);
+
+ private static readonly string DEFAULT_GIT_CUSTOM_CACHE_PATH = Path.Combine(PROGRAM_SAVED_PATH, "GitCache");
+
+ private static BuilderSettingsJson GenerateDefaultSettingsJSON()
+ {
+ BuilderSettingsJson BSJ = new BuilderSettingsJson();
+ BSJ.Theme = "Dark";
+ BSJ.bCheckForUpdatesAtStartup = true;
+ BSJ.bEnableDDCMessages = true;
+ BSJ.bEnableEngineBuildConfirmationMessage = true;
+ BSJ.bShowHTML5DeprecatedMessage = true;
+ BSJ.bShowConsoleDeprecatedMessage = true;
+
+ BSJ.EngineVersionIndex = 0;
+ BSJ.SetupBatFile = null;
+ BSJ.AutomationToolPath = null;
+ BSJ.CustomBuildFile = null;
+ BSJ.GameConfigurations = "Development;Shipping";
+ BSJ.CustomOptions = null;
+ BSJ.AnalyticsOverride = null;
+
+ BSJ.GitDependencyAll = true;
+ BSJ.GitDependencyPlatforms = new List {
+ new GitPlatform("Win64", true),
+ new GitPlatform("Win32", true),
+ new GitPlatform("Linux", false),
+ new GitPlatform("Android", false),
+ new GitPlatform("Mac", false),
+ new GitPlatform("IOS", false),
+ new GitPlatform("TVOS", false),
+ new GitPlatform("HoloLens", false),
+ new GitPlatform("Lumin", false) };
+ BSJ.GitDependencyThreads = 4;
+ BSJ.GitDependencyMaxRetries = 4;
+ BSJ.GitDependencyProxy = "";
+ BSJ.GitDependencyCache = DEFAULT_GIT_CUSTOM_CACHE_PATH;
+ BSJ.GitDependencyCacheMultiplier = 2.0;
+ BSJ.GitDependencyCacheDays = 7;
+ BSJ.GitDependencyEnableCache = true;
+
+ BSJ.bHostPlatformOnly = false;
+ BSJ.bHostPlatformEditorOnly = false;
+ BSJ.bWithWin64 = true;
+ BSJ.bWithWin32 = true;
+ BSJ.bWithMac = false;
+ BSJ.bWithLinux = false;
+ BSJ.bWithLinuxAArch64 = false;
+ BSJ.bWithAndroid = false;
+ BSJ.bWithIOS = false;
+ BSJ.bWithHTML5 = false;
+ BSJ.bWithTVOS = false;
+ BSJ.bWithSwitch = false;
+ BSJ.bWithPS4 = false;
+ BSJ.bWithXboxOne = false;
+ BSJ.bWithLumin = false;
+ BSJ.bWithHoloLens = false;
+
+ BSJ.bWithDDC = true;
+ BSJ.bHostPlatformDDCOnly = true;
+ BSJ.bSignExecutables = false;
+ BSJ.bEnableSymStore = false;
+ BSJ.bWithFullDebugInfo = false;
+ BSJ.bCleanBuild = false;
+ BSJ.bWithServer = false;
+ BSJ.bWithClient = false;
+ BSJ.bCompileDatasmithPlugins = false;
+ BSJ.bVS2019 = false;
+ BSJ.bShutdownPC = false;
+ BSJ.bShutdownIfBuildSuccess = false;
+ BSJ.bContinueToEngineBuild = true;
+
+ BSJ.bZipEngineBuild = false;
+ BSJ.bZipEngineDebug = false;
+ BSJ.bZipEngineDocumentation = true;
+ BSJ.bZipEngineExtras = true;
+ BSJ.bZipEngineFastCompression = true;
+ BSJ.bZipEngineFeaturePacks = true;
+ BSJ.bZipEnginePDB = true;
+ BSJ.bZipEngineSamples = true;
+ BSJ.bZipEngineSource = true;
+ BSJ.bZipEngineTemplates = true;
+ BSJ.ZipEnginePath = "";
+
+ string JsonOutput = JsonConvert.SerializeObject(BSJ, Formatting.Indented);
+ File.WriteAllText(PROGRAM_SETTINGS_PATH, JsonOutput);
+ LogEntry logEntry = new LogEntry();
+ logEntry.Message = $"New Settings file written to {PROGRAM_SETTINGS_PATH}.";
+ ((MainWindow)Application.Current.MainWindow).LogControl.AddLogEntry(logEntry, LogViewer.EMessageType.Info);
+ ((MainWindow)Application.Current.MainWindow).OpenSettingsBtn.IsEnabled = true;
+ return JsonConvert.DeserializeObject(JsonOutput);
+ }
+
+ public static BuilderSettingsJson GetSettingsFile(bool bLog = false)
+ {
+ if (Directory.Exists(PROGRAM_LOG_PATH_BASE))
+ {
+ ((MainWindow)Application.Current.MainWindow).OpenLogFolderBtn.IsEnabled = true;
+ }
+
+ BuilderSettingsJson ReturnValue = null;
+ if (File.Exists(PROGRAM_SETTINGS_PATH))
+ {
+ string JsonOutput = File.ReadAllText(PROGRAM_SETTINGS_PATH);
+ ReturnValue = JsonConvert.DeserializeObject(JsonOutput);
+ if (bLog)
+ {
+ LogEntry logEntry = new LogEntry();
+ logEntry.Message = $"Settings loaded from {PROGRAM_SETTINGS_PATH}.";
+ ((MainWindow)Application.Current.MainWindow).LogControl.AddLogEntry(logEntry, LogViewer.EMessageType.Info);
+ ((MainWindow)Application.Current.MainWindow).OpenSettingsBtn.IsEnabled = true;
+ }
+ }
+ else
+ {
+ if (Directory.Exists(PROGRAM_SAVED_PATH) == false)
+ {
+ Directory.CreateDirectory(PROGRAM_SAVED_PATH);
+ if (bLog)
+ {
+ LogEntry logEntry = new LogEntry();
+ logEntry.Message = $"Directory created: {PROGRAM_SAVED_PATH}.";
+ ((MainWindow)Application.Current.MainWindow).LogControl.AddLogEntry(logEntry, LogViewer.EMessageType.Info);
+ }
+ }
+
+ if (Directory.Exists(PROGRAM_SETTINGS_PATH_BASE) == false)
+ {
+ Directory.CreateDirectory(PROGRAM_SETTINGS_PATH_BASE);
+ if (bLog)
+ {
+ LogEntry logEntry = new LogEntry();
+ logEntry.Message = $"Directory created: {PROGRAM_SETTINGS_PATH_BASE}.";
+ ((MainWindow)Application.Current.MainWindow).LogControl.AddLogEntry(logEntry, LogViewer.EMessageType.Info);
+ }
+ }
+
+ if (Directory.Exists(DEFAULT_GIT_CUSTOM_CACHE_PATH) == false)
+ {
+ Directory.CreateDirectory(DEFAULT_GIT_CUSTOM_CACHE_PATH);
+ }
+
+ ReturnValue = GenerateDefaultSettingsJSON();
+ }
+ return ReturnValue;
+ }
+
+ public static void SaveSettings()
+ {
+ MainWindow mainWindow = ((MainWindow)Application.Current.MainWindow);
+ BuilderSettingsJson BSJ = new BuilderSettingsJson();
+ BSJ.Theme = mainWindow.CurrentTheme;
+ BSJ.bCheckForUpdatesAtStartup = mainWindow.SettingsJSON.bCheckForUpdatesAtStartup;
+ BSJ.EngineVersionIndex = mainWindow.EngineVersionSelection.SelectedIndex;
+ BSJ.SetupBatFile = mainWindow.SetupBatFilePath.Text;
+ BSJ.AutomationToolPath = mainWindow.AutomationToolPath.Text;
+ BSJ.CustomBuildFile = mainWindow.CustomBuildXMLFile.Text;
+ BSJ.GameConfigurations = mainWindow.GameConfigurations.Text;
+ BSJ.CustomOptions = mainWindow.CustomOptions.Text;
+ BSJ.AnalyticsOverride = mainWindow.AnalyticsOverride.Text;
+
+ BSJ.GitDependencyAll = (bool)mainWindow.bGitSyncAll.IsChecked;
+ BSJ.GitDependencyThreads = Convert.ToInt32(mainWindow.GitNumberOfThreads.Text);
+ BSJ.GitDependencyMaxRetries = Convert.ToInt32(mainWindow.GitNumberOfRetries.Text);
+ BSJ.GitDependencyProxy = "";
+ BSJ.GitDependencyCache = mainWindow.GitCachePath.Text;
+ BSJ.GitDependencyCacheMultiplier = Convert.ToDouble(mainWindow.GitCacheMultiplier.Text);
+ BSJ.GitDependencyCacheDays = Convert.ToInt32(mainWindow.GitCacheDays.Text);
+ BSJ.GitDependencyEnableCache = (bool)mainWindow.bGitEnableCache.IsChecked;
+
+ BSJ.bHostPlatformOnly = (bool)mainWindow.bHostPlatformOnly.IsChecked;
+ BSJ.bHostPlatformEditorOnly = (bool)mainWindow.bHostPlatformEditorOnly.IsChecked;
+ BSJ.bWithWin64 = (bool)mainWindow.bWithWin64.IsChecked;
+ BSJ.bWithWin32 = (bool)mainWindow.bWithWin32.IsChecked;
+ BSJ.bWithMac = (bool)mainWindow.bWithMac.IsChecked;
+ BSJ.bWithLinux = (bool)mainWindow.bWithLinux.IsChecked;
+ BSJ.bWithLinuxAArch64 = (bool)mainWindow.bWithLinuxAArch64.IsChecked;
+ BSJ.bWithAndroid = (bool)mainWindow.bWithAndroid.IsChecked;
+ BSJ.bWithIOS = (bool)mainWindow.bWithIOS.IsChecked;
+ BSJ.bWithHTML5 = (bool)mainWindow.bWithHTML5.IsChecked;
+ BSJ.bWithTVOS = (bool)mainWindow.bWithTVOS.IsChecked;
+ BSJ.bWithSwitch = (bool)mainWindow.bWithSwitch.IsChecked;
+ BSJ.bWithPS4 = (bool)mainWindow.bWithPS4.IsChecked;
+ BSJ.bWithXboxOne = (bool)mainWindow.bWithXboxOne.IsChecked;
+ BSJ.bWithLumin = (bool)mainWindow.bWithLumin.IsChecked;
+ BSJ.bWithHoloLens = (bool)mainWindow.bWithHololens.IsChecked;
+
+ BSJ.bWithDDC = (bool)mainWindow.bWithDDC.IsChecked;
+ BSJ.bHostPlatformDDCOnly = (bool)mainWindow.bHostPlatformDDCOnly.IsChecked;
+ BSJ.bSignExecutables = (bool)mainWindow.bSignExecutables.IsChecked;
+ BSJ.bEnableSymStore = (bool)mainWindow.bEnableSymStore.IsChecked;
+ BSJ.bWithFullDebugInfo = (bool)mainWindow.bWithFullDebugInfo.IsChecked;
+ BSJ.bCleanBuild = (bool)mainWindow.bCleanBuild.IsChecked;
+ BSJ.bWithServer = (bool)mainWindow.bWithServer.IsChecked;
+ BSJ.bWithClient = (bool)mainWindow.bWithClient.IsChecked;
+ BSJ.bCompileDatasmithPlugins = (bool)mainWindow.bCompileDatasmithPlugins.IsChecked;
+ BSJ.bVS2019 = (bool)mainWindow.bVS2019.IsChecked;
+ BSJ.bShutdownPC = (bool)mainWindow.bShutdownWindows.IsChecked;
+ BSJ.bShutdownIfBuildSuccess = (bool)mainWindow.bShutdownIfSuccess.IsChecked;
+ BSJ.bContinueToEngineBuild = (bool)mainWindow.bContinueToEngineBuild.IsChecked;
+
+ BSJ.bZipEngineBuild = (bool)mainWindow.bZipBuild.IsChecked;
+ BSJ.bZipEngineDebug = (bool)mainWindow.bIncludeDEBUG.IsChecked;
+ BSJ.bZipEngineDocumentation = (bool)mainWindow.bIncludeDocumentation.IsChecked;
+ BSJ.bZipEngineExtras = (bool)mainWindow.bIncludeExtras.IsChecked;
+ BSJ.bZipEngineFastCompression = (bool)mainWindow.bFastCompression.IsChecked;
+ BSJ.bZipEngineFeaturePacks = (bool)mainWindow.bIncludeFeaturePacks.IsChecked;
+ BSJ.bZipEnginePDB = (bool)mainWindow.bIncludePDB.IsChecked;
+ BSJ.bZipEngineSamples = (bool)mainWindow.bIncludeSamples.IsChecked;
+ BSJ.bZipEngineSource = (bool)mainWindow.bIncludeSource.IsChecked;
+ BSJ.bZipEngineTemplates = (bool)mainWindow.bIncludeTemplates.IsChecked;
+ BSJ.ZipEnginePath = mainWindow.ZipPath.Text;
+
+ List GitPlatformList = mainWindow.SettingsJSON.GitDependencyPlatforms;
+ IEnumerable ComboBoxCollection = GetChildrenOfType(mainWindow.PlatformStackPanelMain);
+ foreach (GitPlatform gp in GitPlatformList)
+ {
+ string ComboBoxName = $"Git{gp.Name}Platform";
+ foreach (ComboBox c in ComboBoxCollection)
+ {
+ if (c.Name.ToLower() == ComboBoxName.ToLower())
+ {
+ gp.bIsIncluded = c.SelectedIndex == 0;
+ break;
+ }
+ }
+ }
+ BSJ.GitDependencyPlatforms = GitPlatformList;
+
+ string JsonOutput = JsonConvert.SerializeObject(BSJ, Formatting.Indented);
+ File.WriteAllText(PROGRAM_SETTINGS_PATH, JsonOutput);
+ LogEntry logEntry = new LogEntry();
+ logEntry.Message = $"New Settings file written to {PROGRAM_SETTINGS_PATH}.";
+ mainWindow.LogControl.AddLogEntry(logEntry, LogViewer.EMessageType.Info);
+ }
+
+ public static void WriteToLogFile(string InContent)
+ {
+ if (Directory.Exists(PROGRAM_LOG_PATH_BASE) == false)
+ {
+ Directory.CreateDirectory(PROGRAM_LOG_PATH_BASE);
+ MainWindow mainWindow = ((MainWindow)Application.Current.MainWindow);
+ mainWindow.OpenLogFolderBtn.IsEnabled = true;
+ }
+ File.WriteAllText(PROGRAM_LOG_PATH, InContent);
+ }
+
+ public static void UpdatePlatformInclusion(string InPlatform, bool bIncluded)
+ {
+ BuilderSettingsJson BSJ = GetSettingsFile();
+ foreach (GitPlatform gp in BSJ.GitDependencyPlatforms)
+ {
+ if (gp.Name.ToLower() == InPlatform.ToLower())
+ {
+ gp.bIsIncluded = bIncluded;
+ break;
+ }
+ }
+
+ string JsonOutput = JsonConvert.SerializeObject(BSJ, Formatting.Indented);
+ File.WriteAllText(PROGRAM_SETTINGS_PATH, JsonOutput);
+ }
+
+ public static void LoadInitialValues()
+ {
+ MainWindow mainWindow = ((MainWindow)Application.Current.MainWindow);
+ List GitPlatformList = mainWindow.SettingsJSON.GitDependencyPlatforms;
+ IEnumerable ComboBoxCollection = GetChildrenOfType(mainWindow.PlatformStackPanelMain);
+
+ foreach (GitPlatform gp in GitPlatformList)
+ {
+ string ComboBoxName = $"Git{gp.Name}Platform";
+ foreach (ComboBox c in ComboBoxCollection)
+ {
+ if (c.Name.ToLower() == ComboBoxName.ToLower())
+ {
+ c.SelectedIndex = gp.bIsIncluded ? 0 : 1;
+ break;
+ }
+ }
+ }
+ }
+
+ public static void OpenLogFolder()
+ {
+ if (Directory.Exists(PROGRAM_LOG_PATH_BASE))
+ {
+ Process.Start("explorer.exe", PROGRAM_LOG_PATH_BASE);
+ }
+ }
+
+ public static void OpenSettings()
+ {
+ if (File.Exists(PROGRAM_SETTINGS_PATH))
+ {
+ Process.Start("notepad.exe", PROGRAM_SETTINGS_PATH);
+ }
+ }
+
+ private static IEnumerable GetChildrenOfType(DependencyObject dependencyObject) where T : DependencyObject
+ {
+ if (dependencyObject != null)
+ {
+ for (int i = 0; i < VisualTreeHelper.GetChildrenCount(dependencyObject); i++)
+ {
+ DependencyObject child = VisualTreeHelper.GetChild(dependencyObject, i);
+ if (child != null && child is T)
+ {
+ yield return (T)child;
+ }
+
+ foreach (T childOfChild in GetChildrenOfType(child))
+ {
+ yield return childOfChild;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Unreal Binary Builder/GameAnalyticsCSharp.cs b/UnrealBinaryBuilder/Classes/GameAnalyticsCSharp.cs
similarity index 83%
rename from Unreal Binary Builder/GameAnalyticsCSharp.cs
rename to UnrealBinaryBuilder/Classes/GameAnalyticsCSharp.cs
index b02d082..81a2468 100644
--- a/Unreal Binary Builder/GameAnalyticsCSharp.cs
+++ b/UnrealBinaryBuilder/Classes/GameAnalyticsCSharp.cs
@@ -1,10 +1,10 @@
using GameAnalyticsSDK.Net;
-namespace Unreal_Binary_Builder
+namespace UnrealBinaryBuilder.Classes
{
public static class GameAnalyticsCSharp
{
- // PLEASE DO NOT CHANGE THIS. IF YOU DON'T WANT ANALYTICS, SET THEM TO null ///////////////////
+ // Please DO NOT change this. If you don't want Analytics, set both GAME_KEY and SECRET_KEY to null ///////////////////
private static readonly string GAME_KEY = "33551f8809806eaac2ad5be41c403c8d"; // null
private static readonly string SECRET_KEY = "38986827a8ff55c879424d4bea7cfe8e99b44b03"; // null
///////////////////////////////////////////////////////////////////////////////////////////////
@@ -20,12 +20,21 @@ public static void InitializeGameAnalytics(string InProductVersion, MainWindow I
// https://gameanalytics.com/docs/item/c-sharp-sdk#initializing
GameAnalytics.Initialize(GAME_KEY, SECRET_KEY);
mainWindow = InMainWindow;
+ mainWindow.AddLogEntry("UE4 Binary Builder Analytics Initialized.");
+#if DEBUG
+ GameAnalytics.AddDesignEvent("Program:Start:Debug");
+#else
+ GameAnalytics.AddDesignEvent("Program:Start:Release");
+#endif
}
}
public static void EndSession()
{
- GameAnalytics.EndSession();
+ if (mainWindow != null)
+ {
+ GameAnalytics.EndSession();
+ }
}
public static void AddDesignEvent(string InMessage)
@@ -33,7 +42,9 @@ public static void AddDesignEvent(string InMessage)
if (mainWindow != null)
{
GameAnalytics.AddDesignEvent(InMessage);
+#if DEBUG
mainWindow.AddLogEntry($"UE4 Binary Builder Analytics (Design): {InMessage}");
+#endif
}
}
@@ -42,7 +53,9 @@ public static void AddProgressStart(string InProgression01)
if (mainWindow != null)
{
GameAnalytics.AddProgressionEvent(EGAProgressionStatus.Start, InProgression01);
+#if DEBUG
mainWindow.AddLogEntry($"UE4 Binary Builder Analytics (Progress Start): {InProgression01}");
+#endif
}
}
@@ -51,7 +64,9 @@ public static void AddProgressStart(string InProgression01, string InProgression
if (mainWindow != null)
{
GameAnalytics.AddProgressionEvent(EGAProgressionStatus.Start, InProgression01, InProgression02);
+#if DEBUG
mainWindow.AddLogEntry($"UE4 Binary Builder Analytics (Progress Start): {InProgression01}::{InProgression02}");
+#endif
}
}
@@ -60,7 +75,9 @@ public static void AddProgressEnd(string InProgression01, bool bIsFail = false)
if (mainWindow != null)
{
GameAnalytics.AddProgressionEvent(bIsFail ? EGAProgressionStatus.Fail : EGAProgressionStatus.Complete, InProgression01);
+#if DEBUG
mainWindow.AddLogEntry($"UE4 Binary Builder Analytics (Progress End): {InProgression01}");
+#endif
}
}
@@ -69,7 +86,9 @@ public static void AddProgressEnd(string InProgression01, string InProgression02
if (mainWindow != null)
{
GameAnalytics.AddProgressionEvent(bIsFail ? EGAProgressionStatus.Fail : EGAProgressionStatus.Complete, InProgression01, InProgression02);
+#if DEBUG
mainWindow.AddLogEntry($"UE4 Binary Builder Analytics (Progress End): {InProgression01}::{InProgression02}");
+#endif
}
}
@@ -78,7 +97,9 @@ public static void LogEvent(string InMessage, EGAErrorSeverity InLogLevel)
if (mainWindow != null)
{
GameAnalytics.AddErrorEvent(InLogLevel, InMessage);
+#if DEBUG
mainWindow.AddLogEntry($"UE4 Binary Builder Analytics (Log): {InMessage}");
+#endif
}
}
}
diff --git a/UnrealBinaryBuilder/Classes/Plugins.cs b/UnrealBinaryBuilder/Classes/Plugins.cs
new file mode 100644
index 0000000..bf559fc
--- /dev/null
+++ b/UnrealBinaryBuilder/Classes/Plugins.cs
@@ -0,0 +1,41 @@
+
+using System;
+using System.Collections.Generic;
+using Microsoft.Win32;
+
+namespace UnrealBinaryBuilder.Classes
+{
+ public class Plugins
+ {
+ public static IDictionary GetInstalledEngines()
+ {
+ IDictionary ReturnValue = new Dictionary();
+
+ RegistryKey EngineInstallations = Registry.LocalMachine.OpenSubKey("Software\\EpicGames\\Unreal Engine");
+ string[] InstalledEngines = EngineInstallations.GetSubKeyNames();
+ foreach (var s in InstalledEngines)
+ {
+ RegistryKey InstalledDirectoryKey = EngineInstallations.OpenSubKey(s);
+ Object o = InstalledDirectoryKey.GetValue("InstalledDirectory");
+ ReturnValue.Add(s, o as string);
+ }
+
+ return ReturnValue;
+ }
+ }
+
+ class UE4PluginJson
+ {
+ public string FriendlyName { get; set; }
+ public string Description { get; set; }
+ public string MarketplaceURL { get; set; }
+ public bool IsBetaVersion { get; set; }
+ public bool IsExperimentalVersion { get; set; }
+ public IList Modules { get; set; }
+ }
+
+ class UE4PluginModule
+ {
+ public IList WhitelistPlatforms { get; set; }
+ }
+}
diff --git a/UnrealBinaryBuilder/Classes/PostBuildSettings.cs b/UnrealBinaryBuilder/Classes/PostBuildSettings.cs
new file mode 100644
index 0000000..afdb006
--- /dev/null
+++ b/UnrealBinaryBuilder/Classes/PostBuildSettings.cs
@@ -0,0 +1,386 @@
+using Ionic.Zip;
+using Ionic.Zlib;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Security.AccessControl;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using UnrealBinaryBuilder.UserControls;
+
+namespace UnrealBinaryBuilder.Classes
+{
+ public class PostBuildSettings
+ {
+ Task ZippingTask = null;
+ static CancellationTokenSource ZipCancelTokenSource = new CancellationTokenSource();
+ CancellationToken ZipCancelToken = ZipCancelTokenSource.Token;
+ MainWindow mainWindow = null;
+
+ public PostBuildSettings(MainWindow _mainWindow)
+ {
+ mainWindow = _mainWindow;
+ }
+
+ public bool CanSaveToZip()
+ {
+ return ShouldSaveToZip() && DirectoryIsWritable(mainWindow.ZipPath.Text);
+ }
+
+ public bool ShouldSaveToZip()
+ {
+ return (bool)mainWindow.bZipBuild.IsChecked && !string.IsNullOrEmpty(mainWindow.ZipPath.Text);
+ }
+
+ public bool DirectoryIsWritable(string DirectoryPath)
+ {
+ DirectoryInfo ZipDirectory = new FileInfo(DirectoryPath).Directory;
+ bool bDirectoryExists = (ZipDirectory != null) && ZipDirectory.Exists;
+ bool bHasWriteAccess = false;
+ if (bDirectoryExists)
+ {
+ try
+ {
+ AuthorizationRuleCollection collection = new DirectoryInfo(ZipDirectory.FullName).GetAccessControl().GetAccessRules(true, true, typeof(System.Security.Principal.NTAccount));
+ foreach (FileSystemAccessRule rule in collection)
+ {
+ if (rule.AccessControlType == AccessControlType.Allow)
+ {
+ bHasWriteAccess = true;
+ break;
+ }
+ }
+ }
+ catch (Exception)
+ {
+
+ }
+ }
+
+ return bDirectoryExists && bHasWriteAccess;
+ }
+
+ public void PrepareToSave()
+ {
+ ZipCancelTokenSource.Dispose();
+ ZipCancelTokenSource = new CancellationTokenSource();
+ ZipCancelToken = ZipCancelTokenSource.Token;
+ }
+
+ public async void SavePluginToZip(PluginCard pluginCard, string ZipLocationToSave, bool bZipForMarketplace)
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ GameAnalyticsCSharp.AddProgressStart("PluginZip", "Progress");
+ });
+
+ CompressionLevel CL = CompressionLevel.BestSpeed;
+ ZippingTask = Task.Run(() =>
+ {
+ using (var zipFile = new ZipFile { CompressionLevel = CL })
+ {
+ IEnumerable files = Directory.EnumerateFiles(pluginCard.DestinationPath, "*.*", SearchOption.AllDirectories);
+ List filesToAdd = new List();
+
+ foreach (string file in files)
+ {
+ bool bSkipFile = false;
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ string CurrentFilePath = Path.GetFullPath(file).ToLower();
+ if (bZipForMarketplace && (CurrentFilePath.Contains(@"\binaries\") || CurrentFilePath.Contains(@"\intermediate\")))
+ {
+ bSkipFile = true;
+ }
+
+ if (bSkipFile == false)
+ {
+ filesToAdd.Add(file);
+ }
+ });
+ }
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ pluginCard.ZipProgressbar.IsIndeterminate = false;
+ pluginCard.ZipProgressbar.Value = 0;
+ pluginCard.ZipProgressbar.Maximum = filesToAdd.Count;
+ });
+
+ foreach (string file in filesToAdd)
+ {
+ zipFile.AddFile(file, Path.GetDirectoryName(file).Replace(pluginCard.DestinationPath, string.Empty));
+ }
+
+ zipFile.SaveProgress += (o, args) =>
+ {
+ if (args.EventType == ZipProgressEventType.Saving_BeforeWriteEntry)
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ pluginCard.ZipProgressbar.Value = Convert.ToInt32(args.EntriesSaved + 1);
+ });
+ }
+ else if (args.EventType == ZipProgressEventType.Saving_Completed)
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ GameAnalyticsCSharp.AddProgressEnd("PluginZip", "Progress");
+ });
+ }
+ };
+
+ zipFile.UseZip64WhenSaving = Zip64Option.Always;
+ zipFile.Save(ZipLocationToSave);
+ Application.Current.Dispatcher.Invoke(() => { mainWindow.AddLogEntry($"Plugin zipped and saved to: {ZipLocationToSave}"); });
+ }
+ });
+
+ await ZippingTask;
+ }
+
+ public async void SaveToZip(string InBuildDirectory, string ZipLocationToSave)
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ GameAnalyticsCSharp.AddProgressStart("Zip", "Progress");
+ mainWindow.TotalResult.Content = "Hold on...Stats will be displayed soon.";
+ mainWindow.CurrentFileSaving.Content = "Waiting...";
+ mainWindow.FileSaveState.Content = "State: Preparing...";
+ mainWindow.ZipStatusLabel.Visibility = Visibility.Collapsed;
+ mainWindow.ZipStausStackPanel.Visibility = Visibility.Visible;
+ });
+
+ CompressionLevel CL = (bool)mainWindow.bFastCompression.IsChecked ? CompressionLevel.BestSpeed : CompressionLevel.BestCompression;
+
+ ZippingTask = Task.Run(() =>
+ {
+ using (var zipFile = new ZipFile { CompressionLevel = CL })
+ {
+ Application.Current.Dispatcher.Invoke(() => { mainWindow.FileSaveState.Content = "State: Finding files..."; });
+ IEnumerable files = Directory.EnumerateFiles(InBuildDirectory, "*.*", SearchOption.AllDirectories);
+
+ ZipCancelToken.ThrowIfCancellationRequested();
+
+ List filesToAdd = new List();
+
+ int SkippedFiles = 0;
+ int AddedFiles = 0;
+ int TotalFiles = files.Count();
+
+ long TotalSize = 0;
+ long TotalSizeToZip = 0;
+ long SkippedSize = 0;
+ string TotalSizeInString = "0B";
+ string TotalSizeToZipInString = "0B";
+ string SkippedSizeToZipInString = "0B";
+ Application.Current.Dispatcher.Invoke(() => { mainWindow.FileSaveState.Content = "State: Preparing files for zipping..."; });
+ foreach (string file in files)
+ {
+ bool bSkipFile = false;
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ string CurrentFilePath = Path.GetFullPath(file).ToLower();
+ if (mainWindow.bIncludePDB.IsChecked == false && Path.GetExtension(file).ToLower() == ".pdb")
+ {
+ bSkipFile = true;
+ }
+
+ if (mainWindow.bIncludeDEBUG.IsChecked == false && Path.GetExtension(file).ToLower() == ".debug")
+ {
+ bSkipFile = true;
+ }
+
+ if (mainWindow.bIncludeDocumentation.IsChecked == false && CurrentFilePath.Contains(@"\source\") == false && CurrentFilePath.Contains(@"\documentation\"))
+ {
+ bSkipFile = true;
+ }
+
+ if (mainWindow.bIncludeExtras.IsChecked == false && CurrentFilePath.Contains(@"\extras\redist\") == false && CurrentFilePath.Contains(@"\extras\"))
+ {
+ bSkipFile = true;
+ }
+
+ if (mainWindow.bIncludeSource.IsChecked == false && CurrentFilePath.Contains(@"\source\developer\"))
+ {
+ bSkipFile = true;
+ }
+
+ if (mainWindow.bIncludeSource.IsChecked == false && CurrentFilePath.Contains(@"\source\editor\"))
+ {
+ bSkipFile = true;
+ }
+
+ if (mainWindow.bIncludeSource.IsChecked == false && CurrentFilePath.Contains(@"\source\programs\"))
+ {
+ bSkipFile = true;
+ }
+
+ if (mainWindow.bIncludeSource.IsChecked == false && CurrentFilePath.Contains(@"\source\runtime\"))
+ {
+ bSkipFile = true;
+ }
+
+ if (mainWindow.bIncludeSource.IsChecked == false && CurrentFilePath.Contains(@"\source\thirdparty\"))
+ {
+ bSkipFile = true;
+ }
+
+ if (mainWindow.bIncludeFeaturePacks.IsChecked == false && CurrentFilePath.Contains(@"\featurepacks\"))
+ {
+ bSkipFile = true;
+ }
+
+ if (mainWindow.bIncludeSamples.IsChecked == false && CurrentFilePath.Contains(@"\samples\"))
+ {
+ bSkipFile = true;
+ }
+
+ if (mainWindow.bIncludeTemplates.IsChecked == false && CurrentFilePath.Contains(@"\source\") == false && CurrentFilePath.Contains(@"\content\editor") == false && CurrentFilePath.Contains(@"\templates\"))
+ {
+ bSkipFile = true;
+ }
+
+ });
+
+ TotalSize += new FileInfo(file).Length;
+ TotalSizeInString = BytesToString(TotalSize);
+ if (bSkipFile)
+ {
+ SkippedFiles++;
+ SkippedSize += new FileInfo(file).Length;
+ SkippedSizeToZipInString = BytesToString(SkippedSize);
+ //Application.Current.Dispatcher.Invoke(() => { mainWindow.AddZipLog($"File Skipped: {file}", MainWindow.ZipLogInclusionType.FileSkipped); });
+ }
+ else
+ {
+ filesToAdd.Add(file);
+ AddedFiles++;
+ TotalSizeToZip += new FileInfo(file).Length;
+ TotalSizeToZipInString = BytesToString(TotalSizeToZip);
+ //Application.Current.Dispatcher.Invoke(() => { mainWindow.AddZipLog($"File Included: {file}", MainWindow.ZipLogInclusionType.FileIncluded); });
+ }
+
+ Application.Current.Dispatcher.Invoke(() => { mainWindow.CurrentFileSaving.Content = string.Format("Total: {0}. Added: {1}. Skipped: {2}", TotalFiles, AddedFiles, SkippedFiles); });
+ ZipCancelToken.ThrowIfCancellationRequested();
+ }
+
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ mainWindow.TotalResult.Content = string.Format("Total Size: {0}. To Zip: {1}. Skipped: {2}", TotalSizeInString, TotalSizeToZipInString, SkippedSizeToZipInString);
+ mainWindow.FileSaveState.Content = "State: Verifying...";
+ mainWindow.OverallProgressbar.Maximum = filesToAdd.Count;
+ });
+
+ foreach (string file in filesToAdd)
+ {
+ ZipCancelToken.ThrowIfCancellationRequested();
+ zipFile.AddFile(file, Path.GetDirectoryName(file).Replace(InBuildDirectory, string.Empty));
+ }
+
+ long ProcessedSize = 0;
+ string ProcessSizeInString = "0B";
+
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ mainWindow.OverallProgressbar.IsIndeterminate = false;
+ mainWindow.FileProgressbar.IsIndeterminate = false;
+ });
+
+ zipFile.SaveProgress += (o, args) =>
+ {
+ ZipCancelToken.ThrowIfCancellationRequested();
+ if (args.EventType == ZipProgressEventType.Saving_BeforeWriteEntry)
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ mainWindow.FileSaveState.Content = "State: Begin Writing...";
+ mainWindow.CurrentFileSaving.Content = string.Format("Saving File: {0} ({1}/{2})", Path.GetFileName(args.CurrentEntry.FileName), (args.EntriesSaved + 1), (args.EntriesTotal));
+ mainWindow.OverallProgressbar.Value = Convert.ToInt32(args.EntriesSaved + 1);
+ });
+ }
+ else if (args.EventType == ZipProgressEventType.Saving_EntryBytesRead)
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ mainWindow.FileSaveState.Content = "State: Writing...";
+ mainWindow.FileProgressbar.Value = (int)((args.BytesTransferred * 100) / args.TotalBytesToTransfer);
+ });
+ }
+ else if (args.EventType == ZipProgressEventType.Saving_AfterWriteEntry)
+ {
+ ProcessedSize += new FileInfo(Path.Combine(InBuildDirectory, args.CurrentEntry.FileName)).Length;
+ ProcessSizeInString = BytesToString(ProcessedSize);
+ Application.Current.Dispatcher.Invoke(() => { mainWindow.TotalResult.Content = string.Format("Total Size: {0}. To Zip: {1}. Skipped: {2}. Processed: {3}", TotalSizeInString, TotalSizeToZipInString, SkippedSizeToZipInString, ProcessSizeInString); });
+ }
+ else if (args.EventType == ZipProgressEventType.Saving_Started)
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ mainWindow.CurrentFileSaving.Content = "";
+ mainWindow.FileSaveState.Content = string.Format("State: Saving zip file ({0} files) to {1}", TotalFiles, mainWindow.ZipPath.Text);
+ });
+ }
+ else if (args.EventType == ZipProgressEventType.Saving_Completed)
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ GameAnalyticsCSharp.AddProgressEnd("Zip", "Progress");
+ mainWindow.TryShutdown();
+ });
+ }
+ };
+
+
+ zipFile.UseZip64WhenSaving = Zip64Option.Always;
+ zipFile.Save(ZipLocationToSave);
+ Application.Current.Dispatcher.Invoke(() => { mainWindow.AddLogEntry($"Done zipping. File location: {ZipLocationToSave}"); });
+ }
+ }, ZipCancelToken);
+
+ try
+ {
+ await ZippingTask;
+ }
+ catch (OperationCanceledException e)
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ mainWindow.CurrentFileSaving.Content = "";
+ mainWindow.FileSaveState.Content = "Operation canceled.";
+ mainWindow.AddLogEntry($"{nameof(OperationCanceledException)} with message: {e.Message}");
+ });
+ }
+ finally
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ mainWindow.CancelZipping.Content = "Cancel Zipping";
+ mainWindow.CancelZipping.IsEnabled = true;
+ });
+ }
+ }
+
+ public void CancelTask()
+ {
+ GameAnalyticsCSharp.AddProgressEnd("Zip", "Progress", true);
+ mainWindow.CancelZipping.Content = "Canceling. Please wait...";
+ mainWindow.CancelZipping.IsEnabled = false;
+ ZipCancelTokenSource.Cancel();
+ }
+
+ static string BytesToString(long byteCount)
+ {
+ string[] suf = { "B", "KB", "MB", "GB", "TB" };
+ if (byteCount == 0)
+ {
+ return "0" + suf[0];
+ }
+ long bytes = Math.Abs(byteCount);
+ int place = Convert.ToInt32(Math.Floor(Math.Log(bytes, 1024)));
+ double num = Math.Round(bytes / Math.Pow(1024, place), 1);
+ return (Math.Sign(byteCount) * num).ToString() + suf[place];
+ }
+ }
+}
diff --git a/UnrealBinaryBuilder/MainWindow.xaml b/UnrealBinaryBuilder/MainWindow.xaml
new file mode 100644
index 0000000..07461ed
--- /dev/null
+++ b/UnrealBinaryBuilder/MainWindow.xaml
@@ -0,0 +1,363 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UnrealBinaryBuilder/MainWindow.xaml.cs b/UnrealBinaryBuilder/MainWindow.xaml.cs
new file mode 100644
index 0000000..a6c8eb1
--- /dev/null
+++ b/UnrealBinaryBuilder/MainWindow.xaml.cs
@@ -0,0 +1,1427 @@
+
+using HandyControl.Controls;
+using HandyControl.Data;
+using HandyControl.Themes;
+using HandyControl.Tools;
+using Microsoft.Win32;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Text.RegularExpressions;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Threading;
+using UnrealBinaryBuilder.Classes;
+using UnrealBinaryBuilder.UserControls;
+using UnrealBinaryBuilderUpdater;
+
+namespace UnrealBinaryBuilder
+{
+ public partial class MainWindow
+ {
+ private static readonly string PRODUCT_VERSION = "3.0";
+
+ private static readonly string SetupBatFileName = "Setup.bat";
+ private static readonly string GenerateProjectBatFileName = "GenerateProjectFiles.bat";
+ private static readonly string AUTOMATION_TOOL_NAME = "AutomationToolLauncher";
+ private static readonly string DEFAULT_BUILD_XML_FILE = "Engine/Build/InstalledEngineBuild.xml";
+ private Process CurrentProcess = null;
+
+ private int NumErrors = 0;
+ private int NumWarnings = 0;
+
+ private int CompiledFiles = 0;
+ private int CompiledFilesTotal = 0;
+
+ private bool bIsBuilding = false;
+ private bool bLastBuildSuccess = false;
+
+ private string LogMessage = null;
+ private string FinalBuildPath = null;
+
+ public string CurrentTheme = null;
+ public PostBuildSettings postBuildSettings = null;
+
+ private readonly Stopwatch StopwatchTimer = new Stopwatch();
+ private readonly DispatcherTimer DispatchTimer = new DispatcherTimer();
+
+ public BuilderSettingsJson SettingsJSON = null;
+
+ private string AutomationExePath = null;
+
+ private PluginCard CurrentPluginBeingBuilt = null;
+ private List PluginBuildEnginePath = new List();
+ private Dialog aboutDialog = null;
+ private Dialog downloadDialog = null;
+ private DownloadDialog downloadDialogWindow = null;
+ private static UBBUpdater unrealBinaryBuilderUpdater = null;
+ private bool bUpdateAvailable = false;
+
+ public enum ZipLogInclusionType
+ {
+ FileIncluded,
+ FileSkipped,
+ ExtensionSkipped
+ }
+
+ private enum CurrentProcessType
+ {
+ None,
+ SetupBat,
+ GenerateProjectFiles,
+ BuildAutomationTool,
+ BuildUnrealEngine,
+ BuildPlugin
+ }
+
+ private CurrentProcessType currentProcessType = CurrentProcessType.None;
+
+ public MainWindow()
+ {
+ InitializeComponent();
+ //GameAnalyticsCSharp.InitializeGameAnalytics(PRODUCT_VERSION, this);
+ AddLogEntry($"Welcome to Unreal Binary Builder v{PRODUCT_VERSION}");
+ PluginQueueBtn.IsEnabled = false;
+ postBuildSettings = new PostBuildSettings(this);
+ SettingsJSON = BuilderSettings.GetSettingsFile(true);
+ BuilderSettings.LoadInitialValues();
+ DataContext = SettingsJSON;
+ bUse2019Compiler.IsEnabled = false;
+
+ foreach (var p in Plugins.GetInstalledEngines())
+ {
+ string RunUATFile = Path.Combine(p.Value, "Engine", "Build", "BatchFiles", "RunUAT.bat");
+ if (File.Exists(RunUATFile))
+ {
+ PluginEngineVersionSelection.Items.Add(p.Key);
+ PluginBuildEnginePath.Add(p.Value);
+ }
+ }
+
+ if (File.Exists(AutomationExePath) && Path.GetFileNameWithoutExtension(AutomationExePath) == AUTOMATION_TOOL_NAME)
+ {
+ BuildRocketUE.IsEnabled = true;
+ }
+
+ ChangeStatusLabel("Idle.");
+
+ DispatchTimer.Tick += new EventHandler(DispatchTimer_Tick);
+ DispatchTimer.Interval = new TimeSpan(0, 0, 1);
+
+ CurrentTheme = SettingsJSON.Theme;
+ if (CurrentTheme.ToLower() == "violet")
+ {
+ ShowToastMessage("Violet theme is not fully supported yet.", LogViewer.EMessageType.Warning, true, false, "Important", 4);
+ UpdateSkin(SkinType.Violet);
+ }
+ else if (CurrentTheme.ToLower() == "dark")
+ {
+ UpdateSkin(SkinType.Dark);
+ }
+ else
+ {
+ ShowToastMessage("Default theme is not fully supported yet.", LogViewer.EMessageType.Warning, true, false, "Important", 4);
+ UpdateSkin(SkinType.Default);
+ }
+ ZipStatusLabel.Visibility = Visibility.Visible;
+ ZipStausStackPanel.Visibility = Visibility.Collapsed;
+
+ if (SettingsJSON.bCheckForUpdatesAtStartup)
+ {
+ CheckForUpdates();
+ }
+ }
+
+ public static void OpenBrowser(string InURL)
+ {
+ InURL = InURL.Replace("&", "^&");
+ Process.Start(new ProcessStartInfo("cmd", $"/c start {InURL}") { CreateNoWindow = true });
+ }
+
+ private void CheckForUpdates()
+ {
+ if (CurrentProcess == null)
+ {
+ CheckUpdateBtn.IsEnabled = false;
+ CheckUpdateBtn.Content = "Checking...";
+ if (unrealBinaryBuilderUpdater == null)
+ {
+ unrealBinaryBuilderUpdater = new UBBUpdater();
+ }
+
+ GameAnalyticsCSharp.AddDesignEvent("Update:Check");
+ unrealBinaryBuilderUpdater.SilentUpdateFinishedEventHandler += OnUpdateCheck;
+ unrealBinaryBuilderUpdater.CheckForUpdatesSilently();
+ }
+ }
+
+ public void ShowToastMessage(string Message, LogViewer.EMessageType ToastType = LogViewer.EMessageType.Info, bool bShowCloseButton = true, bool bStaysOpen = false, string Token = "", int WaitTime = 3)
+ {
+ Growl.Clear(Token);
+ GrowlInfo growlInfo = new GrowlInfo()
+ {
+ ShowDateTime = false,
+ ShowCloseButton = bShowCloseButton,
+ StaysOpen = bStaysOpen,
+ Token = Token,
+ WaitTime = WaitTime
+ };
+
+ growlInfo.Message = Message;
+ switch (ToastType)
+ {
+ case LogViewer.EMessageType.Info:
+ Growl.Info(growlInfo);
+ break;
+ case LogViewer.EMessageType.Warning:
+ Growl.Warning(growlInfo);
+ break;
+ case LogViewer.EMessageType.Error:
+ Growl.Error(growlInfo);
+ break;
+ }
+ }
+
+ private void OnUpdateCheck(object sender, UpdateProgressFinishedEventArgs e)
+ {
+ CheckUpdateBtn.Content = "Check for Update";
+ switch (e.appUpdateCheckStatus)
+ {
+ case AppUpdateCheckStatus.UpdateAvailable:
+ bUpdateAvailable = true;
+ CheckUpdateBtn.Content = "Install Update!";
+ ShowToastMessage("A new update is available!", LogViewer.EMessageType.Info, true, false, "", 2);
+ break;
+ case AppUpdateCheckStatus.NoUpdate:
+ ShowToastMessage("You are running the latest version.", LogViewer.EMessageType.Info, true, false, "", 2);
+ break;
+ case AppUpdateCheckStatus.CouldNotDetermine:
+ ShowToastMessage("Failed to determine update settings. Please try again later.", LogViewer.EMessageType.Error);
+ break;
+ case AppUpdateCheckStatus.UserSkip:
+ break;
+ }
+ CheckUpdateBtn.IsEnabled = true;
+ }
+
+ private void ChangeStatusLabel(string InStatus)
+ {
+ StatusLabel.Text = GetCurrentProcessName() != null ? $"Status: Running [{GetCurrentProcessName()} - {InStatus}]" : $"Status: {InStatus}";
+ }
+
+ private void ChangeStepLabel(string current, string total)
+ {
+ Dispatcher.Invoke(() => { StepLabel.Text = $"Step: [{current}/{total}] "; });
+ }
+
+ private string GetConditionalString(bool? bCondition)
+ {
+ return (bool)bCondition ? "true" : "false";
+ }
+
+ private void DispatchTimer_Tick(object sender, EventArgs e)
+ {
+ ChangeStatusLabel(string.Format("Building... Time Elapsed: {0:hh\\:mm\\:ss}", StopwatchTimer.Elapsed));
+ }
+
+ public void AddZipLog(string InMessage, ZipLogInclusionType InType)
+ {
+ LogEntry logEntry = new LogEntry();
+ logEntry.Message = InMessage;
+ LogControl.AddZipLog(logEntry, InType);
+ }
+
+ public void AddLogEntry(string InMessage, bool bIsError = false)
+ {
+ if (InMessage != null)
+ {
+ LogEntry logEntry = new LogEntry();
+ logEntry.Message = InMessage;
+
+ LogViewer.EMessageType InMessageType = bIsError ? LogViewer.EMessageType.Error : LogViewer.EMessageType.Info;
+
+ if (bIsError == false)
+ {
+ const string StepPattern = @"\*{6} \[(\d+)\/(\d+)\]";
+ const string WarningPattern = @"warning|\*\*\* Unable to determine ";
+ const string DebugPattern = @".+\*\s\D\d\D\d\D\s\w+|.+\*\sFor\sUE4";
+ const string ErrorPattern = @"Error_Unknown|ERROR|exited with code 1";
+ const string ProcessedFilesPattern = @"\w.+\.(cpp|cc|c|h|ispc)";
+
+ Regex StepRgx = new Regex(StepPattern, RegexOptions.IgnoreCase);
+ Regex WarningRgx = new Regex(WarningPattern, RegexOptions.IgnoreCase);
+ Regex DebugRgx = new Regex(DebugPattern, RegexOptions.IgnoreCase);
+ Regex ErrorRgx = new Regex(ErrorPattern, RegexOptions.IgnoreCase);
+ Regex ProcessedFilesRgx = new Regex(ProcessedFilesPattern, RegexOptions.IgnoreCase);
+
+ if (StepRgx.IsMatch(InMessage))
+ {
+ GroupCollection captures = StepRgx.Match(InMessage).Groups;
+ ChangeStepLabel(captures[1].Value, captures[2].Value);
+ CompiledFiles = 0;
+ }
+
+ if (ProcessedFilesRgx.IsMatch(InMessage))
+ {
+ CompiledFiles++;
+ CompiledFilesTotal++;
+ Dispatcher.Invoke(() =>
+ {
+ ProcessedFilesLabel.Text = $"[Compiled: {CompiledFiles}. Total: {CompiledFilesTotal}]";
+ });
+ }
+
+ if (WarningRgx.IsMatch(InMessage))
+ {
+ NumWarnings++;
+ InMessageType = LogViewer.EMessageType.Warning;
+ }
+ else if (ErrorRgx.IsMatch(InMessage))
+ {
+ NumErrors++;
+ InMessageType = LogViewer.EMessageType.Error;
+ }
+ else if (DebugRgx.IsMatch(InMessage))
+ {
+ InMessageType = LogViewer.EMessageType.Debug;
+ }
+ }
+
+ LogControl.AddLogEntry(logEntry, InMessageType);
+ LogMessage += InMessage + "\r\n";
+ }
+ }
+
+ private void Internal_ShutdownWindows()
+ {
+ Process.Start("shutdown", "/s /t 5");
+ Application.Current.Shutdown();
+ }
+
+ private void SaveAllSettings()
+ {
+ BuilderSettings.SaveSettings();
+ }
+
+ private void UnrealBinaryBuilderWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
+ {
+ if (bIsBuilding)
+ {
+ if (HandyControl.Controls.MessageBox.Show($"{GetCurrentProcessName()} is still running. Would you like to stop it and exit?", "Build in progress", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
+ {
+ GameAnalyticsCSharp.AddDesignEvent($"Build:{GetCurrentProcessName()}:Killed:ExitProgram");
+ CurrentProcess.Kill();
+ CurrentProcess.Close();
+ CurrentProcess.Dispose();
+ CurrentProcess = null;
+ }
+ else
+ {
+ e.Cancel = true;
+ return;
+ }
+ }
+
+ GameAnalyticsCSharp.EndSession();
+ SaveAllSettings();
+
+ Application.Current.Shutdown();
+ }
+
+ private void CurrentProcess_OutputDataReceived(object sender, DataReceivedEventArgs e)
+ {
+ AddLogEntry(e.Data);
+ }
+
+ private void CurrentProcess_ErrorDataReceived(object sender, DataReceivedEventArgs e)
+ {
+ NumErrors++;
+ AddLogEntry(e.Data, true);
+ }
+
+ private void CurrentProcess_Exited(object sender, EventArgs e)
+ {
+ DispatchTimer.Stop();
+ StopwatchTimer.Stop();
+ bLastBuildSuccess = CurrentProcess.ExitCode == 0;
+ AddLogEntry(string.Format($"{GetCurrentProcessName()} exited with code {0}\n", CurrentProcess.ExitCode.ToString()));
+
+ Dispatcher.Invoke(() =>
+ {
+ BuildRocketUE.Content = "Build Unreal Engine";
+ ChangeStatusLabel(string.Format("Build finished with code {0}. {1} errors, {2} warnings. Time elapsed: {3:hh\\:mm\\:ss}", CurrentProcess.ExitCode, NumErrors, NumWarnings, StopwatchTimer.Elapsed));
+ });
+
+ CurrentProcess.Close();
+ CurrentProcess.Dispose();
+ CurrentProcess = null;
+
+ NumErrors = 0;
+ NumWarnings = 0;
+ AddLogEntry("========================== BUILD FINISHED ==========================");
+ AddLogEntry(string.Format("Compiled approximately {0} files.", CompiledFilesTotal));
+ AddLogEntry(string.Format("Took {0:hh\\:mm\\:ss}", StopwatchTimer.Elapsed));
+ AddLogEntry(string.Format("Build ended at {0}", DateTime.Now.ToString("dddd, dd MMMM yyyy HH:mm:ss")));
+ StopwatchTimer.Reset();
+ Dispatcher.Invoke(() =>
+ {
+ StartSetupBatFile.IsEnabled = true;
+ StartPluginBuildsBtn.IsEnabled = true;
+ OnBuildFinished(bLastBuildSuccess);
+ });
+ }
+
+ private void OnBuildFinished(bool bBuildSucess)
+ {
+ ZipStatusLabel.Content = "Idle";
+ bIsBuilding = false;
+ if (bBuildSucess)
+ {
+ switch (currentProcessType)
+ {
+ case CurrentProcessType.BuildUnrealEngine:
+ if (postBuildSettings.CanSaveToZip())
+ {
+ EngineTabControl.SelectedIndex = 1;
+ if (FinalBuildPath == null)
+ {
+ FinalBuildPath = Path.GetFullPath(AutomationExePath).Replace(@"\Engine\Binaries\DotNET", @"\LocalBuilds\Engine").Replace(Path.GetFileName(AutomationExePath), "");
+ GameAnalyticsCSharp.LogEvent("Final Build Path was null. Fixed.", GameAnalyticsSDK.Net.EGAErrorSeverity.Info);
+ }
+ AddLogEntry($"Creating ZIP file. Installed build can be found in {FinalBuildPath}");
+ postBuildSettings.PrepareToSave();
+ postBuildSettings.SaveToZip(FinalBuildPath, ZipPath.Text);
+ AddLogEntry($"Saving zip file to {ZipPath.Text}");
+ WriteToLogFile();
+ return;
+ }
+ break;
+ case CurrentProcessType.SetupBat:
+ GameAnalyticsCSharp.AddProgressEnd("Build", "Setup");
+ GenerateProjectFiles();
+ break;
+ case CurrentProcessType.GenerateProjectFiles:
+ GameAnalyticsCSharp.AddProgressEnd("Build", "ProjectFiles");
+ BuildAutomationToolLauncher();
+ break;
+ case CurrentProcessType.BuildAutomationTool:
+ GameAnalyticsCSharp.AddProgressEnd("Build", "AutomationTool");
+ if (bContinueToEngineBuild.IsChecked == true)
+ {
+ BuildEngine();
+ }
+ break;
+ }
+ }
+
+ if (currentProcessType == CurrentProcessType.BuildPlugin)
+ {
+ GameAnalyticsCSharp.AddProgressEnd("Build", "Plugin");
+ CurrentPluginBeingBuilt.PluginFinishedBuild(bBuildSucess);
+ CurrentPluginBeingBuilt = null;
+ foreach (var C in PluginQueues.Children)
+ {
+ PluginCard pluginCard = (PluginCard)C;
+ if (pluginCard.IsPending())
+ {
+ BuildPlugin(pluginCard);
+ break;
+ }
+ }
+
+ if (CurrentPluginBeingBuilt == null)
+ {
+ Growl.Clear("PluginBuild");
+ ShowToastMessage($"Finished plugin queue build with {PluginQueues.Children.Count} plugin(s)");
+ }
+ }
+
+ WriteToLogFile();
+ TryShutdown();
+ }
+
+ public void TryShutdown()
+ {
+ if (currentProcessType == CurrentProcessType.BuildUnrealEngine)
+ {
+ if (bShutdownWindows.IsChecked == true)
+ {
+ if (bShutdownIfSuccess.IsChecked == true)
+ {
+ if (bLastBuildSuccess)
+ {
+ GameAnalyticsCSharp.AddDesignEvent("Shutdown:BuildState:Success");
+ Internal_ShutdownWindows();
+ }
+ else
+ {
+ GameAnalyticsCSharp.AddDesignEvent("Shutdown:BuildState:Failed");
+ }
+ }
+ else
+ {
+ GameAnalyticsCSharp.AddDesignEvent("Shutdown:Started");
+ Internal_ShutdownWindows();
+ }
+ }
+ }
+ }
+
+ private void BrowseEngineFolder_Click(object sender, RoutedEventArgs e)
+ {
+ System.Windows.Forms.FolderBrowserDialog NewFolderDialog = new System.Windows.Forms.FolderBrowserDialog();
+ NewFolderDialog.ShowDialog();
+ SetupBatFilePath.Text = NewFolderDialog.SelectedPath;
+ if (TryUpdateAutomationExePath() == false)
+ {
+ HandyControl.Controls.MessageBox.Error($"This is not the Unreal Engine root folder.\n\nPlease select the root folder where {SetupBatFileName} and {GenerateProjectBatFileName} exists.", "Incorrect folder");
+ }
+ }
+
+ private bool TryUpdateAutomationExePath()
+ {
+ bool bRequiredFilesExist = false;
+ if (string.IsNullOrEmpty(AutomationToolPath.Text) == false && string.IsNullOrEmpty(AutomationExePath))
+ {
+ AutomationExePath = AutomationToolPath.Text;
+ if (Path.GetFileNameWithoutExtension(AutomationExePath) == AUTOMATION_TOOL_NAME)
+ {
+ SetupBatFilePath.Text = AutomationExePath.Replace(Path.GetFileName(AutomationExePath), "").Replace(@"\Engine\Binaries\DotNET", "");
+ bRequiredFilesExist = File.Exists(Path.Combine(SetupBatFilePath.Text, SetupBatFileName)) && File.Exists(Path.Combine(SetupBatFilePath.Text, GenerateProjectBatFileName));
+ }
+ else
+ {
+ ChangeStatusLabel("Error. Invalid automation tool file selected.");
+ HandyControl.Controls.MessageBox.Error("This is not Automation Tool Launcher. Please select AutomationToolLauncher.exe", "");
+ }
+ }
+ else
+ {
+ bRequiredFilesExist = File.Exists(Path.Combine(SetupBatFilePath.Text, SetupBatFileName)) && File.Exists(Path.Combine(SetupBatFilePath.Text, GenerateProjectBatFileName));
+ StartSetupBatFile.IsEnabled = bRequiredFilesExist;
+ if (bRequiredFilesExist)
+ {
+ AutomationExePath = Path.Combine(SetupBatFilePath.Text, "Engine", "Binaries", "DotNET", $"{AUTOMATION_TOOL_NAME}.exe");
+ AutomationToolPath.Text = AutomationExePath;
+ }
+ }
+
+ return bRequiredFilesExist;
+ }
+
+ private string SetupBatCommandLineArgs()
+ {
+ string CommandLines = "--force";
+
+ if (SettingsJSON.GitDependencyAll == true)
+ {
+ CommandLines += " --all";
+ }
+
+ foreach (GitPlatform gp in SettingsJSON.GitDependencyPlatforms)
+ {
+ if (gp.bIsIncluded == false)
+ {
+ CommandLines += $" --exclude={gp.Name}";
+ }
+ }
+
+ CommandLines += $" --threads={SettingsJSON.GitDependencyThreads}";
+ CommandLines += $" --max-retries={SettingsJSON.GitDependencyMaxRetries}";
+
+ if (SettingsJSON.GitDependencyEnableCache == false)
+ {
+ CommandLines += " --no-cache";
+ }
+ else if (string.IsNullOrEmpty(SettingsJSON.GitDependencyCache) == false)
+ {
+ CommandLines += $" --cache={SettingsJSON.GitDependencyCache}";
+ CommandLines += $" --cache-size-multiplier={SettingsJSON.GitDependencyCacheMultiplier}";
+ CommandLines += $" --cache-days={SettingsJSON.GitDependencyCacheDays}";
+ }
+
+ if (string.IsNullOrEmpty(SettingsJSON.GitDependencyProxy) == false)
+ {
+ CommandLines += $" --proxy={SettingsJSON.GitDependencyProxy}";
+ }
+
+
+ return CommandLines;
+ }
+
+ private void StartSetupBatFile_Click(object sender, System.Windows.RoutedEventArgs e)
+ {
+ bool bRequiredFilesExist = File.Exists(Path.Combine(SetupBatFilePath.Text, SetupBatFileName)) && File.Exists(Path.Combine(SetupBatFilePath.Text, GenerateProjectBatFileName));
+ if (bRequiredFilesExist == false)
+ {
+ HandyControl.Controls.MessageBox.Error($"This is not the Unreal Engine root folder.\n\nPlease select the root folder where {SetupBatFileName} and {GenerateProjectBatFileName} exists.", "Incorrect folder");
+ return;
+ }
+
+ if (bIsBuilding == false)
+ {
+ bIsBuilding = true;
+ string Commandline = SetupBatCommandLineArgs();
+ ProcessStartInfo processStartInfo = new ProcessStartInfo
+ {
+ FileName = Path.Combine(SetupBatFilePath.Text, SetupBatFileName),
+ Arguments = Commandline,
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ RedirectStandardError = true,
+ RedirectStandardOutput = true
+ };
+
+ currentProcessType = CurrentProcessType.SetupBat;
+ CreateProcess(processStartInfo);
+ AddLogEntry($"Commandline: {Commandline}");
+ ChangeStatusLabel("Building...");
+ GameAnalyticsCSharp.AddProgressStart("Build", "Setup");
+ }
+ }
+
+ private void CreateProcess(ProcessStartInfo processStartInfo, bool bClearLogs = true)
+ {
+ StartSetupBatFile.IsEnabled = false;
+ DispatchTimer.Start();
+ StopwatchTimer.Start();
+
+ CompiledFiles = CompiledFilesTotal = 0;
+ ProcessedFilesLabel.Text = "[Compiled: 0. Total: 0]";
+
+ if (bClearLogs)
+ {
+ LogControl.ClearAllLogs();
+ AddLogEntry($"Welcome to UE4 Binary Builder v{PRODUCT_VERSION}");
+ }
+
+ AddLogEntry($"========================== RUNNING - {Path.GetFileName(processStartInfo.FileName)} ==========================");
+
+ CurrentProcess = new Process();
+ CurrentProcess.StartInfo = processStartInfo;
+ CurrentProcess.EnableRaisingEvents = true;
+ CurrentProcess.OutputDataReceived += new DataReceivedEventHandler(CurrentProcess_OutputDataReceived);
+ CurrentProcess.ErrorDataReceived += new DataReceivedEventHandler(CurrentProcess_ErrorDataReceived);
+ CurrentProcess.Exited += new EventHandler(CurrentProcess_Exited);
+ CurrentProcess.Start();
+ CurrentProcess.BeginErrorReadLine();
+ CurrentProcess.BeginOutputReadLine();
+ }
+
+ private string GetCurrentProcessName()
+ {
+ if (CurrentProcess != null)
+ {
+ return CurrentProcess.ProcessName;
+ }
+
+ return null;
+ }
+
+ private void WriteToLogFile()
+ {
+ BuilderSettings.WriteToLogFile(LogMessage);
+ }
+
+ private void UpdateSkin(SkinType skin)
+ {
+ SharedResourceDictionary.SharedDictionaries.Clear();
+ Resources.MergedDictionaries.Add(ResourceHelper.GetSkin(skin));
+ Resources.MergedDictionaries.Add(new ResourceDictionary
+ {
+ Source = new Uri("pack://application:,,,/HandyControl;component/Themes/Theme.xaml")
+ });
+ Application.Current.MainWindow?.OnApplyTemplate();
+ GameAnalyticsCSharp.AddDesignEvent($"Theme:{skin.ToString()}");
+ }
+
+ private void AutomationToolBrowse_Click(object sender, RoutedEventArgs e)
+ {
+ OpenFileDialog NewFileDialog = new OpenFileDialog
+ {
+ Filter = "exe file (*.exe)|*.exe"
+ };
+
+ ChangeStatusLabel(string.Format("Waiting for {0}.exe", AUTOMATION_TOOL_NAME));
+ if (NewFileDialog.ShowDialog() == true)
+ {
+ AutomationExePath = NewFileDialog.FileName;
+ AutomationToolPath.Text = AutomationExePath;
+ if (Path.GetFileNameWithoutExtension(AutomationExePath) == AUTOMATION_TOOL_NAME)
+ {
+ BuildRocketUE.IsEnabled = true;
+ ChangeStatusLabel("Idle.");
+ FinalBuildPath = Path.GetFullPath(AutomationExePath).Replace(@"\Engine\Binaries\DotNET", @"\LocalBuilds\Engine").Replace(Path.GetFileName(AutomationExePath), "");
+ AddLogEntry(string.Format("Binary build can be found at: {0}", FinalBuildPath));
+ }
+ else
+ {
+ GameAnalyticsCSharp.AddDesignEvent($"AutomationTool:IncorrectName:{Path.GetFileNameWithoutExtension(AutomationExePath)}");
+ ChangeStatusLabel("Error. Invalid automation tool file selected.");
+ HandyControl.Controls.MessageBox.Error("This is not Automation Tool Launcher. Please select AutomationToolLauncher.exe", "");
+ }
+
+ return;
+ }
+
+ ChangeStatusLabel("Idle.");
+ }
+
+ private void CustomBuildXMLBrowse_Click(object sender, RoutedEventArgs e)
+ {
+ OpenFileDialog NewFileDialog = new OpenFileDialog
+ {
+ Filter = "xml file (*.xml)|*.xml"
+ };
+
+ ChangeStatusLabel("Waiting for custom build file...");
+ if (NewFileDialog.ShowDialog() == true)
+ {
+ CustomBuildXMLFile.Text = NewFileDialog.FileName;
+ CustomOptions.IsEnabled = true;
+ GameAnalyticsCSharp.AddDesignEvent($"BuildXML:Custom:{NewFileDialog.FileName}");
+ }
+
+ ChangeStatusLabel("Idle.");
+ }
+
+ private void ResetDefaultBuildXML_Click(object sender, RoutedEventArgs e)
+ {
+ CustomBuildXMLFile.Text = DEFAULT_BUILD_XML_FILE;
+ GameAnalyticsCSharp.AddDesignEvent("BuildXML:ResetToDefault");
+ }
+
+ private string PrepareCommandline()
+ {
+ string BuildXMLFile = CustomBuildXMLFile.Text;
+ if (CustomBuildXMLFile.Text == "")
+ {
+ BuildXMLFile = DEFAULT_BUILD_XML_FILE;
+ }
+
+ if (BuildXMLFile != DEFAULT_BUILD_XML_FILE)
+ {
+ BuildXMLFile = string.Format("\"{0}\"", CustomBuildXMLFile.Text);
+ }
+
+ if (GameConfigurations.Text == "")
+ {
+ GameConfigurations.Text = "Development;Shipping";
+ GameAnalyticsCSharp.AddDesignEvent("CommandLine:GameConfiguration:Reset");
+ }
+
+ string CommandLineArgs = string.Format("BuildGraph -target=\"Make Installed Build Win64\" -script={0} -set:WithDDC={1} -set:SignExecutables={2} -set:EmbedSrcSrvInfo={3} -set:GameConfigurations={4} -set:WithFullDebugInfo={5} -set:HostPlatformEditorOnly={6} -set:AnalyticsTypeOverride={7}",
+ BuildXMLFile,
+ GetConditionalString(bWithDDC.IsChecked),
+ GetConditionalString(bSignExecutables.IsChecked),
+ GetConditionalString(bEnableSymStore.IsChecked),
+ GameConfigurations.Text,
+ GetConditionalString(bWithFullDebugInfo.IsChecked),
+ GetConditionalString(bHostPlatformEditorOnly.IsChecked),
+ AnalyticsOverride.Text);
+
+ if (bWithDDC.IsChecked == true && bHostPlatformDDCOnly.IsChecked == true)
+ {
+ CommandLineArgs += " -set:HostPlatformDDCOnly=true";
+ }
+
+ if (bHostPlatformOnly.IsChecked == true)
+ {
+ CommandLineArgs += " -set:HostPlatformOnly=true";
+ GameAnalyticsCSharp.AddDesignEvent("CommandLine:HostOnly");
+ }
+ else
+ {
+ CommandLineArgs += string.Format(" -set:WithWin64={0} -set:WithWin32={1} -set:WithMac={2} -set:WithAndroid={3} -set:WithIOS={4} -set:WithTVOS={5} -set:WithLinux={6} -set:WithLumin={7}",
+ GetConditionalString(bWithWin64.IsChecked),
+ GetConditionalString(bWithWin32.IsChecked),
+ GetConditionalString(bWithMac.IsChecked),
+ GetConditionalString(bWithAndroid.IsChecked),
+ GetConditionalString(bWithIOS.IsChecked),
+ GetConditionalString(bWithTVOS.IsChecked),
+ GetConditionalString(bWithLinux.IsChecked),
+ GetConditionalString(bWithLumin.IsChecked));
+
+ if (SupportHTML5())
+ {
+ CommandLineArgs += string.Format(" -set:WithHTML5={0}",
+ GetConditionalString(bWithHTML5.IsChecked));
+ }
+
+ if (SupportConsoles())
+ {
+ CommandLineArgs += string.Format(" -set:WithSwitch={0} -set:WithPS4={1} -set:WithXboxOne={2}",
+ GetConditionalString(bWithSwitch.IsChecked),
+ GetConditionalString(bWithPS4.IsChecked),
+ GetConditionalString(bWithXboxOne.IsChecked));
+ }
+
+ if (SupportLinuxAArch64())
+ {
+ CommandLineArgs += string.Format(" -set:WithLinuxAArch64={0}", GetConditionalString(bWithLinuxAArch64.IsChecked));
+ }
+ }
+
+ if (IsEngineSelection425OrAbove())
+ {
+ CommandLineArgs += string.Format(" -set:CompileDatasmithPlugins={0} -set:VS2019={1}",
+ GetConditionalString(bCompileDatasmithPlugins.IsChecked),
+ GetConditionalString(bVS2019.IsChecked));
+ }
+
+ if (EngineVersionSelection.SelectedIndex > 1)
+ {
+ CommandLineArgs += string.Format(" -set:WithServer={0} -set:WithClient={1} -set:WithHoloLens={2}",
+ GetConditionalString(bWithServer.IsChecked),
+ GetConditionalString(bWithClient.IsChecked),
+ GetConditionalString(bWithHololens.IsChecked));
+ }
+
+ if (BuildXMLFile != DEFAULT_BUILD_XML_FILE && CustomOptions.Text != string.Empty)
+ {
+ CommandLineArgs += string.Format(" {0}", CustomOptions.Text);
+ AddLogEntry("Using custom options...");
+ GameAnalyticsCSharp.AddDesignEvent("CommandLine:UsingCustomOptions");
+ }
+
+ if (bCleanBuild.IsChecked == true)
+ {
+ CommandLineArgs += " -Clean";
+ GameAnalyticsCSharp.AddDesignEvent("CommandLine:CleanEnabled");
+ }
+
+ return CommandLineArgs;
+ }
+
+ private void BuildRocketUE_Click(object sender, RoutedEventArgs e)
+ {
+ BuildEngine();
+ }
+
+ private void BuildEngine()
+ {
+ if (bIsBuilding)
+ {
+ switch (currentProcessType)
+ {
+ case CurrentProcessType.SetupBat:
+ case CurrentProcessType.GenerateProjectFiles:
+ MessageBoxResult MessageResult = HandyControl.Controls.MessageBox.Show($"Automation tool is currently running. Would you like to stop it and start building the Engine?\n\nPress Yes to force stop Automation Tool and begin Engine Build.\nPress No to continue current process.", "Automation Tool Running!", MessageBoxButton.YesNo, MessageBoxImage.Question);
+ switch (MessageResult)
+ {
+ case MessageBoxResult.Yes:
+ GameAnalyticsCSharp.AddDesignEvent("Build:AutomationTool:Killed");
+ CurrentProcess.Kill();
+ break;
+ case MessageBoxResult.No:
+ return;
+ }
+ break;
+ }
+ }
+
+ TryUpdateAutomationExePath();
+ EngineTabControl.SelectedIndex = 2;
+ currentProcessType = CurrentProcessType.BuildUnrealEngine;
+ bLastBuildSuccess = false;
+
+ if (FinalBuildPath == null && string.IsNullOrWhiteSpace(AutomationExePath) == false)
+ {
+ FinalBuildPath = Path.GetFullPath(AutomationExePath).Replace(@"\Engine\Binaries\DotNET", @"\LocalBuilds\Engine").Replace(Path.GetFileName(AutomationExePath), "");
+ }
+
+ if (Directory.Exists(FinalBuildPath))
+ {
+ MessageBoxResult MessageResult = HandyControl.Controls.MessageBox.Show($"Looks like an Engine build is already available at {FinalBuildPath}. Would you like to skip compiling the Engine and start zipping the existing build?\n\nPress Yes to Skip Engine build and start zipping (if enabled).\nPress No to continue with Engine Build.\nPress Cancel to do nothing.", "Zip Binary Version", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
+ switch (MessageResult)
+ {
+ case MessageBoxResult.Yes:
+ GameAnalyticsCSharp.AddDesignEvent("Build:EngineExists:FinishBuild");
+ // We don't want the system to shutdown since user is interacting.
+ bool? bOriginalShutdownState = bShutdownWindows.IsChecked;
+ bShutdownWindows.IsChecked = false;
+ OnBuildFinished(true);
+ bShutdownWindows.IsChecked = bOriginalShutdownState;
+ return;
+ case MessageBoxResult.Cancel:
+ GameAnalyticsCSharp.AddDesignEvent("Build:EngineExists:Exit");
+ return;
+ default:
+ GameAnalyticsCSharp.AddDesignEvent("Build:EngineExists:IgnoreAndContinue");
+ break;
+ }
+ }
+
+ if (EngineVersionSelection.SelectedIndex == 0)
+ {
+ HandyControl.Controls.MessageBox.Fatal("Please select your Engine version to build. If you are unsure about the version number look into the following file:\n\n/Engine/Source/Runtime/Launch/Resources/Version.h\n\nAnd check ENGINE_MAJOR_VERSION and ENGINE_MINOR_VERSION.", "Select Engine Version.");
+ return;
+ }
+
+ ChangeStatusLabel("Preparing to build...");
+
+ if (postBuildSettings.ShouldSaveToZip() && postBuildSettings.DirectoryIsWritable(ZipPath.Text) == false)
+ {
+ GameAnalyticsCSharp.AddDesignEvent("Build:ZipEnabled:InvalidSetting");
+ HandyControl.Controls.MessageBox.Error(string.Format("You chose to save Engine build as a zip file but below directory is either not available or not writable.\n\n{0}", ZipPath.Text), "Error");
+ return;
+ }
+
+ if (CustomBuildXMLFile.Text == string.Empty)
+ {
+ CustomBuildXMLFile.Text = DEFAULT_BUILD_XML_FILE;
+ }
+ else if (CustomBuildXMLFile.Text != DEFAULT_BUILD_XML_FILE)
+ {
+ if (File.Exists(CustomBuildXMLFile.Text) == false)
+ {
+ GameAnalyticsCSharp.LogEvent("BuildXML does not exist.", GameAnalyticsSDK.Net.EGAErrorSeverity.Error);
+ ChangeStatusLabel("Error. Build xml does not exist.");
+ HandyControl.Controls.MessageBox.Error(string.Format("Build XML {0} does not exist!", CustomBuildXMLFile.Text), "Error");
+ return;
+ }
+ }
+
+ if (SupportHTML5() == false && bWithHTML5.IsChecked == true)
+ {
+ GameAnalyticsCSharp.AddDesignEvent($"Build:HTML5:IncorrectEngine:{GetEngineName()}");
+ bWithHTML5.IsChecked = false;
+ if (SettingsJSON.bShowHTML5DeprecatedMessage)
+ {
+ HandyControl.Controls.MessageBox.Show("HTML5 support was removed from Unreal Engine 4.24 and higher. You had it enabled but since it is of no use, it is disabled.");
+ }
+ }
+
+ if (SupportConsoles() == false && (bWithSwitch.IsChecked == true || bWithPS4.IsChecked == true || bWithXboxOne.IsChecked == true))
+ {
+ GameAnalyticsCSharp.AddDesignEvent($"Build:Console:IncorrectEngine:{GetEngineName()}");
+ bWithSwitch.IsChecked = bWithPS4.IsChecked = bWithXboxOne.IsChecked = false;
+ if (SettingsJSON.bShowConsoleDeprecatedMessage)
+ {
+ HandyControl.Controls.MessageBox.Show("Console support was removed from Unreal Engine 4.25 and higher. You had it enabled but since it is of no use, it is disabled.");
+ }
+ }
+
+ bool bContinueToBuild = true;
+ if (SettingsJSON.bEnableEngineBuildConfirmationMessage)
+ {
+ bContinueToBuild = HandyControl.Controls.MessageBox.Show("You are going to build a binary version of Unreal Engine 4. This is a long process and might take time to finish. Are you sure you want to continue? ", "Build Binary Version", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes;
+ }
+
+ if (bContinueToBuild)
+ {
+ if (bWithDDC.IsChecked == true && SettingsJSON.bEnableDDCMessages)
+ {
+ MessageBoxResult MessageResult = HandyControl.Controls.MessageBox.Show("Building Derived Data Cache (DDC) is one of the slowest aspect of the build. You can skip this step if you want to. Do you want to continue with DDC enabled?\n\nPress Yes to continue with build\nPress No to continue without DDC\nPress Cancel to stop build", "Warning", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning);
+
+ switch (MessageResult)
+ {
+ case MessageBoxResult.No:
+ bWithDDC.IsChecked = false;
+ GameAnalyticsCSharp.AddDesignEvent("Build:DDC:AutoDisabled");
+ break;
+ case MessageBoxResult.Cancel:
+ GameAnalyticsCSharp.AddDesignEvent("Build:DDC:Exit");
+ return;
+ default:
+ GameAnalyticsCSharp.AddDesignEvent("Build:DDC:IgnoreAndContinue");
+ break;
+ }
+ }
+
+ GameAnalyticsCSharp.AddDesignEvent($"Build:Engine:{GetEngineName()}");
+ BuildRocketUE.Content = "Stop Build";
+
+ string CommandLineArgs = PrepareCommandline();
+
+ ProcessStartInfo AutomationStartInfo = new ProcessStartInfo
+ {
+ FileName = AutomationExePath,
+ Arguments = CommandLineArgs,
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ RedirectStandardError = true,
+ RedirectStandardOutput = true
+ };
+
+ CreateProcess(AutomationStartInfo);
+
+ bIsBuilding = true;
+ ChangeStatusLabel("Building...");
+ ZipStatusLabel.Content = "Waiting for Engine to finish building...";
+ GameAnalyticsCSharp.AddDesignEvent("Build:Started");
+ }
+ }
+
+ private void EngineVersionSelection_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
+ {
+ bWithServer.IsEnabled = bWithClient.IsEnabled = EngineVersionSelection.SelectedIndex > 1;
+ bWithHTML5.IsEnabled = SupportHTML5();
+ bWithLinuxAArch64.IsEnabled = SupportLinuxAArch64();
+ bWithSwitch.IsEnabled = bWithPS4.IsEnabled = bWithXboxOne.IsEnabled = SupportConsoles();
+ bCompileDatasmithPlugins.IsEnabled = bVS2019.IsEnabled = IsEngineSelection425OrAbove();
+ }
+
+ private bool SupportHTML5()
+ {
+ return EngineVersionSelection.SelectedIndex < 3;
+ }
+
+ private bool SupportLinuxAArch64()
+ {
+ return EngineVersionSelection.SelectedIndex >= 3;
+ }
+
+ private bool SupportConsoles()
+ {
+ return EngineVersionSelection.SelectedIndex <= 3;
+ }
+
+ private bool IsEngineSelection425OrAbove()
+ {
+ return EngineVersionSelection.SelectedIndex >= 4;
+ }
+
+ private string GetEngineName()
+ {
+ string ReturnString = "Unknown";
+ switch (EngineVersionSelection.SelectedIndex)
+ {
+ case 1:
+ ReturnString = "4.22";
+ break;
+ case 2:
+ ReturnString = "4.23";
+ break;
+ case 3:
+ ReturnString = "4.24";
+ break;
+ case 4:
+ ReturnString = "4.25";
+ break;
+ case 5:
+ ReturnString = "4.26";
+ break;
+ }
+
+ return ReturnString;
+ }
+
+ private void CopyCommandLine_Click(object sender, RoutedEventArgs e)
+ {
+ GameAnalyticsCSharp.AddDesignEvent("CommandLine:CopyToClipboard");
+ Clipboard.SetText(PrepareCommandline());
+ HandyControl.Controls.MessageBox.Show("Command line copied to clipboard!");
+ }
+
+ private void SetZipPathLocation_Click(object sender, RoutedEventArgs e)
+ {
+ System.Windows.Forms.SaveFileDialog SFD = new System.Windows.Forms.SaveFileDialog();
+ SFD.DefaultExt = ".zip";
+ SFD.Filter = "Zip File (.zip)|*.zip";
+ System.Windows.Forms.DialogResult SaveDialogResult = SFD.ShowDialog();
+ if (SaveDialogResult == System.Windows.Forms.DialogResult.OK)
+ {
+ ZipPath.Text = SFD.FileName;
+ }
+ }
+
+ private void GenerateProjectFiles()
+ {
+ if (bIsBuilding == false)
+ {
+ bIsBuilding = true;
+ BuildRocketUE.IsEnabled = false;
+ ProcessStartInfo processStartInfo = new ProcessStartInfo
+ {
+ FileName = Path.Combine(SetupBatFilePath.Text, GenerateProjectBatFileName),
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ RedirectStandardError = true,
+ RedirectStandardOutput = true
+ };
+
+ currentProcessType = CurrentProcessType.GenerateProjectFiles;
+ CreateProcess(processStartInfo, false);
+ ChangeStatusLabel("Building...");
+ GameAnalyticsCSharp.AddProgressStart("Build", "ProjectFiles");
+ }
+ }
+
+ private bool? BuildAutomationToolLauncher()
+ {
+ if (bIsBuilding == false)
+ {
+ if (string.IsNullOrEmpty(AutomationExePath))
+ {
+ if (TryUpdateAutomationExePath() == false)
+ {
+ AddLogEntry("Failed to build Automation Tool. AutomationExePath was null.", true);
+ return null;
+ }
+ }
+
+ bIsBuilding = true;
+ BuildRocketUE.IsEnabled = false;
+ currentProcessType = CurrentProcessType.BuildAutomationTool;
+ if (File.Exists(AutomationExePath))
+ {
+ AddLogEntry("Skip building Automation Tool. Already exists.");
+ OnBuildFinished(true);
+ return false;
+ }
+
+ string RunUATFile = Path.Combine(SetupBatFilePath.Text, "Engine", "Build", "BatchFiles", "RunUAT.bat");
+ if (File.Exists(RunUATFile))
+ {
+ ProcessStartInfo processStartInfo = new ProcessStartInfo
+ {
+ FileName = RunUATFile,
+ Arguments = "-compileonly",
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ RedirectStandardError = true,
+ RedirectStandardOutput = true
+ };
+
+ CreateProcess(processStartInfo, false);
+ ChangeStatusLabel("Building...");
+ GameAnalyticsCSharp.AddProgressStart("Build", "AutomationTool");
+ return true;
+ }
+ }
+
+ return null;
+ }
+
+ private bool? BuildPlugin(PluginCard pluginCard)
+ {
+ if (bIsBuilding == false)
+ {
+ if (pluginCard.IsValid())
+ {
+ CurrentPluginBeingBuilt = pluginCard;
+ bIsBuilding = true;
+ BuildRocketUE.IsEnabled = false;
+ StartPluginBuildsBtn.IsEnabled = false;
+ currentProcessType = CurrentProcessType.BuildPlugin;
+ AddLogEntry($"========================== BUILDING PLUGIN {Path.GetFileNameWithoutExtension(pluginCard.PluginPath).ToUpper()} ==========================");
+ AddLogEntry($"Plugin: {pluginCard.PluginPath}");
+ AddLogEntry($"Package Location: {pluginCard.DestinationPath}");
+ AddLogEntry($"Target Engine: {pluginCard.EngineVersionText.Text}");
+ ProcessStartInfo processStartInfo = new ProcessStartInfo
+ {
+ FileName = pluginCard.RunUATFile,
+ Arguments = $"BuildPlugin -Plugin=\"{pluginCard.PluginPath}\" -Package=\"{pluginCard.DestinationPath}\" -Rocket {pluginCard.GetCompiler()} {pluginCard.GetTargetPlatforms()}",
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ RedirectStandardError = true,
+ RedirectStandardOutput = true
+ };
+
+ pluginCard.BuildStarted();
+ CreateProcess(processStartInfo, false);
+ ChangeStatusLabel($"Building Plugin - {Path.GetFileNameWithoutExtension(pluginCard.PluginPath)}");
+ ShowToastMessage($"Building Plugin - {Path.GetFileNameWithoutExtension(pluginCard.PluginPath)}", LogViewer.EMessageType.Info, false, true, "PluginBuild");
+ GameAnalyticsCSharp.AddProgressStart("Build", "Plugin");
+ return true;
+ }
+ }
+
+ return null;
+ }
+
+ private void CancelZipping_Click(object sender, RoutedEventArgs e)
+ {
+ postBuildSettings.CancelTask();
+ }
+
+ private void GitCachePathBrowse_Click(object sender, RoutedEventArgs e)
+ {
+ System.Windows.Forms.FolderBrowserDialog NewFolderDialog = new System.Windows.Forms.FolderBrowserDialog();
+ NewFolderDialog.ShowDialog();
+ GitCachePath.Text = NewFolderDialog.SelectedPath;
+ }
+
+ private void PluginQueueBtn_Click(object sender, RoutedEventArgs e)
+ {
+ if (File.Exists(PluginPath.Text) && Directory.Exists(PluginDestinationPath.Text))
+ {
+ if (PluginEngineVersionSelection.SelectedIndex < 0)
+ {
+ HandyControl.Controls.MessageBox.Fatal($"Cannot build \"{Path.GetFileNameWithoutExtension(PluginPath.Text)}\". Engine selection is invalid.");
+ return;
+ }
+
+ List TargetPlatformsList = null;
+ if (bPluginOverrideTargetPlatforms.IsChecked == true)
+ {
+ TargetPlatformsList = new List();
+ foreach (var C in PluginPlatforms.Children)
+ {
+ if (((CheckBox)C).IsChecked == true)
+ {
+ TargetPlatformsList.Add(((CheckBox)C).Name.Replace("bPlugin", ""));
+ }
+ }
+ }
+
+ bool bCanUse2019Compiler = bUse2019Compiler.IsEnabled && (bool)bUse2019Compiler.IsChecked;
+ PluginQueues.Children.Add(new PluginCard(this, PluginPath.Text, PluginDestinationPath.Text, PluginBuildEnginePath[PluginEngineVersionSelection.SelectedIndex], (bool)bCanUse2019Compiler, TargetPlatformsList, (bool)PluginZip.IsChecked, PluginZipPath.Text, (bool)PluginZipForMarketplace.IsChecked));
+ PluginQueueBtn.IsEnabled = false;
+ PluginPath.Text = "";
+ PluginDestinationPath.Text = "";
+ PluginEngineVersionSelection.SelectedIndex = -1;
+ PluginZipForMarketplace.IsChecked = true;
+ PluginZip.IsChecked = false;
+ PluginZipPath.Text = "";
+ foreach (var C in PluginPlatforms.Children)
+ {
+ if (((CheckBox)C).Name != "bPluginWin64")
+ {
+ ((CheckBox)C).IsChecked = false;
+ }
+ }
+ }
+ else
+ {
+ HandyControl.Controls.MessageBox.Fatal($"Cannot build \"{Path.GetFileNameWithoutExtension(PluginPath.Text)}\". Either file does not exist or save location is not valid.");
+ }
+ }
+
+ private void PluginPathBrowse_Click(object sender, RoutedEventArgs e)
+ {
+ OpenFileDialog NewFileDialog = new OpenFileDialog
+ {
+ Filter = "Unreal Plugin file (*.uplugin)|*.uplugin"
+ };
+
+ if (NewFileDialog.ShowDialog() == true)
+ {
+ PluginPath.Text = NewFileDialog.FileName;
+ foreach (var C in PluginPlatforms.Children)
+ {
+ CheckBox checkBox = (CheckBox)C;
+ if (checkBox.Name != "bPluginWin64")
+ {
+ checkBox.IsChecked = false;
+ }
+ }
+
+ using (StreamReader reader = File.OpenText(PluginPath.Text))
+ {
+ UE4PluginJson PluginJson = JsonConvert.DeserializeObject(File.ReadAllText(PluginPath.Text));
+
+ if (PluginJson.Modules[0].WhitelistPlatforms != null)
+ {
+ foreach (var C in PluginPlatforms.Children)
+ {
+ CheckBox checkBox = (CheckBox)C;
+ if (PluginJson.Modules[0].WhitelistPlatforms.Contains(checkBox.Name.Replace("bPlugin", "")))
+ {
+ checkBox.IsChecked = true;
+ }
+ }
+ }
+ }
+
+ }
+
+ if (File.Exists(PluginPath.Text) && Directory.Exists(PluginDestinationPath.Text))
+ {
+ PluginQueueBtn.IsEnabled = true;
+ }
+ }
+
+ private void PluginDestinationPathBrowse_Click(object sender, RoutedEventArgs e)
+ {
+ System.Windows.Forms.FolderBrowserDialog NewFolderDialog = new System.Windows.Forms.FolderBrowserDialog();
+ NewFolderDialog.ShowDialog();
+ PluginDestinationPath.Text = NewFolderDialog.SelectedPath;
+
+ if (File.Exists(PluginPath.Text) && Directory.Exists(PluginDestinationPath.Text))
+ {
+ PluginQueueBtn.IsEnabled = true;
+ }
+ }
+
+ public void RemovePluginFromList(PluginCard pluginCard)
+ {
+ PluginQueues.Children.Remove(pluginCard);
+ }
+
+ private void StartPluginBuildsBtn_Click(object sender, RoutedEventArgs e)
+ {
+ if (PluginQueues.Children.Count > 0)
+ {
+ AddLogEntry($"Building {PluginQueues.Children.Count} Plugin(s).");
+ AddLogEntry("");
+ ShowToastMessage($"Building {PluginQueues.Children.Count} Plugin(s).");
+ BuildPlugin((PluginCard)PluginQueues.Children[0]);
+ }
+ else
+ {
+ HandyControl.Controls.MessageBox.Fatal("Queue is empty. Add plugins to queue and build.");
+ }
+ }
+
+ private void PluginEngineVersionSelection_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ bUse2019Compiler.IsEnabled = Convert.ToDouble(PluginEngineVersionSelection.SelectedValue) >= 4.25;
+ }
+
+ private void GitWin64Platform_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
+ {
+ BuilderSettings.UpdatePlatformInclusion("Win64", GitWin64Platform.SelectedIndex == 0);
+ }
+
+ private void GitWin32Platform_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ BuilderSettings.UpdatePlatformInclusion("Win32", GitWin64Platform.SelectedIndex == 0);
+ }
+
+ private void GitMacPlatform_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ BuilderSettings.UpdatePlatformInclusion("Mac", GitWin64Platform.SelectedIndex == 0);
+ }
+
+ private void GitIOSPlatform_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ BuilderSettings.UpdatePlatformInclusion("IOS", GitWin64Platform.SelectedIndex == 0);
+ }
+
+ private void GitAndroidPlatform_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ BuilderSettings.UpdatePlatformInclusion("Android", GitWin64Platform.SelectedIndex == 0);
+ }
+
+ private void GitHololensPlatform_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ BuilderSettings.UpdatePlatformInclusion("Hololens", GitWin64Platform.SelectedIndex == 0);
+ }
+
+ private void GitLinuxPlatform_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ BuilderSettings.UpdatePlatformInclusion("Linux", GitWin64Platform.SelectedIndex == 0);
+ }
+
+ private void GitLuminPlatform_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ BuilderSettings.UpdatePlatformInclusion("Lumin", GitWin64Platform.SelectedIndex == 0);
+ }
+
+ private void GitTvOSPlatform_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ BuilderSettings.UpdatePlatformInclusion("TvOS", GitWin64Platform.SelectedIndex == 0);
+ }
+
+ private void PluginZipDestinationPathBrowse_Click(object sender, RoutedEventArgs e)
+ {
+ System.Windows.Forms.FolderBrowserDialog NewFolderDialog = new System.Windows.Forms.FolderBrowserDialog();
+ NewFolderDialog.ShowDialog();
+ PluginZipPath.Text = NewFolderDialog.SelectedPath;
+ }
+
+ private void GetSourceCode_Click(object sender, RoutedEventArgs e)
+ {
+ OpenBrowser("https://github.com/ryanjon2040/UE4-Binary-Builder");
+ GameAnalyticsCSharp.AddDesignEvent("Menu:Click:SourceCode");
+ }
+
+ private void SupportUnrealX_Click(object sender, RoutedEventArgs e)
+ {
+ OpenBrowser("https://www.buymeacoffee.com/ryanjon2040");
+ GameAnalyticsCSharp.AddDesignEvent("Menu:Click:BuyMeACoffee");
+ }
+
+ private void SupportAgora_Click(object sender, RoutedEventArgs e)
+ {
+ OpenBrowser("https://www.patreon.com/ryanjon2040");
+ GameAnalyticsCSharp.AddDesignEvent("Menu:Click:Agora");
+ }
+
+ private void FeedbackBtn_Click(object sender, RoutedEventArgs e)
+ {
+ OpenBrowser("https://forms.gle/LeZqAeqmV9fWQpxP7");
+ GameAnalyticsCSharp.AddDesignEvent("Menu:Click:Feedback");
+ }
+
+ private void OpenLogFolderBtn_Click(object sender, RoutedEventArgs e)
+ {
+ BuilderSettings.OpenLogFolder();
+ }
+
+ private void OpenSettingsBtn_Click(object sender, RoutedEventArgs e)
+ {
+ BuilderSettings.OpenSettings();
+ }
+
+ private void AboutBtn_Click(object sender, RoutedEventArgs e)
+ {
+ GameAnalyticsCSharp.AddDesignEvent("AboutDialog:Open");
+ aboutDialog = Dialog.Show(new AboutDialog(this));
+ }
+
+ public void CloseAboutDialog()
+ {
+ GameAnalyticsCSharp.AddDesignEvent("AboutDialog:Close");
+ aboutDialog.Close();
+ }
+
+ private void CheckUpdateBtn_Click(object sender, RoutedEventArgs e)
+ {
+ if (CurrentProcess == null)
+ {
+ if (bUpdateAvailable)
+ {
+ downloadDialogWindow = new DownloadDialog(this);
+ downloadDialog = Dialog.Show(downloadDialog);
+ CheckUpdateBtn.IsEnabled = false;
+ CheckUpdateBtn.Content = "Downloading...";
+ unrealBinaryBuilderUpdater.UpdateDownloadStartedEventHandler += DownloadUpdateProgressStart;
+ unrealBinaryBuilderUpdater.UpdateDownloadFinishedEventHandler += DownloadUpdateProgressFinish;
+ unrealBinaryBuilderUpdater.UpdateProgressEventHandler += DownloadUpdateProgress;
+ unrealBinaryBuilderUpdater.DownloadUpdate();
+ }
+ else
+ {
+ CheckForUpdates();
+ }
+ }
+ else
+ {
+ ShowToastMessage($"{GetCurrentProcessName()} is currently running. You can check for updates after it is done.", LogViewer.EMessageType.Error);
+ }
+ }
+
+ private void DownloadUpdateProgressStart(object sender, UpdateProgressDownloadStartEventArgs e)
+ {
+ GameAnalyticsCSharp.AddDesignEvent($"Update:Download:{e.Version}");
+ downloadDialogWindow.Initialize(e.UpdateSize, e.Version);
+ }
+
+ private void DownloadUpdateProgress(object sender, UpdateProgressDownloadEventArgs progressDownloadEventArgs)
+ {
+ downloadDialogWindow.SetProgress(progressDownloadEventArgs.AppUpdateProgress);
+ }
+
+ private void DownloadUpdateProgressFinish(object sender, EventArgs e)
+ {
+ GameAnalyticsCSharp.AddDesignEvent($"Update:Install:{downloadDialogWindow.VersionText}");
+ unrealBinaryBuilderUpdater.UpdateDownloadStartedEventHandler -= DownloadUpdateProgressStart;
+ unrealBinaryBuilderUpdater.UpdateDownloadFinishedEventHandler -= DownloadUpdateProgressFinish;
+ unrealBinaryBuilderUpdater.UpdateProgressEventHandler -= DownloadUpdateProgress;
+ unrealBinaryBuilderUpdater.CloseApplicationEventHandler += CloseApplication;
+ unrealBinaryBuilderUpdater.InstallUpdate();
+ }
+
+ private void CloseApplication(object sender, EventArgs e)
+ {
+ downloadDialog.Close();
+ Close();
+ }
+ }
+}
diff --git a/UnrealBinaryBuilder/UnrealBinaryBuilder.csproj b/UnrealBinaryBuilder/UnrealBinaryBuilder.csproj
new file mode 100644
index 0000000..6ff1d46
--- /dev/null
+++ b/UnrealBinaryBuilder/UnrealBinaryBuilder.csproj
@@ -0,0 +1,49 @@
+
+
+
+ WinExe
+ netcoreapp3.1
+ true
+ true
+ Debug;Release;ReleaseToPublic
+ Unreal Binary Builder
+ Satheesh (ryanjon2040)
+ Satheesh (ryanjon2040)
+ A helper application designed to create Installed Build of Unreal Engine from Github Source and plugin packager.
+ Copyright 2020-2021. Created by Satheesh (ryanjon2040)
+ 3.0.0
+ https://www.buymeacoffee.com/ryanjon2040
+ https://github.com/ryanjon2040/UE4-Binary-Builder
+ Github
+ false
+ false
+ LICENSE.md
+ compiler.png
+ compiler.ico
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+
+
+
+ True
+
+
+
+
+
\ No newline at end of file
diff --git a/UnrealBinaryBuilder/UserControls/AboutDialog.xaml b/UnrealBinaryBuilder/UserControls/AboutDialog.xaml
new file mode 100644
index 0000000..8e345e8
--- /dev/null
+++ b/UnrealBinaryBuilder/UserControls/AboutDialog.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/UnrealBinaryBuilder/UserControls/AboutDialog.xaml.cs b/UnrealBinaryBuilder/UserControls/AboutDialog.xaml.cs
new file mode 100644
index 0000000..e343af9
--- /dev/null
+++ b/UnrealBinaryBuilder/UserControls/AboutDialog.xaml.cs
@@ -0,0 +1,21 @@
+using HandyControl.Tools;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace UnrealBinaryBuilder.UserControls
+{
+ public partial class AboutDialog
+ {
+ private MainWindow _mainWindow;
+ public AboutDialog(MainWindow mainWindow)
+ {
+ InitializeComponent();
+ _mainWindow = mainWindow;
+ }
+
+ private void CloseBtn_Click(object sender, RoutedEventArgs e)
+ {
+ _mainWindow.CloseAboutDialog();
+ }
+ }
+}
diff --git a/UnrealBinaryBuilder/UserControls/DownloadDialog.xaml b/UnrealBinaryBuilder/UserControls/DownloadDialog.xaml
new file mode 100644
index 0000000..304026a
--- /dev/null
+++ b/UnrealBinaryBuilder/UserControls/DownloadDialog.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/UnrealBinaryBuilder/UserControls/DownloadDialog.xaml.cs b/UnrealBinaryBuilder/UserControls/DownloadDialog.xaml.cs
new file mode 100644
index 0000000..40b737a
--- /dev/null
+++ b/UnrealBinaryBuilder/UserControls/DownloadDialog.xaml.cs
@@ -0,0 +1,32 @@
+using System.Windows.Controls;
+
+namespace UnrealBinaryBuilder.UserControls
+{
+ ///
+ /// Interaction logic for DownloadDialog.xaml
+ ///
+ public partial class DownloadDialog
+ {
+ MainWindow _mainWindow = null;
+ public string VersionText = null;
+ public DownloadDialog(MainWindow mainWindow)
+ {
+ InitializeComponent();
+ _mainWindow = mainWindow;
+ }
+
+ public void Initialize(long fileSize, string InVersion)
+ {
+ DownloadProgressbar.IsIndeterminate = false;
+ DownloadProgressbar.Maximum = fileSize;
+ DownloadProgressbar.Value = 0;
+ VersionText = InVersion;
+ }
+
+ public void SetProgress(int InProgress)
+ {
+ DownloadProgressbar.Value = InProgress;
+ DownloadProgressTextBlock.Text = $"Downloading {VersionText} - {DownloadProgressbar.Value}/{DownloadProgressbar.Maximum}";
+ }
+ }
+}
diff --git a/UnrealBinaryBuilder/UserControls/LogViewer.xaml b/UnrealBinaryBuilder/UserControls/LogViewer.xaml
new file mode 100644
index 0000000..9b0e70b
--- /dev/null
+++ b/UnrealBinaryBuilder/UserControls/LogViewer.xaml
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Unreal Binary Builder/LogViewer.xaml.cs b/UnrealBinaryBuilder/UserControls/LogViewer.xaml.cs
similarity index 82%
rename from Unreal Binary Builder/LogViewer.xaml.cs
rename to UnrealBinaryBuilder/UserControls/LogViewer.xaml.cs
index 34de6d3..4caed36 100644
--- a/Unreal Binary Builder/LogViewer.xaml.cs
+++ b/UnrealBinaryBuilder/UserControls/LogViewer.xaml.cs
@@ -8,15 +8,11 @@
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
-using System.Data.Linq;
-using System.Drawing;
using System.Windows.Media;
+using static UnrealBinaryBuilder.MainWindow;
-namespace Unreal_Binary_Builder
+namespace UnrealBinaryBuilder.UserControls
{
- ///
- /// Interaction logic for LogViewer.xaml
- ///
public partial class LogViewer : UserControl
{
private ObservableCollection LogEntries { get; set; }
@@ -36,8 +32,27 @@ public LogViewer()
DataContext = LogEntries = new ObservableCollection();
}
+ public void AddZipLog(LogEntry InLogEntry, ZipLogInclusionType InType)
+ {
+ InLogEntry.DateTime = DateTime.Now;
+ switch (InType)
+ {
+ case ZipLogInclusionType.FileIncluded:
+ InLogEntry.MessageColor = Brushes.Green;
+ break;
+ case ZipLogInclusionType.FileSkipped:
+ InLogEntry.MessageColor = Brushes.Orange;
+ break;
+ case ZipLogInclusionType.ExtensionSkipped:
+ InLogEntry.MessageColor = Brushes.OrangeRed;
+ break;
+ }
+ Dispatcher.BeginInvoke((Action)(() => LogEntries.Add(InLogEntry)));
+ }
+
public void AddLogEntry(LogEntry InLogEntry, EMessageType InMessageType)
{
+ InLogEntry.DateTime = DateTime.Now;
switch (InMessageType)
{
case EMessageType.Info:
diff --git a/UnrealBinaryBuilder/UserControls/PluginCard.xaml b/UnrealBinaryBuilder/UserControls/PluginCard.xaml
new file mode 100644
index 0000000..982d017
--- /dev/null
+++ b/UnrealBinaryBuilder/UserControls/PluginCard.xaml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/UnrealBinaryBuilder/UserControls/PluginCard.xaml.cs b/UnrealBinaryBuilder/UserControls/PluginCard.xaml.cs
new file mode 100644
index 0000000..068548c
--- /dev/null
+++ b/UnrealBinaryBuilder/UserControls/PluginCard.xaml.cs
@@ -0,0 +1,134 @@
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.IO;
+using System.Windows.Controls;
+using System.Windows.Media.Imaging;
+using System.Windows;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Text.RegularExpressions;
+
+namespace UnrealBinaryBuilder.UserControls
+{
+ public partial class PluginCard : UserControl
+ {
+ public string PluginPath = null;
+ public string DestinationPath = null;
+ public string RunUATFile = null;
+
+ private List TargetPlatforms = null;
+ private bool IsUsing2019Compiler = false;
+ private bool bBuildFinished = false;
+ private bool bCanZip = false;
+ private bool bZipForMarketplaceZip = false;
+ private string TargetZipPath = null;
+
+ MainWindow mainWindow = null;
+
+ public PluginCard(MainWindow _mainWindow, string InPluginPath, string InDestination, string InEnginePath, bool bUse2019Compiler, List InTargetPlatformsList, bool bZipBuild, string ZipPath, bool bForMarketplace)
+ {
+ InitializeComponent();
+ mainWindow = _mainWindow;
+ TargetPlatforms = InTargetPlatformsList;
+ IsUsing2019Compiler = bUse2019Compiler;
+ PluginPath = InPluginPath;
+ DestinationPath = InDestination;
+ RunUATFile = Path.Combine(InEnginePath, "Engine", "Build", "BatchFiles", "RunUAT.bat");
+ PluginName.Text = Path.GetFileNameWithoutExtension(PluginPath);
+ PluginName.ToolTip = PluginPath;
+ using (StreamReader reader = File.OpenText(PluginPath))
+ {
+ JObject o = (JObject)JToken.ReadFrom(new JsonTextReader(reader));
+ PluginDescription.Text = o.GetValue("Description").ToString();
+ PluginDescription.ToolTip = PluginDescription.Text;
+ }
+
+ string PluginIcon = Path.Combine(InPluginPath.Replace(Path.GetFileName(InPluginPath), ""), "Resources", "Icon128.png");
+ PluginImage.Source = new BitmapImage(new Uri(PluginIcon));
+ LoadingCircle.Visibility = Visibility.Collapsed;
+ OpenBtn.Visibility = Visibility.Collapsed;
+ ZipProgressbar.Visibility = Visibility.Collapsed;
+
+ const string DigitsPattern = @"\d.+";
+ Regex DigitsPatternRgx = new Regex(DigitsPattern, RegexOptions.IgnoreCase);
+ EngineVersionText.Text = DigitsPatternRgx.Match(InEnginePath).Value;
+
+ bCanZip = bZipBuild;
+ TargetZipPath = ZipPath;
+ bZipForMarketplaceZip = bForMarketplace;
+ }
+
+ public bool IsValid()
+ {
+ return File.Exists(PluginPath) && Directory.Exists(DestinationPath) && File.Exists(RunUATFile);
+ }
+
+ public string GetTargetPlatforms()
+ {
+ if (TargetPlatforms != null)
+ {
+ string TargetPlatformsString = "";
+ foreach (string s in TargetPlatforms)
+ {
+ TargetPlatformsString += $"{s}+";
+ }
+
+ return $"-TargetPlatforms={TargetPlatformsString.Remove(TargetPlatformsString.Length - 1, 1)}";
+ }
+
+ return "";
+ }
+
+ public void BuildStarted()
+ {
+ LoadingCircle.Visibility = Visibility.Visible;
+ CancelBtn.Visibility = Visibility.Collapsed;
+ OpenBtn.Visibility = Visibility.Collapsed;
+ }
+
+ public void PluginFinishedBuild(bool bWasSuccess)
+ {
+ bBuildFinished = true;
+ if (bWasSuccess)
+ {
+ OpenBtn.Visibility = Visibility.Visible;
+ LoadingCircle.Visibility = Visibility.Collapsed;
+ CancelBtn.Visibility = Visibility.Collapsed;
+ if (bCanZip && mainWindow.postBuildSettings.DirectoryIsWritable(TargetZipPath))
+ {
+ ZipProgressbar.Visibility = Visibility.Visible;
+ mainWindow.postBuildSettings.SavePluginToZip(this, $"{TargetZipPath}\\{Path.GetFileNameWithoutExtension(PluginPath)}_{EngineVersionText.Text}.zip", bZipForMarketplaceZip);
+ }
+ }
+ else
+ {
+ CancelBtn.Visibility = Visibility.Visible;
+ OpenBtn.Visibility = Visibility.Collapsed;
+ LoadingCircle.Visibility = Visibility.Collapsed;
+ ZipProgressbar.Visibility = Visibility.Collapsed;
+ }
+ }
+
+ public bool IsPending()
+ {
+ return (bBuildFinished == false);
+ }
+
+ public string GetCompiler()
+ {
+ return IsUsing2019Compiler ? "-VS2019" : "-VS2017";
+ }
+
+ private void CancelBtn_Click(object sender, RoutedEventArgs e)
+ {
+ MainWindow mainWindow = ((MainWindow)Application.Current.MainWindow);
+ mainWindow.RemovePluginFromList(this);
+ }
+
+ private void OpenBtn_Click(object sender, RoutedEventArgs e)
+ {
+ Process.Start("explorer.exe", DestinationPath);
+ }
+ }
+}
diff --git a/UnrealBinaryBuilder/compiler.ico b/UnrealBinaryBuilder/compiler.ico
new file mode 100644
index 0000000..0b9f24e
Binary files /dev/null and b/UnrealBinaryBuilder/compiler.ico differ
diff --git a/UnrealBinaryBuilder/compiler.png b/UnrealBinaryBuilder/compiler.png
new file mode 100644
index 0000000..ff7e54c
Binary files /dev/null and b/UnrealBinaryBuilder/compiler.png differ
diff --git a/UnrealBinaryBuilderUpdater/UnrealBinaryBuilderUpdater.csproj b/UnrealBinaryBuilderUpdater/UnrealBinaryBuilderUpdater.csproj
new file mode 100644
index 0000000..6ad96c8
--- /dev/null
+++ b/UnrealBinaryBuilderUpdater/UnrealBinaryBuilderUpdater.csproj
@@ -0,0 +1,13 @@
+
+
+
+ netcoreapp3.1
+ true
+ Debug;Release;ReleaseToPublic
+
+
+
+
+
+
+
diff --git a/UnrealBinaryBuilderUpdater/UnrealBinaryUpdater.cs b/UnrealBinaryBuilderUpdater/UnrealBinaryUpdater.cs
new file mode 100644
index 0000000..e5fad72
--- /dev/null
+++ b/UnrealBinaryBuilderUpdater/UnrealBinaryUpdater.cs
@@ -0,0 +1,180 @@
+using NetSparkleUpdater;
+using NetSparkleUpdater.SignatureVerifiers;
+using System;
+using NetSparkleUpdater.Events;
+using System.Linq;
+
+namespace UnrealBinaryBuilderUpdater
+{
+ public enum AppUpdateCheckStatus
+ {
+ UpdateAvailable,
+ NoUpdate,
+ UserSkip,
+ CouldNotDetermine
+ }
+
+ public class UBBUpdater
+ {
+ private static readonly string APP_CAST_XML = "https://github.com/ryanjon2040/UE4-Binary-Builder/raw/master/UnrealBinaryBuilderUpdater/appcast.xml";
+ private static UpdateInfo _updateInfo;
+ private static SparkleUpdater _sparkle = null;
+ private string _downloadPath = null;
+
+ public event EventHandler SilentUpdateFinishedEventHandler;
+ public event EventHandler UpdateProgressEventHandler;
+ public event EventHandler UpdateProgressDownloadErrorEventHandler;
+ public event EventHandler UpdateDownloadStartedEventHandler;
+ public event EventHandler UpdateDownloadFinishedEventHandler;
+ public event EventHandler CloseApplicationEventHandler;
+
+ public UBBUpdater()
+ {
+ Internal_SetupSparkle();
+ }
+
+ private static void Internal_SetupSparkle()
+ {
+ if (_sparkle == null)
+ {
+ _sparkle = new SparkleUpdater(APP_CAST_XML, new DSAChecker(NetSparkleUpdater.Enums.SecurityMode.UseIfPossible, "+mLdLTe3Mj6OU0Kr6+ZDeVj+TTFRsNUJvUaPhuJ7pUI="))
+ {
+ ShowsUIOnMainThread = false,
+ UseNotificationToast = true
+ };
+ _sparkle.LogWriter = new LogWriter(true);
+ }
+
+ if (_sparkle.UIFactory == null)
+ {
+ string manifestModuleName = System.Reflection.Assembly.GetEntryAssembly().ManifestModule.FullyQualifiedName;
+ var icon = System.Drawing.Icon.ExtractAssociatedIcon(manifestModuleName);
+ _sparkle.UIFactory = new NetSparkleUpdater.UI.WPF.UIFactory(NetSparkleUpdater.UI.WPF.IconUtilities.ToImageSource(icon));
+ }
+
+ _sparkle.SecurityProtocolType = System.Net.SecurityProtocolType.Tls12;
+ }
+
+ public void CheckForUpdates()
+ {
+ Internal_SetupSparkle();
+ _sparkle.CheckForUpdatesAtUserRequest();
+ }
+
+ public async void CheckForUpdatesSilently()
+ {
+ _sparkle.UIFactory = null;
+ _updateInfo = await _sparkle.CheckForUpdatesQuietly();
+ if (_updateInfo != null)
+ {
+ UpdateProgressFinishedEventArgs eventArgs = new UpdateProgressFinishedEventArgs();
+ switch (_updateInfo.Status)
+ {
+ case NetSparkleUpdater.Enums.UpdateStatus.UpdateAvailable:
+ eventArgs.appUpdateCheckStatus = AppUpdateCheckStatus.UpdateAvailable;
+ break;
+ case NetSparkleUpdater.Enums.UpdateStatus.UpdateNotAvailable:
+ eventArgs.appUpdateCheckStatus = AppUpdateCheckStatus.NoUpdate;
+ break;
+ case NetSparkleUpdater.Enums.UpdateStatus.UserSkipped:
+ eventArgs.appUpdateCheckStatus = AppUpdateCheckStatus.UserSkip;
+ break;
+ case NetSparkleUpdater.Enums.UpdateStatus.CouldNotDetermine:
+ eventArgs.appUpdateCheckStatus = AppUpdateCheckStatus.CouldNotDetermine;
+ break;
+ }
+
+ OnUpdateCheckFinished(eventArgs);
+ }
+ }
+
+ public async void DownloadUpdate()
+ {
+ _sparkle.DownloadStarted -= OnDownloadStart;
+ _sparkle.DownloadStarted += OnDownloadStart;
+
+ _sparkle.DownloadFinished -= OnDownloadFinish;
+ _sparkle.DownloadFinished += OnDownloadFinish;
+
+ _sparkle.DownloadHadError -= OnDownloadError;
+ _sparkle.DownloadHadError += OnDownloadError;
+
+ _sparkle.DownloadMadeProgress += OnDownloadMadeProgress;
+
+ await _sparkle.InitAndBeginDownload(_updateInfo.Updates.First());
+ }
+
+ public void InstallUpdate()
+ {
+ _sparkle.CloseApplication += CloseApplication;
+ _sparkle.InstallUpdate(_updateInfo.Updates.First(), _downloadPath);
+ }
+
+ private void CloseApplication()
+ {
+ EventArgs eventArgs = new EventArgs();
+ EventHandler eventHandler = CloseApplicationEventHandler;
+ eventHandler(this, eventArgs);
+ }
+
+ private void OnDownloadStart(AppCastItem item, string path)
+ {
+ UpdateProgressDownloadStartEventArgs eventArgs = new UpdateProgressDownloadStartEventArgs();
+ eventArgs.UpdateSize = item.UpdateSize;
+ eventArgs.Version = item.Version;
+ EventHandler eventHandler = UpdateDownloadStartedEventHandler;
+ eventHandler(this, eventArgs);
+ }
+
+ private void OnDownloadFinish(AppCastItem item, string path)
+ {
+ _downloadPath = path;
+ EventArgs eventArgs = new EventArgs();
+ EventHandler eventHandler = UpdateDownloadFinishedEventHandler;
+ eventHandler(this, eventArgs);
+ }
+
+ private void OnDownloadMadeProgress(object sender, AppCastItem appCastItem, ItemDownloadProgressEventArgs e)
+ {
+ UpdateProgressDownloadEventArgs eventArgs = new UpdateProgressDownloadEventArgs();
+ eventArgs.AppUpdateProgress = e.ProgressPercentage;
+ EventHandler eventHandler = UpdateProgressEventHandler;
+ eventHandler(this, eventArgs);
+ }
+
+ private void OnDownloadError(AppCastItem item, string path, Exception ex)
+ {
+ UpdateProgressDownloadErrorEventArgs eventArgs = new UpdateProgressDownloadErrorEventArgs();
+ eventArgs.ErrorException = ex;
+ EventHandler eventHandler = UpdateProgressDownloadErrorEventHandler;
+ eventHandler(this, eventArgs);
+ }
+
+ private void OnUpdateCheckFinished(UpdateProgressFinishedEventArgs e)
+ {
+ EventHandler handler = SilentUpdateFinishedEventHandler;
+ handler(this, e);
+ }
+ }
+
+ public class UpdateProgressFinishedEventArgs : EventArgs
+ {
+ public AppUpdateCheckStatus appUpdateCheckStatus { get; set; }
+ }
+
+ public class UpdateProgressDownloadEventArgs : EventArgs
+ {
+ public int AppUpdateProgress { get; set; }
+ }
+
+ public class UpdateProgressDownloadErrorEventArgs : EventArgs
+ {
+ public Exception ErrorException { get; set; }
+ }
+
+ public class UpdateProgressDownloadStartEventArgs : EventArgs
+ {
+ public long UpdateSize { get; set; }
+ public string Version { get; set; }
+ }
+}
diff --git a/UnrealBinaryBuilderUpdater/appcast.xml b/UnrealBinaryBuilderUpdater/appcast.xml
new file mode 100644
index 0000000..b52ff48
--- /dev/null
+++ b/UnrealBinaryBuilderUpdater/appcast.xml
@@ -0,0 +1,24 @@
+
+
+
+ Unreal Binary Builder
+ Most recent changes with links to updates.
+ https://github.com/ryanjon2040/UE4-Binary-Builder/raw/master/UnrealBinaryBuilderUpdater/appcast.xml
+ en
+ -
+ Unreal Binary Builder 3.0.0
+ Sat, 09 Jan 2021 15:25:40 +05:30
+
+ https://netsparkleupdater.github.io/NetSparkle/files/sample-app/2.0-release-notes.md
+
+
+
+
+
+
diff --git a/UnrealBinaryBuilderUpdater/appcast.xml.signature b/UnrealBinaryBuilderUpdater/appcast.xml.signature
new file mode 100644
index 0000000..b867245
--- /dev/null
+++ b/UnrealBinaryBuilderUpdater/appcast.xml.signature
@@ -0,0 +1 @@
+/Z85Txx8oFCaI1Vc7/PvZWURgADH4DKXJwfdPHs7m2vNNBYkGmpySYqEr2Gf6JM7ppW6AmStwV8U0/dgKIGuAA==
\ No newline at end of file
diff --git a/UnrealBinaryBuilderUpdater/keys/NetSparkle_Ed25519.priv b/UnrealBinaryBuilderUpdater/keys/NetSparkle_Ed25519.priv
new file mode 100644
index 0000000..88f0311
--- /dev/null
+++ b/UnrealBinaryBuilderUpdater/keys/NetSparkle_Ed25519.priv
@@ -0,0 +1 @@
+7yPyZQM0+1dUPNkLdm4ZD8Gl/lpcFDTME9T7QisE/gw=
\ No newline at end of file
diff --git a/UnrealBinaryBuilderUpdater/keys/NetSparkle_Ed25519.pub b/UnrealBinaryBuilderUpdater/keys/NetSparkle_Ed25519.pub
new file mode 100644
index 0000000..1f5af1b
--- /dev/null
+++ b/UnrealBinaryBuilderUpdater/keys/NetSparkle_Ed25519.pub
@@ -0,0 +1 @@
++mLdLTe3Mj6OU0Kr6+ZDeVj+TTFRsNUJvUaPhuJ7pUI=
\ No newline at end of file
diff --git a/generate_appcast.bat b/generate_appcast.bat
new file mode 100644
index 0000000..7b6c47d
--- /dev/null
+++ b/generate_appcast.bat
@@ -0,0 +1,39 @@
+@echo off
+set tools_version=2.0.0-preview20201108002
+set appcast_path=%UserProfile%\.nuget\packages\netsparkleupdater.tools\%tools_version%\tools\windows\generate_appcast.exe
+set appcast_output=%cd%\UnrealBinaryBuilderUpdater
+set appcast_binary=%cd%\UnrealBinaryBuilder\bin\Release\netcoreapp3.1\win-x64
+set appcast_mainexe=%appcast_binary%\UnrealBinaryBuilder.exe
+set appcast_release=https://github.com/ryanjon2040/UE4-Binary-Builder/releases/tag/2.6.1
+set appcast_changelog=https://github.com/ryanjon2040/UE4-Binary-Builder/blob/master/README.md
+set appcast_default_key_path=%localappdata%\netsparkle
+
+set default_option=0
+echo 1 for export-keys
+echo 2 for force generate keys
+echo 3 for verifying
+echo 4 for generating appcast
+set /p option=What would you like to do?:
+
+echo %option%
+if %option% == 1 (
+ %appcast_path% --export true
+) else if %option% == 2 (
+ %appcast_path% --generate-keys --force true
+ %SystemRoot%\explorer.exe appcast_default_key_path
+ %appcast_path% --export true
+) else if %option% == 3 (
+ set /p input_signature=Input your signature
+ %appcast_path% --verify "%appcast_mainexe%" --signature %input_signature%
+) else if %option% == 4 (
+ if exist %appcast_path% (
+ echo Generating appcast.xml (Debug)
+ %appcast_path% -a "%appcast_output%" -b "%appcast_binary%" -e exe -o windows -u %appcast_release% -l %appcast_changelog% -n "Unreal Binary Builder" --key-path "%appcast_output%\keys"
+ echo Done.
+ ) else (
+ echo generate_appcast.exe was not found.
+ )
+)
+
+
+pause
\ No newline at end of file
diff --git a/publish.bat b/publish.bat
new file mode 100644
index 0000000..afd4d68
--- /dev/null
+++ b/publish.bat
@@ -0,0 +1,10 @@
+@echo off
+set output_dir=Output
+set binary_updater=UnrealBinaryBuilderUpdater\UnrealBinaryBuilderUpdater.csproj
+set binary_builder=UnrealBinaryBuilder\UnrealBinaryBuilder.csproj
+
+if not exist %output_dir% (mkdir %output_dir%)
+rmdir /s /q UnrealBinaryBuilder\bin
+rmdir /s /q UnrealBinaryBuilderUpdater\bin
+dotnet publish -c Release -r win-x64 --output %output_dir% %binary_builder% --self-contained true -p:PublishSingleFile=true
+pause
\ No newline at end of file