private static void PerformServerBuild()
    {
        BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions();

        buildPlayerOptions.scenes           = new[] { "Assets/scenes/Lobby.unity", "Assets/scenes/OutpostStation.unity" };
        buildPlayerOptions.locationPathName = "../Tools/ContentBuilder/content/Server/Unitystation-Server";
        buildPlayerOptions.target           = BuildTarget.StandaloneLinux64;
        buildPlayerOptions.options          = BuildOptions.None;
        BuildPreferences.SetRelease(true);
        BuildPipeline.BuildPlayer(buildPlayerOptions);
    }
    private static void PerformLinuxBuild()
    {
        BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions();

        buildPlayerOptions.scenes           = new[] { "Assets/scenes/Lobby.unity", "Assets/scenes/OutpostStation.unity" };
        buildPlayerOptions.locationPathName = "../Tools/ContentBuilder/content/Linux/Unitystation";
        buildPlayerOptions.target           = BuildTarget.StandaloneLinux64;
        buildPlayerOptions.options          = BuildOptions.Development | BuildOptions.AllowDebugging | BuildOptions.CompressWithLz4HC;
        BuildPreferences.SetRelease(true);
        BuildPipeline.BuildPlayer(buildPlayerOptions);
    }
    private static void PerformOSXBuild()
    {
        BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions();

        buildPlayerOptions.scenes           = new[] { "Assets/scenes/Lobby.unity", "Assets/scenes/OutpostStation.unity" };
        buildPlayerOptions.locationPathName = "../Tools/ContentBuilder/content/OSX/Unitystation.app";
        buildPlayerOptions.target           = BuildTarget.StandaloneOSX;
        buildPlayerOptions.options          = BuildOptions.CompressWithLz4HC;
        BuildPreferences.SetRelease(true);
        BuildPipeline.BuildPlayer(buildPlayerOptions);
    }
Exemple #4
0
    private static void PerformWindowsBuild()
    {
        BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions();

        buildPlayerOptions.scenes           = new[] { "Assets/scenes/Lobby.unity", "Assets/scenes/OutpostDeathmatch.unity" };
        buildPlayerOptions.locationPathName = "../Tools/ContentBuilder/content/Windows/Unitystation.exe";
        buildPlayerOptions.target           = BuildTarget.StandaloneWindows64;
        buildPlayerOptions.options          = BuildOptions.Development;
        buildPlayerOptions.options          = BuildOptions.CompressWithLz4HC;
        BuildPreferences.SetRelease(true);
        BuildPipeline.BuildPlayer(buildPlayerOptions);
    }
    private static void PerformServerBuild()
    {
        BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions();

        buildPlayerOptions.scenes           = new[] { "Assets/scenes/Lobby.unity", "Assets/scenes/OutpostDeathmatch.unity", "Assets/scenes/Flashlight Deathmatch.unity" };
        buildPlayerOptions.locationPathName = "../Tools/ContentBuilder/content/Server/Unitystation-Server";
        buildPlayerOptions.target           = BuildTarget.StandaloneLinux64;
        buildPlayerOptions.options          = BuildOptions.EnableHeadlessMode;
        buildPlayerOptions.options          = BuildOptions.CompressWithLz4HC;
        BuildPreferences.SetRelease(true);
        BuildPipeline.BuildPlayer(buildPlayerOptions);
    }
Exemple #6
0
    //IMPORTANT: ALWAYS DO WINDOWS BUILD FIRST IN YOUR BUILD CYCLE:
    private static void PerformWindowsBuild()
    {
        //Always build windows client first so that build info can increment the build number
        int       buildNum        = 0;
        var       buildInfo       = JsonUtility.FromJson <BuildInfo>(File.ReadAllText(Path.Combine(Application.streamingAssetsPath, "buildinfo.json")));
        BuildInfo buildInfoUpdate = new BuildInfo();

        if (File.Exists(Path.Combine(Application.streamingAssetsPath, "buildinfoupdate.json")))
        {
            buildInfoUpdate = JsonUtility.FromJson <BuildInfo>(File.ReadAllText(Path.Combine(Application.streamingAssetsPath, "buildinfoupdate.json")));

            //Allows build number ranges to be forced by committing a change to buildinfo.json
            //buildinfoupdate is gitignored so it can be stored on the build server
            if (buildInfoUpdate.BuildNumber < buildInfo.BuildNumber)
            {
                buildInfoUpdate.BuildNumber = buildInfo.BuildNumber;
            }
        }
        else
        {
            buildInfoUpdate.BuildNumber = buildInfo.BuildNumber;
        }

        buildInfoUpdate.BuildNumber++;
        buildInfo.BuildNumber = buildInfoUpdate.BuildNumber;
        File.WriteAllText(Path.Combine(Application.streamingAssetsPath, "buildinfo.json"), JsonUtility.ToJson(buildInfo));
        File.WriteAllText(Path.Combine(Application.streamingAssetsPath, "buildinfoupdate.json"), JsonUtility.ToJson(buildInfoUpdate));

        BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions();

        buildPlayerOptions.scenes = new[] { "Assets/scenes/StartUp.unity", "Assets/scenes/Lobby.unity",
                                            "Assets/scenes/BoxStationV1.unity", "Assets/scenes/OutpostStation.unity",
                                            "Assets/scenes/PogStation.unity", "Assets/scenes/AsteroidStation.unity" };
        buildPlayerOptions.locationPathName = "../Tools/ContentBuilder/content/Windows/Unitystation.exe";
        buildPlayerOptions.target           = BuildTarget.StandaloneWindows64;
        buildPlayerOptions.options          = BuildOptions.CompressWithLz4HC;
        BuildPreferences.SetRelease(true);
        BuildPipeline.BuildPlayer(buildPlayerOptions);
    }