修改自动打包
parent
d49b472d3e
commit
1789f84530
|
|
@ -13,20 +13,20 @@ using Debug = UnityEngine.Debug;
|
|||
class BuildLauncher
|
||||
{
|
||||
private const string HybirdCLRGenerateDir = "/HybridCLRGenerate";
|
||||
|
||||
|
||||
private const string GameLauncherSceneName = "Assets/Scenes/GameLauncher.unity";
|
||||
|
||||
|
||||
|
||||
|
||||
private const string RemoteUser = "root";
|
||||
|
||||
private const string RemoteHost = "132.232.113.98";
|
||||
|
||||
private const string RemotePath = "/var/www/html/nld/{0}/{1}/{2}";
|
||||
|
||||
|
||||
public static void BuildHotUpdateDlls()
|
||||
{
|
||||
// VersionControlSystem.Checkout(HybirdCLRGenerateDir);
|
||||
BuildLauncherBase.SetFileReadable(Application.dataPath+HybirdCLRGenerateDir);
|
||||
// VersionControlSystem.Checkout(HybirdCLRGenerateDir);
|
||||
BuildLauncherBase.SetFileReadable(Application.dataPath + HybirdCLRGenerateDir);
|
||||
PrebuildCommand.GenerateAll();
|
||||
HotUpadeEditorHelper.CopyHotUpdateDll();
|
||||
HotUpadeEditorHelper.CopyMetaDataDll();
|
||||
|
|
@ -53,8 +53,10 @@ class BuildLauncher
|
|||
EditorSceneManager.CloseScene(gameLauncherScene, false);
|
||||
HybridCLR.Editor.SettingsUtil.Enable = isEnable;
|
||||
}
|
||||
|
||||
public static bool BuildAddressables(BuildTarget buildTarget, string profileName, string version,
|
||||
|
||||
public static bool BuildAddressables(BuildTarget buildTarget,
|
||||
string profileName,
|
||||
string version,
|
||||
string workSpace,
|
||||
bool ignoreHotUpdate,
|
||||
bool needClearCached = false,
|
||||
|
|
@ -71,8 +73,11 @@ class BuildLauncher
|
|||
groups, RemoteUser, RemoteHost, RemotePath);
|
||||
|
||||
}
|
||||
|
||||
public static void UpdatePreviousBuild(string profileName, bool ignoreHotUpdate, BuildTarget buildTarget,string workSpace)
|
||||
|
||||
public static void UpdatePreviousBuild(string profileName,
|
||||
bool ignoreHotUpdate,
|
||||
BuildTarget buildTarget,
|
||||
string workSpace)
|
||||
{
|
||||
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildPipeline.GetBuildTargetGroup(buildTarget), buildTarget);
|
||||
|
||||
|
|
@ -84,8 +89,10 @@ class BuildLauncher
|
|||
BuildLauncherBase.UpdatePreviousBuild(profileName, buildTarget, workSpace, RemoteUser, RemoteHost, RemotePath);
|
||||
}
|
||||
|
||||
|
||||
public static void BuildAddressablesAndPlayer(BuildTarget buildTarget, string profileName, string version,
|
||||
|
||||
public static void BuildAddressablesAndPlayer(BuildTarget buildTarget,
|
||||
string profileName,
|
||||
string version,
|
||||
string workSpace,
|
||||
bool ignoreHotUpdate,
|
||||
bool needClearCached = false)
|
||||
|
|
@ -113,7 +120,7 @@ internal class BatchBuild
|
|||
public static void BuildAddressables()
|
||||
{
|
||||
var enableHotUpdate = BatchBuildBase.Init();
|
||||
if(enableHotUpdate)
|
||||
if (enableHotUpdate)
|
||||
BuildLauncher.BuildHotUpdateDlls();
|
||||
BatchBuildBase.BuildAddressables();
|
||||
}
|
||||
|
|
@ -153,17 +160,14 @@ internal class BatchBuild
|
|||
newDefineList.AddRange(appendDefineList);
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(currentTargetGroup, string.Join(";", newDefineList));
|
||||
}
|
||||
// 等待编译
|
||||
EditorApplication.delayCall += () =>
|
||||
{
|
||||
var enableHotUpdate = BatchBuildBase.Init();
|
||||
if(enableHotUpdate)
|
||||
BuildLauncher.BuildHotUpdateDlls();
|
||||
BatchBuildBase.BuildContentAndPlayer();
|
||||
|
||||
// 还原宏
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(currentTargetGroup, oldDefines);
|
||||
};
|
||||
|
||||
var enableHotUpdate = BatchBuildBase.Init();
|
||||
if (enableHotUpdate)
|
||||
BuildLauncher.BuildHotUpdateDlls();
|
||||
BatchBuildBase.BuildContentAndPlayer();
|
||||
|
||||
// 还原宏
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(currentTargetGroup, oldDefines);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -172,10 +176,9 @@ internal class BatchBuild
|
|||
public static void UpdatePreviousBuild()
|
||||
{
|
||||
var enableHotUpdate = BatchBuildBase.Init();
|
||||
if(enableHotUpdate)
|
||||
if (enableHotUpdate)
|
||||
BuildLauncher.BuildHotUpdateDlls();
|
||||
BatchBuildBase.UpdatePreviousBuild();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue