围棋-有没有可能在围棋中嵌入像webkit一样的谷歌Chrome浏览器?要使Mac、Windows和Linux兼容?
我需要准备一个Go应用程序,该应用程序将用于分发,在启动时,它将在Go内打开Google Chrome浏览器(如模式窗口或单窗口GUI),并可部署到Mac、Windows和Linux上执行 我尝试过使用Go to Google Chrome执行命令行,但这并不能解决我重新调整/移动/拖动/自定义设计窗口的问题 你知道Go和Google Chrome浏览器是否有稳定的工作绑定吗?(如webKit) 编辑: 1) 如何制作: 2) 其他方法:1)安装nodejs() 2) 准备项目围棋-有没有可能在围棋中嵌入像webkit一样的谷歌Chrome浏览器?要使Mac、Windows和Linux兼容?,windows,macos,google-chrome,go,Windows,Macos,Google Chrome,Go,我需要准备一个Go应用程序,该应用程序将用于分发,在启动时,它将在Go内打开Google Chrome浏览器(如模式窗口或单窗口GUI),并可部署到Mac、Windows和Linux上执行 我尝试过使用Go to Google Chrome执行命令行,但这并不能解决我重新调整/移动/拖动/自定义设计窗口的问题 你知道Go和Google Chrome浏览器是否有稳定的工作绑定吗?(如webKit) 编辑: 1) 如何制作: 2) 其他方法:1)安装nodejs() 2) 准备项目 $ mkdir
$ mkdir /var/tmp/go; cd /var/tmp/go
$ npm init
$ cat >> package.json <\EOF
{
"name": "go",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"window": {
"title": "Sample Application 2",
"toolbar": true,
"frame": true,
"width": 850,
"height": 500",
"position": "center",
"resizable": true,
"icon": "sample.png"
}
"author": "",
"license": "ISC"
}
EOF
$ cat >> index.js <\EOF
Hello world
EOF
$ zip go.nw index.js package.json
B) 玩
$cp/var/tmp/go/go.nw/var/tmp/node webkit/
$./nw go.nw
如果运行GO应用程序的系统没有安装Chrome怎么办?如果系统没有安装Google Chrome,它将检查runtime.GOOS和runtime.GOARCH并自动升级或安装。然后启动它。@Annjawn:你能根据Go改进我的答案吗?至少,如果我们能使该部分工作,那么我们可以使用go来触发它,我们可以使用一些外部GUI拖动器、移动器、大小调整器来控制这些弹出窗口。
$ mkdir /var/tmp/go; cd /var/tmp/go
$ npm init
$ cat >> package.json <\EOF
{
"name": "go",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"window": {
"title": "Sample Application 2",
"toolbar": true,
"frame": true,
"width": 850,
"height": 500",
"position": "center",
"resizable": true,
"icon": "sample.png"
}
"author": "",
"license": "ISC"
}
EOF
$ cat >> index.js <\EOF
Hello world
EOF
$ zip go.nw index.js package.json
$ cd /var/tmp/
$ wget https://s3.amazonaws.com/node-webkit/v0.8.4/node-webkit-v0.8.4-linux-x64.tar.gz;
mv node-webkit-v0.8.4-linux-x64.tar.gz node-webkit;