[windows-x] Use winres for processing manifest + icon

This commit is contained in:
Lea Anthony
2021-08-15 20:16:14 +10:00
parent 1d6cce7c52
commit 3ac1dcc8d9
7 changed files with 87 additions and 36 deletions

View File

@@ -13,7 +13,7 @@ import {EventsEmit, EventsNotify, EventsOff, EventsOn, EventsOnce, EventsOnMulti
import {Callback} from './calls';
import {SetBindings} from "./bindings";
// import {AddScript, DisableDefaultContextMenu, InjectCSS} from './utils';
// import {AddIPCListener, SendMessage} from 'ipc';
import {SendMessage} from './ipc';
// Backend is where the Go struct wrappers get bound to
window.backend = {};
@@ -29,18 +29,26 @@ window.runtime = {
// Initialise global if not already
window.wails = {
Callback,
EventsNotify,
SetBindings,
// AddScript,
// InjectCSS,
// DisableDefaultContextMenu,
// // Init,
// AddIPCListener,
// SystemCall,
// SendMessage,
Callback,
EventsNotify,
SetBindings,
};
window.wails.SetBindings(window.wailsbindings);
delete window.wails['SetBindings'];
delete window['wailsbindings'];
// Setup drag handler
// Based on code from: https://github.com/patr0nus/DeskGap
window.addEventListener('mousedown', (e) => {
let currentElement = e.target;
while (currentElement != null) {
if (currentElement.hasAttribute('data-wails-no-drag')) {
break;
} else if (currentElement.hasAttribute('data-wails-drag')) {
SendMessage("drag");
break;
}
currentElement = currentElement.parentElement;
}
});