diff --git a/GGJ/Assets/Editor/BuildPipeline/BuildManager.cs b/GGJ/Assets/Editor/BuildPipeline/BuildManager.cs index ff3dd22..a6b27e4 100644 --- a/GGJ/Assets/Editor/BuildPipeline/BuildManager.cs +++ b/GGJ/Assets/Editor/BuildPipeline/BuildManager.cs @@ -15,7 +15,7 @@ //TODO: publish to itch.io via butler public static class BuildManager { //TODO: move to settings that can be changed in editor; - const string butlerRelativePath = @"Thirdparty/Editor/butler/butler.exe"; + const string butlerRelativePath = @"Editor/butler/butler.exe"; static string[] channelNames = new string[] { "windows-32", "windows-64", @@ -23,8 +23,8 @@ public static class BuildManager { "osx-universal", "webgl", "android", - //"ios", - //"uwp", + "ios", + "uwp", }; @@ -84,6 +84,7 @@ static void BuildAll() { buildsPath.Add(BuildLinux(true)); buildsPath.Add(BuildOSX(true)); buildsPath.Add(BuildWeb(true)); + buildsPath.Add(BuildAndroid(true)); EditorUserBuildSettings.SwitchActiveBuildTarget(targetGroupBeforeStart, targetBeforeStart); Debug.Log($"End building all. Elapsed time: {string.Format("{0:mm\\:ss}", DateTime.Now - startTime)}"); @@ -172,8 +173,8 @@ public static string BuildAndroid(bool isInBuildSequence) { isInBuildSequence ? BuildOptions.None : BuildOptions.ShowBuiltPlayer, !isInBuildSequence, !isInBuildSequence, - "", - $"{PlayerSettings.productName}_{PlayerSettings.bundleVersion}.{LastBuildPatch}.apk" + ".apk", + $".apk" ); } @@ -183,15 +184,15 @@ public static string BuildIos(bool isInBuildSequence) { isInBuildSequence ? BuildOptions.None : BuildOptions.ShowBuiltPlayer, !isInBuildSequence, !isInBuildSequence, - "", - $"{PlayerSettings.productName}_{PlayerSettings.bundleVersion}.{LastBuildPatch}.ipa" + ".ipa", + $".ipa" ); } static string BaseBuild(BuildTargetGroup buildTargetGroup, BuildTarget buildTarget, BuildOptions buildOptions, bool needReturnBuildTarget, bool incrementPatch, string folderPath, string buildPath) { folderPath = folderPath.Replace(' ', '-'); buildPath = buildPath.Replace(' ', '-'); - string basePath = $"Builds/{PlayerSettings.productName}_{PlayerSettings.bundleVersion}.{LastBuildPatch}"; + string basePath = $"Builds/{PlayerSettings.productName}_{PlayerSettings.bundleVersion}.{LastBuildPatch}".Replace(' ', '-'); BuildTarget targetBeforeStart = EditorUserBuildSettings.activeBuildTarget; BuildTargetGroup targetGroupBeforeStart = BuildPipeline.GetBuildTargetGroup(targetBeforeStart); @@ -237,7 +238,10 @@ static string BaseBuild(BuildTargetGroup buildTargetGroup, BuildTarget buildTarg public static void Compress(string dirPath) { using (ZipFile zip = new ZipFile()) { DateTime startTime = DateTime.Now; - zip.AddDirectory(dirPath); + if(Directory.Exists(dirPath)) + zip.AddDirectory(dirPath); + else + zip.AddFile(dirPath); zip.Save(dirPath + ".zip"); long uncompresedSize = 0; @@ -257,13 +261,13 @@ public static void Push(string dirPath, string channelName) { fileName.Append("/"); fileName.Append(butlerRelativePath); - args.Append("push \""); + args.Append(" push \""); args.Append(Application.dataPath); args.Append("/../"); args.Append(dirPath); args.Append("\" "); - args.Append($"teamon/{PlayerSettings.productName}:{channelName} "); + args.Append($"teamon/{PlayerSettings.productName.Replace(' ', '-')}:{channelName} "); args.Append($"--userversion {PlayerSettings.bundleVersion}.{LastBuildPatch} "); Debug.Log(fileName.ToString() + args.ToString()); diff --git a/GGJ/ProjectSettings/GraphicsSettings.asset b/GGJ/ProjectSettings/GraphicsSettings.asset index ab4d074..7c75f03 100644 --- a/GGJ/ProjectSettings/GraphicsSettings.asset +++ b/GGJ/ProjectSettings/GraphicsSettings.asset @@ -34,6 +34,7 @@ GraphicsSettings: - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} diff --git a/GGJ/ProjectSettings/ProjectSettings.asset b/GGJ/ProjectSettings/ProjectSettings.asset index c4342bf..1af1e02 100644 --- a/GGJ/ProjectSettings/ProjectSettings.asset +++ b/GGJ/ProjectSettings/ProjectSettings.asset @@ -285,7 +285,99 @@ PlayerSettings: m_Width: 128 m_Height: 128 m_Kind: 0 - m_BuildTargetPlatformIcons: [] + m_BuildTargetPlatformIcons: + - m_BuildTarget: Android + m_Icons: + - m_Textures: [] + m_Width: 432 + m_Height: 432 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 324 + m_Height: 324 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 216 + m_Height: 216 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 162 + m_Height: 162 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 108 + m_Height: 108 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 81 + m_Height: 81 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 192 + m_Height: 192 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 144 + m_Height: 144 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 96 + m_Height: 96 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 72 + m_Height: 72 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 48 + m_Height: 48 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 36 + m_Height: 36 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 192 + m_Height: 192 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 144 + m_Height: 144 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 96 + m_Height: 96 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 72 + m_Height: 72 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 48 + m_Height: 48 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 36 + m_Height: 36 + m_Kind: 1 + m_SubKind: m_BuildTargetBatching: [] m_BuildTargetGraphicsAPIs: - m_BuildTarget: AndroidPlayer