dzduole 1 mês atrás
commit
02d6a4b107
100 arquivos alterados com 2306 adições e 0 exclusões
  1. 1 0
      client/laya/.gitignore
  2. 620 0
      client/laya/.laya/_pub_old/_publish_1742208354874.js
  3. 283 0
      client/laya/.laya/_pub_old/_publish_bytedancegame_1742208354865.js
  4. 479 0
      client/laya/.laya/_pub_old/_publish_oppogame_1742208354868.js
  5. 283 0
      client/laya/.laya/_pub_old/_publish_qqgame_1742208354870.js
  6. 185 0
      client/laya/.laya/_pub_old/_publish_taobaominiapp_1742208354856.js
  7. 350 0
      client/laya/.laya/_pub_old/_publish_wxgame_1742208354872.js
  8. 77 0
      client/laya/.laya/bytedancegame.json
  9. BIN
      client/laya/.laya/chrome/BrowserMetrics/BrowserMetrics-61E15599-9AA0.pma
  10. BIN
      client/laya/.laya/chrome/BrowserMetrics/BrowserMetrics-622ACDE8-3080.pma
  11. 0 0
      client/laya/.laya/chrome/Crashpad/metadata
  12. BIN
      client/laya/.laya/chrome/Crashpad/settings.dat
  13. BIN
      client/laya/.laya/chrome/Default/Affiliation Database
  14. 0 0
      client/laya/.laya/chrome/Default/Affiliation Database-journal
  15. 0 0
      client/laya/.laya/chrome/Default/AutofillStrikeDatabase/LOCK
  16. 0 0
      client/laya/.laya/chrome/Default/AutofillStrikeDatabase/LOG
  17. 0 0
      client/laya/.laya/chrome/Default/AutofillStrikeDatabase/LOG.old
  18. 0 0
      client/laya/.laya/chrome/Default/BudgetDatabase/LOCK
  19. 0 0
      client/laya/.laya/chrome/Default/BudgetDatabase/LOG
  20. 0 0
      client/laya/.laya/chrome/Default/BudgetDatabase/LOG.old
  21. BIN
      client/laya/.laya/chrome/Default/Cache/Cache_Data/data_0
  22. BIN
      client/laya/.laya/chrome/Default/Cache/Cache_Data/data_1
  23. BIN
      client/laya/.laya/chrome/Default/Cache/Cache_Data/data_2
  24. BIN
      client/laya/.laya/chrome/Default/Cache/Cache_Data/data_3
  25. BIN
      client/laya/.laya/chrome/Default/Cache/Cache_Data/index
  26. BIN
      client/laya/.laya/chrome/Default/Code Cache/js/index
  27. BIN
      client/laya/.laya/chrome/Default/Code Cache/js/index-dir/the-real-index
  28. BIN
      client/laya/.laya/chrome/Default/Code Cache/wasm/index
  29. BIN
      client/laya/.laya/chrome/Default/Code Cache/wasm/index-dir/the-real-index
  30. 0 0
      client/laya/.laya/chrome/Default/Download Service/EntryDB/LOCK
  31. 0 0
      client/laya/.laya/chrome/Default/Download Service/EntryDB/LOG
  32. 0 0
      client/laya/.laya/chrome/Default/Download Service/EntryDB/LOG.old
  33. BIN
      client/laya/.laya/chrome/Default/Extension Scripts/000003.log
  34. 1 0
      client/laya/.laya/chrome/Default/Extension Scripts/CURRENT
  35. 0 0
      client/laya/.laya/chrome/Default/Extension Scripts/LOCK
  36. 3 0
      client/laya/.laya/chrome/Default/Extension Scripts/LOG
  37. 3 0
      client/laya/.laya/chrome/Default/Extension Scripts/LOG.old
  38. BIN
      client/laya/.laya/chrome/Default/Extension Scripts/MANIFEST-000001
  39. BIN
      client/laya/.laya/chrome/Default/Extension State/000003.log
  40. 1 0
      client/laya/.laya/chrome/Default/Extension State/CURRENT
  41. 0 0
      client/laya/.laya/chrome/Default/Extension State/LOCK
  42. 3 0
      client/laya/.laya/chrome/Default/Extension State/LOG
  43. 3 0
      client/laya/.laya/chrome/Default/Extension State/LOG.old
  44. BIN
      client/laya/.laya/chrome/Default/Extension State/MANIFEST-000001
  45. BIN
      client/laya/.laya/chrome/Default/Favicons
  46. 0 0
      client/laya/.laya/chrome/Default/Favicons-journal
  47. 0 0
      client/laya/.laya/chrome/Default/Feature Engagement Tracker/AvailabilityDB/LOCK
  48. 0 0
      client/laya/.laya/chrome/Default/Feature Engagement Tracker/AvailabilityDB/LOG
  49. 0 0
      client/laya/.laya/chrome/Default/Feature Engagement Tracker/AvailabilityDB/LOG.old
  50. 0 0
      client/laya/.laya/chrome/Default/Feature Engagement Tracker/EventDB/LOCK
  51. 0 0
      client/laya/.laya/chrome/Default/Feature Engagement Tracker/EventDB/LOG
  52. 0 0
      client/laya/.laya/chrome/Default/Feature Engagement Tracker/EventDB/LOG.old
  53. BIN
      client/laya/.laya/chrome/Default/GPUCache/data_0
  54. BIN
      client/laya/.laya/chrome/Default/GPUCache/data_1
  55. BIN
      client/laya/.laya/chrome/Default/GPUCache/data_2
  56. BIN
      client/laya/.laya/chrome/Default/GPUCache/data_3
  57. BIN
      client/laya/.laya/chrome/Default/GPUCache/index
  58. BIN
      client/laya/.laya/chrome/Default/History
  59. 0 0
      client/laya/.laya/chrome/Default/History-journal
  60. 0 0
      client/laya/.laya/chrome/Default/LOCK
  61. 0 0
      client/laya/.laya/chrome/Default/LOG
  62. 0 0
      client/laya/.laya/chrome/Default/LOG.old
  63. BIN
      client/laya/.laya/chrome/Default/Local Storage/leveldb/000003.log
  64. 1 0
      client/laya/.laya/chrome/Default/Local Storage/leveldb/CURRENT
  65. 0 0
      client/laya/.laya/chrome/Default/Local Storage/leveldb/LOCK
  66. 3 0
      client/laya/.laya/chrome/Default/Local Storage/leveldb/LOG
  67. 3 0
      client/laya/.laya/chrome/Default/Local Storage/leveldb/LOG.old
  68. BIN
      client/laya/.laya/chrome/Default/Local Storage/leveldb/MANIFEST-000001
  69. BIN
      client/laya/.laya/chrome/Default/Login Data
  70. BIN
      client/laya/.laya/chrome/Default/Login Data For Account
  71. 0 0
      client/laya/.laya/chrome/Default/Login Data For Account-journal
  72. 0 0
      client/laya/.laya/chrome/Default/Login Data-journal
  73. BIN
      client/laya/.laya/chrome/Default/Network Action Predictor
  74. 0 0
      client/laya/.laya/chrome/Default/Network Action Predictor-journal
  75. BIN
      client/laya/.laya/chrome/Default/Network/Cookies
  76. 0 0
      client/laya/.laya/chrome/Default/Network/Cookies-journal
  77. 1 0
      client/laya/.laya/chrome/Default/Network/Network Persistent State
  78. 0 0
      client/laya/.laya/chrome/Default/Network/NetworkDataMigrated
  79. BIN
      client/laya/.laya/chrome/Default/Network/Reporting and NEL
  80. 0 0
      client/laya/.laya/chrome/Default/Network/Reporting and NEL-journal
  81. 0 0
      client/laya/.laya/chrome/Default/Preferences
  82. 1 0
      client/laya/.laya/chrome/Default/PreferredApps
  83. BIN
      client/laya/.laya/chrome/Default/QuotaManager
  84. 0 0
      client/laya/.laya/chrome/Default/QuotaManager-journal
  85. 1 0
      client/laya/.laya/chrome/Default/README
  86. 0 0
      client/laya/.laya/chrome/Default/Safe Browsing Network/NetworkDataMigrated
  87. BIN
      client/laya/.laya/chrome/Default/Safe Browsing Network/Safe Browsing Cookies
  88. 0 0
      client/laya/.laya/chrome/Default/Safe Browsing Network/Safe Browsing Cookies-journal
  89. 0 0
      client/laya/.laya/chrome/Default/Secure Preferences
  90. BIN
      client/laya/.laya/chrome/Default/Service Worker/Database/000003.log
  91. 1 0
      client/laya/.laya/chrome/Default/Service Worker/Database/CURRENT
  92. 0 0
      client/laya/.laya/chrome/Default/Service Worker/Database/LOCK
  93. 2 0
      client/laya/.laya/chrome/Default/Service Worker/Database/LOG
  94. BIN
      client/laya/.laya/chrome/Default/Service Worker/Database/MANIFEST-000001
  95. BIN
      client/laya/.laya/chrome/Default/Service Worker/ScriptCache/2cc80dabc69f58b6_0
  96. BIN
      client/laya/.laya/chrome/Default/Service Worker/ScriptCache/2cc80dabc69f58b6_1
  97. BIN
      client/laya/.laya/chrome/Default/Service Worker/ScriptCache/index
  98. BIN
      client/laya/.laya/chrome/Default/Service Worker/ScriptCache/index-dir/the-real-index
  99. BIN
      client/laya/.laya/chrome/Default/Session Storage/000003.log
  100. 1 0
      client/laya/.laya/chrome/Default/Session Storage/CURRENT

+ 1 - 0
client/laya/.gitignore

@@ -0,0 +1 @@
+.rpt2_cache

+ 620 - 0
client/laya/.laya/_pub_old/_publish_1742208354874.js

@@ -0,0 +1,620 @@
+// v1.8.6
+//是否使用IDE自带的node环境和插件,设置false后,则使用自己环境(使用命令行方式执行)
+const useIDENode = process.argv[0].indexOf("LayaAir") > -1 ? true : false;
+const useCMDNode = process.argv[1].indexOf("layaair2-cmd") > -1 ? true : false;
+function useOtherNode(){
+	return useIDENode||useCMDNode;
+}
+//获取Node插件和工作路径
+const ideModuleDir = useOtherNode() ? process.argv[1].replace("gulp\\bin\\gulp.js", "").replace("gulp/bin/gulp.js", "") : "";
+const workSpaceDir = useOtherNode() ? process.argv[2].replace("--gulpfile=", "").replace("\\.laya\\publish.js", "").replace("/.laya/publish.js", "") + "/" : "./../";
+global.ideModuleDir = ideModuleDir;
+global.workSpaceDir = workSpaceDir;
+
+//引用插件模块
+const gulp = require(ideModuleDir + "gulp");
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+const uglify = require(ideModuleDir + 'gulp-uglify-es').default;
+const jsonminify = require(ideModuleDir + "gulp-jsonminify");
+const image = require(ideModuleDir + "gulp-image");
+const rev = require(ideModuleDir + "gulp-rev");
+const revdel = require(ideModuleDir + "gulp-rev-delete-original");
+const revCollector = require(ideModuleDir + 'gulp-rev-collector');
+const del = require(ideModuleDir + "del");
+const requireDir = require(ideModuleDir + 'require-dir');
+const babel = require(ideModuleDir + 'gulp-babel');
+
+// 结合compile.js使用
+global.publish = true;
+const fileList = ["compile.js", "pub_utils.js", "publish_xmgame.js", "publish_oppogame.js", "publish_vivogame.js", "publish_biligame.js", "publish_alipaygame.js", "publish_wxgame.js", "publish_bdgame.js", "publish_qqgame.js", "publish_bytedancegame.js", "publish_hwgame.js", "publish_taobaominiapp.js"];
+requireDir('./', {
+	filter: function (fullPath) {
+		// 只用到了compile.js和publish.js
+		if (fileList.includes(path.basename(fullPath))) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+});
+
+const QUICKGAMELIST = ["xmgame", "oppogame", "vivogame", "hwgame"];
+
+// 清理临时文件夹,加载配置
+let config,
+	releaseDir,
+	binPath,
+	platform = "web",
+	isOpendataProj = false,
+	platformCopyTask = [],// 平台脚本拷贝任务
+	platformTask = [], // 平台需要执行的任务
+	commandSuffix = ".cmd",
+	adbPath = "adb",
+	opensslPath = "openssl";
+//任务对照列表
+const copyTasks = {
+	"taobaominiapp": "preCreate_TBMini",
+	"hwgame": "copyPlatformFile_HW",
+	"bytedancegame": "copyPlatformFile_ByteDance",
+	"biligame": "copyPlatformFile_Bili",
+	"Alipaygame": "copyPlatformFile_Alipay",
+	"vivogame": "copyPlatformFile_VIVO",
+	"oppogame": "copyPlatformFile_OPPO",
+	"xmgame": "copyPlatformFile_XM",
+	"bdgame": "copyPlatformFile_BD",
+	"qqgame": "copyPlatformFile_QQ",
+	"wxgame": "copyPlatformFile_WX",
+	"web": "copyPlatformLibsJsFile"
+}
+const tasks = {
+	"taobaominiapp": "buildTBMiniProj",
+	"hwgame": "buildHWProj",
+	"bytedancegame": "buildByteDanceProj",
+	"biligame": "buildBiliProj",
+	"Alipaygame": "buildAlipayProj",
+	"vivogame": "buildVivoProj",
+	"oppogame": "buildOPPOProj",
+	"xmgame": "buildXiaomiProj",
+	"bdgame": "buildBDProj",
+	"qqgame": "buildQQProj",
+	"wxgame": "buildWXProj",
+	"web": "version2"
+}
+
+if (!useOtherNode() && process.argv.length > 5 && process.argv[4] == "--config") {
+	platform = process.argv[5].replace(".json", "");
+}
+if (useOtherNode() && process.argv.length >= 4 && process.argv[3].startsWith("--config") && process.argv[3].endsWith(".json")) {
+	platform = process.argv[3].match(/(\w+).json/)[1];
+	platformCopyTask.push(copyTasks[platform]);
+	platformTask.push(tasks[platform]);
+}
+
+gulp.task("loadConfig", function (cb) {
+	let _path;
+	if (!useOtherNode()) {
+		_path = platform + ".json";
+		releaseDir = "../release/" + platform;
+		binPath = "../bin/";
+	}
+	if (useOtherNode()) {
+		_path = path.join(workSpaceDir, ".laya", `${platform}.json`);
+		releaseDir = path.join(workSpaceDir, "release", platform).replace(/\\/g, "/");
+		binPath = path.join(workSpaceDir, "bin").replace(/\\/g, "/");
+	}
+	global.platform = platform;
+	let file = fs.readFileSync(_path, "utf-8");
+	if (file) {
+		if ([...QUICKGAMELIST, "taobaominiapp"].includes(platform)) {
+			file = file.replace(/\$basePath/g, releaseDir + "/temprelease");
+		} else {
+			file = file.replace(/\$basePath/g, releaseDir);
+		}
+		config = JSON.parse(file);
+		global.config = config;
+	}
+	// 是否是开放域项目
+	let projInfoPath = path.join(workSpaceDir, path.basename(workSpaceDir) + ".laya");
+	let isExist = fs.existsSync(projInfoPath);
+	if (isExist) {
+		try {
+			let projInfo = fs.readFileSync(projInfoPath, "utf8");
+			projInfo = projInfo && JSON.parse(projInfo);
+			isOpendataProj = projInfo.layaProType === 12;
+		} catch (e) {}
+	}
+	// 其他变量的初始化
+	let layarepublicPath = path.join(ideModuleDir, "../", "code", "layarepublic");
+	if (!fs.existsSync(layarepublicPath)) {
+		layarepublicPath = path.join(ideModuleDir, "../", "out", "layarepublic");
+	}
+	global.layarepublicPath = layarepublicPath;
+
+	if (process.platform === "darwin") {
+		commandSuffix = "";
+	}
+	global.commandSuffix = commandSuffix;
+
+	// 检查环境中是否存在adb和openssl
+	let otherLibsPath = path.join(layarepublicPath, "../", "vs", "layaEditor", "libs");
+	childProcess.exec("adb version", (error, stdout, stderr) => {
+		if (error) {
+			if (process.platform === "darwin") {
+				adbPath = path.join(otherLibsPath, "adb", "darwin", "adb");
+			} else {
+				adbPath = path.join(otherLibsPath, "adb", "win", "adb.exe");
+			}
+			adbPath = `"${adbPath}"`;
+		}
+		global.adbPath = adbPath;
+		if (global.opensslPath) {
+			cb();
+		}
+	});
+	childProcess.exec("openssl version", (error, stdout, stderr) => {
+		if (error) {
+			if (process.platform === "darwin") {
+				opensslPath = path.join(otherLibsPath, "openssl", "darwin", "bin", "openssl");
+			} else {
+				opensslPath = path.join(otherLibsPath, "openssl", "win", "bin", "openssl.exe");
+				let opensslCnfPath = path.join(otherLibsPath, "openssl", "win", "bin", "openssl.cfg");
+				// 特别的,当windows没有openssl时,需要额外的OPENSSL_CONF设置变量
+				// childProcess.execSync(`set OPENSSL_CONF=${opensslCnfPath}`);
+				process.env.OPENSSL_CONF = opensslCnfPath;
+				console.log("OPENSSL_CONF: " + childProcess.execSync("echo %OPENSSL_CONF%"));
+			}
+			opensslPath = `"${opensslPath}"`;
+		}
+		global.opensslPath = opensslPath;
+		if (global.adbPath) {
+			cb();
+		}
+	});
+});
+
+// 清理release文件夹
+gulp.task("clearReleaseDir", ["compile"], function (cb) {
+	if (config.clearReleaseDir) {
+		let delList = [`${releaseDir}/**`, releaseDir + "_pack"];
+		if (config.packfileTargetValue) {
+			delList.push(config.packfileTargetValue);
+		}
+		// 小米快游戏,使用即存的项目,删掉Laya工程文件,保留小米环境项目文件
+		if (platform === "xmgame") {
+			let xmProj = path.join(releaseDir, config.xmInfo.projName);
+			// 这里不是node-glob语法,详见: https://github.com/sindresorhus/del
+			delList = [`${xmProj}/**`, `!${xmProj}`, `!${xmProj}/node_modules/**`, `!${xmProj}/sign/**`, `!${xmProj}/{babel.config.js,main.js,manifest.json,package.json,package-lock.json}`];
+		} else if (platform === "oppogame") {
+			let oppoProjSrc = path.join(releaseDir, config.oppoInfo.projName);
+			delList = [`${oppoProjSrc}/**`, `!${oppoProjSrc}`, `!${oppoProjSrc}/{manifest.json,main.js}`];
+		} else if (platform === "vivogame") {
+			let vvProj = path.join(releaseDir, config.vivoInfo.projName);
+			let vvProjSrc = path.join(vvProj, "src");
+			// 这里不是node-glob语法,详见: https://github.com/sindresorhus/del
+			delList = [`${vvProj}/engine/**`, `${vvProj}/laya-library/**`, `${vvProj}/config/**`,
+						`${vvProjSrc}/**`, `!${vvProjSrc}`, `!${vvProjSrc}/{game.js,manifest.json}`];
+		} else if (platform === "hwgame") {
+			let hwProjSrc = path.join(releaseDir, config.hwInfo.projName);
+			delList = [`${hwProjSrc}/**`, `!${hwProjSrc}`, `!${hwProjSrc}/{game.js,manifest.json}`];
+		}
+		// 保留平台配置文件
+		if (config.keepPlatformFile) {
+			if (["wxgame", "qqgame", "Alipaygame", "bytedancegame"].includes(platform)) {
+				delList = delList.concat(`!${releaseDir}`, `!${releaseDir}/{game.js,game.json,project.config.json}`);
+			} else if (platform === "bdgame") {
+				delList = delList.concat(`!${releaseDir}`, `!${releaseDir}/{game.js,game.json,project.swan.json}`);
+			} else if (platform === "biligame") {
+				delList = delList.concat(`!${releaseDir}`, `!${releaseDir}/{game.js,game.json}`);
+			} else if (platform === "taobaominiapp") { // 特殊的,淘宝平台,仅删除确定为我们的文件
+				// 删除 node_modules/layaengine/libs 下引擎文件,以及 node_modules/layaengine/laya.js 文件
+				// 删除 pages/index 下除 game.js,game.json,game.axml 外所有文件
+				// release/taobaominiapp/node_modules/layaengine/adapter.js 必更新
+				delList = [`${releaseDir}/node_modules/layaengine/libs`, `${releaseDir}/node_modules/layaengine/laya.js`,
+							// `${releaseDir}/node_modules/layaengine`, `!${releaseDir}/node_modules/layaengine`, `!${releaseDir}/node_modules/layaengine/{adapter.js,index.js/package.json}`,
+							`${releaseDir}/pages/index/**`, `!${releaseDir}/pages/index`, `!${releaseDir}/pages/index/{game.js,game.json,game.axml}`];
+			}
+		}
+		del(delList, { force: true }).then(paths => {
+			cb();
+		}).catch((err) => {
+			throw err;
+		})
+	} else cb();
+});
+
+// copy bin文件到release文件夹
+gulp.task("copyFile", ["clearReleaseDir"], function () {
+	//del(`${workSpaceDir}/bin/**/*.map`, { force: true })
+	//`!${workSpaceDir}/bin/app/**/*.*`,
+	let baseCopyFilter = [`${workSpaceDir}/bin/**/*.*`,`!${workSpaceDir}/bin/**/*.map`,`!${workSpaceDir}/bin/**/*.ogg`, `!${workSpaceDir}/bin/**/**/*.ogg`,`!${workSpaceDir}/bin/**/**/**/*.ogg`, `!${workSpaceDir}/bin/indexmodule.html`, `!${workSpaceDir}/bin/import/*.*`];
+	// 只拷贝index.js中引用的类库
+	if (config.onlyIndexJS) {
+		baseCopyFilter = baseCopyFilter.concat(`!${workSpaceDir}/bin/libs/**/*.*`);
+	}
+	if (platform === "wxgame" && isOpendataProj) { // 开放域项目微信发布,仅拷贝用到的文件
+		config.copyFilesFilter = [`${workSpaceDir}/bin/js/bundle.js`, `${workSpaceDir}/bin/index.js`, `${workSpaceDir}/bin/game.js`];
+		if (config.projectType !== "as") { // 开放域精简类库
+			config.copyFilesFilter.push(`${workSpaceDir}/bin/libs/laya.opendata.js`);
+		}
+	} else if (platform === "wxgame") { // 微信项目,不拷贝index.html,不拷贝百度bin目录中的文件
+		config.copyFilesFilter = baseCopyFilter.concat([`!${workSpaceDir}/bin/{project.swan.json,swan-game-adapter.js}`]);
+	} else if (platform === "bdgame") { // 百度项目,不拷贝index.html,不拷贝微信bin目录中的文件
+		config.copyFilesFilter = baseCopyFilter.concat([`!${workSpaceDir}/bin/{project.config.json,weapp-adapter.js}`]);
+	} else { // 除微信、百度外,不拷贝微信、百度在bin目录中的文件
+		config.copyFilesFilter = baseCopyFilter.concat([`!${workSpaceDir}/bin/{game.js,game.json,project.config.json,weapp-adapter.js,project.swan.json,swan-game-adapter.js}`]);
+	}
+	// bili/alipay/qq,不拷贝index.html
+	if (platform !== "web") {
+		config.copyFilesFilter = config.copyFilesFilter.concat([`!${workSpaceDir}/bin/index.html`]);
+	}
+	// 快游戏,需要新建一个快游戏项目,拷贝的只是项目的一部分,将文件先拷贝到文件夹的临时目录中去
+	if ([...QUICKGAMELIST, "taobaominiapp"].includes(platform)) {
+		releaseDir = global.tempReleaseDir = path.join(releaseDir, "temprelease").replace(/\\/g, "/");
+	}
+	if (config.exclude) { // 排除文件
+		config.excludeFilter.forEach(function(item, index, list) {
+			releaseDir = releaseDir.replace(/\\/g, "/");
+			config.excludeFilter[index] = item.replace(releaseDir, binPath);
+		});
+		config.copyFilesFilter = config.copyFilesFilter.concat(config.excludeFilter);
+	}
+	global.releaseDir = releaseDir;
+	var stream = gulp.src(config.copyFilesFilter, { base: `${workSpaceDir}/bin` });
+	return stream.pipe(gulp.dest(releaseDir));
+});
+
+// 使用min版本引擎
+gulp.task("useMinJsLibs", ["copyFile"], function () {
+	if (!config.useMinJsLibs) {
+		return;
+	}
+	if (platform === "wxgame" && isOpendataProj) { // 开放域项目微信发布,拷贝文件时已经拷贝类库文件了
+		return;
+	}
+	// 开放域项目,as语言,没有libs目录,mac系统报错
+	let libs = path.join(workSpaceDir, "bin", "libs");
+	if (!fs.existsSync(libs)) {
+		return;
+	}
+	// 分析index.js
+	let indexJSPath = path.join(releaseDir, "index.js");
+	let indexJsContent = fs.readFileSync(indexJSPath, "utf8");
+	let libsList = indexJsContent.match(/loadLib\(['"]libs\/[\w-./]+\.(js|wasm)['"]\)/g);
+	if (!libsList) {
+		return;
+	}
+	let 
+		item,
+		libsName = "",
+		minLibsName = "";
+	for (let i = 0, len = libsList.length; i < len; i++) {
+		item = libsList[i];
+		libsName = item.match(/loadLib\(['"]libs\/([\w-./]+\.(js|wasm))['"]\)/);
+		minLibsName = `min/${libsName[1].replace(".js", ".min.js")}`;
+		indexJsContent = indexJsContent.replace(libsName[1], minLibsName);
+	}
+	fs.writeFileSync(indexJSPath, indexJsContent);
+});
+
+// copy libs中的js文件到release文件夹
+gulp.task("copyLibsJsFile", ["useMinJsLibs"], function () {
+	if (!config.onlyIndexJS) {
+		return;
+	}
+	if (platform === "wxgame" && isOpendataProj) { // 开放域项目微信发布,拷贝文件时已经拷贝类库文件了
+		return;
+	}
+	// 开放域项目,as语言,没有libs目录,mac系统报错
+	let libs = path.join(workSpaceDir, "bin", "libs");
+	if (!fs.existsSync(libs)) {
+		return;
+	}
+	// 分析index.js
+	let indexJSPath = path.join(releaseDir, "index.js");
+	let indexJsContent = fs.readFileSync(indexJSPath, "utf8");
+	let libsList = indexJsContent.match(/loadLib\(['"]libs\/[\w-./]+\.(js|wasm)['"]\)/g);
+	if (!libsList) {
+		libsList = [];
+	}
+	let 
+		item,
+		libsName = "",
+		libsStr = "";
+	for (let i = 0, len = libsList.length; i < len; i++) {
+		item = libsList[i];
+		libsName = item.match(/loadLib\(['"]libs\/([\w-./]+\.(js|wasm))['"]\)/);
+		libsStr += libsStr ? `,${libsName[1]}` : libsName[1];
+	}
+	// 发布web项目,如果使用了physics3D,默认拷贝runtime
+	if (platform === "web" && libsStr.includes("laya.physics3D")) {
+		if (config.useMinJsLibs) {
+			libsStr += ',min/laya.physics3D.runtime.min.js';
+		} else {
+			libsStr += ',laya.physics3D.runtime.js';
+		}
+	}
+	let copyLibsList = [`${workSpaceDir}/bin/libs/{${libsStr}}`];
+	if (!libsStr.includes(",")) {
+		copyLibsList = [`${workSpaceDir}/bin/libs/${libsStr}`];
+	}
+	var stream = gulp.src(copyLibsList, { base: `${workSpaceDir}/bin` });
+	return stream.pipe(gulp.dest(releaseDir));
+});
+
+gulp.task("copyPlatformLibsJsFile", ["copyLibsJsFile"], function () {
+	if (platform === "wxgame" && isOpendataProj) { // 开放域项目微信发布,拷贝文件时已经拷贝类库文件了
+		return;
+	}
+	// 开放域项目,as语言,没有libs目录,mac系统报错
+	let libs = path.join(workSpaceDir, "bin", "libs");
+	if (!fs.existsSync(libs)) {
+		return;
+	}
+	if (platform === "web") {
+		return;
+	}
+	
+	let platformLibName = "";
+	switch (platform) {
+		case "wxgame":
+			platformLibName = "laya.wxmini.js";
+			break;
+		case "qqgame":
+			platformLibName = "laya.qqmini.js";
+			break;
+		case "bdgame":
+			platformLibName = "laya.bdmini.js";
+			break;
+		case "Alipaygame":
+			platformLibName = "laya.Alipaymini.js";
+			break;
+		case "biligame":
+			platformLibName = "laya.bilimini.js";
+			break;
+		case "bytedancegame":
+			platformLibName = "laya.ttmini.js";
+			break;
+		case "oppogame":
+			platformLibName = "laya.quickgamemini.js";
+			break;
+		case "vivogame":
+			platformLibName = "laya.vvmini.js";
+			break;
+		case "xmgame":
+			platformLibName = "laya.xmmini.js";
+			break;
+		case "hwgame":
+			platformLibName = "laya.hwmini.js";
+			break;
+		case "taobaominiapp":
+			platformLibName = "laya.tbmini.js";
+			break;
+	}
+	let copyPath = `${workSpaceDir}/bin/libs`;
+	if (config.useMinJsLibs) {
+		platformLibName = platformLibName.replace(".js", ".min.js");
+		copyPath = path.join(copyPath, "min");
+	}
+	let copyLibPath = path.join(copyPath, platformLibName);
+	var stream = gulp.src(copyLibPath, { base: `${workSpaceDir}/bin` });
+	return stream.pipe(gulp.dest(releaseDir));
+});
+
+// es6toes5
+gulp.task("es6toes5", platformCopyTask, function() {
+	if (config.es6toes5) {
+		return gulp.src(`${releaseDir}/**/*.js`, { base: releaseDir })
+		.pipe(babel({
+			presets: ['@babel/env'],
+			compact: false // 1) 为规避500K限制,不能为"auto" 2) 为便于调试,并防止开发者误解已经经过压缩,调整为false
+		})) 
+		.on('error', function (err) {
+			console.warn(err.toString());
+		})
+		.pipe(gulp.dest(releaseDir));
+	}
+})
+
+// 压缩json
+gulp.task("compressJson", ["es6toes5"], function () {
+	if (config.compressJson) {
+		return gulp.src(config.compressJsonFilter, { base: releaseDir })
+			.pipe(jsonminify())
+			.pipe(gulp.dest(releaseDir));
+	}
+});
+
+// 压缩js
+gulp.task("compressJs", ["compressJson"], function () {
+	let compressJsFilter = null;
+	if (!config.compressJs) {
+		if (config.es6toes5 && config.useMinJsLibs) { // 如果开启了es6toes5并使用了压缩版类库
+			console.log("发布提示:\n 您当前开启了es6toes5并使用了压缩版类库,为了保证符合预期,脚本将对min文件夹下类库进行压缩");
+			compressJsFilter = [`${releaseDir}/libs/min/**/*.js`];
+		}
+	} else {
+		if (config.es6toes5 && config.useMinJsLibs) { // 如果开启了es6toes5并使用了压缩版类库
+			console.log("发布提示:\n 您当前开启了es6toes5并使用了压缩版类库,为了保证符合预期,脚本将对min文件夹下类库进行压缩");
+			compressJsFilter = config.compressJsFilter;
+			let index = compressJsFilter.indexOf(`!${releaseDir}/libs/min/**/*.js`)
+			if (index !== -1) {
+				compressJsFilter.splice(index, 1);
+			}
+		} else {
+			compressJsFilter = config.compressJsFilter;
+		}
+	}
+	if (!compressJsFilter) {
+		return;
+	}
+
+	let options = {
+		mangle: {
+			keep_fnames:true
+		}
+	}
+	if ("taobaominiapp" === platform) {
+		options = {
+			mangle: {
+				keep_fnames:true,
+				// sequences: false, // 不使用逗号
+				reserved: ["window"]
+			}
+		}
+	}
+	console.log("compressJsFilter: ", compressJsFilter);
+	return gulp.src(compressJsFilter, { base: releaseDir })
+		.pipe(uglify(options))
+		.on('error', function (err) {
+			console.warn(err.toString());
+		})
+		.pipe(gulp.dest(releaseDir));
+});
+
+// 压缩png,jpg
+gulp.task("compressImage", ["compressJs"], function () {
+	if (config.compressImage) {
+		return gulp.src(config.compressImageFilter, { base: releaseDir })
+			.pipe(image({
+				pngquant: true,			//PNG优化工具
+				optipng: false,			//PNG优化工具
+				zopflipng: true,		//PNG优化工具
+				jpegRecompress: false,	//jpg优化工具
+				mozjpeg: true,			//jpg优化工具
+				guetzli: false,			//jpg优化工具
+				gifsicle: false,		//gif优化工具
+				svgo: false,			//SVG优化工具
+				concurrent: 10,			//并发线程数
+				quiet: true 			//是否是静默方式
+				// optipng: ['-i 1', '-strip all', '-fix', '-o7', '-force'],
+				// pngquant: ['--speed=1', '--force', 256],
+				// zopflipng: ['-y', '--lossy_8bit', '--lossy_transparent'],
+				// jpegRecompress: ['--strip', '--quality', 'medium', '--min', 40, '--max', 80],
+				// mozjpeg: ['-optimize', '-progressive'],
+				// guetzli: ['--quality', 85]
+			}))
+			.pipe(gulp.dest(releaseDir));
+	}
+});
+
+// 生成版本管理信息
+gulp.task("version1", ["compressImage"], function () {
+	if (config.version) {
+		return gulp.src(config.versionFilter, { base: releaseDir })
+			.pipe(rev())
+			.pipe(gulp.dest(releaseDir))
+			.pipe(revdel())
+			.pipe(rev.manifest("version.json"))
+			.pipe(gulp.dest(releaseDir));
+	}
+});
+
+// 更新index.js的hash值
+gulp.task("renameIndexJs", ["version1"], function (cb) {
+	if (config.version) {
+		let versionPath = releaseDir + "/version.json";
+		let versionCon = fs.readFileSync(versionPath, "utf8");
+		versionCon = JSON.parse(versionCon);
+		let indexJSPath;
+		let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+		indexJSPath = releaseDir + "/" + indexJsStr;
+
+		return new Promise((resolve, reject) => {
+			let srcList = [versionPath, indexJSPath];
+			gulp.src(srcList)
+				.pipe(revCollector())
+				.pipe(gulp.dest(releaseDir));
+			setTimeout(resolve, 1500);
+		}).then(function() {
+			return new Promise(async function(resolve, reject) {
+				// index-xxx.js => index.js
+				let indexJsOrigin = path.join(releaseDir, "index.js")
+				fs.renameSync(indexJSPath, indexJsOrigin);
+				gulp.src(indexJsOrigin, { base: releaseDir })
+					.pipe(rev())
+					.pipe(gulp.dest(releaseDir))
+					.pipe(revdel())
+					.pipe(rev.manifest({
+						path: versionPath,
+						merge: true
+					}))
+					.pipe(gulp.dest("./")); // 注意,这里不能是releaseDir (https://segmentfault.com/q/1010000002876613)
+				setTimeout(cb, 2000);
+			})
+		}).catch(function(e) {
+			throw e;
+		})
+	} else {
+		cb();
+	}
+});
+
+// 替换index.html/game.js/main.js以及index.js里面的变化的文件名
+gulp.task("version2", ["renameIndexJs"], function () {
+	if (config.version) {
+		//替换index.html和index.js里面的文件名称
+		let htmlPath = releaseDir + "/index.html";
+		let versionPath = releaseDir + "/version.json";
+		let gameJSPath = releaseDir + "/game.js";
+		let mainJSPath = releaseDir + "/main.js";
+		let indexJSPath;
+		let versionCon = fs.readFileSync(versionPath, "utf8");
+		versionCon = JSON.parse(versionCon);
+		let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+		indexJSPath = releaseDir + "/" + indexJsStr;
+		// 替换config.packfileFullValue中的路径
+		let packfileStr = JSON.stringify(config.packfileFullValue).replace(/\\\\/g, "/");
+		let tempPackfile = `${workSpaceDir}/.laya/configTemp.json`;
+		fs.writeFileSync(tempPackfile, packfileStr, "utf8");
+
+		let srcList = [versionPath, indexJSPath, tempPackfile];
+		if (fs.existsSync(htmlPath)) {
+			srcList.push(htmlPath);
+		}
+		if (fs.existsSync(gameJSPath)) {
+			srcList.push(gameJSPath);
+		}
+		if (fs.existsSync(mainJSPath)) {
+			srcList.push(mainJSPath);
+		}
+		return gulp.src(srcList)
+			.pipe(revCollector())
+			.pipe(gulp.dest(releaseDir));
+	}
+});
+
+// 筛选4M包
+gulp.task("packfile", platformTask, function() {
+	if (config.version) {
+		if ("taobaominiapp" === platform) {
+			releaseDir = releaseDir.replace("temprelease", "pages/index");
+		} else {
+			releaseDir = releaseDir.replace("temprelease", "quickgame");
+		}
+		// 从release目录取得带有版本号的目录
+		let tempPackfile = `${workSpaceDir}/.laya/configTemp.json`;
+		let releasePackfile = `${releaseDir}/configTemp.json`;
+		let packfileStr = fs.readFileSync(releasePackfile, "utf8");
+		config.packfileFullValue = JSON.parse(packfileStr);
+		// 删掉临时目录
+		fs.unlinkSync(tempPackfile);
+		fs.unlinkSync(releasePackfile);
+	}
+	if ("taobaominiapp" === platform) {
+		releaseDir = releaseDir.replace("/temprelease", "").replace("/pages/index", "");
+		for (let len = config.packfileFullValue.length, i = 0; i < len; i++) {
+			config.packfileFullValue[i] = config.packfileFullValue[i].replace("temprelease", "");
+		}
+	}
+	if (config.packfile) { // 提取本地包(文件列表形式)
+		return gulp.src(config.packfileFullValue, { base: releaseDir })
+			.pipe(gulp.dest(config.packfileTargetValue || releaseDir + "_pack"));
+	}
+});
+
+// 起始任务
+gulp.task("publish", ["packfile"] , function () {
+	console.log("All tasks completed!");
+});

+ 283 - 0
client/laya/.laya/_pub_old/_publish_bytedancegame_1742208354865.js

@@ -0,0 +1,283 @@
+// v1.1.0
+const ideModuleDir = global.ideModuleDir;
+const workSpaceDir = global.workSpaceDir;
+
+//引用插件模块
+const gulp = require(ideModuleDir + "gulp");
+const fs = require("fs");
+const path = require("path");
+const del = require(ideModuleDir + "del");
+const revCollector = require(ideModuleDir + 'gulp-rev-collector');
+const { getEngineVersion, getFileMd5, canUsePluginEngine } = require("./pub_utils");
+
+const provider = "tt13aa65178c90228a";
+const minPluginVersion = "2.7.0";
+let fullRemoteEngineList = ["laya.core.js", "laya.filter.js", "laya.ani.js", "laya.tiledmap.js", "laya.d3.js", "laya.html.js", "laya.particle.js", "laya.ui.js", "laya.webgl.js", "laya.filter.js", "laya.d3Plugin.js"];
+let copyLibsTask = ["copyPlatformLibsJsFile"];
+let versiontask = ["version2"];
+
+let 
+    config,
+    releaseDir;
+let versionCon; // 版本管理version.json
+let commandSuffix,
+	layarepublicPath;
+
+gulp.task("preCreate_ByteDance", copyLibsTask, function() {
+	releaseDir = global.releaseDir;
+	config = global.config;
+	commandSuffix = global.commandSuffix;
+	layarepublicPath = global.layarepublicPath;
+
+	if (config.useMinJsLibs) {
+		fullRemoteEngineList = fullRemoteEngineList.map((item, index) => {
+			return item.replace(".js", ".min.js");
+		})
+	}
+});
+
+gulp.task("copyPlatformFile_ByteDance", ["preCreate_ByteDance"], function() {
+	let adapterPath = path.join(layarepublicPath, "LayaAirProjectPack", "lib", "data", "bytefiles");
+	let hasPublishPlatform = 
+		fs.existsSync(path.join(releaseDir, "game.js")) &&
+		fs.existsSync(path.join(releaseDir, "game.json")) &&
+		fs.existsSync(path.join(releaseDir, "project.config.json"));
+	let copyLibsList;
+	if (hasPublishPlatform) {
+		copyLibsList = [`${adapterPath}/microgame-adapter.js`];
+	} else {
+		copyLibsList = [`${adapterPath}/*.*`];
+	}
+	var stream = gulp.src(copyLibsList);
+	return stream.pipe(gulp.dest(releaseDir));
+});
+
+gulp.task("modifyFile_ByteDance", versiontask, function() {
+	// 修改game.json文件
+	let gameJsonPath = path.join(releaseDir, "game.json");
+	let content = fs.readFileSync(gameJsonPath, "utf8");
+	let conJson = JSON.parse(content);
+	conJson.deviceOrientation = config.bytedanceInfo.orientation;
+	content = JSON.stringify(conJson, null, 4);
+	fs.writeFileSync(gameJsonPath, content, "utf8");
+
+	if (config.version || config.enableVersion) {
+		let versionPath = releaseDir + "/version.json";
+		versionCon = fs.readFileSync(versionPath, "utf8");
+		versionCon = JSON.parse(versionCon);
+	}
+	// 修改index.js
+	let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+	let indexFilePath = path.join(releaseDir, indexJsStr);
+	if (!fs.existsSync(indexFilePath)) {
+		return;
+	}
+	let indexFileContent = fs.readFileSync(indexFilePath, "utf8");
+	indexFileContent = indexFileContent.replace(/loadLib(\(['"])/gm, "require$1./");
+	fs.writeFileSync(indexFilePath, indexFileContent, "utf8");
+})
+
+gulp.task("modifyMinJs_ByteDance", ["modifyFile_ByteDance"], function() {
+	// 如果保留了平台文件,如果同时取消使用min类库,就会出现文件引用不正确的问题
+	if (config.keepPlatformFile) {
+		let fileJsPath = path.join(releaseDir, "game.js");
+		let content = fs.readFileSync(fileJsPath, "utf-8");
+		content = content.replace(/min\/laya(-[\w\d]+)?\.ttmini\.min\.js/gm, "laya.ttmini.js");
+		fs.writeFileSync(fileJsPath, content, 'utf-8');
+	}
+	if (!config.useMinJsLibs) {
+		return;
+	}
+	let fileJsPath = path.join(releaseDir, "game.js");
+	let content = fs.readFileSync(fileJsPath, "utf-8");
+	content = content.replace(/(min\/)?laya(-[\w\d]+)?\.ttmini(\.min)?\.js/gm, "min/laya.ttmini.min.js");
+	fs.writeFileSync(fileJsPath, content, 'utf-8');
+});
+
+gulp.task("version_ByteDance", ["modifyMinJs_ByteDance"], function() {
+	// 如果保留了平台文件,如果同时开启版本管理,就会出现文件引用不正确的问题
+	if (config.keepPlatformFile) {
+		let fileJsPath = path.join(releaseDir, "game.js");
+		let content = fs.readFileSync(fileJsPath, "utf-8");
+		content = content.replace(/laya(-[\w\d]+)?\.ttmini/gm, "laya.ttmini");
+		content = content.replace(/index(-[\w\d]+)?\.js/gm, "index.js");
+		fs.writeFileSync(fileJsPath, content, 'utf-8');
+	}
+	if (config.version) {
+		let versionPath = releaseDir + "/version.json";
+		let gameJSPath = releaseDir + "/game.js";
+		let srcList = [versionPath, gameJSPath];
+		return gulp.src(srcList)
+			.pipe(revCollector())
+			.pipe(gulp.dest(releaseDir));
+	}
+});
+
+gulp.task("pluginEngin_ByteDance", ["version_ByteDance"], function(cb) {
+	if (!config.uesEnginePlugin) { // 没有使用微信引擎插件,还是像以前一样发布
+		return cb();
+	}
+	if (config.version) {
+		let versionPath = releaseDir + "/version.json";
+		versionCon = fs.readFileSync(versionPath, "utf8");
+		versionCon = JSON.parse(versionCon);
+	}
+	let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+	
+	// 获取version等信息
+	let coreLibPath = path.join(workSpaceDir, "bin", "libs", "laya.core.js");
+	let isHasCoreLib = fs.existsSync(coreLibPath);
+	let isOldAsProj = fs.existsSync(`${workSpaceDir}/asconfig.json`) && !isHasCoreLib;
+	let isNewTsProj = fs.existsSync(`${workSpaceDir}/src/tsconfig.json`) && !isHasCoreLib;
+	let EngineVersion = getEngineVersion();
+	if (!EngineVersion) {
+		throw new Error(`读取引擎版本号失败,请于服务提供商联系!`);
+	}
+	if (!EngineVersion || EngineVersion.includes("beta") || !canUsePluginEngine(EngineVersion, minPluginVersion)) {
+		throw new Error(`该版本引擎无法使用引擎插件功能(engineVersion: ${EngineVersion})`);
+	}
+	console.log(`通过版本号检查:  ${EngineVersion}`);
+	// 使用引擎插件
+	let localUseEngineList = [];
+	let copyEnginePathList;
+	new Promise(function(resolve, reject) {
+		console.log(`修改game.js和game.json`);
+		// 1) 修改game.js和game.json
+		// 修改game.js
+		let gameJsPath = path.join(releaseDir, "game.js");
+		let platformJs = config.useMinJsLibs ? `require("./libs/min/laya.ttmini.min.js");` : `require("./libs/laya.ttmini.js");`;
+		let gameJscontent = `require("microgame-adapter.js");\n${platformJs}\nrequirePlugin('layaPlugin');\nwindow.loadLib = require;\nrequire("./${indexJsStr}");`;
+		fs.writeFileSync(gameJsPath, gameJscontent, "utf8");
+		// 修改game.json,使其支持引擎插件
+		let gameJsonPath = path.join(releaseDir, "game.json");
+		let gameJsonContent = fs.readFileSync(gameJsonPath, "utf8");
+		let conJson = JSON.parse(gameJsonContent);
+		conJson.plugins = {
+			"layaPlugin": {
+				"version": EngineVersion,
+				"provider": provider,
+				"path": "laya-libs"
+			}
+		}
+		gameJsonContent = JSON.stringify(conJson, null, 4);
+		fs.writeFileSync(gameJsonPath, gameJsonContent, "utf8");
+		resolve();
+	}).then(function() {
+		return new Promise(function(resolve, reject) {
+			console.log(`确定用到的插件引擎`);
+			// 2) 确定用到了那些插件引擎,并将插件引擎从index.js的引用中去掉
+			let indexJsPath = path.join(releaseDir, indexJsStr);
+			let indexJsCon = fs.readFileSync(indexJsPath, "utf8");
+			let item, fullRequireItem;
+			for (let i = 0, len = fullRemoteEngineList.length; i < len; i++) {
+				item = fullRemoteEngineList[i];
+				fullRequireItem = config.useMinJsLibs ? `require("./libs/min/${item}")` : `require("./libs/${item}")`;
+				if (indexJsCon.includes(fullRequireItem)) {
+					let _item = item.replace(".min.js", ".js"), _minItem = item;
+					localUseEngineList.push(_item);
+					indexJsCon = indexJsCon.replace(fullRequireItem + ";", "").replace(fullRequireItem + ",", "").replace(fullRequireItem, "");
+					// 如果引用了压缩的类库,将其重命名为未压缩的类库,并拷贝到libs中
+					if (config.useMinJsLibs) {
+						let oldMinlibPath = path.join(releaseDir, "libs", "min", _minItem);
+						let newMinlibPath = path.join(releaseDir, "libs", "min", _item);
+						let newlibPath = path.join(releaseDir, "libs", _item);
+						fs.renameSync(oldMinlibPath, newMinlibPath);
+						// fs.copyFileSync(newlibPath, newMinlibPath);
+						let con = fs.readFileSync(newMinlibPath, "utf8");
+						fs.writeFileSync(newlibPath, con, "utf8");
+						fs.unlinkSync(newMinlibPath);
+					}
+				}
+			}
+			if (isOldAsProj || isNewTsProj) { // 如果as||ts_new语言,开发者将laya.js也写入index.js中了,将其删掉
+				fullRequireItem = `require("./laya.js")`;
+				if (indexJsCon.includes(fullRequireItem)) {
+					indexJsCon = indexJsCon.replace(fullRequireItem + ";", "").replace(fullRequireItem + ",", "").replace(fullRequireItem, "");
+				}
+			}
+			fs.writeFileSync(indexJsPath, indexJsCon, "utf8");
+			// ts/js再次修改game.js,仅引用使用到的类库
+			// as||ts_new因为本地只有laya.js,无法仅引用使用到的类库
+			if (!isOldAsProj && !isNewTsProj) {
+				let pluginCon = "";
+				localUseEngineList.forEach(function(item) {
+					pluginCon += `requirePlugin("layaPlugin/${item}");\n`;
+				});
+				let gameJsPath = path.join(releaseDir, "game.js");
+				let gameJsCon = fs.readFileSync(gameJsPath, "utf8");
+				gameJsCon = gameJsCon.replace(`requirePlugin('layaPlugin');`, pluginCon);
+				fs.writeFileSync(gameJsPath, gameJsCon, "utf8");
+			}
+			resolve();
+		});
+	}).then(function() {
+		return new Promise(function(resolve, reject) {
+			console.log(`将本地的引擎插件移动到laya-libs中`);
+			// 3) 将本地的引擎插件移动到laya-libs中
+			let libsPath = /** config.useMinJsLibs ? `${releaseDir}/libs/min` : */`${releaseDir}/libs`;
+			copyEnginePathList = [`${libsPath}/{${localUseEngineList.join(",")}}`];
+			if (isOldAsProj || isNewTsProj) { // 单独拷贝laya.js
+				copyEnginePathList = [`${releaseDir}/laya.js`];
+			}
+			gulp.src(copyEnginePathList).pipe(gulp.dest(`${releaseDir}/laya-libs`));
+			setTimeout(resolve, 500);
+		});
+	}).then(function() {
+		return new Promise(function(resolve, reject) {
+			console.log(`将libs中的本地引擎插件删掉`);
+			// 4) 将libs中的本地引擎插件删掉
+			del(copyEnginePathList, { force: true }).then(resolve);
+		});
+	}).then(function() {
+		return new Promise(async function(resolve, reject) {
+			console.log(`完善引擎插件目录`);
+			// 5) 引擎插件目录laya-libs中还需要新建几个文件,使该目录能够使用
+			if (isOldAsProj || isNewTsProj) { // 单独拷贝laya.js
+				localUseEngineList.push("laya.js");
+			}
+			let 
+				layalibsPath = path.join(releaseDir, "laya-libs"),
+				engineIndex = path.join(layalibsPath, "index.js"),
+				engineplugin = path.join(layalibsPath, "plugin.json"),
+				enginesignature = path.join(layalibsPath, "signature.json");
+			// index.js
+			if (!fs.existsSync(layalibsPath)) {
+				throw new Error("引擎插件目录创建失败,请与服务提供商联系!");
+			}
+			let indexCon = "";
+			localUseEngineList.forEach(function(item) {
+				indexCon += `require("./${item}");\n`;
+			});
+			fs.writeFileSync(engineIndex, indexCon, "utf8");
+			// plugin.json
+			let pluginCon = {"main": "index.js"};
+			fs.writeFileSync(engineplugin, JSON.stringify(pluginCon, null, 4), "utf8");
+			// signature.json,目前平台方将其作为保留用途,不会做插件的md5校验;IDE仍将生成md5
+			let signatureCon = {
+				"provider": provider,
+				"signature": []
+			};
+			localUseEngineList.unshift("index.js");
+			let fileName, md5Str;
+			for (let i = 0, len = localUseEngineList.length; i < len; i++) {
+				fileName = localUseEngineList[i];
+				let md5Str = await getFileMd5(path.join(releaseDir, "laya-libs", fileName));
+				signatureCon.signature.push({
+					"path": fileName,
+					"md5": md5Str
+				});
+			}
+			fs.writeFileSync(enginesignature, JSON.stringify(signatureCon, null, 4), "utf8");
+			resolve();
+		});
+	})
+	.then(function() {
+		cb();
+	}).catch(function(e) {
+		throw e;
+	})
+});
+
+gulp.task("buildByteDanceProj", ["pluginEngin_ByteDance"], function() {
+	console.log("all tasks completed");
+});

+ 479 - 0
client/laya/.laya/_pub_old/_publish_oppogame_1742208354868.js

@@ -0,0 +1,479 @@
+// v1.8.5
+const ideModuleDir = global.ideModuleDir;
+const workSpaceDir = global.workSpaceDir;
+
+//引用插件模块
+const gulp = require(ideModuleDir + "gulp");
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+const del = require(ideModuleDir + "del");
+const revCollector = require(ideModuleDir + 'gulp-rev-collector');
+const iconv =  require(ideModuleDir + "iconv-lite");
+
+let copyLibsTask = ["copyPlatformLibsJsFile"];
+let versiontask = ["version2"];
+
+let 
+    config,
+	releaseDir,
+    toolkitPath,
+    tempReleaseDir, // OPPO临时拷贝目录
+	projDir; // OPPO快游戏工程目录
+let versionCon; // 版本管理version.json
+let commandSuffix,
+	adbPath,
+	opensslPath,
+	layarepublicPath;
+
+// 创建OPPO项目前,拷贝OPPO引擎库、修改index.js
+gulp.task("preCreate_OPPO", copyLibsTask, function() {
+	releaseDir = global.releaseDir;
+	config = global.config;
+	commandSuffix = global.commandSuffix;
+	adbPath = global.adbPath;
+	opensslPath = global.opensslPath;
+	layarepublicPath = global.layarepublicPath;
+	tempReleaseDir = global.tempReleaseDir;
+
+    toolkitPath = path.join(layarepublicPath, "oppo", "quickgame-toolkit");
+});
+
+gulp.task("copyPlatformFile_OPPO", ["preCreate_OPPO"], function() {
+	return;
+});
+
+// 新建OPPO项目-OPPO项目与其他项目不同,需要安装OPPO quickgame node_modules,并打包成.rpk文件
+gulp.task("installModules_OPPO", versiontask, function() {
+	releaseDir = path.dirname(releaseDir);
+	projDir = path.join(releaseDir, config.oppoInfo.projName);
+    // 如果IDE里对应OPPO包已经install node_modules了,忽略这一步
+    if (fs.existsSync(path.join(toolkitPath, "node_modules"))) {
+        return;
+    }
+	// 安装OPPO quickgame node_modules
+	return new Promise((resolve, reject) => {
+		console.log("开始安装OPPO quickgame node_modules,请耐心等待...");
+		let cmd = `npm${commandSuffix}`;
+		let args = ["install"];
+        let opts = {
+			cwd: toolkitPath,
+			shell: true
+		};
+        let cp = childProcess.spawn(cmd, args, opts);
+        
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+		
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			// reject();
+		});
+		
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			resolve();
+		});
+	});
+});
+
+// 拷贝文件到OPPO快游戏
+gulp.task("copyFileToProj_OPPO", ["installModules_OPPO"], function() {
+	// 将临时文件夹中的文件,拷贝到项目中去
+	let originalDir = `${tempReleaseDir}/**/*.*`;
+	let stream = gulp.src(originalDir);
+	return stream.pipe(gulp.dest(path.join(projDir)));
+});
+
+// 拷贝icon到OPPO快游戏
+gulp.task("copyIconToProj_OPPO", ["copyFileToProj_OPPO"], function() {
+	let originalDir = config.oppoInfo.icon;
+	let stream = gulp.src(originalDir);
+	return stream.pipe(gulp.dest(path.join(projDir)));
+});
+
+// 清除OPPO快游戏临时目录
+gulp.task("clearTempDir_OPPO", ["copyIconToProj_OPPO"], function() {
+	// 删掉临时目录
+	return del([tempReleaseDir], { force: true });
+});
+
+// 生成release签名(私钥文件 private.pem 和证书文件 certificate.pem )
+gulp.task("generateSign_OPPO", ["clearTempDir_OPPO"], function() {
+    if (!config.oppoSign.generateSign) {
+        return;
+    }
+	// https://doc.quickapp.cn/tools/compiling-tools.html
+	return new Promise((resolve, reject) => {
+		let cmd = `${opensslPath}`;
+		let args = ["req", "-newkey", "rsa:2048", "-nodes", "-keyout", "private.pem", 
+					"-x509", "-days", "3650", "-out", "certificate.pem"];
+		let opts = {
+			cwd: projDir,
+			shell: true
+		};
+		let cp = childProcess.spawn(cmd, args, opts);
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			data += "";
+			if (data.includes("Country Name")) {
+				cp.stdin.write(`${config.oppoSign.countryName}\n`);
+				console.log(`Country Name: ${config.oppoSign.countryName}`);
+			} else if (data.includes("Province Name")) {
+				cp.stdin.write(`${config.oppoSign.provinceName}\n`);
+				console.log(`Province Name: ${config.oppoSign.provinceName}`);
+			} else if (data.includes("Locality Name")) {
+				cp.stdin.write(`${config.oppoSign.localityName}\n`);
+				console.log(`Locality Name: ${config.oppoSign.localityName}`);
+			} else if (data.includes("Organization Name")) {
+				cp.stdin.write(`${config.oppoSign.orgName}\n`);
+				console.log(`Organization Name: ${config.oppoSign.orgName}`);
+			} else if (data.includes("Organizational Unit Name")) {
+				cp.stdin.write(`${config.oppoSign.orgUnitName}\n`);
+				console.log(`Organizational Unit Name: ${config.oppoSign.orgUnitName}`);
+			} else if (data.includes("Common Name")) {
+				cp.stdin.write(`${config.oppoSign.commonName}\n`);
+				console.log(`Common Name: ${config.oppoSign.commonName}`);
+			} else if (data.includes("Email Address")) {
+				cp.stdin.write(`${config.oppoSign.emailAddr}\n`);
+				console.log(`Email Address: ${config.oppoSign.emailAddr}`);
+				// cp.stdin.end();
+			}
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			// 签名是否生成成功
+			let 
+				privatePem = path.join(projDir, "private.pem"),
+				certificatePem = path.join(projDir, "certificate.pem");
+			let isSignExits = fs.existsSync(privatePem) && fs.existsSync(certificatePem);
+			if (!isSignExits) {
+				throw new Error("签名生成失败,请检查!");
+			}
+			resolve();
+		});
+	});
+});
+
+// 拷贝sign文件到指定位置
+gulp.task("copySignFile_OPPO", ["generateSign_OPPO"], function() {
+    if (config.oppoSign.generateSign) { // 新生成的签名
+        // 移动签名文件到项目中(Laya & OPPO快游戏项目中)
+        let 
+            privatePem = path.join(projDir, "private.pem"),
+            certificatePem = path.join(projDir, "certificate.pem");
+        let isSignExits = fs.existsSync(privatePem) && fs.existsSync(certificatePem);
+        if (!isSignExits) {
+            return;
+        }
+        let 
+            xiaomiDest = `${projDir}/sign/release`,
+            layaDest = `${workSpaceDir}/sign/release`;
+        let stream = gulp.src([privatePem, certificatePem]);
+        return stream.pipe(gulp.dest(xiaomiDest))
+                    .pipe(gulp.dest(layaDest));
+    } else if (config.oppoInfo.useReleaseSign && !config.oppoSign.generateSign) { // 使用release签名,并且没有重新生成
+        // 从项目中将签名拷贝到OPPO快游戏项目中
+        let 
+            privatePem = path.join(workSpaceDir, "sign", "release", "private.pem"),
+            certificatePem = path.join(workSpaceDir, "sign", "release", "certificate.pem");
+        let isSignExits = fs.existsSync(privatePem) && fs.existsSync(certificatePem);
+        if (!isSignExits) {
+            return;
+        }
+        let 
+            xiaomiDest = `${projDir}/sign/release`;
+        let stream = gulp.src([privatePem, certificatePem]);
+        return stream.pipe(gulp.dest(xiaomiDest));
+    }
+});
+
+gulp.task("deleteSignFile_OPPO", ["copySignFile_OPPO"], function() {
+	if (config.oppoSign.generateSign) { // 新生成的签名
+		let 
+            privatePem = path.join(projDir, "private.pem"),
+            certificatePem = path.join(projDir, "certificate.pem");
+		return del([privatePem, certificatePem], { force: true });
+	}
+});
+
+gulp.task("modifyFile_OPPO", ["deleteSignFile_OPPO"], function() {
+	// 修改manifest.json文件
+	let manifestPath = path.join(projDir, "manifest.json");
+	let IDEManifestPath = path.join(toolkitPath, "tpl", "manifest.json");
+	if (!fs.existsSync(IDEManifestPath) && !fs.existsSync(manifestPath)) {
+		return;
+	}
+	let manifestContent;
+	if (fs.existsSync(manifestPath)) {
+		manifestContent = fs.readFileSync(manifestPath, "utf8");
+	} else {
+		manifestContent = fs.readFileSync(IDEManifestPath, "utf8");
+	}
+	let manifestJson = JSON.parse(manifestContent);
+	manifestJson.package = config.oppoInfo.package;
+	manifestJson.name = config.oppoInfo.name;
+	manifestJson.orientation = config.oppoInfo.orientation;
+	manifestJson.config.logLevel = config.oppoInfo.logLevel || "off";
+	manifestJson.versionName = config.oppoInfo.versionName;
+	manifestJson.versionCode = config.oppoInfo.versionCode;
+	manifestJson.minPlatformVersion = config.oppoInfo.minPlatformVersion;
+	manifestJson.icon = `./${path.basename(config.oppoInfo.icon)}`;
+	if (config.oppoInfo.subpack) {
+		manifestJson.subpackages = config.oppoSubpack;
+	} else {
+		delete manifestJson.subpackages;
+	}
+	fs.writeFileSync(manifestPath, JSON.stringify(manifestJson, null, 4), "utf8");
+
+	if (config.version) {
+		let versionPath = projDir + "/version.json";
+		versionCon = fs.readFileSync(versionPath, "utf8");
+		versionCon = JSON.parse(versionCon);
+	}
+	let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+	// OPPO项目,修改main.js
+	let filePath = path.join(projDir, "main.js");
+	if (!fs.existsSync(filePath)) {
+		let fileContent = `window.navigator.userAgent = 'Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E) AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E8301 OPPO MiniGame NetType/WIFI Language/zh_CN';
+require("./libs/laya.quickgamemini.js");\nrequire("index.js");`;
+		fs.writeFileSync(filePath, fileContent, "utf8");
+	}
+
+	// OPPO项目,修改index.js
+	let indexFilePath = path.join(projDir, indexJsStr);
+	if (!fs.existsSync(indexFilePath)) {
+		return;
+	}
+	let indexFileContent = fs.readFileSync(indexFilePath, "utf8");
+	indexFileContent = indexFileContent.replace(/loadLib(\(['"])/gm, "require$1./");
+	fs.writeFileSync(indexFilePath, indexFileContent, "utf8");
+});
+
+gulp.task("modifyMinJs_OPPO", ["modifyFile_OPPO"], function() {
+	let fileJsPath = path.join(projDir, "main.js");
+	let content = fs.readFileSync(fileJsPath, "utf-8");
+	if (!config.useMinJsLibs) { // 默认保留了平台文件,如果同时取消使用min类库,就会出现文件引用不正确的问题
+		content = content.replace(/min\/laya(-[\w\d]+)?\.quickgamemini\.min\.js/gm, "laya.quickgamemini.js");
+	} else {
+		content = content.replace(/(min\/)?laya(-[\w\d]+)?\.quickgamemini(\.min)?\.js/gm, "min/laya.quickgamemini.min.js");
+	}
+	fs.writeFileSync(fileJsPath, content, 'utf-8');
+});
+
+gulp.task("version_OPPO", ["modifyMinJs_OPPO"], function () {
+	// main.js默认不覆盖,如果同时开启版本管理,就会出现文件引用不正确的问题
+	let fileJsPath = path.join(projDir, "main.js");
+	let content = fs.readFileSync(fileJsPath, "utf-8");
+	content = content.replace(/laya(-[\w\d]+)?\.quickgamemini/gm, "laya.quickgamemini");
+	content = content.replace(/index(-[\w\d]+)?\.js/gm, "index.js");
+	fs.writeFileSync(fileJsPath, content, 'utf-8');
+
+	if (config.version) {
+		let versionPath = projDir + "/version.json";
+		let mainJSPath = projDir + "/main.js";
+		let srcList = [versionPath, mainJSPath];
+		return gulp.src(srcList)
+			.pipe(revCollector())
+			.pipe(gulp.dest(projDir));
+	}
+});
+
+// 打包rpk
+gulp.task("buildRPK_OPPO", ["version_OPPO"], function() {
+	// 在OPPO轻游戏项目目录中执行:
+    // quickgame pack || quickgame pack release
+    // quickgame subpack --no-build-js || quickgame subpack release --no-build-js
+	let cmdStr = "";
+	let packStr = "pack";
+	let nobuildjs = "";
+	if (config.oppoInfo.subpack) {
+		packStr = "subpack";
+		nobuildjs = "--no-build-js";
+	}
+    if (config.oppoInfo.useReleaseSign) {
+        cmdStr = "release";
+    }
+	return new Promise((resolve, reject) => {
+		let cmd = path.join(toolkitPath, "lib", "bin", `quickgame${commandSuffix}`);
+		let args = [packStr, cmdStr, nobuildjs];
+		let opts = {
+			cwd: projDir,
+			shell: true
+		};
+		let cp = childProcess.spawn(`"${cmd}"`, args, opts);
+		// let cp = childProcess.spawn('npx.cmd', ['-v']);
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			console.log(`stderr(iconv): ${iconv.decode(data, 'gbk')}`);
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`子进程退出码:${code}`);
+			// rpk是否生成成功
+			let distRpkPath = path.join(projDir, "dist", `${config.oppoInfo.package}${config.oppoInfo.useReleaseSign ? ".signed" : ""}.rpk`);
+			if (!fs.existsSync(distRpkPath)) {
+				throw new Error("rpk生成失败,请检查!");
+			}
+			resolve();
+		});
+	});
+});
+
+gulp.task("pushRPK_OPPO", ["buildRPK_OPPO"], function() {
+	if (!config.oppoInfo.adbDebug) {
+        return;
+    }
+	// 在OPPO轻游戏项目目录中执行:
+    // adb push dist/game.rpk sdcard/games
+	// adb push layarepublicPath/oppo/instant_app_settings.properties
+	// adb shell am force-stop com.nearme.instant.platform
+	// adb shell am start -n com.nearme.instant.platform/com.oppo.autotest.main.InstantAppActivity
+	return new Promise((resolve, reject) => {
+		if (!config.oppoInfo.subpack) {
+			return resolve();
+		}
+		
+		let cmd = `${adbPath}`;
+		let args = ["shell", "mkdir", `sdcard/Android/data/com.nearme.instant.platform/files/subPkg`];
+		let opts = {
+			cwd: projDir,
+			shell: true
+		};
+		let cp = childProcess.spawn(cmd, args, opts);
+		// let cp = childProcess.spawn('npx.cmd', ['-v']);
+		cp.stdout.on('data', (data) => {
+			console.log(`stdout: ${data}`);
+		});
+
+		cp.stderr.on('data', (data) => {
+			console.log(`stderr: ${data}`);
+			// reject();
+		});
+
+		cp.on('close', (code) => {
+			console.log(`pre) push_RPK 子进程退出码:${code}`);
+			resolve();
+		});
+	}).then(() => {
+		return new Promise((resolve, reject) => {
+			let cmd = `${adbPath}`;
+			let sdGamesPath = config.oppoInfo.subpack ? "sdcard/Android/data/com.nearme.instant.platform/files/subPkg" : "sdcard/games";
+			let args = ["push", `dist/${config.oppoInfo.package}${config.oppoInfo.useReleaseSign ? ".signed" : ""}.rpk`, sdGamesPath];
+			let opts = {
+				cwd: projDir,
+				shell: true
+			};
+			let cp = childProcess.spawn(cmd, args, opts);
+			// let cp = childProcess.spawn('npx.cmd', ['-v']);
+			cp.stdout.on('data', (data) => {
+				console.log(`stdout: ${data}`);
+			});
+	
+			cp.stderr.on('data', (data) => {
+				console.log(`stderr: ${data}`);
+				// reject();
+			});
+	
+			cp.on('close', (code) => {
+				console.log(`1) push_RPK 子进程退出码:${code}`);
+				resolve();
+			});
+		})
+	}).then(() => {
+		return new Promise((resolve, reject) => {
+			// 如果是分包,需要修改里面的内容
+			let oppoPropPath = path.join(layarepublicPath, "oppo", "instant_app_settings.properties");
+			if (config.oppoInfo.subpack) {
+				fs.writeFileSync(oppoPropPath, "default_tab=game_split", "utf8");
+			} else {
+				fs.writeFileSync(oppoPropPath, "default_tab=game", "utf8");
+			}
+			let cmd = `${adbPath}`;
+			let args = ["push", oppoPropPath, "sdcard/"];
+			let opts = {
+				cwd: projDir,
+				shell: true
+			};
+			let cp = childProcess.spawn(cmd, args, opts);
+			// let cp = childProcess.spawn('npx.cmd', ['-v']);
+			cp.stdout.on('data', (data) => {
+				console.log(`stdout: ${data}`);
+			});
+	
+			cp.stderr.on('data', (data) => {
+				console.log(`stderr: ${data}`);
+				// reject();
+			});
+	
+			cp.on('close', (code) => {
+				console.log(`2) push_RPK 子进程退出码:${code}`);
+				resolve();
+			});
+		});
+	}).then(() => {
+		return new Promise((resolve, reject) => {
+			let cmd = `${adbPath}`;
+			let args = ["shell", "am", "force-stop", "com.nearme.instant.platform"];
+			let opts = {
+				cwd: projDir,
+				shell: true
+			};
+			let cp = childProcess.spawn(cmd, args, opts);
+			// let cp = childProcess.spawn('npx.cmd', ['-v']);
+			cp.stdout.on('data', (data) => {
+				console.log(`stdout: ${data}`);
+			});
+	
+			cp.stderr.on('data', (data) => {
+				console.log(`stderr: ${data}`);
+				// reject();
+			});
+	
+			cp.on('close', (code) => {
+				console.log(`3) push_RPK 子进程退出码:${code}`);
+				resolve();
+			});
+		});
+	}).then(() => {
+		return new Promise((resolve, reject) => {
+			let cmd = `${adbPath}`;
+			let args = ["shell", "am", "start", "-n", "com.nearme.instant.platform/com.oppo.autotest.main.InstantAppActivity"];
+			let opts = {
+				cwd: projDir,
+				shell: true
+			};
+			let cp = childProcess.spawn(cmd, args, opts);
+			// let cp = childProcess.spawn('npx.cmd', ['-v']);
+			cp.stdout.on('data', (data) => {
+				console.log(`stdout: ${data}`);
+			});
+	
+			cp.stderr.on('data', (data) => {
+				console.log(`stderr: ${data}`);
+				// reject();
+			});
+	
+			cp.on('close', (code) => {
+				console.log(`4) push_RPK 子进程退出码:${code}`);
+				resolve();
+			});
+		});
+	});
+});
+
+gulp.task("buildOPPOProj", ["pushRPK_OPPO"], function() {
+	console.log("all tasks completed");
+});

+ 283 - 0
client/laya/.laya/_pub_old/_publish_qqgame_1742208354870.js

@@ -0,0 +1,283 @@
+// v1.8.5
+const ideModuleDir = global.ideModuleDir;
+const workSpaceDir = global.workSpaceDir;
+
+//引用插件模块
+const gulp = require(ideModuleDir + "gulp");
+const fs = require("fs");
+const path = require("path");
+const del = require(ideModuleDir + "del");
+const revCollector = require(ideModuleDir + 'gulp-rev-collector');
+const { getEngineVersion, getFileMd5, canUsePluginEngine } = require("./pub_utils");
+
+const provider = "1109625052";
+const minPluginVersion = "2.1.1";
+let fullRemoteEngineList = ["laya.core.js", "laya.filter.js", "laya.ani.js", "laya.tiledmap.js", "laya.d3.js", "laya.html.js", "laya.particle.js", "laya.ui.js", "laya.webgl.js", "laya.filter.js", "laya.d3Plugin.js"];
+let copyLibsTask = ["copyPlatformLibsJsFile"];
+let versiontask = ["version2"];
+
+let 
+    config,
+    releaseDir;
+let versionCon; // 版本管理version.json
+let commandSuffix,
+	layarepublicPath;
+
+gulp.task("preCreate_QQ", copyLibsTask, function() {
+	releaseDir = global.releaseDir;
+	config = global.config;
+	commandSuffix = global.commandSuffix;
+	layarepublicPath = global.layarepublicPath;
+
+	if (config.useMinJsLibs) {
+		fullRemoteEngineList = fullRemoteEngineList.map((item, index) => {
+			return item.replace(".js", ".min.js");
+		})
+	}
+});
+
+gulp.task("copyPlatformFile_QQ", ["preCreate_QQ"], function() {
+	let adapterPath = path.join(layarepublicPath, "LayaAirProjectPack", "lib", "data", "qqfiles");
+	let hasPublishPlatform = 
+		fs.existsSync(path.join(releaseDir, "game.js")) &&
+		fs.existsSync(path.join(releaseDir, "game.json")) &&
+		fs.existsSync(path.join(releaseDir, "project.config.json"));
+	let copyLibsList;
+	if (hasPublishPlatform) {
+		copyLibsList = [`${adapterPath}/weapp-adapter.js`];
+	} else {
+		copyLibsList = [`${adapterPath}/*.*`];
+	}
+	var stream = gulp.src(copyLibsList);
+	return stream.pipe(gulp.dest(releaseDir));
+});
+
+gulp.task("modifyFile_QQ", versiontask, function() {
+	// 修改game.json文件
+	let gameJsonPath = path.join(releaseDir, "game.json");
+	let content = fs.readFileSync(gameJsonPath, "utf8");
+	let conJson = JSON.parse(content);
+	conJson.deviceOrientation = config.qqInfo.orientation;
+	content = JSON.stringify(conJson, null, 4);
+	fs.writeFileSync(gameJsonPath, content, "utf8");
+
+	if (config.version) {
+		let versionPath = releaseDir + "/version.json";
+		versionCon = fs.readFileSync(versionPath, "utf8");
+		versionCon = JSON.parse(versionCon);
+	}
+	let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+	// QQ小游戏项目,修改index.js
+	let filePath = path.join(releaseDir, indexJsStr);
+	if (!fs.existsSync(filePath)) {
+		return;
+	}
+	let fileContent = fs.readFileSync(filePath, "utf8");
+	fileContent = fileContent.replace(/loadLib(\(['"])/gm, "require$1./");
+	fs.writeFileSync(filePath, fileContent, "utf8");
+});
+
+gulp.task("modifyMinJs_QQ", ["modifyFile_QQ"], function() {
+	// 如果保留了平台文件,如果同时取消使用min类库,就会出现文件引用不正确的问题
+	if (config.keepPlatformFile) {
+		let fileJsPath = path.join(releaseDir, "game.js");
+		let content = fs.readFileSync(fileJsPath, "utf-8");
+		content = content.replace(/min\/laya(-[\w\d]+)?\.qqmini\.min\.js/gm, "laya.qqmini.js");
+		fs.writeFileSync(fileJsPath, content, 'utf-8');
+	}
+	if (!config.useMinJsLibs) {
+		return;
+	}
+	let fileJsPath = path.join(releaseDir, "game.js");
+	let content = fs.readFileSync(fileJsPath, "utf-8");
+	content = content.replace(/(min\/)?laya(-[\w\d]+)?\.qqmini(\.min)?\.js/gm, "min/laya.qqmini.min.js");
+	fs.writeFileSync(fileJsPath, content, 'utf-8');
+});
+
+gulp.task("version_QQ", ["modifyMinJs_QQ"], function() {
+	// 如果保留了平台文件,如果同时开启版本管理,就会出现文件引用不正确的问题
+	if (config.keepPlatformFile) {
+		let fileJsPath = path.join(releaseDir, "game.js");
+		let content = fs.readFileSync(fileJsPath, "utf-8");
+		content = content.replace(/laya(-[\w\d]+)?\.qqmini/gm, "laya.qqmini");
+		content = content.replace(/index(-[\w\d]+)?\.js/gm, "index.js");
+		fs.writeFileSync(fileJsPath, content, 'utf-8');
+	}
+	if (config.version) {
+		let versionPath = releaseDir + "/version.json";
+		let gameJSPath = releaseDir + "/game.js";
+		let srcList = [versionPath, gameJSPath];
+		return gulp.src(srcList)
+			.pipe(revCollector())
+			.pipe(gulp.dest(releaseDir));
+	}
+});
+
+gulp.task("pluginEngin_QQ", ["version_QQ"], function(cb) {
+	if (!config.uesEnginePlugin) { // 没有使用微信引擎插件,还是像以前一样发布
+		return cb();
+	}
+	if (config.version) {
+		let versionPath = releaseDir + "/version.json";
+		versionCon = fs.readFileSync(versionPath, "utf8");
+		versionCon = JSON.parse(versionCon);
+	}
+	let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+	
+	// 获取version等信息
+	let coreLibPath = path.join(workSpaceDir, "bin", "libs", "laya.core.js");
+	let isHasCoreLib = fs.existsSync(coreLibPath);
+	let isOldAsProj = fs.existsSync(`${workSpaceDir}/asconfig.json`) && !isHasCoreLib;
+	let isNewTsProj = fs.existsSync(`${workSpaceDir}/src/tsconfig.json`) && !isHasCoreLib;
+	let EngineVersion = getEngineVersion();
+	if (!EngineVersion) {
+		throw new Error(`读取引擎版本号失败,请于服务提供商联系!`);
+	}
+	if (!EngineVersion || EngineVersion.includes("beta") || !canUsePluginEngine(EngineVersion, minPluginVersion)) {
+		throw new Error(`该版本引擎无法使用引擎插件功能(engineVersion: ${EngineVersion})`);
+	}
+	console.log(`通过版本号检查:  ${EngineVersion}`);
+	// 使用引擎插件
+	let localUseEngineList = [];
+	let copyEnginePathList;
+	new Promise(function(resolve, reject) {
+		console.log(`修改game.js和game.json`);
+		// 1) 修改game.js和game.json
+		// 修改game.js
+		let gameJsPath = path.join(releaseDir, "game.js");
+		let platformJs = config.useMinJsLibs ? `require("./libs/min/laya.qqmini.min.js");` : `require("./libs/laya.qqmini.js");`;
+		let gameJscontent = `require("weapp-adapter.js");\n${platformJs}\nrequirePlugin('layaPlugin');\nwindow.loadLib = require;\nrequire("./${indexJsStr}");`;
+		fs.writeFileSync(gameJsPath, gameJscontent, "utf8");
+		// 修改game.json,使其支持引擎插件
+		let gameJsonPath = path.join(releaseDir, "game.json");
+		let gameJsonContent = fs.readFileSync(gameJsonPath, "utf8");
+		let conJson = JSON.parse(gameJsonContent);
+		conJson.plugins = {
+			"layaPlugin": {
+				"version": EngineVersion,
+				"provider": provider,
+				"path": "laya-libs"
+			}
+		}
+		gameJsonContent = JSON.stringify(conJson, null, 4);
+		fs.writeFileSync(gameJsonPath, gameJsonContent, "utf8");
+		resolve();
+	}).then(function() {
+		return new Promise(function(resolve, reject) {
+			console.log(`确定用到的插件引擎`);
+			// 2) 确定用到了那些插件引擎,并将插件引擎从index.js的引用中去掉
+			let indexJsPath = path.join(releaseDir, indexJsStr);
+			let indexJsCon = fs.readFileSync(indexJsPath, "utf8");
+			let item, fullRequireItem;
+			for (let i = 0, len = fullRemoteEngineList.length; i < len; i++) {
+				item = fullRemoteEngineList[i];
+				fullRequireItem = config.useMinJsLibs ? `require("./libs/min/${item}")` : `require("./libs/${item}")`;
+				if (indexJsCon.includes(fullRequireItem)) {
+					let _item = item.replace(".min.js", ".js"), _minItem = item;
+					localUseEngineList.push(_item);
+					indexJsCon = indexJsCon.replace(fullRequireItem + ";", "").replace(fullRequireItem + ",", "").replace(fullRequireItem, "");
+					// 如果引用了压缩的类库,将其重命名为未压缩的类库,并拷贝到libs中
+					if (config.useMinJsLibs) {
+						let oldMinlibPath = path.join(releaseDir, "libs", "min", _minItem);
+						let newMinlibPath = path.join(releaseDir, "libs", "min", _item);
+						let newlibPath = path.join(releaseDir, "libs", _item);
+						fs.renameSync(oldMinlibPath, newMinlibPath);
+						// fs.copyFileSync(newlibPath, newMinlibPath);
+						let con = fs.readFileSync(newMinlibPath, "utf8");
+						fs.writeFileSync(newlibPath, con, "utf8");
+						fs.unlinkSync(newMinlibPath);
+					}
+				}
+			}
+			if (isOldAsProj || isNewTsProj) { // 如果as||ts_new语言,开发者将laya.js也写入index.js中了,将其删掉
+				fullRequireItem = `require("./laya.js")`;
+				if (indexJsCon.includes(fullRequireItem)) {
+					indexJsCon = indexJsCon.replace(fullRequireItem + ";", "").replace(fullRequireItem + ",", "").replace(fullRequireItem, "");
+				}
+			}
+			fs.writeFileSync(indexJsPath, indexJsCon, "utf8");
+			// ts/js再次修改game.js,仅引用使用到的类库
+			// as||ts_new因为本地只有laya.js,无法仅引用使用到的类库
+			if (!isOldAsProj && !isNewTsProj) {
+				let pluginCon = "";
+				localUseEngineList.forEach(function(item) {
+					pluginCon += `requirePlugin("layaPlugin/${item}");\n`;
+				});
+				let gameJsPath = path.join(releaseDir, "game.js");
+				let gameJsCon = fs.readFileSync(gameJsPath, "utf8");
+				gameJsCon = gameJsCon.replace(`requirePlugin('layaPlugin');`, pluginCon);
+				fs.writeFileSync(gameJsPath, gameJsCon, "utf8");
+			}
+			resolve();
+		});
+	}).then(function() {
+		return new Promise(function(resolve, reject) {
+			console.log(`将本地的引擎插件移动到laya-libs中`);
+			// 3) 将本地的引擎插件移动到laya-libs中
+			let libsPath = /** config.useMinJsLibs ? `${releaseDir}/libs/min` : */`${releaseDir}/libs`;
+			copyEnginePathList = [`${libsPath}/{${localUseEngineList.join(",")}}`];
+			if (isOldAsProj || isNewTsProj) { // 单独拷贝laya.js
+				copyEnginePathList = [`${releaseDir}/laya.js`];
+			}
+			gulp.src(copyEnginePathList).pipe(gulp.dest(`${releaseDir}/laya-libs`));
+			setTimeout(resolve, 500);
+		});
+	}).then(function() {
+		return new Promise(function(resolve, reject) {
+			console.log(`将libs中的本地引擎插件删掉`);
+			// 4) 将libs中的本地引擎插件删掉
+			del(copyEnginePathList, { force: true }).then(resolve);
+		});
+	}).then(function() {
+		return new Promise(async function(resolve, reject) {
+			console.log(`完善引擎插件目录`);
+			// 5) 引擎插件目录laya-libs中还需要新建几个文件,使该目录能够使用
+			if (isOldAsProj || isNewTsProj) { // 单独拷贝laya.js
+				localUseEngineList.push("laya.js");
+			}
+			let 
+				layalibsPath = path.join(releaseDir, "laya-libs"),
+				engineIndex = path.join(layalibsPath, "index.js"),
+				engineplugin = path.join(layalibsPath, "plugin.json"),
+				enginesignature = path.join(layalibsPath, "signature.json");
+			// index.js
+			if (!fs.existsSync(layalibsPath)) {
+				throw new Error("引擎插件目录创建失败,请与服务提供商联系!");
+			}
+			let indexCon = "";
+			localUseEngineList.forEach(function(item) {
+				indexCon += `require("./${item}");\n`;
+			});
+			fs.writeFileSync(engineIndex, indexCon, "utf8");
+			// plugin.json
+			let pluginCon = {"main": "index.js"};
+			fs.writeFileSync(engineplugin, JSON.stringify(pluginCon, null, 4), "utf8");
+			// signature.json,目前平台方将其作为保留用途,不会做插件的md5校验;IDE仍将生成md5
+			let signatureCon = {
+				"provider": provider,
+				"signature": []
+			};
+			localUseEngineList.unshift("index.js");
+			let fileName, md5Str;
+			for (let i = 0, len = localUseEngineList.length; i < len; i++) {
+				fileName = localUseEngineList[i];
+				let md5Str = await getFileMd5(path.join(releaseDir, "laya-libs", fileName));
+				signatureCon.signature.push({
+					"path": fileName,
+					"md5": md5Str
+				});
+			}
+			fs.writeFileSync(enginesignature, JSON.stringify(signatureCon, null, 4), "utf8");
+			resolve();
+		});
+	})
+	.then(function() {
+		cb();
+	}).catch(function(e) {
+		throw e;
+	})
+});
+
+gulp.task("buildQQProj", ["pluginEngin_QQ"], function() {
+	console.log("all tasks completed");
+});

+ 185 - 0
client/laya/.laya/_pub_old/_publish_taobaominiapp_1742208354856.js

@@ -0,0 +1,185 @@
+// v1.1.0
+const ideModuleDir = global.ideModuleDir;
+const workSpaceDir = global.workSpaceDir;
+
+//引用插件模块
+const gulp = require(ideModuleDir + "gulp");
+const fs = require("fs");
+const path = require("path");
+const del = require(ideModuleDir + "del");
+const revCollector = require(ideModuleDir + 'gulp-rev-collector');
+
+let copyLibsTask = ["copyPlatformLibsJsFile"];
+let versiontask = ["version2"];
+
+let 
+    config,
+	releaseDir,
+	tempReleaseDir;
+let versionCon; // 版本管理version.json
+let commandSuffix,
+	layarepublicPath;
+
+gulp.task("preCreate_TBMini", copyLibsTask, function() {
+	releaseDir = global.releaseDir;
+	tempReleaseDir = global.tempReleaseDir;
+	config = global.config;
+	commandSuffix = global.commandSuffix;
+	layarepublicPath = global.layarepublicPath;
+});
+
+gulp.task("copyPlatformFile_TBMini", versiontask, function() {
+	releaseDir = path.dirname(releaseDir);
+	let adapterPath = path.join(layarepublicPath, "LayaAirProjectPack", "lib", "data", "taobaofiles");
+	let hasPublishPlatform = 
+		fs.existsSync(path.join(releaseDir, "app.js")) &&
+		fs.existsSync(path.join(releaseDir, "app.json")) &&
+		fs.existsSync(path.join(releaseDir, "package.json"));
+	let copyLibsList;
+	if (hasPublishPlatform) {
+		copyLibsList = [`${adapterPath}/node_modules/layaengine/adapter.js`];
+	} else {
+		copyLibsList = [`${adapterPath}/**/*.*`];
+	}
+	var stream = gulp.src(copyLibsList, {base: adapterPath});
+	return stream.pipe(gulp.dest(releaseDir));
+});
+
+gulp.task("copyFiles2Pages_TBMini", ["copyPlatformFile_TBMini"], function() {
+	return gulp.src([`${tempReleaseDir}/**/*.*`, `!${tempReleaseDir}/libs/**/*.*`]).pipe(gulp.dest(`${releaseDir}/pages/index`));
+});
+
+gulp.task("moveToLibs_TBMini", ["copyFiles2Pages_TBMini"], function() {
+	let libsPath = path.join(tempReleaseDir, "libs");
+	let layaenginePath = path.join(releaseDir, "node_modules", "layaengine", "libs");
+	return gulp.src(`${libsPath}/**/*.*`)
+			.pipe(gulp.dest(layaenginePath));
+});
+
+gulp.task("delFiles_TBMini", ["moveToLibs_TBMini"], function(cb) {
+	let delList = [`${tempReleaseDir}/**`];
+	del(delList, { force: true }).then(paths => {
+		cb();
+	}).catch((err) => {
+		throw err;
+	})
+});
+
+gulp.task("modifyFile_TBMini", ["delFiles_TBMini"], function() {
+	if (config.version || config.enableVersion) {
+		let versionPath = path.join(releaseDir, "pages", "index", "version.json");
+		versionCon = fs.readFileSync(versionPath, "utf-8");
+		versionCon = JSON.parse(versionCon);
+	}
+	// 修改index.js
+	let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+	let indexFilePath = path.join(releaseDir, "pages", "index", indexJsStr);
+	if (!fs.existsSync(indexFilePath)) {
+		return;
+	}
+	let indexFileContent = fs.readFileSync(indexFilePath, "utf-8");
+	indexFileContent = indexFileContent.replace(/(window.screenOrientation\s*=\s*"\w+"[,;]?)/gm, "/**$1*/");
+	indexFileContent = indexFileContent.replace(/loadLib(\(['"]libs\/)/gm, `require("layaengine/libs/`);
+	indexFileContent = indexFileContent.replace(/loadLib(\(['"])/gm, "require$1./");
+	indexFileContent = indexFileContent.replace(`require("./laya.js")`, `require("layaengine/laya.js")`);
+	// 特殊的,增加清除缓存
+	indexFileContent = indexFileContent.replace(/(require(\(['"][\w\/\.]+['"]\));?)/gm, "delete require.cache[require.resolve$2];\n$1");
+	fs.writeFileSync(indexFilePath, indexFileContent, "utf-8");
+})
+
+gulp.task("modifyMinJs_TBMini", ["modifyFile_TBMini"], function() {
+	// 如果保留了平台文件,如果同时取消使用min类库,就会出现文件引用不正确的问题
+	if (config.keepPlatformFile) {
+		let fileJsPath = path.join(releaseDir, "pages", "index", "game.js");
+		let content = fs.readFileSync(fileJsPath, "utf-8");
+		content = content.replace(/min\/laya(-[\w\d]+)?\.tbmini\.min\.js/gm, "laya.tbmini.js");
+		fs.writeFileSync(fileJsPath, content, 'utf-8');
+	}
+	if (!config.useMinJsLibs) {
+		return;
+	}
+	let fileJsPath = path.join(releaseDir, "pages", "index", "game.js");
+	let content = fs.readFileSync(fileJsPath, "utf-8");
+	content = content.replace(/(min\/)?laya(-[\w\d]+)?\.tbmini(\.min)?\.js/gm, "min/laya.tbmini.min.js");
+	fs.writeFileSync(fileJsPath, content, 'utf-8');
+});
+
+gulp.task("modifyLibsJs_TBMini", ["modifyMinJs_TBMini"], function() {
+	const NONCORESTR = "var window = $global.window;\nvar document = window.document;\nvar XMLHttpRequest = window.XMLHttpRequest;\nvar Laya = window.Laya;\nvar Laya3D = window.Laya3D;\n";
+	const CORESTR = "var window = $global.window;\nvar document = window.document;\nvar XMLHttpRequest = window.XMLHttpRequest;\n";
+	// libs
+	let libsPath = path.join(releaseDir, "node_modules", "layaengine", "libs", config.useMinJsLibs ? "min" : "");
+	let libsList = fs.readdirSync(libsPath);
+	for (let libName, fullPath, con, len = libsList.length, i = 0; i < len; i++) {
+		libName = libsList[i];
+		fullPath = path.join(libsPath, libName);
+		con = fs.readFileSync(fullPath, "utf8");
+		if (/laya(-[\w\d]+)?\.core/gm.test(libName)) {
+			con = CORESTR + con;
+		} else {
+			con = NONCORESTR + con;
+		}
+		fs.writeFileSync(fullPath, con, "utf8");
+	}
+	// bundle.js
+	let bundleJsStr = (versionCon && versionCon["js/bundle.js"]) ? versionCon["js/bundle.js"] :  "js/bundle.js";
+	let bundlePath = path.join(releaseDir, "pages", "index", bundleJsStr);
+	let con = fs.readFileSync(bundlePath, "utf8");
+	// as 侵入式的修改bundle.js
+	if (fs.existsSync(path.join(workSpaceDir, "asconfig.json"))) {
+		let fileList = fs.readdirSync(path.join(workSpaceDir, "src"));
+		for (let i = 0, len = fileList.length, fileItem, filePath, isDir; i < len; i++) {
+			fileItem = fileList[i];
+			filePath = path.join(workSpaceDir, "src", fileItem);
+			isDir = fs.statSync(filePath).isDirectory();
+			if (isDir && (con.includes(`window.${fileItem} = {};`) || con.includes(`window.${fileItem}={}`))) {
+				// 因为压缩时不能禁用逗号,只能穷尽所有可能
+				con = con.replace(`window.${fileItem} = {};`, `var ${fileItem} = window.${fileItem} = {};`)
+					.replace(`;window.${fileItem}={};`, `;var ${fileItem}=window.${fileItem}={};`)
+					.replace(`,window.${fileItem}={};`, `;var ${fileItem}=window.${fileItem}={};`)
+					.replace(`,window.${fileItem}={},`, `;var ${fileItem}=window.${fileItem}={};`)
+					.replace(`;window.${fileItem}={},`, `;var ${fileItem}=window.${fileItem}={};`)
+				if (!con.includes(`;var ${fileItem}=window.${fileItem}={};`)) {
+					con = con.replace(`window.${fileItem}={}`, `;var ${fileItem}=window.${fileItem}={};`)
+				}
+			}
+		}
+	}
+	con = NONCORESTR + con;
+	fs.writeFileSync(bundlePath, con, "utf8");
+	// laya.js
+	let layaJsStr = (versionCon && versionCon["laya.js"]) ? versionCon["laya.js"] :  "laya.js";
+	let layaPath = path.join(releaseDir, "pages", "index", layaJsStr);
+	if (fs.existsSync(layaPath)) {
+		let con = fs.readFileSync(layaPath, "utf8");
+		con = CORESTR + con;
+
+		// 移动到 layaengine 下
+		let newLayaPath = path.join(releaseDir, "node_modules", "layaengine", layaJsStr);
+		fs.writeFileSync(newLayaPath, con, "utf8");
+		fs.unlinkSync(layaPath);
+	}
+});
+
+gulp.task("version_TBMini", ["modifyLibsJs_TBMini"], function() {
+	// 如果保留了平台文件,如果同时开启版本管理,就会出现文件引用不正确的问题
+	if (config.keepPlatformFile) {
+		let fileJsPath = path.join(releaseDir, "pages", "index", "game.js");
+		let content = fs.readFileSync(fileJsPath, "utf-8");
+		content = content.replace(/laya(-[\w\d]+)?\.tbmini/gm, "laya.tbmini");
+		content = content.replace(/index(-[\w\d]+)?\.js/gm, "index.js");
+		fs.writeFileSync(fileJsPath, content, 'utf-8');
+	}
+	if (config.version) {
+		let versionPath = path.join(releaseDir, "pages", "index", "version.json");
+		let gameJSPath = path.join(releaseDir, "pages", "index", "game.js");
+		let srcList = [versionPath, gameJSPath];
+		return gulp.src(srcList)
+			.pipe(revCollector())
+			.pipe(gulp.dest(`${releaseDir}/pages/index`));
+	}
+});
+
+gulp.task("buildTBMiniProj", ["version_TBMini"], function() {
+	console.log("all tasks completed");
+});

+ 350 - 0
client/laya/.laya/_pub_old/_publish_wxgame_1742208354872.js

@@ -0,0 +1,350 @@
+// v1.8.6
+const ideModuleDir = global.ideModuleDir;
+const workSpaceDir = global.workSpaceDir;
+
+//引用插件模块
+const gulp = require(ideModuleDir + "gulp");
+const fs = require("fs");
+const path = require("path");
+const del = require(ideModuleDir + "del");
+const revCollector = require(ideModuleDir + 'gulp-rev-collector');
+const { getEngineVersion, getFileMd5, canUsePluginEngine } = require("./pub_utils");
+
+const provider = "wx70d8aa25ec591f7a";
+const minPluginVersion = "2.0.1";
+let fullRemoteEngineList = ["laya.core.js", "laya.filter.js", "laya.ani.js", "laya.tiledmap.js", "laya.d3.js", "laya.html.js", "laya.particle.js", "laya.ui.js", "laya.webgl.js", "laya.filter.js", "laya.d3Plugin.js"];
+let copyLibsTask = ["copyPlatformLibsJsFile"];
+let versiontask = ["version2"];
+
+let 
+    config,
+    releaseDir;
+let isOpendataProj;
+let versionCon; // 版本管理version.json
+let commandSuffix,
+	layarepublicPath;
+
+gulp.task("preCreate_WX", copyLibsTask, function() {
+	releaseDir = global.releaseDir;
+	config = global.config;
+	commandSuffix = global.commandSuffix;
+	layarepublicPath = global.layarepublicPath;
+
+	if (config.useMinJsLibs) {
+		fullRemoteEngineList = fullRemoteEngineList.map((item, index) => {
+			return item.replace(".js", ".min.js");
+		})
+	}
+
+	// 是否是开放域项目
+	let projInfoPath = path.join(workSpaceDir, path.basename(workSpaceDir) + ".laya");
+	let isExist = fs.existsSync(projInfoPath);
+	if (isExist) {
+		try {
+			let projInfo = fs.readFileSync(projInfoPath, "utf8");
+			projInfo = projInfo && JSON.parse(projInfo);
+			isOpendataProj = projInfo.layaProType === 12;
+		} catch (e) {}
+	}
+});
+
+gulp.task("copyPlatformFile_WX", ["preCreate_WX"], function() {
+	let adapterPath = path.join(layarepublicPath, "LayaAirProjectPack", "lib", "data", "wxfiles");
+	// 开放域项目
+	if (isOpendataProj) {
+		let platformDir = path.join(adapterPath, "weapp-adapter.js");
+		let stream = gulp.src(platformDir);
+		return stream.pipe(gulp.dest(releaseDir));
+	}
+	// 如果新建项目时已经点击了"微信/百度小游戏bin目录快速调试",不再拷贝
+	let hasPlatform =
+		fs.existsSync(path.join(workSpaceDir, "bin", "game.js")) &&
+		fs.existsSync(path.join(workSpaceDir, "bin", "game.json")) &&
+		fs.existsSync(path.join(workSpaceDir, "bin", "project.config.json"));
+	let hasPublishPlatform = 
+		fs.existsSync(path.join(releaseDir, "game.js")) &&
+		fs.existsSync(path.join(releaseDir, "game.json")) &&
+		fs.existsSync(path.join(releaseDir, "project.config.json"));
+	let copyLibsList;
+	if (hasPlatform || hasPublishPlatform) {
+		copyLibsList = [`${adapterPath}/weapp-adapter.js`];
+	} else {
+		copyLibsList = [`${adapterPath}/*.*`];
+	}
+	var stream = gulp.src(copyLibsList);
+	return stream.pipe(gulp.dest(releaseDir));
+});
+
+// 开放域的情况下,合并game.js和index.js,并删除game.js
+gulp.task("openData_WX", versiontask, function (cb) {
+	if (config.openDataZone) {
+		let versionCon;
+		if (config.version) {
+			let versionPath = releaseDir + "/version.json";
+			versionCon = fs.readFileSync(versionPath, "utf8");
+			versionCon = JSON.parse(versionCon);
+		}
+		let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+		let indexPath = path.join(releaseDir, indexJsStr);
+		let indexjs = readFile(indexPath);
+		let gamejs = readFile(releaseDir + "/game.js");
+		if (gamejs && indexjs) {
+			gamejs = gamejs.replace(`require("index.js")`, indexjs);
+			fs.writeFileSync(indexPath, gamejs, 'utf-8');
+		}
+		if (isOpendataProj) {
+			// 开放域项目,将game.js删掉,发布最小包
+			del(`${releaseDir}/game.js`, { force: true }).then(paths => {
+				cb();
+			});
+		} else {
+			cb();
+		}
+	} else {
+		cb();
+	}
+});
+
+function readFile(path) {
+	if (fs.existsSync(path)) {
+		return fs.readFileSync(path, "utf-8");
+	}
+	return null;
+}
+
+gulp.task("modifyMinJs_WX", ["openData_WX"], function() {
+	if (config.openDataZone) {
+		return;
+	}
+	// 如果保留了平台文件,如果同时取消使用min类库,就会出现文件引用不正确的问题
+	if (config.keepPlatformFile) {
+		let fileJsPath = path.join(releaseDir, "game.js");
+		let content = fs.readFileSync(fileJsPath, "utf-8");
+		content = content.replace(/min\/laya(-[\w\d]+)?\.wxmini\.min\.js/gm, "laya.wxmini.js");
+		fs.writeFileSync(fileJsPath, content, 'utf-8');
+	}
+	if (!config.useMinJsLibs) {
+		return;
+	}
+	let fileJsPath = path.join(releaseDir, "game.js");
+	let content = fs.readFileSync(fileJsPath, "utf-8");
+	content = content.replace(/(min\/)?laya(-[\w\d]+)?\.wxmini(\.min)?\.js/gm, "min/laya.wxmini.min.js");
+	fs.writeFileSync(fileJsPath, content, 'utf-8');
+});
+
+gulp.task("version_WX", ["modifyMinJs_WX"], function() {
+	if (config.openDataZone) {
+		return;
+	}
+	// 如果保留了平台文件,如果同时开启版本管理,就会出现文件引用不正确的问题
+	if (config.keepPlatformFile) {
+		let fileJsPath = path.join(releaseDir, "game.js");
+		let content = fs.readFileSync(fileJsPath, "utf-8");
+		content = content.replace(/laya(-[\w\d]+)?\.wxmini/gm, "laya.wxmini");
+		content = content.replace(/index(-[\w\d]+)?\.js/gm, "index.js");
+		fs.writeFileSync(fileJsPath, content, 'utf-8');
+	}
+	if (config.version) {
+		let versionPath = releaseDir + "/version.json";
+		let gameJSPath = releaseDir + "/game.js";
+		let srcList = [versionPath, gameJSPath];
+		return gulp.src(srcList)
+			.pipe(revCollector())
+			.pipe(gulp.dest(releaseDir));
+	}
+});
+
+gulp.task("optimizeOpen_WX", ["version_WX"], function(cb) {
+	let wxOptimize = config.wxOptimize;
+	if (!wxOptimize || !wxOptimize.useOptimizeOpen) { // 没有使用微信引擎插件,还是像以前一样发布
+		return cb();
+	}
+	// 首屏加载优化(秒开),修改game.json
+	let filePath = path.join(releaseDir, "game.json");
+	if (!fs.existsSync(filePath)) {
+		return cb();
+	}
+	let fileContent = fs.readFileSync(filePath, "utf8");
+	let fileConObj = JSON.parse(fileContent);
+	if (wxOptimize.preloadRes) {
+		fileConObj.preloadResources = wxOptimize.preloadResList;
+	} else {
+		delete fileConObj.preloadResources;
+	}
+	if (wxOptimize.preloadSubpack) {
+		fileConObj.preloadSubpackages = wxOptimize.preloadSubpackList;
+	} else {
+		delete fileConObj.preloadSubpackages;
+	}
+	fs.writeFileSync(filePath, JSON.stringify(fileConObj, null, 4), "utf8");
+	return cb();
+});
+
+gulp.task("pluginEngin_WX", ["optimizeOpen_WX"], function(cb) {
+	if (!config.uesEnginePlugin) { // 没有使用微信引擎插件,还是像以前一样发布
+		return cb();
+	}
+	if (config.version) {
+		let versionPath = releaseDir + "/version.json";
+		versionCon = fs.readFileSync(versionPath, "utf8");
+		versionCon = JSON.parse(versionCon);
+	}
+	let indexJsStr = (versionCon && versionCon["index.js"]) ? versionCon["index.js"] :  "index.js";
+	
+	// 获取version等信息
+	let coreLibPath = path.join(workSpaceDir, "bin", "libs", "laya.core.js");
+	let isHasCoreLib = fs.existsSync(coreLibPath);
+	let isOldAsProj = fs.existsSync(`${workSpaceDir}/asconfig.json`) && !isHasCoreLib;
+	let isNewTsProj = fs.existsSync(`${workSpaceDir}/src/tsconfig.json`) && !isHasCoreLib;
+	let EngineVersion = getEngineVersion();
+	if (!EngineVersion) {
+		throw new Error(`读取引擎版本号失败,请于服务提供商联系!`);
+	}
+	if (!EngineVersion || EngineVersion.includes("beta") || !canUsePluginEngine(EngineVersion, minPluginVersion)) {
+		throw new Error(`该版本引擎无法使用引擎插件功能(engineVersion: ${EngineVersion})`);
+	}
+	console.log(`通过版本号检查:  ${EngineVersion}`);
+	// 使用引擎插件
+	let localUseEngineList = [];
+	let copyEnginePathList;
+	new Promise(function(resolve, reject) {
+		console.log(`修改game.js和game.json`);
+		// 1) 修改game.js和game.json
+		// 修改game.js
+		let gameJsPath = path.join(releaseDir, "game.js");
+		let platformJs = config.useMinJsLibs ? `require("./libs/min/laya.wxmini.min.js");` : `require("./libs/laya.wxmini.js");`;
+		let gameJscontent = `require("weapp-adapter.js");\n${platformJs}\nrequirePlugin('layaPlugin');\nwindow.loadLib = require;\nrequire("./${indexJsStr}");`;
+		fs.writeFileSync(gameJsPath, gameJscontent, "utf8");
+		// 修改game.json,使其支持引擎插件
+		let gameJsonPath = path.join(releaseDir, "game.json");
+		let gameJsonContent = fs.readFileSync(gameJsonPath, "utf8");
+		let conJson = JSON.parse(gameJsonContent);
+		conJson.plugins = {
+			"layaPlugin": {
+				"version": EngineVersion,
+				"provider": provider,
+				"path": "laya-libs"
+			}
+		}
+		gameJsonContent = JSON.stringify(conJson, null, 4);
+		fs.writeFileSync(gameJsonPath, gameJsonContent, "utf8");
+		resolve();
+	}).then(function() {
+		return new Promise(function(resolve, reject) {
+			console.log(`确定用到的插件引擎`);
+			// 2) 确定用到了那些插件引擎,并将插件引擎从index.js的引用中去掉
+			let indexJsPath = path.join(releaseDir, indexJsStr);
+			let indexJsCon = fs.readFileSync(indexJsPath, "utf8");
+			let item, fullRequireItem;
+			for (let i = 0, len = fullRemoteEngineList.length; i < len; i++) {
+				item = fullRemoteEngineList[i];
+				fullRequireItem = config.useMinJsLibs ? `loadLib("libs/min/${item}")` : `loadLib("libs/${item}")`;
+				if (indexJsCon.includes(fullRequireItem)) {
+					let _item = item.replace(".min.js", ".js"), _minItem = item;
+					localUseEngineList.push(_item);
+					indexJsCon = indexJsCon.replace(fullRequireItem + ";", "").replace(fullRequireItem + ",", "").replace(fullRequireItem, "");
+					// 如果引用了压缩的类库,将其重命名为未压缩的类库,并拷贝到libs中
+					if (config.useMinJsLibs) {
+						let oldMinlibPath = path.join(releaseDir, "libs", "min", _minItem);
+						let newMinlibPath = path.join(releaseDir, "libs", "min", _item);
+						let newlibPath = path.join(releaseDir, "libs", _item);
+						fs.renameSync(oldMinlibPath, newMinlibPath);
+						// fs.copyFileSync(newlibPath, newMinlibPath);
+						let con = fs.readFileSync(newMinlibPath, "utf8");
+						fs.writeFileSync(newlibPath, con, "utf8");
+						fs.unlinkSync(newMinlibPath);
+					}
+				}
+			}
+			if (isOldAsProj || isNewTsProj) { // 如果as||ts_new语言,开发者将laya.js也写入index.js中了,将其删掉
+				fullRequireItem = `loadLib("laya.js")`;
+				if (indexJsCon.includes(fullRequireItem)) {
+					indexJsCon = indexJsCon.replace(fullRequireItem + ";", "").replace(fullRequireItem + ",", "").replace(fullRequireItem, "");
+				}
+			}
+			fs.writeFileSync(indexJsPath, indexJsCon, "utf8");
+			// ts/js再次修改game.js,仅引用使用到的类库
+			// as||ts_new因为本地只有laya.js,无法仅引用使用到的类库
+			if (!isOldAsProj && !isNewTsProj) {
+				let pluginCon = "";
+				localUseEngineList.forEach(function(item) {
+					pluginCon += `requirePlugin("layaPlugin/${item}");\n`;
+				});
+				let gameJsPath = path.join(releaseDir, "game.js");
+				let gameJsCon = fs.readFileSync(gameJsPath, "utf8");
+				gameJsCon = gameJsCon.replace(`requirePlugin('layaPlugin');`, pluginCon);
+				fs.writeFileSync(gameJsPath, gameJsCon, "utf8");
+			}
+			resolve();
+		});
+	}).then(function() {
+		return new Promise(function(resolve, reject) {
+			console.log(`将本地的引擎插件移动到laya-libs中`);
+			// 3) 将本地的引擎插件移动到laya-libs中
+			let libsPath = /** config.useMinJsLibs ? `${releaseDir}/libs/min` : */`${releaseDir}/libs`;
+			copyEnginePathList = [`${libsPath}/{${localUseEngineList.join(",")}}`];
+			if (isOldAsProj || isNewTsProj) { // 单独拷贝laya.js
+				copyEnginePathList = [`${releaseDir}/laya.js`];
+			}
+			gulp.src(copyEnginePathList).pipe(gulp.dest(`${releaseDir}/laya-libs`));
+			setTimeout(resolve, 500);
+		});
+	}).then(function() {
+		return new Promise(function(resolve, reject) {
+			console.log(`将libs中的本地引擎插件删掉`);
+			// 4) 将libs中的本地引擎插件删掉
+			del(copyEnginePathList, { force: true }).then(resolve);
+		});
+	}).then(function() {
+		return new Promise(async function(resolve, reject) {
+			console.log(`完善引擎插件目录`);
+			// 5) 引擎插件目录laya-libs中还需要新建几个文件,使该目录能够使用
+			if (isOldAsProj || isNewTsProj) { // 单独拷贝laya.js
+				localUseEngineList.push("laya.js");
+			}
+			let 
+				layalibsPath = path.join(releaseDir, "laya-libs"),
+				engineIndex = path.join(layalibsPath, "index.js"),
+				engineplugin = path.join(layalibsPath, "plugin.json"),
+				enginesignature = path.join(layalibsPath, "signature.json");
+			// index.js
+			if (!fs.existsSync(layalibsPath)) {
+				throw new Error("引擎插件目录创建失败,请与服务提供商联系!");
+			}
+			let indexCon = "";
+			localUseEngineList.forEach(function(item) {
+				indexCon += `require("./${item}");\n`;
+			});
+			fs.writeFileSync(engineIndex, indexCon, "utf8");
+			// plugin.json
+			let pluginCon = {"main": "index.js"};
+			fs.writeFileSync(engineplugin, JSON.stringify(pluginCon, null, 4), "utf8");
+			// signature.json,目前平台方将其作为保留用途,不会做插件的md5校验;IDE仍将生成md5
+			let signatureCon = {
+				"provider": provider,
+				"signature": []
+			};
+			localUseEngineList.unshift("index.js");
+			let fileName, md5Str;
+			for (let i = 0, len = localUseEngineList.length; i < len; i++) {
+				fileName = localUseEngineList[i];
+				let md5Str = await getFileMd5(path.join(releaseDir, "laya-libs", fileName));
+				signatureCon.signature.push({
+					"path": fileName,
+					"md5": md5Str
+				});
+			}
+			fs.writeFileSync(enginesignature, JSON.stringify(signatureCon, null, 4), "utf8");
+			resolve();
+		});
+	})
+	.then(function() {
+		cb();
+	}).catch(function(e) {
+		throw e;
+	})
+});
+
+gulp.task("buildWXProj", ["pluginEngin_WX"], function() {
+	console.log("all tasks completed");
+});

+ 77 - 0
client/laya/.laya/bytedancegame.json

@@ -0,0 +1,77 @@
+{
+    "copyFilesFilter": [
+        "../bin/**/*.*"
+    ],
+    "openDataZone": false,
+    "compressJson": true,
+    "compressJsonFilter": [
+        "$basePath/**/*.{json,atlas}"
+    ],
+    "compressJsonNoteList": [
+        ""
+    ],
+    "compressImage": true,
+    "compressImageFilter": [
+        "$basePath/**/*.{png,jpg}"
+    ],
+    "compressImageNoteList": [
+        ""
+    ],
+    "compressJs": true,
+    "compressJsFilter": [
+        "$basePath/**/*.js",
+        "!$basePath/libs/min/**/*.js"
+    ],
+    "compressJsNoteList": [
+        "",
+        ""
+    ],
+    "version": false,
+    "versionFilter": [
+        "$basePath/**/*.*",
+        "!$basePath/*.html",
+        "!$basePath/{version.json,game.js,game.json,project.config.json,weapp-adapter.js,project.swan.json,swan-game-adapter.js,main.js,gameConfig.json,my-adapter.js,microgame-adapter.js,qg-adapter.js,huawei-adapter.js,adapter.js,}",
+        "!$basePath/layaforqq/**/*.*"
+    ],
+    "versionNoteList": [
+        "",
+        "",
+        "",
+        ""
+    ],
+    "exclude": false,
+    "excludeFilter": [
+        "!$basePath/res/**/*.*"
+    ],
+    "vexcludeNoteList": [
+        ""
+    ],
+    "packfile": false,
+    "keepPlatformFile": true,
+    "packfileFilter": [
+        ""
+    ],
+    "packfileFullValue": [
+        "$basePath/**/*.*",
+        "$basePath/game.js",
+        "$basePath/game.json",
+        "$basePath/project.config.json",
+        "$basePath/microgame-adapter.js"
+    ],
+    "packfileTargetValue": "",
+    "packfileNoteList": [
+        ""
+    ],
+    "clearReleaseDir": true,
+    "compile": true,
+    "forceCompile": false,
+    "onlyIndexJS": true,
+    "useMinJsLibs": false,
+    "es6toes5": false,
+    "projectType": "ts",
+    "pubTime": 1647418252482,
+    "bytedanceInfo": {
+        "orientation": "landscape"
+    },
+    "uesEnginePlugin": false
+}

BIN
client/laya/.laya/chrome/BrowserMetrics/BrowserMetrics-61E15599-9AA0.pma


BIN
client/laya/.laya/chrome/BrowserMetrics/BrowserMetrics-622ACDE8-3080.pma


+ 0 - 0
client/laya/.laya/chrome/Crashpad/metadata


BIN
client/laya/.laya/chrome/Crashpad/settings.dat


BIN
client/laya/.laya/chrome/Default/Affiliation Database


+ 0 - 0
client/laya/.laya/chrome/Default/Affiliation Database-journal


+ 0 - 0
client/laya/.laya/chrome/Default/AutofillStrikeDatabase/LOCK


+ 0 - 0
client/laya/.laya/chrome/Default/AutofillStrikeDatabase/LOG


+ 0 - 0
client/laya/.laya/chrome/Default/AutofillStrikeDatabase/LOG.old


+ 0 - 0
client/laya/.laya/chrome/Default/BudgetDatabase/LOCK


+ 0 - 0
client/laya/.laya/chrome/Default/BudgetDatabase/LOG


+ 0 - 0
client/laya/.laya/chrome/Default/BudgetDatabase/LOG.old


BIN
client/laya/.laya/chrome/Default/Cache/Cache_Data/data_0


BIN
client/laya/.laya/chrome/Default/Cache/Cache_Data/data_1


BIN
client/laya/.laya/chrome/Default/Cache/Cache_Data/data_2


BIN
client/laya/.laya/chrome/Default/Cache/Cache_Data/data_3


BIN
client/laya/.laya/chrome/Default/Cache/Cache_Data/index


BIN
client/laya/.laya/chrome/Default/Code Cache/js/index


BIN
client/laya/.laya/chrome/Default/Code Cache/js/index-dir/the-real-index


BIN
client/laya/.laya/chrome/Default/Code Cache/wasm/index


BIN
client/laya/.laya/chrome/Default/Code Cache/wasm/index-dir/the-real-index


+ 0 - 0
client/laya/.laya/chrome/Default/Download Service/EntryDB/LOCK


+ 0 - 0
client/laya/.laya/chrome/Default/Download Service/EntryDB/LOG


+ 0 - 0
client/laya/.laya/chrome/Default/Download Service/EntryDB/LOG.old


BIN
client/laya/.laya/chrome/Default/Extension Scripts/000003.log


+ 1 - 0
client/laya/.laya/chrome/Default/Extension Scripts/CURRENT

@@ -0,0 +1 @@
+MANIFEST-000001

+ 0 - 0
client/laya/.laya/chrome/Default/Extension Scripts/LOCK


+ 3 - 0
client/laya/.laya/chrome/Default/Extension Scripts/LOG

@@ -0,0 +1,3 @@
+2022/03/11-12:19:52.767 3e7c Reusing MANIFEST G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Extension Scripts/MANIFEST-000001
+2022/03/11-12:19:52.775 3e7c Recovering log #3
+2022/03/11-12:19:52.775 3e7c Reusing old log G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Extension Scripts/000003.log 

+ 3 - 0
client/laya/.laya/chrome/Default/Extension Scripts/LOG.old

@@ -0,0 +1,3 @@
+2022/01/14-18:51:05.735 81b8 Reusing MANIFEST G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Extension Scripts/MANIFEST-000001
+2022/01/14-18:51:05.735 81b8 Recovering log #3
+2022/01/14-18:51:05.735 81b8 Reusing old log G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Extension Scripts/000003.log 

BIN
client/laya/.laya/chrome/Default/Extension Scripts/MANIFEST-000001


BIN
client/laya/.laya/chrome/Default/Extension State/000003.log


+ 1 - 0
client/laya/.laya/chrome/Default/Extension State/CURRENT

@@ -0,0 +1 @@
+MANIFEST-000001

+ 0 - 0
client/laya/.laya/chrome/Default/Extension State/LOCK


+ 3 - 0
client/laya/.laya/chrome/Default/Extension State/LOG

@@ -0,0 +1,3 @@
+2022/03/11-12:19:52.855 4114 Reusing MANIFEST G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Extension State/MANIFEST-000001
+2022/03/11-12:19:52.860 4114 Recovering log #3
+2022/03/11-12:19:52.860 4114 Reusing old log G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Extension State/000003.log 

+ 3 - 0
client/laya/.laya/chrome/Default/Extension State/LOG.old

@@ -0,0 +1,3 @@
+2022/01/14-18:51:05.856 a794 Reusing MANIFEST G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Extension State/MANIFEST-000001
+2022/01/14-18:51:05.856 a794 Recovering log #3
+2022/01/14-18:51:05.856 a794 Reusing old log G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Extension State/000003.log 

BIN
client/laya/.laya/chrome/Default/Extension State/MANIFEST-000001


BIN
client/laya/.laya/chrome/Default/Favicons


+ 0 - 0
client/laya/.laya/chrome/Default/Favicons-journal


+ 0 - 0
client/laya/.laya/chrome/Default/Feature Engagement Tracker/AvailabilityDB/LOCK


+ 0 - 0
client/laya/.laya/chrome/Default/Feature Engagement Tracker/AvailabilityDB/LOG


+ 0 - 0
client/laya/.laya/chrome/Default/Feature Engagement Tracker/AvailabilityDB/LOG.old


+ 0 - 0
client/laya/.laya/chrome/Default/Feature Engagement Tracker/EventDB/LOCK


+ 0 - 0
client/laya/.laya/chrome/Default/Feature Engagement Tracker/EventDB/LOG


+ 0 - 0
client/laya/.laya/chrome/Default/Feature Engagement Tracker/EventDB/LOG.old


BIN
client/laya/.laya/chrome/Default/GPUCache/data_0


BIN
client/laya/.laya/chrome/Default/GPUCache/data_1


BIN
client/laya/.laya/chrome/Default/GPUCache/data_2


BIN
client/laya/.laya/chrome/Default/GPUCache/data_3


BIN
client/laya/.laya/chrome/Default/GPUCache/index


BIN
client/laya/.laya/chrome/Default/History


+ 0 - 0
client/laya/.laya/chrome/Default/History-journal


+ 0 - 0
client/laya/.laya/chrome/Default/LOCK


+ 0 - 0
client/laya/.laya/chrome/Default/LOG


+ 0 - 0
client/laya/.laya/chrome/Default/LOG.old


BIN
client/laya/.laya/chrome/Default/Local Storage/leveldb/000003.log


+ 1 - 0
client/laya/.laya/chrome/Default/Local Storage/leveldb/CURRENT

@@ -0,0 +1 @@
+MANIFEST-000001

+ 0 - 0
client/laya/.laya/chrome/Default/Local Storage/leveldb/LOCK


+ 3 - 0
client/laya/.laya/chrome/Default/Local Storage/leveldb/LOG

@@ -0,0 +1,3 @@
+2022/03/11-12:19:52.853 3fc8 Reusing MANIFEST G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Local Storage\leveldb/MANIFEST-000001
+2022/03/11-12:19:52.860 3fc8 Recovering log #3
+2022/03/11-12:19:52.865 3fc8 Reusing old log G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Local Storage\leveldb/000003.log 

+ 3 - 0
client/laya/.laya/chrome/Default/Local Storage/leveldb/LOG.old

@@ -0,0 +1,3 @@
+2022/01/14-18:51:05.779 112a8 Reusing MANIFEST G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Local Storage\leveldb/MANIFEST-000001
+2022/01/14-18:51:05.780 112a8 Recovering log #3
+2022/01/14-18:51:05.780 112a8 Reusing old log G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Local Storage\leveldb/000003.log 

BIN
client/laya/.laya/chrome/Default/Local Storage/leveldb/MANIFEST-000001


BIN
client/laya/.laya/chrome/Default/Login Data


BIN
client/laya/.laya/chrome/Default/Login Data For Account


+ 0 - 0
client/laya/.laya/chrome/Default/Login Data For Account-journal


+ 0 - 0
client/laya/.laya/chrome/Default/Login Data-journal


BIN
client/laya/.laya/chrome/Default/Network Action Predictor


+ 0 - 0
client/laya/.laya/chrome/Default/Network Action Predictor-journal


BIN
client/laya/.laya/chrome/Default/Network/Cookies


+ 0 - 0
client/laya/.laya/chrome/Default/Network/Cookies-journal


+ 1 - 0
client/laya/.laya/chrome/Default/Network/Network Persistent State

@@ -0,0 +1 @@
+{"net":{"http_server_properties":{"servers":[{"isolation":[],"server":"https://mygame1.tangro.cn","supports_spdy":true}],"version":5},"network_qualities":{"CAESABiAgICA+P////8B":"4G"}}}

+ 0 - 0
client/laya/.laya/chrome/Default/Network/NetworkDataMigrated


BIN
client/laya/.laya/chrome/Default/Network/Reporting and NEL


+ 0 - 0
client/laya/.laya/chrome/Default/Network/Reporting and NEL-journal


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
client/laya/.laya/chrome/Default/Preferences


+ 1 - 0
client/laya/.laya/chrome/Default/PreferredApps

@@ -0,0 +1 @@
+{"preferred_apps":[],"version":1}

BIN
client/laya/.laya/chrome/Default/QuotaManager


+ 0 - 0
client/laya/.laya/chrome/Default/QuotaManager-journal


+ 1 - 0
client/laya/.laya/chrome/Default/README

@@ -0,0 +1 @@
+Google Chrome settings and storage represent user-selected preferences and information and MUST not be extracted, overwritten or modified except through Google Chrome defined APIs.

+ 0 - 0
client/laya/.laya/chrome/Default/Safe Browsing Network/NetworkDataMigrated


BIN
client/laya/.laya/chrome/Default/Safe Browsing Network/Safe Browsing Cookies


+ 0 - 0
client/laya/.laya/chrome/Default/Safe Browsing Network/Safe Browsing Cookies-journal


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
client/laya/.laya/chrome/Default/Secure Preferences


BIN
client/laya/.laya/chrome/Default/Service Worker/Database/000003.log


+ 1 - 0
client/laya/.laya/chrome/Default/Service Worker/Database/CURRENT

@@ -0,0 +1 @@
+MANIFEST-000001

+ 0 - 0
client/laya/.laya/chrome/Default/Service Worker/Database/LOCK


+ 2 - 0
client/laya/.laya/chrome/Default/Service Worker/Database/LOG

@@ -0,0 +1,2 @@
+2022/03/11-12:19:52.958 40ac Creating DB G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Service Worker\Database since it was missing.
+2022/03/11-12:19:52.964 40ac Reusing MANIFEST G:\yt\layabox\TableBall\client\laya\.laya\chrome\Default\Service Worker\Database/MANIFEST-000001

BIN
client/laya/.laya/chrome/Default/Service Worker/Database/MANIFEST-000001


BIN
client/laya/.laya/chrome/Default/Service Worker/ScriptCache/2cc80dabc69f58b6_0


BIN
client/laya/.laya/chrome/Default/Service Worker/ScriptCache/2cc80dabc69f58b6_1


BIN
client/laya/.laya/chrome/Default/Service Worker/ScriptCache/index


BIN
client/laya/.laya/chrome/Default/Service Worker/ScriptCache/index-dir/the-real-index


BIN
client/laya/.laya/chrome/Default/Session Storage/000003.log


+ 1 - 0
client/laya/.laya/chrome/Default/Session Storage/CURRENT

@@ -0,0 +1 @@
+MANIFEST-000001

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff