你高兴的去minigui官网,发现有one by one的操作步骤,窃喜。告诉你,有问题,有问题,有问题:
一:你会发现你竟然无法git,提示ssh的密钥有问题之类。
解决方法:
a: http://www.minigui.org/zhcn/download/ 下载
b: https://github.com/VincentWei
你要是问我怎么找到的,我说,http://www.fmsoft.cn/en/products/
二:下载之后,就可以安装了,全部默认安装。
1:安装minigui-res-3.2:
./configure
sudo make install
2:安装 libminigui-3.2
./configure
make; sudo make install;
3:安装mg-samples-3.0.12
./configure
make
这里一定出错。感谢https://blog.youkuaiyun.com/meteor_s/article/details/82865200
minesweeper.c: In function ‘TestMyWinProc’:
minesweeper.c:827:30: error: invalid operands to binary | (have ‘HWND {aka void *}’ and ‘HWND {aka void *}’)
if (hCongratuate | hHighscore)
修改
if (hCongratuate | |hHighscore)
然后就是大量的定义没有:
利用linux查找:find -name \* -type f -print |xargs grep "xxxx"
然后用管理员身份编辑/usr/local/include/minigui/control.h,把查找到的h文件直接include(原文是ifdef xxxxx)
报错:
lf_tiny.c:1235:对‘DWORD2PIXEL’未定义的引用。
我们在整个下载的资源中查找:find -name \* -type f -print |xargs grep "DWORD2PIXEL"
看到:
RELEASE-NOTES.md: * `DWORD2PIXEL` to `DWORD2Pixel`. The old one has a bad name.
明白了,替换就好了DWORD2Pixel`
三:运行
1:在samples文件夹中
mg-samples-3.0.12/src# ./mginit
我是有安装了
运行成功后,在same文件夹中执行
mg-samples-3.0.12/same# ./same