mirror of
https://github.com/zlgopen/awtk.git
synced 2025-05-07 19:05:54 +08:00
improve for win32 res
This commit is contained in:
parent
9bc2359767
commit
be2603a742
@ -8,8 +8,14 @@ from awtk_config_common import joinPath, toWholeArchive, genIdlAndDefEx, setEnvS
|
||||
from awtk_config_common import OS_FLAGS, OS_LIBS, OS_LIBPATH, OS_CPPPATH, OS_LINKFLAGS, OS_SUBSYSTEM_CONSOLE, OS_SUBSYSTEM_WINDOWS, OS_PROJECTS, COMMON_CFLAGS
|
||||
|
||||
WIN32_AWTK_RES = 'win32_res/awtk.res'
|
||||
if TARGET_ARCH == 'x86':
|
||||
WIN32_AWTK_RES = 'win32_res/awtk_x86.res'
|
||||
|
||||
if not os.path.exists(WIN32_AWTK_RES):
|
||||
WIN32_AWTK_RES = os.path.join(TK_ROOT, 'win32_res/awtk.res')
|
||||
if TARGET_ARCH == 'x86':
|
||||
WIN32_AWTK_RES = os.path.join(TK_ROOT, 'win32_res/awtk_x86.res')
|
||||
else:
|
||||
WIN32_AWTK_RES = os.path.join(TK_ROOT, 'win32_res/awtk.res')
|
||||
|
||||
AWTK_STATIC_LIBS = ['awtk_global', 'extwidgets',
|
||||
'widgets', 'base', 'gpinyin', 'fribidi', 'linebreak']
|
||||
|
@ -1,5 +1,8 @@
|
||||
# 最新动态
|
||||
|
||||
2022/07/14
|
||||
* win32_res兼容x86平台编译(感谢雨欣提供补丁)
|
||||
|
||||
2022/07/13
|
||||
* 重构 widget\_add\_child
|
||||
* 完善 pages 动态增加子控件。
|
||||
|
@ -5,7 +5,7 @@
|
||||
1. 用 VC 创建的 .res 文件代替 awtk.res,
|
||||
2. 用 [ResEdit](http://rsdt.free.fr/ResEdit-x64.7z) 直接编辑 awtk.res 文件。
|
||||
|
||||
兼容 mingw 的话:
|
||||
## 生成兼容 mingw 的 res
|
||||
|
||||
1. awtk.rc 转为 utf8(或者 utf8 with BOM) 的编码。
|
||||
2. 注释 rc 文件中的 #include "targetver.h" 代码
|
||||
@ -14,3 +14,11 @@
|
||||
```bash
|
||||
windres awtk.rc -O coff awtk.res
|
||||
```
|
||||
|
||||
## 生成兼容 mingw 的 x86 格式 res
|
||||
|
||||
步骤与上一小节一致,但最后使用 windres 工具导出 res 文件时,需要加上 `--target=pe-i386` 参数,命令如下:
|
||||
|
||||
```bash
|
||||
windres awtk.rc -O coff awtk_x86.res --target=pe-i386
|
||||
```
|
||||
|
BIN
win32_res/awtk_x86.res
Normal file
BIN
win32_res/awtk_x86.res
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user