diff --git a/NEWS.md b/NEWS.md
index 046fc0d9..c1879228 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,6 +1,7 @@
Red Panda C++ Version 2.8
- fix: Crash when editing makefile
+ - enhancement: Add "Resources" in project option's dialog's custom compiler parameter page
Red Panda C++ Version 2.7
diff --git a/RedPandaIDE/compiler/projectcompiler.cpp b/RedPandaIDE/compiler/projectcompiler.cpp
index 34279296..382c1627 100644
--- a/RedPandaIDE/compiler/projectcompiler.cpp
+++ b/RedPandaIDE/compiler/projectcompiler.cpp
@@ -266,6 +266,9 @@ void ProjectCompiler::writeMakeDefines(QFile &file)
writeln(file,"PCH_H = " + genMakePath1(extractRelativePath(mProject->makeFileName(), mProject->options().precompiledHeader )));
writeln(file,"PCH = " + genMakePath1(extractRelativePath(mProject->makeFileName(), mProject->options().precompiledHeader+"."+GCH_EXT)));
}
+#ifdef Q_OS_WIN
+ writeln(file,"WINDRESFLAGS = " + mProject->options().resourceCmd);
+#endif
// This needs to be put in before the clean command.
@@ -492,11 +495,11 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file)
if (mOnlyCheckSyntax) {
writeln(file);
writeln(file, ObjFileName + ':');
- writeln(file, "\t$(WINDRES) -i " + PrivResName + WindresArgs + " --input-format=rc -o nul -O coff" + ResIncludes);
+ writeln(file, "\t$(WINDRES) -i " + PrivResName + WindresArgs + " --input-format=rc -o nul -O coff $(WINDRESFLAGS)" + ResIncludes);
} else {
writeln(file);
writeln(file, ObjFileName + ": " + PrivResName + ' ' + ResFiles);
- writeln(file, "\t$(WINDRES) -i " + PrivResName + WindresArgs + " --input-format=rc -o " + ObjFileName + " -O coff"
+ writeln(file, "\t$(WINDRES) -i " + PrivResName + WindresArgs + " --input-format=rc -o " + ObjFileName + " -O coff $(WINDRESFLAGS)"
+ ResIncludes);
}
writeln(file);
diff --git a/RedPandaIDE/project.cpp b/RedPandaIDE/project.cpp
index ca6bdfc1..7dc7c72d 100644
--- a/RedPandaIDE/project.cpp
+++ b/RedPandaIDE/project.cpp
@@ -1007,6 +1007,8 @@ bool Project::saveAsTemplate(const QString &templateFolder,
ini->SetValue("Project", "CppCompiler", mOptions.cppCompilerCmd.toUtf8());
if (!mOptions.linkerCmd.isEmpty())
ini->SetValue("Project", "Linker",mOptions.linkerCmd.toUtf8());
+ if (!mOptions.resourceCmd.isEmpty())
+ ini->SetValue("Project", "ResourceCommand",mOptions.resourceCmd.toUtf8());
ini->SetBoolValue("Project", "IsCpp", mOptions.isCpp);
if (mOptions.includeVersionInfo)
ini->SetBoolValue("Project", "IncludeVersionInfo", true);
@@ -1091,6 +1093,7 @@ void Project::saveOptions()
ini.SetValue("Project","Compiler", toByteArray(mOptions.compilerCmd));
ini.SetValue("Project","CppCompiler", toByteArray(mOptions.cppCompilerCmd));
ini.SetValue("Project","Linker", toByteArray(mOptions.linkerCmd));
+ ini.SetValue("Project", "ResourceCommand", toByteArray(mOptions.resourceCmd));
ini.SetLongValue("Project","IsCpp", mOptions.isCpp);
ini.SetValue("Project","Icon", toByteArray(extractRelativePath(directory(), mOptions.icon)));
ini.SetValue("Project","ExeOutput", toByteArray(extractRelativePath(directory(),mOptions.exeOutput)));
@@ -1896,6 +1899,7 @@ void Project::loadOptions(SimpleIni& ini)
mOptions.compilerCmd = fromByteArray(ini.GetValue("Project", "Compiler", ""));
mOptions.cppCompilerCmd = fromByteArray(ini.GetValue("Project", "CppCompiler", ""));
mOptions.linkerCmd = fromByteArray(ini.GetValue("Project", "Linker", ""));
+ mOptions.resourceCmd = fromByteArray(ini.GetValue("Project", "ResourceCommand", ""));
mOptions.binDirs = absolutePaths(fromByteArray(ini.GetValue("Project", "Bins", "")).split(";",
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
Qt::SkipEmptyParts
diff --git a/RedPandaIDE/projectoptions.h b/RedPandaIDE/projectoptions.h
index c3c46e8d..82189b34 100644
--- a/RedPandaIDE/projectoptions.h
+++ b/RedPandaIDE/projectoptions.h
@@ -66,6 +66,7 @@ struct ProjectOptions{
QString compilerCmd;
QString cppCompilerCmd;
QString linkerCmd;
+ QString resourceCmd;
QStringList binDirs;
QStringList includeDirs;
QStringList libDirs;
diff --git a/RedPandaIDE/projecttemplate.cpp b/RedPandaIDE/projecttemplate.cpp
index cb8dd738..b179f089 100644
--- a/RedPandaIDE/projecttemplate.cpp
+++ b/RedPandaIDE/projecttemplate.cpp
@@ -137,6 +137,7 @@ void ProjectTemplate::readTemplateFile(const QString &fileName)
mOptions.compilerCmd = fromByteArray(mIni->GetValue("Project", "Compiler", ""));
mOptions.cppCompilerCmd = fromByteArray(mIni->GetValue("Project", "CppCompiler", ""));
mOptions.linkerCmd = fromByteArray(mIni->GetValue("Project", "Linker",""));
+ mOptions.resourceCmd = fromByteArray(mIni->GetValue("Project", "ResourceCommand", ""));
mOptions.isCpp = mIni->GetBoolValue("Project", "IsCpp", false);
mOptions.includeVersionInfo = mIni->GetBoolValue("Project", "IncludeVersionInfo", false);
mOptions.supportXPThemes = mIni->GetBoolValue("Project", "SupportXPThemes", false);
diff --git a/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.cpp b/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.cpp
index 4dc708ca..61a406b8 100644
--- a/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.cpp
+++ b/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.cpp
@@ -35,7 +35,10 @@ ProjectCompileParamatersWidget::ProjectCompileParamatersWidget(const QString &na
SYSTEM_INFO info;
GetSystemInfo(&info);
ui->spinParallelJobs->setMaximum(info.dwNumberOfProcessors);
+#else
+ ui->tabResource->setVisible(false);
#endif
+ ui->tabCommands->setCurrentWidget(ui->tabCCompiler);
}
ProjectCompileParamatersWidget::~ProjectCompileParamatersWidget()
@@ -48,6 +51,7 @@ void ProjectCompileParamatersWidget::doLoad()
ui->txtCCompiler->setPlainText(pMainWindow->project()->options().compilerCmd);
ui->txtCPPCompiler->setPlainText(pMainWindow->project()->options().cppCompilerCmd);
ui->txtLinker->setPlainText(pMainWindow->project()->options().linkerCmd);
+ ui->txtResource->setPlainText(pMainWindow->project()->options().resourceCmd);
ui->grpAllowParallelBuilding->setChecked(pMainWindow->project()->options().allowParallelBuilding);
ui->spinParallelJobs->setValue(pMainWindow->project()->options().parellelBuildingJobs);
}
@@ -57,6 +61,7 @@ void ProjectCompileParamatersWidget::doSave()
pMainWindow->project()->options().compilerCmd = ui->txtCCompiler->toPlainText();
pMainWindow->project()->options().cppCompilerCmd = ui->txtCPPCompiler->toPlainText();
pMainWindow->project()->options().linkerCmd = ui->txtLinker->toPlainText();
+ pMainWindow->project()->options().resourceCmd = ui->txtResource->toPlainText();
pMainWindow->project()->options().allowParallelBuilding = ui->grpAllowParallelBuilding->isChecked();
pMainWindow->project()->options().parellelBuildingJobs = ui->spinParallelJobs->value();
pMainWindow->project()->saveOptions();
diff --git a/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.ui b/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.ui
index 649b9988..5cecd205 100644
--- a/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.ui
+++ b/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.ui
@@ -54,7 +54,7 @@
2
-
+
C Compiler
@@ -76,7 +76,7 @@
-
+
C++ Compiler
@@ -98,7 +98,7 @@
-
+
Linker
@@ -159,6 +159,28 @@
+
+
+ Resource
+
+
+
+ 5
+
+
+ 5
+
+
+ 5
+
+
+ 5
+
+ -
+
+
+
+
diff --git a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts
index c19495a5..d546aed4 100644
--- a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts
+++ b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts
@@ -2072,6 +2072,10 @@
+
+
+
+
FilePropertiesDialog
@@ -5365,6 +5369,10 @@
+
+
+
+
ProjectCompiler
diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts
index 2d6befd7..9a5928d4 100644
--- a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts
+++ b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts
@@ -702,12 +702,12 @@ p, li { white-space: pre-wrap; }
程序中的文字内容可能无法被正确处理和显示。
-
+
找不到Console Pauser程序
-
+
找不到Console Pauser程序"%1"!
@@ -2752,55 +2752,60 @@ Are you really want to continue?
FileCompiler
-
+
+
+ 检查单个文件...
+
+
+
编译单个文件...
-
+
- 文件名: %1
-
+
- 编译器配置: %1
-
-
+
+
无法删除旧的可执行文件"%1".
-
+
Can't the compiler for file %1
找不到适合文件%1的编译器
-
+
编译器程序"%1"不存在!
-
+
请检查编译器设置中的“程序”页。
-
+
正在处理%1源程序文件:
-
+
%1编译器: %2
-
+
命令: %1 %2
@@ -4106,7 +4111,7 @@ Are you really want to continue?
-
+
编译器
@@ -4544,7 +4549,7 @@ Are you really want to continue?
-
+
新建试题集
@@ -4566,7 +4571,7 @@ Are you really want to continue?
-
+
保存试题集
@@ -4574,7 +4579,7 @@ Are you really want to continue?
-
+
载入试题集
@@ -4705,14 +4710,14 @@ Are you really want to continue?
-
+
导入FPS试题集
-
+
导出FPS试题集
@@ -4949,7 +4954,7 @@ Are you really want to continue?
-
+
删除所有断点
@@ -5196,7 +5201,7 @@ Are you really want to continue?
-
+
重命名符号
@@ -5217,13 +5222,13 @@ Are you really want to continue?
-
+
导出为RTF
-
+
导出为HTML
@@ -5597,22 +5602,22 @@ Are you really want to continue?
-
-
+
+
错误的编译器设置
-
-
+
+
编译器被设置为不生成可执行文件。
-
+
我们需要可执行文件来运行试题案例。
@@ -5678,7 +5683,7 @@ Are you really want to continue?
-
+
请在调试前改正设置。
@@ -5736,22 +5741,22 @@ Are you really want to continue?
全部复制
-
+
跳转到行
-
+
行
-
+
模板已存在
-
+
模板%1已存在。是否覆盖?
@@ -5777,7 +5782,7 @@ Are you really want to continue?
-
+
试题集%1
@@ -5851,15 +5856,15 @@ Are you really want to continue?
-
-
+
+
书签描述
-
-
+
+
描述:
@@ -6035,7 +6040,7 @@ Are you really want to continue?
-
+
删除
@@ -6094,17 +6099,17 @@ Are you really want to continue?
中止
-
+
FPS试题集文件(*.fps;*.xml)
-
+
FPS试题集文件(*.fps)
-
+
导出时出错
@@ -6148,7 +6153,7 @@ Are you really want to continue?
-
+
需要保存吗?
@@ -6172,7 +6177,7 @@ Are you really want to continue?
-
+
保存失败
@@ -6211,78 +6216,78 @@ Are you really want to continue?
无标题%1
-
+
修改监视表达式
-
+
监视表达式
-
+
您真的要清除该文件的所有断点吗?
-
+
新建项目
-
+
关闭'%1'以打开新项目?
-
+
文件夹不存在
-
+
文件夹'%1'不存在。是否创建?
-
+
无法创建文件夹
-
+
创建文件夹'%1'失败。
-
+
-
+
文件夹%1不是空的。
-
+
你真的要删除它吗?
-
+
改变工作文件夹
-
+
File '%1' is not in the current working folder
文件'%1'不在当前工作文件夹中。
-
+
是否将工作文件夹改设为'%1'?
@@ -6291,28 +6296,28 @@ Are you really want to continue?
正在删除试题...
-
+
无法提交
-
+
Git需要用信息进行提交。
-
+
选择输入数据文件
-
-
+
+
所有文件 (*.*)
-
+
Choose Expected Input Data File
选择期望输出文件
@@ -6324,59 +6329,59 @@ Are you really want to continue?
-
+
选择工作文件夹
-
-
+
+
头文件已存在
-
-
+
+
头文件"%1"已存在!
-
+
源文件已存在!
-
+
源文件"%1"已存在!
-
+
无法提交!
-
+
下列文件处于冲突状态,请解决后重新添加和提交:
-
+
提交信息
-
+
提交信息:
-
+
提交失败
-
+
提交信息不能为空!
@@ -6385,22 +6390,22 @@ Are you really want to continue?
小熊猫Dev-C++项目文件 (*.dev)
-
+
新建项目失败
-
+
无法使用模板创建项目
-
+
删除文件
-
+
同时从硬盘上删除文件?
@@ -6409,27 +6414,27 @@ Are you really want to continue?
无标题
-
+
新的项目文件名
-
+
文件名:
-
+
文件已存在!
-
+
文件'%1'已经存在!
-
+
添加到项目
@@ -6460,76 +6465,76 @@ Are you really want to continue?
本操作会删除此试题的所有案例。
-
+
小熊猫C++项目文件(*.dev)
-
+
重命名出错
-
+
符号'%1'在系统头文件中定义,无法修改。
-
+
新名称
-
-
+
+
替换出错
-
+
无法打开文件'%1'进行替换!
-
+
内容和上次查找时不一致。
-
+
RTF格式文件 (*.rtf)
-
+
HTML文件 (*.html)
-
+
当前的试题集不是空的。
-
+
试题%1
-
-
+
+
试题集文件 (*.pbs)
-
-
+
+
载入失败
-
+
试题案例%1
@@ -6547,9 +6552,9 @@ Are you really want to continue?
-
-
-
+
+
+
错误
@@ -6601,54 +6606,54 @@ Are you really want to continue?
打开
-
+
编译失败
-
+
运行失败
-
-
-
+
+
+
确认转换
-
-
-
+
+
+
当前编辑器中的文件将会使用%1编码保存。<br />这项操作无法被撤回。<br />你确定要继续吗?
-
+
新监视表达式
-
+
输入监视表达式
-
+
(%1/%2)正在解析文件"%3"
-
-
+
+
完成%1个文件的解析,用时%2秒
-
+
(每秒%1个文件)
@@ -6999,31 +7004,31 @@ Are you really want to continue?
-
+
秒
-
+
毫秒
-
+
KB
-
+
MB
-
+
GB
@@ -7057,7 +7062,7 @@ Are you really want to continue?
-
+
错误
@@ -7067,89 +7072,89 @@ Are you really want to continue?
无法创建文件夹%1
-
+
警告
-
-
+
+
无法保存文件%1
-
+
文件已存在
-
+
文件'%1'已在项目中
-
+
项目已升级
-
+
已成功将项目升级到新的格式
-
+
旧项目文件备份在'%1'。
-
+
头文件
-
+
源文件
-
+
其他文件
-
+
设置需要更新
-
+
The compiler settings format of Dev-C++ has changed.
小熊猫C++的编译器设置格式已发生改变。
-
+
请在项目 >> 项目属性 >> 编译器设置中修改您的设置并保存您的项目
-
+
未找到编译器
-
+
您为该项目设置的编译器不存在。
-
+
它将会被全局编译器设置代替。
-
+
Developed using the Red Panda Dev-C++ IDE
使用小熊猫C++编辑器开发
@@ -7230,13 +7235,18 @@ Are you really want to continue?
-
+
添加库文件
-
-
+
+
+ 资源
+
+
+
+
库文件
@@ -7264,42 +7274,42 @@ Are you really want to continue?
- 资源文件: %1
-
+
正在编译项目修改...
-
+
- 项目文件名: %1
-
+
- 编译器配置: %1
-
+
Make程序“%1”不存在!
-
+
请检查编译器配置中的“程序”页。
-
+
正在处理makefile...
-
+
- makefile处理器: %1
-
+
- 命令: %1 %2
@@ -7637,32 +7647,32 @@ Are you really want to continue?
ProjectModel
-
+
文件已存在
-
+
文件'%1'已存在。是否删除?
-
+
删除失败
-
+
无法删除文件'%1'
-
+
改名失败
-
+
无法将文件'%1'改名为'%2'
@@ -9307,7 +9317,7 @@ Are you really want to continue?
-
+
@@ -9316,7 +9326,7 @@ Are you really want to continue?
-
+
@@ -9328,7 +9338,7 @@ Are you really want to continue?
自动链接
-
+
@@ -9405,15 +9415,15 @@ Are you really want to continue?
杂项
-
-
+
+
程序运行
-
+
试题集
diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts
index ff83e230..477deb67 100644
--- a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts
+++ b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts
@@ -1941,6 +1941,10 @@
+
+
+
+
FilePropertiesDialog
@@ -5146,6 +5150,10 @@
+
+
+
+
ProjectCompiler