Fix cannot be compiled under release
Signed-off-by: jiajia_deng <2894220@gmail.com>
This commit is contained in:
parent
3856f80a5d
commit
a514022ce6
@ -38,21 +38,7 @@ void MainThread::Init()
|
|||||||
|
|
||||||
// 获取资源路径,初始化全局参数
|
// 获取资源路径,初始化全局参数
|
||||||
std::wstring theme_dir = QPath::GetAppPath();
|
std::wstring theme_dir = QPath::GetAppPath();
|
||||||
#ifdef _DEBUG
|
|
||||||
// Debug 模式下使用本地文件夹作为资源
|
|
||||||
// 默认皮肤使用 resources\\themes\\default
|
|
||||||
// 默认语言使用 resources\\lang\\zh_CN
|
|
||||||
// 如需修改请指定 Startup 最后两个参数
|
|
||||||
ui::GlobalManager::Startup(theme_dir + L"resources\\", MyCreateControlCallback, false);
|
ui::GlobalManager::Startup(theme_dir + L"resources\\", MyCreateControlCallback, false);
|
||||||
#else
|
|
||||||
// Release 模式下使用资源中的压缩包作为资源
|
|
||||||
// 资源被导入到资源列表分类为 THEME,资源名称为 IDR_THEME
|
|
||||||
// 如果资源使用的是本地的 zip 文件而非资源中的 zip 压缩包
|
|
||||||
// 可以使用 OpenResZip 另一个重载函数打开本地的资源压缩包
|
|
||||||
ui::GlobalManager::OpenResZip(MAKEINTRESOURCE(IDR_THEME), L"THEME", "");
|
|
||||||
// ui::GlobalManager::OpenResZip(L"resources.zip", "");
|
|
||||||
ui::GlobalManager::Startup(L"resources\\", ui::CreateControlCallback(), false);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 创建一个默认带有阴影的居中窗口
|
// 创建一个默认带有阴影的居中窗口
|
||||||
MainForm* window = new MainForm();
|
MainForm* window = new MainForm();
|
||||||
|
Loading…
Reference in New Issue
Block a user