# go-encrypt **Repository Path**: bobowang2019/go-encrypt ## Basic Information - **Project Name**: go-encrypt - **Description**: 基于golang的GUI框架fyne开发的Aes加密解密小工具 - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-01-13 - **Last Updated**: 2023-06-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 打包 ### fyne package -os windows -icon image/encrypt.png ## 编译字体 ### 1、安装CMD工具(go get fyne.io/fyne/cmd/fyne) ### 2、在windows打开CMD窗口,不要用powershell或者类似goland之类的打开控制台,否则编译不成功。 ### 3、在CMD窗口执行如下命令,注意路径 fyne bundle themes\simkai.ttf >> bundled.go ### 4、如果2中提示fyne命令不存在,则需要将goPath路径添加到环境变量的path中。 ### 5、创建theme,参考源代码。需要注意theme中font方法的返回值是bundled.go中的变量(resourceSimkaiTtf) ### 6、引入theme ## 编译字体的另外一种方式 ### 参考 https://www.pudn.com/news/630d8b9088df2007aaf45a79.html ## 关于Entry、Label放置在Hbox/Vhox中,最小化窗口的时候Panic的问题 ### 框架不兼容window,暂未找到合适的解决方案,参考(https://github.com/fyne-io/fyne/issues/3552) ### 当前解决方案:采用formLayout+borderLayout组合使用替换vbox/hbox ### 也可将label/entry组件先放入formLayout,然后再放到hbox/vhox ## 自定义icon ### 1、与中文字体的解决方式一样,用fyne bundle 1.png >> icon-bundled.go ### 2、代码中设置即可 encryptBtn.SetIcon(resourceImageIconEncryptPng),其中resourceImageIconEncryptPng是编译后文件中的变量 ### 参考文档:https://blog.meetwhy.com/blog/some-experience-in-the-use-of-fyne.html