mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
fix single header freetype on windows compile error
This commit is contained in:
parent
b71133f0fc
commit
bf77da8bdd
@ -162,7 +162,7 @@ elif OS_NAME == 'Windows':
|
||||
if not os.path.exists(os.path.abspath(TK_LIB_DIR)) :
|
||||
os.makedirs(os.path.abspath(TK_LIB_DIR))
|
||||
if TOOLS_NAME == '' :
|
||||
OS_LIBS=['freetype.lib', 'gdi32', 'user32','winmm.lib','imm32.lib','version.lib','shell32.lib','ole32.lib','Oleaut32.lib','Advapi32.lib','DelayImp.lib','psapi.lib']
|
||||
OS_LIBS=['gdi32', 'user32','winmm.lib','imm32.lib','version.lib','shell32.lib','ole32.lib','Oleaut32.lib','Advapi32.lib','DelayImp.lib','psapi.lib']
|
||||
OS_FLAGS='-DWIN32 -D_WIN32 -DWINDOWS /EHsc -D_CONSOLE /DEBUG /Od /FS /Z7 '
|
||||
if TARGET_ARCH == 'x86':
|
||||
OS_FLAGS += OS_FLAGS + ' /MD '
|
||||
@ -177,7 +177,7 @@ elif OS_NAME == 'Windows':
|
||||
OS_SUBSYSTEM_WINDOWS='/SUBSYSTEM:WINDOWS '
|
||||
COMMON_CCFLAGS = COMMON_CCFLAGS + ' -D_WIN64 '
|
||||
elif TOOLS_NAME == 'mingw' :
|
||||
OS_LIBS=['freetype','kernel32', 'gdi32', 'user32', 'winmm','imm32','version','shell32','ole32','Oleaut32','Advapi32','oleaut32','uuid','stdc++']
|
||||
OS_LIBS=['kernel32', 'gdi32', 'user32', 'winmm','imm32','version','shell32','ole32','Oleaut32','Advapi32','oleaut32','uuid','stdc++']
|
||||
OS_FLAGS='-DWINDOWS -D_CONSOLE -g -Wall'
|
||||
COMMON_CFLAGS=COMMON_CFLAGS+' -std=gnu99 '
|
||||
COMMON_CCFLAGS=COMMON_CCFLAGS+' -DWITH_DOUBLE_FLOAT -DUNICODE '
|
||||
@ -187,8 +187,7 @@ elif OS_NAME == 'Windows':
|
||||
COMMON_CCFLAGS = COMMON_CCFLAGS + '-D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -D_HAS_EXCEPTIONS=0 -D_HAS_ITERATOR_DEBUGGING=0 -D_ITERATOR_DEBUG_LEVEL=0 -D_SCL_SECURE=0'
|
||||
COMMON_CCFLAGS = COMMON_CCFLAGS + '-D_SECURE_SCL=0 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE '
|
||||
OS_PROJECTS=['3rd/SDL/SConscript']
|
||||
OS_CPPPATH = [joinPath(TK_3RD_ROOT, 'freetype-windows/include')]
|
||||
COMMON_CCFLAGS=COMMON_CCFLAGS+' -DWITH_FT_FONT -DUSE_SYSTEM_FREETYPE '
|
||||
COMMON_CCFLAGS=COMMON_CCFLAGS+' -DWITH_FT_FONT '
|
||||
|
||||
|
||||
CFLAGS=COMMON_CFLAGS
|
||||
@ -235,21 +234,3 @@ os.environ['NANOVG_BACKEND'] = NANOVG_BACKEND;
|
||||
os.environ['NATIVE_WINDOW'] = NATIVE_WINDOW;
|
||||
os.environ['FRAME_BUFFER_FORMAT'] = FRAME_BUFFER_FORMAT;
|
||||
|
||||
def copy_freetype_after_build():
|
||||
TARGET_LIB_DIR=TK_LIB_DIR
|
||||
TARGET_BIN_DIR=os.environ['BIN_DIR']
|
||||
if OS_NAME == 'Windows':
|
||||
if TOOLS_NAME == '' :
|
||||
if TARGET_ARCH == 'x86':
|
||||
copyfile(joinPath(TK_3RD_ROOT, 'freetype-windows/win32/freetype.lib'), joinPath(TARGET_LIB_DIR, 'freetype.lib'));
|
||||
copyfile(joinPath(TK_3RD_ROOT, 'freetype-windows/win32/freetype.dll'), joinPath(TARGET_BIN_DIR, 'freetype.dll'));
|
||||
else:
|
||||
copyfile(joinPath(TK_3RD_ROOT, 'freetype-windows/win64/freetype.lib'), joinPath(TARGET_LIB_DIR, 'freetype.lib'));
|
||||
copyfile(joinPath(TK_3RD_ROOT, 'freetype-windows/win64/freetype.dll'), joinPath(TARGET_BIN_DIR, 'freetype.dll'));
|
||||
elif TOOLS_NAME == 'mingw' :
|
||||
copyfile(joinPath(TK_3RD_ROOT, 'freetype-windows/mingw32/libfreetype.a'), joinPath(TARGET_LIB_DIR, 'libfreetype.a'));
|
||||
copyfile(joinPath(TK_3RD_ROOT, 'freetype-windows/mingw32/freetype6.dll'), joinPath(TARGET_BIN_DIR, 'freetype6.dll'));
|
||||
print('copy_freetype_after_build: TARGET_BIN_DIR=' + TARGET_BIN_DIR + " TARGET_LIB_DIR=" + TARGET_LIB_DIR);
|
||||
|
||||
import atexit
|
||||
atexit.register(copy_freetype_after_build)
|
||||
|
@ -1,4 +1,7 @@
|
||||
# 最新动态
|
||||
* 2019/08/30
|
||||
* 修改windows下使用单头文件freetype的问题(感谢陈谭提供补丁)。
|
||||
|
||||
* 2019/08/29
|
||||
* 修改重载new的问题(感谢陈谭提供补丁)。
|
||||
* 修改combox在dialog上焦点设置错误的问题。
|
||||
@ -7,8 +10,8 @@
|
||||
* 修改 children layouter的 BUG(感谢尧燊提供补丁)。
|
||||
|
||||
* 2019/08/28
|
||||
* 增加widget_reset_canvas用于designer打开新工程时清除vgcanvas中的资源。
|
||||
* hscroll_label 支持右对齐(感谢智明提供补丁)。
|
||||
* 增加widget\_reset\_canvas用于designer打开新工程时清除vgcanvas中的资源。
|
||||
* hscroll\_label 支持右对齐(感谢智明提供补丁)。
|
||||
* 修改密码编辑器的BUG(感谢俊杰提供补丁)。
|
||||
* vgcanvas 支持设置assets manager, 以便从指定的assets manager加载字体。
|
||||
|
||||
|
@ -50,6 +50,7 @@ static ret_t widget_destroy_sync(widget_t* widget);
|
||||
static ret_t widget_destroy_async(widget_t* widget);
|
||||
static ret_t widget_ensure_style_mutable(widget_t* widget);
|
||||
static ret_t widget_destroy_in_idle(const idle_info_t* info);
|
||||
static ret_t widget_dispatch_blur_event(widget_t* widget);
|
||||
static ret_t widget_on_paint_done(widget_t* widget, canvas_t* c);
|
||||
|
||||
static ret_t widget_real_destroy(widget_t* widget) {
|
||||
|
@ -16,6 +16,9 @@
|
||||
#include <freetype/ftpfr.h>
|
||||
#include <freetype/ftadvanc.h>
|
||||
#else
|
||||
#ifdef WIN32
|
||||
#undef interface
|
||||
#endif/*WIN32*/
|
||||
/*3rd/freetype_single_header/freetype.h*/
|
||||
#include "freetype_single_header/freetype.h"
|
||||
#endif /*USE_SYSTEM_FREETYPE*/
|
||||
|
Loading…
Reference in New Issue
Block a user