FIX 3 van de Windows:

1. LOAD CHAM: PyInstaller onefile 723MB giai nen toan bo vao %TEMP% moi lan chay -> chuyen ONEDIR (engine.spec COLLECT) + bundle qua Tauri resources (resource_dir/daw_engine/daw_engine.exe) thay externalBin — khoi dong tuc thi khong giai nen
2. WINDOW PICKER: Tauri v2 khong co window.__TAURI__.dialog — goi invoke('plugin:dialog|open', {options:{directory:true}}) qua __TAURI__.core.invoke
3. ICON exe: bundle.icon chuyen icon.ico -> favicon.ico + thay 3 PNG bang favicon render
- build_windows.ps1 buoc 4: copy onedir dist/daw_engine -> src-tauri/resources/daw_engine
This commit is contained in:
2026-08-09 03:30:57 +00:00
parent 466bf25a0b
commit bc8431fe81
9 changed files with 55 additions and 21 deletions
+7 -3
View File
@@ -5299,11 +5299,15 @@ const PluginManagerModal = ({ isOpen, onClose, pluginsData }) => {
setTimeout(() => { try { window.lucide.createIcons(); } catch(e) {} }, 50);
}
}, [isOpen]);
// Folder picker: Tauri dialog (desktop) nếu có; fallback: paste path.
// Folder picker: Tauri v2 dialog qua invoke (window.__TAURI__.dialog KHONG
// ton tai trong v2 plugin dialog chi co JS binding qua npm; goi truc tiep
// command 'plugin:dialog|open'). Fallback: prompt nhap path (browser).
const pickPluginFolder = async () => {
try {
if (window.__TAURI__ && window.__TAURI__.dialog) {
const sel = await window.__TAURI__.dialog.open({ directory: true, multiple: false });
if (window.__TAURI__ && window.__TAURI__.core && window.__TAURI__.core.invoke) {
const sel = await window.__TAURI__.core.invoke('plugin:dialog|open', {
options: { directory: true, multiple: false }
});
if (typeof sel === 'string' && sel) {
if (!pmDirs.includes(sel)) setPmDirs(prev => [...prev, sel]);
}