mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 02:30:48 +08:00
Move to mewn
This commit is contained in:
parent
8e909fc9f4
commit
1d8e99d846
@ -83,7 +83,7 @@ func newAppConfig(userConfig *AppConfig) (*AppConfig, error) {
|
||||
Resizable: true,
|
||||
Title: "My Wails App",
|
||||
Colour: "#FFF", // White by default
|
||||
HTML: mewn.String("./assets/default/default.html"),
|
||||
HTML: mewn.String("./wailsruntimeassets/default/default.html"),
|
||||
}
|
||||
|
||||
if userConfig != nil {
|
||||
|
@ -196,7 +196,7 @@ func InstallFrontendDeps(projectDir string, projectOptions *ProjectOptions, forc
|
||||
|
||||
// Copy bridge to project
|
||||
_, filename, _, _ := runtime.Caller(1)
|
||||
bridgeFileSource := filepath.Join(path.Dir(filename), "..", "..", "assets", "bridge", bridgeFile)
|
||||
bridgeFileSource := filepath.Join(path.Dir(filename), "..", "..", "wailsruntimeassets", "bridge", bridgeFile)
|
||||
bridgeFileTarget := filepath.Join(projectDir, projectOptions.FrontEnd.Dir, projectOptions.FrontEnd.Bridge, "wailsbridge.js")
|
||||
err = fs.CopyFile(bridgeFileSource, bridgeFileTarget)
|
||||
if err != nil {
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<img alt="Wails logo" src="./assets/images/logo.png" class="logo zoomIn">
|
||||
<img alt="Wails logo" src="./wailsruntimeassets/images/logo.png" class="logo zoomIn">
|
||||
<HelloWorld/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HelloWorld from "./components/HelloWorld.vue";
|
||||
import "./assets/css/main.css";
|
||||
import "./wailsruntimeassets/css/main.css";
|
||||
|
||||
export default {
|
||||
name: "app",
|
||||
|
@ -2,4 +2,4 @@ package cmd
|
||||
|
||||
// Version - Wails version
|
||||
// ...oO(There must be a better way)
|
||||
const Version = "v0.9.0"
|
||||
const Version = "v0.9.1"
|
||||
|
@ -113,7 +113,7 @@ func (h *Headless) start(conn *websocket.Conn) {
|
||||
// set external.invoke
|
||||
h.log.Infof("Connected to frontend.")
|
||||
|
||||
wailsRuntime := mewn.String("./assets/default/wails.js")
|
||||
wailsRuntime := mewn.String("./wailsruntimeassets/default/wails.js")
|
||||
h.evalJS(wailsRuntime, wailsRuntimeMessage)
|
||||
|
||||
// Inject bindings
|
||||
|
@ -161,7 +161,7 @@ func (w *webViewRenderer) Run() error {
|
||||
w.log.Info("Run()")
|
||||
|
||||
// Runtime assets
|
||||
wailsRuntime := mewn.String("./assets/default/wails.js")
|
||||
wailsRuntime := mewn.String("./wailsruntimeassets/default/wails.js")
|
||||
w.evalJS(wailsRuntime)
|
||||
|
||||
// Ping the wait channel when the wails runtime is loaded
|
||||
@ -194,7 +194,7 @@ func (w *webViewRenderer) Run() error {
|
||||
} else {
|
||||
// Use default wails css
|
||||
w.log.Debug("Injecting Default Wails CSS")
|
||||
defaultCSS := mewn.String("./assets/default/wails.css")
|
||||
defaultCSS := mewn.String("./wailsruntimeassets/default/wails.css")
|
||||
|
||||
w.injectCSS(defaultCSS)
|
||||
}
|
||||
|
9
wails-mewn.go
Normal file
9
wails-mewn.go
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user