ソースを参照

修复mac登录问题
修复热更、整包更新问题
增加发包流程说明文件

kaka 5 年 前
コミット
9841e09b1b

ファイルの差分が大きいため隠しています
+ 0 - 0
assets/resources/module/login/hot/project.manifest


+ 1 - 1
assets/resources/module/login/hot/version.manifest

@@ -1 +1 @@
-{"version":"1.0.1","packageUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemote/","remoteManifestUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemote/project.manifest","remoteVersionUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemote/version.manifest"}
+{"version":"1.0.0","packageUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/","remoteManifestUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/project.manifest","remoteVersionUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/version.manifest"}

+ 4 - 1
assets/script/game/data/AppData.ts

@@ -84,6 +84,8 @@ export class AppData {
 
     /** 更新状态 */
     public updateState: UpdateState = UpdateState.None;
+    /** 更新进度 */
+    public updatePercent = 0;
 
     //强更信息--------------------------------------------------------
     /** 需要强制更新 */
@@ -104,5 +106,6 @@ export enum UpdateState {
     CheckForce = 0,
     ForceUpdateFinish = 1,
     CheckHot = 2,
-    UpdateFinish = 3,
+    IsUpdate = 3,
+    UpdateFinish = 4,
 }

+ 1 - 1
assets/script/game/data/HttpData.ts

@@ -5,7 +5,7 @@
 export class HttpData {
 
     /** 服务器类型 0测试服 1正式服 2李扬服 3悍国服 */
-    public serverType: number = 0;
+    public serverType: number = 1;
 
     public getServerUrl(): string {
         switch (this.serverType) {

+ 7 - 8
assets/script/game/module/hotUpdate/HotUpdatePanel.ts

@@ -38,10 +38,9 @@ export default class HotUpdatePanel extends cc.Component {
             let byte = event.getPercent().toFixed(2);
             let msg = event.getMessage();
 
+            gData.appData.updateState = UpdateState.IsUpdate;
+            gData.appData.updatePercent = parseFloat(file);
             console.log('[update]: 进度=' + file);
-            // this.updateProgress.progress = parseFloat(file);
-            // this.tipsLabel.string = '正在更新中,请耐心等待';
-            console.log(msg);
         };
         options.OnNeedToUpdate = (data) => {
             HotUpdate.hotUpdate();
@@ -52,15 +51,15 @@ export default class HotUpdatePanel extends cc.Component {
         options.OnUpdateFailed = () => {
             // this.tipsLabel.string = '更新失败';
             console.log('热更新失败');
-            // HotUpdate.checkUpdate();
+            setTimeout(() => {
+                HotUpdate.checkUpdate();
+            }, 2000);
         };
         options.OnUpdateSucceed = () => {
             // this.tipsLabel.string = '更新成功';
             console.log('更新成功');
-            // DialogMgr.showTipsWithOkBtn('更新成功,点击确定重启游戏', () => {
-            //     cc.audioEngine.stopAll();
-            //     cc.game.restart();
-            // });
+            cc.audioEngine.stopAll();
+            cc.game.restart();
         };
         HotUpdate.init(this.manifest, options);
     }

+ 6 - 0
assets/script/game/module/login/Login.ts

@@ -54,6 +54,12 @@ export default class Login extends cc.Component {
             this.checkHotUpdate();
         }
 
+        if (gData.appData.updateState == UpdateState.IsUpdate) {
+            this.lbl_progress.string = '正在更新中,请耐心等待';
+            this.bar.setProgress(gData.appData.updatePercent);
+            return;
+        }
+
         if (gData.appData.updateState != UpdateState.UpdateFinish) {
             return;
         }

+ 1 - 1
assets/script/mk/utils/LogUtil.ts

@@ -9,7 +9,7 @@ export default class LogUtil {
      * 是否显示Log
      * @description
      */
-    public ifShowLog: boolean = true;
+    public ifShowLog: boolean = false;
 
     /**
      * 标签符号

BIN
build/jsb-link/assets/main/index.jsc


ファイルの差分が大きいため隠しています
+ 0 - 0
build/jsb-link/assets/resources/config.json


+ 1 - 1
build/jsb-link/assets/resources/native/9e/9ed98385-f23f-41b7-a2bc-27a1d4ad9fd6.manifest

@@ -1 +1 @@
-{"version":"1.0.1","packageUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemote/","remoteManifestUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemote/project.manifest","remoteVersionUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemote/version.manifest"}
+{"version":"1.0.0","packageUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/","remoteManifestUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/project.manifest","remoteVersionUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/version.manifest"}

ファイルの差分が大きいため隠しています
+ 0 - 0
build/jsb-link/assets/resources/native/a8/a81eb395-718d-4f3b-958c-cb871f7dd5fa.manifest


+ 3 - 3
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/1786486690/libcocos2dx.iml

@@ -33,16 +33,16 @@
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/java/src" isTestSource="false" />
     </content>
     <content url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx">
-      <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true" />
+      <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/rs/debug" type="java-resource" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/resValues/debug" type="java-resource" generated="true" />
-      <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" />
+      <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/res/resValues/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://D:/CocosCreatorIDE/CocosDashboard/resources/.editors/Creator/2.4.5/resources/cocos2d-x/cocos/platform/android/libcocos2dx/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />

+ 3 - 4
build/jsb-link/frameworks/runtime-src/proj.android-studio/.idea/modules/app/EasyEliminate.iml

@@ -187,16 +187,16 @@
       <sourceFolder url="file://$MODULE_DIR$/../../../../Classes" isTestSource="false" />
     </content>
     <content url="file://$MODULE_DIR$/../../../app">
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/rs/debug" type="java-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/resValues/debug" type="java-resource" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
-      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
+      <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/res/resValues/androidTest/debug" type="java-test-resource" generated="true" />
       <sourceFolder url="file://$MODULE_DIR$/../../../app/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />
@@ -300,7 +300,6 @@
     <orderEntry type="library" name="Gradle: ./app/libs/thinkingdata/ThinkingSDK.aar" level="project" />
     <orderEntry type="library" name="Gradle: ./app/libs/umeng/umeng-abtest-v1.0.0.aar" level="project" />
     <orderEntry type="library" name="Gradle: ./app/libs/umeng/umeng-asms-armeabi-v1.2.3.aar" level="project" />
-    <orderEntry type="library" name="Gradle: ./app/libs/aliRisk/Android-AliyunDevice-10017.aar" level="project" />
     <orderEntry type="library" name="Gradle: com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.7.9@aar" level="project" />
     <orderEntry type="library" name="Gradle: com.google.android.material:material:1.0.0@aar" level="project" />
     <orderEntry type="library" name="Gradle: androidx.appcompat:appcompat:1.0.0@aar" level="project" />

+ 1 - 1
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/gradle.properties

@@ -10,7 +10,7 @@ UM_SECRET="";       //友盟秘钥
 WX_APP_ID="wxcf31f0e54f7fefda"; //微信appidUM_CHANNEL
 MY_APP_NAME=\u5929\u5929\u7231\u6d88\u6d88
 PACKAGE_NAME=com.aries.qsllx.mz
-VERSION_NAME=1.0.0
+VERSION_NAME=1.0.2
 VERSION_CODE=2
 TOPON="a60cac090a6eb0,66b742dd0e502b64d783d9c66a9d30c4,b60cac0e43c0e1,b60cac0e4892fa,b60cac0e4d08e8,b60cac0e5754fc,b60cac0e524313"; //巨量渠道topon的 AppId,AppSecreate,激励视频,插屏,信息流,全屏开屏,banner
 APP_CONFIG_CODE="1.1.1"

+ 19 - 5
build/jsb-link/js backups (useful for debugging)/main.index.js

@@ -2254,6 +2254,7 @@ umid: "",
 UA: ""
 };
 this.updateState = o.None;
+this.updatePercent = 0;
 }
 t.prototype.updateDeviceInfo = function(t) {
 var e = t.split("#");
@@ -2284,7 +2285,8 @@ t[t.None = -1] = "None";
 t[t.CheckForce = 0] = "CheckForce";
 t[t.ForceUpdateFinish = 1] = "ForceUpdateFinish";
 t[t.CheckHot = 2] = "CheckHot";
-t[t.UpdateFinish = 3] = "UpdateFinish";
+t[t.IsUpdate = 3] = "IsUpdate";
+t[t.UpdateFinish = 4] = "UpdateFinish";
 })(o = n.UpdateState || (n.UpdateState = {}));
 cc._RF.pop();
 }, {} ],
@@ -10379,9 +10381,11 @@ t.local, t.server;
 };
 e.OnUpdateProgress = function(t) {
 t.getDownloadedBytes(), t.getTotalBytes(), t.getDownloadedFiles(), t.getTotalFiles();
-var e = t.getPercentByFile().toFixed(2), n = (t.getPercent().toFixed(2), t.getMessage());
+var e = t.getPercentByFile().toFixed(2);
+t.getPercent().toFixed(2), t.getMessage();
+gData.appData.updateState = c.UpdateState.IsUpdate;
+gData.appData.updatePercent = parseFloat(e);
 console.log("[update]: 进度=" + e);
-console.log(n);
 };
 e.OnNeedToUpdate = function() {
 r.default.hotUpdate();
@@ -10391,9 +10395,14 @@ t.enterGame();
 };
 e.OnUpdateFailed = function() {
 console.log("热更新失败");
+setTimeout(function() {
+r.default.checkUpdate();
+}, 2e3);
 };
 e.OnUpdateSucceed = function() {
 console.log("更新成功");
+cc.audioEngine.stopAll();
+cc.game.restart();
 };
 r.default.init(this.manifest, e);
 };
@@ -10565,7 +10574,7 @@ value: !0
 n.ServerUrl = n.HttpData = void 0;
 var o, i = function() {
 function t() {
-this.serverType = 0;
+this.serverType = 1;
 }
 t.prototype.getServerUrl = function() {
 switch (this.serverType) {
@@ -11124,7 +11133,7 @@ value: !0
 n.LogTagColor = void 0;
 var i, a = function() {
 function t() {
-this.ifShowLog = !0;
+this.ifShowLog = !1;
 this._tagChar = "...";
 this._frontChar = "    ";
 this._keyValueChar = " = ";
@@ -11759,6 +11768,7 @@ if (gData.appData.updateState == p.UpdateState.ForceUpdateFinish) {
 gData.appData.updateState = p.UpdateState.CheckHot;
 this.checkHotUpdate();
 }
+if (gData.appData.updateState != p.UpdateState.IsUpdate) {
 if (gData.appData.updateState == p.UpdateState.UpdateFinish) {
 if (this.process < 100) {
 this.process += 2;
@@ -11781,6 +11791,10 @@ gData.gameData.dataFinish = !1;
 }
 } else gData.loginData.loadLocalRes();
 }
+} else {
+this.lbl_progress.string = "正在更新中,请耐心等待";
+this.bar.setProgress(gData.appData.updatePercent);
+}
 };
 e.prototype.setProgress = function(t) {
 this.bar.setProgress(t);

+ 9 - 5
packages-hot-update/cfg.json

@@ -1,15 +1,19 @@
 {
-    "version": "1.0.3",
-    "serverRootDir": "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote1/",
+    "version": "1.0.0",
+    "serverRootDir": "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/",
     "resourceRootDir": "D:\\mokaszProjects\\mk_framework\\build\\jsb-link",
     "genManifestDir": "",
     "hotAddressArray": [
         "http://",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemote/",
         "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/",
-        "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote1/"
+        "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote1/",
+        "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemote1/",
+        "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTestT/baseRemote1/",
+        "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTestT/baseRemote/",
+        "https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminateTest/baseRemoteTest/"
     ],
-    "buildTime": 1628320180539,
-    "genTime": 1628320180539,
+    "buildTime": 1628490699336,
+    "genTime": 1628490699336,
     "genVersion": null
 }

ファイルの差分が大きいため隠しています
+ 0 - 0
packages-hot-update/manifest/project.manifest


+ 1 - 1
packages-hot-update/manifest/version.manifest

@@ -1 +1 @@
-{"version":"1.0.3","packageUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote1/","remoteManifestUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote1/project.manifest","remoteVersionUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote1/version.manifest"}
+{"version":"1.0.0","packageUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/","remoteManifestUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/project.manifest","remoteVersionUrl":"https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/version.manifest"}

BIN
packages-hot-update/versions/ver_1_0.3.zip → packages-hot-update/versions/ver_1_0.0.zip


BIN
packages-hot-update/versions/ver_1_0.2.zip


+ 8 - 0
发包流程.txt

@@ -0,0 +1,8 @@
+1、检查服务器地址是否是正式服   HttpData.ts类中 serverType = 1
+2、关闭测试log	LogUtil.ts类中 ifShowLog = false
+3、构建发布
+4、生成最新热更资源	a、热更版本号+1
+					b、热更地址检查  https://xcx-box.oss-cn-hangzhou.aliyuncs.com/hotgame/EasyEliminate/baseRemote/
+					c、将生成的热更配置文件,目录mk_framework\packages-hot-update\manifest下文件拷贝到目录mk_framework\assets\resources\module\login\hot下
+5、再次构建发布
+6、提交代码,打tag后星云打包

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません