diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 11f16d5..e8ae146 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,3 +1,7 @@ +# 1.06.2409140-3 / 2024-11-16 + +- fix: 多开实例会出现卡死的情况 + # 1.06.2409140-2 / 2024-11-15 - perf: 不对Skyline插件进行初始化(不会弹窗) diff --git a/res/scripts/entrance.js b/res/scripts/entrance.js new file mode 100644 index 0000000..457f9fc --- /dev/null +++ b/res/scripts/entrance.js @@ -0,0 +1,11 @@ +(() => { + const http = require('http') + const originaleListen = http.Server.prototype.listen + http.Server.prototype.listen = function(port) { + if (port == 33233) { + console.warn('block port of http server:', port) + return + } + return originaleListen.apply(this, [port]) + } +})(); \ No newline at end of file diff --git a/tools/fix-other.sh b/tools/fix-other.sh index 4fedbd8..1040f49 100755 --- a/tools/fix-other.sh +++ b/tools/fix-other.sh @@ -67,6 +67,12 @@ unzip "${srcdir}/cache/libffmpeg-0.55.00-linux-x64.zip" -d "${nwjs_dir}/lib" # 不加载Skyline插件 sed -i 's#,this.skylineStyleClient.init(),#,/*this.skylineStyleClient.init(),*/#' "${package_dir}/js/libs/vseditor/extensions/wechat-miniprogram-development/extension.js" +# 阻止无限启动服务器 +mv "${package_dir}/js/core/entrance.js" "${package_dir}/js/core/entrance.js.bak" +cat "${srcdir}/res/scripts/entrance.js" > "${package_dir}/js/core/entrance.js" +cat "${package_dir}/js/core/entrance.js.bak" >> "${package_dir}/js/core/entrance.js" +rm "${package_dir}/js/core/entrance.js.bak" + current=`date "+%Y-%m-%d %H:%M:%S"` timeStamp=`date -d "$current" +%s` echo $timeStamp > "${package_dir}/.build_time"