private static void loadPackVersionOver() { BytesReadStream stream = _loader.getBytesRead(); if (stream != null && stream.checkVersion(ShineGlobal.versionInfoVersion)) { _packVersionData = new VersionSaveData(); _packVersionData.readBytes(stream); } _loader.unload(); //初次下载 if (_versionData == null) { _versionData = _packVersionData; if (_versionData == null) { ShineSetup.exit("没有可用的versionInfo数据,请重新打包"); return; } makeVersionFirst(); } //更新app或调试版 else if (_packVersionData.resourceVersion > _versionData.resourceVersion || !_packVersionData.isRelease) { if (!ShineSetting.isRelease && ShineSetting.needDebugResourceVersion) { //其他动作 } else { //新包覆盖 if (ShineSetting.newPackNeedCover) { _versionData = _packVersionData; // deleteAllCache(); deleteAllPackageCache(); makeVersionFirst(); } else { mergeVersion(_packVersionData); checkResourceExists(); } } } Action func = _overCall; _overCall = null; if (func != null) { func(); } }
private static void initOver() { BytesReadStream stream = _loader.getBytesRead(); //检测版本 if (!stream.checkVersion(ShineGlobal.bundleInfoVersion)) { ShineSetup.exit("bundleInfo结构版本检测不对"); return; } readBundleInfo(stream); _loader.unload(); Action func = _overCall; _overCall = null; if (func != null) { func(); } }
private void OnDestroy() { ShineSetup.exit(); }