void DrawConfigGUI() { GUILayout.Space(3); GUILayout.Label("-------------[Config]-------------"); GUILayout.Space(3); GUILayout.BeginHorizontal(); GUILayout.Label("app_version", GUILayout.Width(80)); string curBundleVersion = GUILayout.TextField(appVersion, GUILayout.Width(100)); if (curBundleVersion != appVersion) { appVersion = curBundleVersion; PlayerSettings.bundleVersion = curBundleVersion; SaveLocalVersionFile(buildTarget, channelType); } GUILayout.EndHorizontal(); GUILayout.Space(3); GUILayout.BeginHorizontal(); GUILayout.Label("res_version", GUILayout.Width(80)); string curResVersion = GUILayout.TextField(resVersion, GUILayout.Width(100)); if (curResVersion != resVersion) { resVersion = curResVersion; SaveLocalVersionFile(buildTarget, channelType); } GUILayout.EndHorizontal(); GUILayout.Space(3); GUILayout.BeginHorizontal(); if (PackageUtils.BuildAssetBundlesForPerChannel(buildTarget)) { if (GUILayout.Button("Load Version From Channel", GUILayout.Width(200))) { ReadLocalVersionFile(buildTarget, channelType); } if (GUILayout.Button("Validate All Channels ResVersion", GUILayout.Width(200))) { ValidateAllLocalVersions(); } if (GUILayout.Button("Save Version To All Channels", GUILayout.Width(200))) { SaveAllVersionFile(); } } else { if (GUILayout.Button("Load Version From Channel", GUILayout.Width(200))) { ReadLocalVersionFile(buildTarget, channelType); } if (GUILayout.Button("Save Version To Channel", GUILayout.Width(200))) { SaveLocalVersionFile(buildTarget, channelType); } } GUILayout.EndHorizontal(); }
public static void GenXLuaCode(BuildTarget buildTarget) { PackageUtils.CheckAndAddSymbolIfNeeded(buildTarget, "HOTFIX_ENABLE"); CSObjectWrapEditor.Generator.ClearAll(); CSObjectWrapEditor.Generator.GenAll(); }
static public void ToolsOpenOutput() { string outputPath = PackageUtils.GetCurBuildSettingAssetBundleOutputPath(); EditorUtils.ExplorerFolder(outputPath); }
public static string GetPlatformChannelPath(BuildTarget target, string channelName) { return(Path.Combine(PackageUtils.GetPlatformName(target), channelName)); }
void DrawConfigGUI() { GUILayout.Space(3); GUILayout.Label("-------------[Config]-------------"); GUILayout.Space(3); GUILayout.BeginHorizontal(); GUILayout.Label("res_version", GUILayout.Width(100)); string curResVersion = GUILayout.TextField(resVersion, GUILayout.Width(100)); if (curResVersion != resVersion) { resVersion = curResVersion; SaveAllCurrentVersionFile(true); } GUILayout.Label("Auto increase sub version, otherwise modify the text directly!", GUILayout.Width(500)); GUILayout.EndHorizontal(); GUILayout.Space(3); GUILayout.BeginHorizontal(); GUILayout.Label("notice_version", GUILayout.Width(100)); GUILayout.Label("1.0.0", GUILayout.Width(100)); GUILayout.Label("No supported yet!", GUILayout.Width(500)); GUILayout.EndHorizontal(); GUILayout.Space(3); GUILayout.BeginHorizontal(); GUILayout.Label("app_version", GUILayout.Width(100)); string curBundleVersion = GUILayout.TextField(bundleVersion, GUILayout.Width(100)); if (curBundleVersion != bundleVersion) { bundleVersion = curBundleVersion; PlayerSettings.bundleVersion = curBundleVersion; } GUILayout.Label("Auto increase sub version, otherwise modify the text directly or go to PlayerSetting!", GUILayout.Width(500)); GUILayout.EndHorizontal(); GUILayout.Space(3); GUILayout.BeginHorizontal(); if (PackageUtils.BuildAssetBundlesForPerChannel(buildTarget)) { if (GUILayout.Button("Load ResVersion From Channel", GUILayout.Width(200))) { LoadCurrentResVersionFromFile(); } if (GUILayout.Button("Validate All Channels ResVersion", GUILayout.Width(200))) { ValidateAllResVersionFile(); } if (GUILayout.Button("Save Version To All Channels", GUILayout.Width(200))) { SaveAllVersionFile(); } } else { if (GUILayout.Button("Load ResVersion From Channel", GUILayout.Width(200))) { LoadCurrentResVersionFromFile(); } if (GUILayout.Button("Save All Version To Channel", GUILayout.Width(200))) { SaveAllCurrentVersionFile(); } } GUILayout.EndHorizontal(); }
static public void ToolsCopyLuaScriptsToAssetbundles() { PackageUtils.CopyLuaScriptsToStreamingAssets(); }
public string GetRepoURLTest(string packageId) { return(PackageUtils.GetRepoHttpUrl(packageId)); }
/// <summary> /// Initializes a new instance of the <see cref="LogsViewerToolWindowControl"/> class. /// </summary> public LogsViewerToolWindowControl() { PackageUtils.ReferenceType(typeof(VisibilityConverter)); InitializeComponent(); }
public string GetRepoURLTest(bool isPackageInfoExist) { return(PackageUtils.GetRepoHttpUrl(isPackageInfoExist ? pi : null)); }
public string GetRevisionHashTest(bool isPackageInfoExist) { return(PackageUtils.GetRevisionHash(isPackageInfoExist ? pi : null)); }
public override void Submit_OnClick(object sender, EventArgs e) { if (TranslateUtils.ToBool(RblInstallType.SelectedValue)) { if (HifFile.PostedFile == null || HifFile.PostedFile.FileName == "") { return; } var filePath = HifFile.PostedFile.FileName; if (!StringUtils.EqualsIgnoreCase(Path.GetExtension(filePath), ".nupkg")) { FailMessage("必须上传后缀为.nupkg的文件"); return; } var idAndVersion = Path.GetFileNameWithoutExtension(filePath); var directoryPath = PathUtils.GetPackagesPath(idAndVersion); var localFilePath = PathUtils.Combine(directoryPath, idAndVersion + ".nupkg"); if (!Directory.Exists(directoryPath)) { Directory.CreateDirectory(directoryPath); } HifFile.PostedFile.SaveAs(localFilePath); ZipUtils.UnpackFiles(localFilePath, directoryPath); string errorMessage; if (!PackageUtils.UpdatePackage(idAndVersion, false, out errorMessage)) { FailMessage($"手动安装插件失败:{errorMessage}"); return; } Body.AddAdminLog("手动安装插件:" + idAndVersion); LayerUtils.CloseAndRedirect(Page, PageManagement.GetRedirectUrl()); } else { string errorMessage; try { PackageUtils.DownloadPackage(TbPluginId.Text, TbVersion.Text); } catch (Exception ex) { FailMessage($"手动安装插件失败:{ex.Message}"); return; } var idWithVersion = $"{TbPluginId.Text}.{TbVersion.Text}"; if (!PackageUtils.UpdatePackage(idWithVersion, false, out errorMessage)) { FailMessage($"手动安装插件失败:{errorMessage}"); return; } Body.AddAdminLog($"手动安装插件:{TbPluginId.Text} {TbVersion.Text}"); LayerUtils.CloseAndRedirect(Page, PageManagement.GetRedirectUrl()); } }
{ RuntimePlatform.WindowsEditor })] // URIs require a <drive>:\\ on Windows, see UriFormatException public void TestRelativeFolderPathTrailingSlash() { var res = PackageUtils.GetRelativeFolderPath("/path/to/folder/", "/path/to/folder/subfolder/file.ext"); Assert.That(res == "subfolder"); }
public void InstallDependenciesPackage(string path) { _ui.parent.SetEnabled(false); PackageUtils.AddOrUpdatePackage(path, () => { _ui.SetEnabled(true); }); }
public static void CopyAndroidSDKResources() { PackageUtils.CopyAndroidSDKResources(channelType.ToString()); }
public string GetRepoIdTest(string packageId) { return(PackageUtils.GetRepoId(packageId)); }
public static void WritePackageNameFile(BuildTarget buildTarget, string channelName) { var outputPath = PackageUtils.GetBuildPlatformOutputPath(buildTarget, channelName); GameUtility.SafeWriteAllText(Path.Combine(outputPath, BuildUtils.PackageNameFileName), channelName); }
public static string ReadVersionFile(BuildTarget target, ChannelType channel) { string rootPath = PackageUtils.GetBuildPlatformOutputPath(target, channel.ToString()); return(GameUtility.SafeReadAllText(Path.Combine(rootPath, BuildUtils.ResVersionFileName))); }