FEAT: chuẩn bị thư viện để tạo file exe trên window
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<!doctype html>
|
||||
<html lang="vi">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>SonicForge DAW</title>
|
||||
<style>
|
||||
body { font-family: system-ui, sans-serif; background: #12141a; color: #e8eaf0;
|
||||
display: flex; align-items: center; justify-content: center; height: 100vh; margin: 0; }
|
||||
#msg { text-align: center; max-width: 480px; line-height: 1.6; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="msg">Đang khởi động SonicForge Engine…</div>
|
||||
<script>
|
||||
// Engine (sidecar) có thể cần vài giây để boot (import librosa/pedalboard).
|
||||
// Thử health-check trên dải port 8000-8010, redirect tới port đầu tiên OK.
|
||||
(async function () {
|
||||
var tries = 0;
|
||||
while (tries < 90) { // ~60s tối đa
|
||||
for (var p = 8000; p <= 8010; p++) {
|
||||
try {
|
||||
var r = await fetch('http://127.0.0.1:' + p + '/health', { cache: 'no-store' });
|
||||
if (r.ok) { location.href = 'http://127.0.0.1:' + p + '/'; return; }
|
||||
} catch (e) { /* port chưa mở */ }
|
||||
}
|
||||
tries++;
|
||||
await new Promise(function (res) { setTimeout(res, 700); });
|
||||
}
|
||||
document.getElementById('msg').textContent =
|
||||
'Không tìm thấy SonicForge Engine (port 8000–8010). Hãy đóng và chạy lại ứng dụng. ' +
|
||||
'Nếu lặp lại, xem log: %APPDATA%\\SonicForgeDAW\\logs\\engine.log';
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user