-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added websocket sharp to server proj * Added beginnings of websocket server/client * Fixed refreshing views when changing projects * Removed views from home menu item template * Changed home page process items to be build via C# * Updated readme * Fixed controls in home screen * Added a single ping/pong from client to server * Added build server for server * Added ServerClientShared proj for network package sending * Got payload from /build service * Change test projects file structure * Update AvaloniaAppMVVM.csproj * Added Unity IL2CPP test proj * Fixed json package properly * Improved build target form page * Fixed enum selections in targets page * Improved app project data persistence * Added cloning git repo * Updated git build process - Removed test project into own repo * Update README.md * Fixed getting branches now from local repo ref * Added back starting client * Fixed checking if settings paths exists * Removed BuildPath * Updated build processes * Removed not needed files for unity package * Update package.json * Fixed switching branch in git * Added switching branch before update * Improved gui app locking up when trying to connect to server when server is not running * Update Git.cs * Moved UnityBuilder into Build folder * Create UnityHub.cs * Update UnityHub.cs * Added build runner for unity builds * Update Program.cs * Fixed cancellation issues * Attempt at uploading zip files * Changed uploads to raw files rather than zip * Prepared proj for deployment runners * Added copying steam sdk to output dir * Removed stuff from steam sdk not needed * Added xcode deploy scaffold * Added google deploy proj * Added aws deployment proj * Added unity services proj * Added clanforge and itchio projs * Moved build runner to offload server proj * moved stuff to main server proj * Added server retries when disconnected * Preparing new main server proj * Prepare for testing new server layout * Added branch to build service message request * Fixed connecting to offload servers * Beginnings of making custom websocket server * Added TPC connection * Improved file up/downloads * Removed WebsocketSharp in favour for custom TPC connections * Established connection from gui app to server * Added loop to keep trying client connection if server isnt up * Updated unity package to serialise enums as strings * Moved projects into proper folders * Added a way to extract as much data from EditorUserBuildSettings as i can for build options * Updated Unity builds * Removed code not needed * Added test for uploading multiple directories in a queue * Fixed not all builds getting to runner server * code tidy * Update launchSettings.json * Move deployment runner to new MainServer proj * Finished deployments to main server proj
- Loading branch information
Showing
311 changed files
with
9,873 additions
and
8,947 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using ServerClientShared; | ||
|
||
namespace AvaloniaAppMVVM.Data.Shared; | ||
|
||
/// <summary> | ||
/// Unity Build Target, synced with <see cref="ServerClientShared.UnityBuildTarget"/> | ||
/// </summary> | ||
public class UnityBuildTargetTemplate(UnityBuildTarget data) : CiProcess | ||
{ | ||
public UnityBuildTarget Data { get; set; } = data; | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Newtonsoft.Json.Linq; | ||
using SocketServer; | ||
|
||
namespace AvaloniaAppMVVM.Services; | ||
|
||
public class BuildClientService(Client client) : ClientService(client) | ||
{ | ||
public override string Name => "build"; | ||
|
||
public override void OnStringMessage(string message) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override void OnDataMessage(byte[] data) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override void OnJsonMessage(JObject payload) | ||
{ | ||
Console.WriteLine($"BuildClientService: Received json message: {payload}"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using Newtonsoft.Json.Serialization; | ||
|
||
namespace AvaloniaAppMVVM.Utils; | ||
|
||
/// <summary> | ||
/// Wrapper class for JsonConvert | ||
/// </summary> | ||
public static class Json | ||
{ | ||
private static readonly JsonSerializerSettings _settings = new() | ||
{ | ||
ContractResolver = new CamelCasePropertyNamesContractResolver(), | ||
Formatting = Formatting.Indented, | ||
NullValueHandling = NullValueHandling.Ignore, | ||
Converters = | ||
{ | ||
new StringEnumConverter(), | ||
} | ||
}; | ||
|
||
public static string Serialise(object? obj) | ||
{ | ||
try | ||
{ | ||
return JsonConvert.SerializeObject(obj, _settings); | ||
} | ||
catch (Exception e) | ||
{ | ||
Console.WriteLine($"Failed to serialise object: {obj}"); | ||
return string.Empty; | ||
} | ||
} | ||
|
||
public static T? Deserialise<T>(string jsonStr) | ||
{ | ||
try | ||
{ | ||
return JsonConvert.DeserializeObject<T>(jsonStr, _settings); | ||
} | ||
catch (Exception e) | ||
{ | ||
Console.WriteLine($"Failed to deserialise to type: {typeof(T).Name}, json: {jsonStr}"); | ||
throw; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,146 @@ | ||
using System.Collections.ObjectModel; | ||
using System.Runtime.Serialization; | ||
using AvaloniaAppMVVM.Data; | ||
using AvaloniaAppMVVM.Data.Shared; | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
using CommunityToolkit.Mvvm.Input; | ||
using ServerClientShared; | ||
|
||
namespace AvaloniaAppMVVM.ViewModels; | ||
|
||
public partial class BuildTargetsViewModel : ViewModelBase | ||
{ | ||
public ObservableCollection<UnityBuildTarget> BuildTargets { get; } = []; | ||
public Project Project { get; set; } | ||
|
||
[IgnoreDataMember] | ||
public static ObservableCollection<string> ExtensionOptions { get; } = | ||
[".exe", ".app", ".x86_64", ".aab", "/"]; | ||
|
||
[IgnoreDataMember] | ||
public static ObservableCollection<Unity.BuildTarget> BuildTargetOptions { get; } = | ||
new(Enum.GetValues<Unity.BuildTarget>()); | ||
|
||
[IgnoreDataMember] | ||
public static ObservableCollection<Unity.BuildTargetGroup> BuildTargetGroupOptions { get; } = | ||
new(Enum.GetValues<Unity.BuildTargetGroup>()); | ||
|
||
[IgnoreDataMember] | ||
public static ObservableCollection<Unity.SubTarget> SubTargetOptions { get; } = | ||
new(Enum.GetValues<Unity.SubTarget>()); | ||
|
||
[IgnoreDataMember] | ||
public static ObservableCollection<Unity.BuildOptions> BuildOptionOptions { get; } = | ||
new(Enum.GetValues<Unity.BuildOptions>()); | ||
|
||
public ObservableCollection<UnityBuildTargetTemplate> BuildTargets { get; } = []; | ||
public ObservableCollection<NewBuildTargetTemplate> NewTargetTemplates { get; } = | ||
[ | ||
new NewBuildTargetTemplate( | ||
"Windows", | ||
Unity.BuildTarget.StandaloneWindows64, | ||
Unity.BuildTargetGroup.Standalone, | ||
".exe" | ||
), | ||
new NewBuildTargetTemplate( | ||
"Mac", | ||
Unity.BuildTarget.StandaloneOSX, | ||
Unity.BuildTargetGroup.Standalone, | ||
".app" | ||
), | ||
new NewBuildTargetTemplate( | ||
"Linux", | ||
Unity.BuildTarget.StandaloneLinux64, | ||
Unity.BuildTargetGroup.Standalone, | ||
".x86_64" | ||
), | ||
new NewBuildTargetTemplate( | ||
"Android", | ||
Unity.BuildTarget.Android, | ||
Unity.BuildTargetGroup.Android, | ||
".apk" | ||
), | ||
new NewBuildTargetTemplate( | ||
"iOS", | ||
Unity.BuildTarget.iOS, | ||
Unity.BuildTargetGroup.iOS, | ||
"/" | ||
), | ||
]; | ||
|
||
[ObservableProperty] | ||
private UnityBuildTargetTemplate? _selectedBuildTarget; | ||
|
||
[ObservableProperty] | ||
private NewBuildTargetTemplate? _selectedNewTargetTemplate; | ||
|
||
[ObservableProperty] | ||
private bool _showContent; | ||
|
||
[ObservableProperty] | ||
private UnityBuildTarget? _selectedBuildTarget; | ||
private bool _showError = true; | ||
|
||
partial void OnSelectedBuildTargetChanged(UnityBuildTargetTemplate? value) | ||
{ | ||
ShowContent = true; | ||
ShowError = false; | ||
} | ||
|
||
[RelayCommand] | ||
public void NewTargetCommand(string name) | ||
{ | ||
var template = NewTargetTemplates.FirstOrDefault(template => template.Name == name); | ||
|
||
if (template is null) | ||
return; | ||
|
||
var data = new UnityBuildTarget | ||
{ | ||
Name = template.Name, | ||
ProductName = Project.Settings.ProjectName, | ||
Target = template.Target, | ||
SubTarget = Unity.SubTarget.Player, | ||
TargetGroup = template.TargetGroup, | ||
Extension = template.Extension | ||
}; | ||
|
||
var newTarget = new UnityBuildTargetTemplate(data); | ||
BuildTargets.Add(newTarget); | ||
SelectedBuildTarget = newTarget; | ||
} | ||
|
||
[RelayCommand] | ||
public void DeleteTargetCommand(string name) | ||
{ | ||
foreach (var target in BuildTargets) | ||
{ | ||
if (target.Data.Name != name) | ||
continue; | ||
|
||
BuildTargets.Remove(target); | ||
break; | ||
} | ||
|
||
if (BuildTargets.Count > 0) | ||
{ | ||
SelectedBuildTarget = BuildTargets[0]; | ||
} | ||
else | ||
{ | ||
ShowContent = false; | ||
ShowError = true; | ||
} | ||
} | ||
} | ||
|
||
public class NewBuildTargetTemplate( | ||
string? name, | ||
Unity.BuildTarget target, | ||
Unity.BuildTargetGroup targetGroup, | ||
string? extension | ||
) | ||
{ | ||
public string? Name { get; set; } = name; | ||
public Unity.BuildTarget Target { get; set; } = target; | ||
public Unity.BuildTargetGroup TargetGroup { get; set; } = targetGroup; | ||
public string? Extension { get; set; } = extension; | ||
} |
Oops, something went wrong.