mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 00:39:50 +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,
|
Resizable: true,
|
||||||
Title: "My Wails App",
|
Title: "My Wails App",
|
||||||
Colour: "#FFF", // White by default
|
Colour: "#FFF", // White by default
|
||||||
HTML: mewn.String("./assets/default/default.html"),
|
HTML: mewn.String("./wailsruntimeassets/default/default.html"),
|
||||||
}
|
}
|
||||||
|
|
||||||
if userConfig != nil {
|
if userConfig != nil {
|
||||||
|
@ -196,7 +196,7 @@ func InstallFrontendDeps(projectDir string, projectOptions *ProjectOptions, forc
|
|||||||
|
|
||||||
// Copy bridge to project
|
// Copy bridge to project
|
||||||
_, filename, _, _ := runtime.Caller(1)
|
_, 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")
|
bridgeFileTarget := filepath.Join(projectDir, projectOptions.FrontEnd.Dir, projectOptions.FrontEnd.Bridge, "wailsbridge.js")
|
||||||
err = fs.CopyFile(bridgeFileSource, bridgeFileTarget)
|
err = fs.CopyFile(bridgeFileSource, bridgeFileTarget)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<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/>
|
<HelloWorld/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import HelloWorld from "./components/HelloWorld.vue";
|
import HelloWorld from "./components/HelloWorld.vue";
|
||||||
import "./assets/css/main.css";
|
import "./wailsruntimeassets/css/main.css";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "app",
|
name: "app",
|
||||||
|
@ -2,4 +2,4 @@ package cmd
|
|||||||
|
|
||||||
// Version - Wails version
|
// Version - Wails version
|
||||||
// ...oO(There must be a better way)
|
// ...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
|
// set external.invoke
|
||||||
h.log.Infof("Connected to frontend.")
|
h.log.Infof("Connected to frontend.")
|
||||||
|
|
||||||
wailsRuntime := mewn.String("./assets/default/wails.js")
|
wailsRuntime := mewn.String("./wailsruntimeassets/default/wails.js")
|
||||||
h.evalJS(wailsRuntime, wailsRuntimeMessage)
|
h.evalJS(wailsRuntime, wailsRuntimeMessage)
|
||||||
|
|
||||||
// Inject bindings
|
// Inject bindings
|
||||||
|
@ -161,7 +161,7 @@ func (w *webViewRenderer) Run() error {
|
|||||||
w.log.Info("Run()")
|
w.log.Info("Run()")
|
||||||
|
|
||||||
// Runtime assets
|
// Runtime assets
|
||||||
wailsRuntime := mewn.String("./assets/default/wails.js")
|
wailsRuntime := mewn.String("./wailsruntimeassets/default/wails.js")
|
||||||
w.evalJS(wailsRuntime)
|
w.evalJS(wailsRuntime)
|
||||||
|
|
||||||
// Ping the wait channel when the wails runtime is loaded
|
// Ping the wait channel when the wails runtime is loaded
|
||||||
@ -194,7 +194,7 @@ func (w *webViewRenderer) Run() error {
|
|||||||
} else {
|
} else {
|
||||||
// Use default wails css
|
// Use default wails css
|
||||||
w.log.Debug("Injecting 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)
|
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