Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
energye
energy
提交
0f451654
energy
项目概览
energye
/
energy
通知
13
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
energy
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0f451654
编写于
7月 26, 2023
作者:
yanghye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
U: examples, build
上级
9b6525b1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
7 deletion
+16
-7
example/build-examples/build-examples.go
example/build-examples/build-examples.go
+15
-6
example/build-examples/syso/syso_other.go
example/build-examples/syso/syso_other.go
+1
-1
未找到文件。
example/build-examples/build-examples.go
浏览文件 @
0f451654
...
...
@@ -34,6 +34,7 @@ func main() {
var
(
ext
string
ldflags
string
tags
=
`-tags=tempdll`
)
if
isWindows
{
...
...
@@ -43,7 +44,19 @@ func main() {
ldflags
=
`-H windowsgui -s -w`
}
else
if
isLinux
||
isDarwin
{
examples
=
append
(
examples
,
"tray/lcltray"
,
"tray/systray"
)
ldflags
=
`-s -w`
var
gtk
string
if
isLinux
{
print
(
`Linst: Please select the GTK version to build, default GTK3
1. GTK2
2. GTK3
Input: `
)
fmt
.
Scan
(
&
gtk
)
if
gtk
==
"1"
{
tags
=
`-tags=tempdll gtk2`
}
else
{
tags
=
`-tags=tempdll gtk3`
}
}
}
cmd
:=
command
.
NewCMD
()
for
i
,
example
:=
range
examples
{
...
...
@@ -53,7 +66,7 @@ func main() {
copySyso
(
dir
)
out
:=
filepath
.
Join
(
dist
,
example
+
ext
)
println
(
"build example"
,
example
,
fmt
.
Sprintf
(
"%d/%d"
,
i
+
1
,
len
(
examples
)),
"
\n\t
build-dir:"
,
dir
,
"
\n\t
out-dir:"
,
out
)
cmd
.
Command
(
"go"
,
"build"
,
"-ldflags"
,
ldflags
,
"-o"
,
out
,
`-tags=tempdll`
)
cmd
.
Command
(
"go"
,
"build"
,
"-ldflags"
,
ldflags
,
"-o"
,
out
,
tags
)
removeSyso
(
dir
)
println
()
}
else
{
...
...
@@ -88,10 +101,6 @@ Input 1 IS: `)
cmd
.
Close
()
}
func
upx
()
{
}
func
isExist
(
path
string
)
bool
{
_
,
err
:=
os
.
Stat
(
path
)
if
err
!=
nil
{
...
...
example/build-examples/syso/syso_other.go
浏览文件 @
0f451654
...
...
@@ -6,5 +6,5 @@ const (
Syso
=
false
)
var
SysoBytes
AMD
64
[]
byte
var
SysoBytes
x
64
[]
byte
var
SysoBytes386
[]
byte
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录