Skip to content

Commit

Permalink
fix: 多开实例会出现卡死的情况 #123
Browse files Browse the repository at this point in the history
  • Loading branch information
msojocs committed Nov 16, 2024
1 parent 1d38da3 commit 3ea4614
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.06.2409140-3 / 2024-11-16

- fix: 多开实例会出现卡死的情况

# 1.06.2409140-2 / 2024-11-15

- perf: 不对Skyline插件进行初始化(不会弹窗)
Expand Down
11 changes: 11 additions & 0 deletions res/scripts/entrance.js
Original file line number Diff line number Diff line change
@@ -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])
}
})();
6 changes: 6 additions & 0 deletions tools/fix-other.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3ea4614

Please sign in to comment.