Build scripts done.
This commit is contained in:
parent
1732d7523a
commit
e7f360d284
5 changed files with 31 additions and 39 deletions
|
@ -1,5 +1,11 @@
|
|||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
|
||||
|
||||
public class BuildSrcipt
|
||||
{
|
||||
|
@ -9,26 +15,35 @@ public class BuildSrcipt
|
|||
[MenuItem("Build/Build WebGL")]
|
||||
static void BuildWebGL()
|
||||
{
|
||||
BuildPipeline.BuildPlayer(scenes, "./" + name + "_Web/" + name, BuildTarget.WebGL, BuildOptions.None);
|
||||
BuildPlatform("Web", BuildTarget.WebGL);
|
||||
}
|
||||
|
||||
[MenuItem("Build/Build Windows")]
|
||||
static void BuildWindows()
|
||||
{
|
||||
BuildPipeline.BuildPlayer(scenes, "./" + name + "_Windows/" + name, BuildTarget.StandaloneWindows64, BuildOptions.None);
|
||||
BuildPlatform("Windows", BuildTarget.StandaloneWindows64);
|
||||
}
|
||||
|
||||
[MenuItem("Build/Build Linux")]
|
||||
static void BuildLinux()
|
||||
{
|
||||
BuildPipeline.BuildPlayer(scenes, "./" + name + "_Linux/" + name, BuildTarget.StandaloneLinux64, BuildOptions.None);
|
||||
//System.Diagnostics.Process.Start("mkdir /home/piegames/Documents/GitHub/Bildschirmflausch.LD41/teghsfdt");
|
||||
//Debug.Log("fdsghjk");
|
||||
BuildPlatform("Linux", BuildTarget.StandaloneLinux64);
|
||||
}
|
||||
|
||||
[MenuItem("Build/Build All")]
|
||||
public static void BuildAll()
|
||||
{
|
||||
[MenuItem("Build/Build All")]
|
||||
public static void BuildAll()
|
||||
{
|
||||
BuildLinux();
|
||||
BuildWindows();
|
||||
BuildWebGL();
|
||||
}
|
||||
}
|
||||
|
||||
public static void BuildPlatform(String platformName, BuildTarget target) {
|
||||
Directory.Delete("./" + name + "_" + platformName, true);
|
||||
File.Delete("./Build/DungeonDrifter_" + platformName + ".zip");
|
||||
BuildPipeline.BuildPlayer(scenes, "./" + name + "_" + platformName + "/" + name, target, BuildOptions.None);
|
||||
//System.Diagnostics.Process.Start("zip -r Build/DungeonDrifter_" + platformName + ".zip " + platformName + "_" + platformName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class WebGLBuilder : MonoBehaviour
|
||||
{
|
||||
public static void BuildWebGL()
|
||||
{
|
||||
string[] scenes = { "Assets/main.unity" };
|
||||
Debug.Log("BLUUUUUUUUUUUUUU");
|
||||
BuildSrcipt.BuildAll();
|
||||
//UnityEditor.BuildPlayerOptions options = new BuildPlayerOptions();
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f78523fb1f3ae4a50a0a58566e475bf0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
9
build.sh
9
build.sh
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
unity-editor-beta -executeMethod Editor.BuildScript.BuildAll
|
||||
#unity-editor-beta -quit -batchmode -buildLinux64Player ./DungeonDrifter_Linux/DungeonDrifter
|
||||
#unity-editor-beta -quit -batchmode -buildWindows64Player ./DungeonDrifter_Windows/DungeonDrifter
|
||||
|
||||
#zip -r Build/DungeonDrifter_Windows.zip DungeonDrifter_Windows
|
||||
#zip -r Build/DungeonDrifter_Linux.zip DungeonDrifter_Linux
|
||||
#zip -r Build/DungeonDrifter_Web.zip DungeonDrifter_Web
|
9
package.sh
Executable file
9
package.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
#unity-editor-beta -executeMethod Editor.BuildScript.BuildAll
|
||||
#unity-editor-beta -quit -batchmode -buildLinux64Player ./DungeonDrifter_Linux/DungeonDrifter
|
||||
#unity-editor-beta -quit -batchmode -buildWindows64Player ./DungeonDrifter_Windows/DungeonDrifter
|
||||
|
||||
zip -r Build/DungeonDrifter_Windows.zip DungeonDrifter_Windows
|
||||
zip -r Build/DungeonDrifter_Linux.zip DungeonDrifter_Linux
|
||||
zip -r Build/DungeonDrifter_Web.zip DungeonDrifter_Web
|
Loading…
Add table
Reference in a new issue