forked from x/ContextOS
opt some
This commit is contained in:
parent
23967d62f3
commit
1f6b4942dd
2
Makefile
2
Makefile
@ -13,7 +13,7 @@ def:
|
||||
@ [ -f src/binpack.go ] || echo "package main" > src/binpack.go
|
||||
|
||||
app: def
|
||||
CGO_ENABLED=1 go build -v -o usr/publish/contexts.app/Contents/MacOS/contexts src/webview.go src/version.go src/binpack.go && ./${binarys} forever stop && sleep 1 && open usr/publish/contexts.app
|
||||
CGO_ENABLED=1 go build -v -o usr/publish/contexts.app/Contents/MacOS/contexts src/webview.go src/version.go src/binpack.go && ./${binarys} forever restart &>/dev/null
|
||||
# hdiutil create usr/publish/tmp.dmg -ov -volname "ContextsInstall" -fs HFS+ -srcfolder "usr/publish/contexts.app"
|
||||
# rm -f usr/publish/ContextsInstall.dmg
|
||||
# hdiutil convert usr/publish/tmp.dmg -format UDZO -o usr/publish/ContextsInstall.dmg
|
||||
|
@ -5,6 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"shylinux.com/x/ice"
|
||||
"shylinux.com/x/icebergs/base/cli"
|
||||
"shylinux.com/x/icebergs/base/tcp"
|
||||
"shylinux.com/x/icebergs/base/web"
|
||||
"shylinux.com/x/icebergs/misc/webview"
|
||||
@ -14,8 +15,15 @@ import (
|
||||
type view struct{ *webview.WebView }
|
||||
|
||||
func main() {
|
||||
os.Chdir(kit.HomePath(ice.CONTEXTS))
|
||||
if os.Chdir(kit.HomePath(ice.CONTEXTS)); len(os.Args) == 1 {
|
||||
for {
|
||||
if ice.Run(cli.SYSTEM, os.Args[0], "webview"); cli.IsSuccess(ice.Pulse) {
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
go ice.Run(web.SERVE, tcp.START)
|
||||
time.Sleep(time.Second)
|
||||
webview.Run(func(w *webview.WebView) ice.Any { return view{w} })
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
localhost http://localhost:9020
|
||||
shylinux https://shylinux.com
|
||||
vimer "http://localhost:9020/chat/cmd/web.code.vimer?topic=black&path=src/,usr/icebergs/,usr/volcanos/&file=main.go#src/,main.go,1"
|
||||
localhost http://localhost:9020
|
||||
vimer "http://localhost:9020/chat/cmd/web.code.vimer?topic=black&path=src/,usr/icebergs/,usr/volcanos/&file=main.go"
|
||||
|
Loading…
x
Reference in New Issue
Block a user