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:
@@ -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]);
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user