- fix: Can't correctly load project's custom compile options, if it contains more than one line contents.
This commit is contained in:
parent
7e4a87a704
commit
78f9aa8b3c
4
NEWS.md
4
NEWS.md
|
@ -1,3 +1,7 @@
|
||||||
|
Red Panda C++ Version 2.12
|
||||||
|
|
||||||
|
- fix: Can't correctly load project's custom compile options, if it contains more than one line contents.
|
||||||
|
|
||||||
Red Panda C++ Version 2.11
|
Red Panda C++ Version 2.11
|
||||||
|
|
||||||
- fix: Can't correctly handle definitions for "operator,"
|
- fix: Can't correctly handle definitions for "operator,"
|
||||||
|
|
|
@ -10,7 +10,7 @@ isEmpty(APP_NAME) {
|
||||||
}
|
}
|
||||||
|
|
||||||
isEmpty(APP_VERSION) {
|
isEmpty(APP_VERSION) {
|
||||||
APP_VERSION = 2.11
|
APP_VERSION = 2.12
|
||||||
}
|
}
|
||||||
|
|
||||||
macos: {
|
macos: {
|
||||||
|
|
|
@ -1028,15 +1028,15 @@ bool Project::saveAsTemplate(const QString &templateFolder,
|
||||||
if (!mOptions.libDirs.isEmpty())
|
if (!mOptions.libDirs.isEmpty())
|
||||||
ini->SetValue("Project", "Libs", relativePaths(mOptions.libDirs).join(";").toUtf8());
|
ini->SetValue("Project", "Libs", relativePaths(mOptions.libDirs).join(";").toUtf8());
|
||||||
if (!mOptions.compilerCmd.isEmpty())
|
if (!mOptions.compilerCmd.isEmpty())
|
||||||
ini->SetValue("Project", "Compiler", mOptions.compilerCmd.toUtf8());
|
ini->SetValue("Project", "Compiler", textToLines(mOptions.compilerCmd).join(";CONFIG_LINE;").toUtf8());
|
||||||
if (!mOptions.cppCompilerCmd.isEmpty())
|
if (!mOptions.cppCompilerCmd.isEmpty())
|
||||||
ini->SetValue("Project", "CppCompiler", mOptions.cppCompilerCmd.toUtf8());
|
ini->SetValue("Project", "CppCompiler", textToLines(mOptions.cppCompilerCmd).join(";CONFIG_LINE;").toUtf8());
|
||||||
if (!mOptions.linkerCmd.isEmpty())
|
if (!mOptions.linkerCmd.isEmpty())
|
||||||
ini->SetValue("Project", "Linker",mOptions.linkerCmd.toUtf8());
|
ini->SetValue("Project", "Linker",textToLines(mOptions.linkerCmd).join(";CONFIG_LINE;").toUtf8());
|
||||||
if (!mOptions.resourceCmd.isEmpty())
|
if (!mOptions.resourceCmd.isEmpty())
|
||||||
ini->SetValue("Project", "ResourceCommand",mOptions.resourceCmd.toUtf8());
|
ini->SetValue("Project", "ResourceCommand",textToLines(mOptions.resourceCmd).join(";CONFIG_LINE;").toUtf8());
|
||||||
if (!mOptions.assemblerArgs.isEmpty())
|
if (!mOptions.assemblerArgs.isEmpty())
|
||||||
ini->SetValue("Project", "AssemblerArgs",mOptions.assemblerArgs.toUtf8());
|
ini->SetValue("Project", "AssemblerArgs",textToLines(mOptions.assemblerArgs).join(";CONFIG_LINE;").toUtf8());
|
||||||
ini->SetBoolValue("Project", "IsCpp", mOptions.isCpp);
|
ini->SetBoolValue("Project", "IsCpp", mOptions.isCpp);
|
||||||
if (mOptions.includeVersionInfo)
|
if (mOptions.includeVersionInfo)
|
||||||
ini->SetBoolValue("Project", "IncludeVersionInfo", true);
|
ini->SetBoolValue("Project", "IncludeVersionInfo", true);
|
||||||
|
@ -1133,11 +1133,11 @@ void Project::saveOptions()
|
||||||
ini.SetValue("Project","ResourceIncludes", toByteArray(relativePaths(mOptions.resourceIncludes).join(";")));
|
ini.SetValue("Project","ResourceIncludes", toByteArray(relativePaths(mOptions.resourceIncludes).join(";")));
|
||||||
ini.SetValue("Project","MakeIncludes", toByteArray(relativePaths(mOptions.makeIncludes).join(";")));
|
ini.SetValue("Project","MakeIncludes", toByteArray(relativePaths(mOptions.makeIncludes).join(";")));
|
||||||
ini.SetValue("Project","PrivateResource", toByteArray(mOptions.privateResource));
|
ini.SetValue("Project","PrivateResource", toByteArray(mOptions.privateResource));
|
||||||
ini.SetValue("Project","Compiler", toByteArray(mOptions.compilerCmd));
|
ini.SetValue("Project","Compiler", toByteArray(textToLines(mOptions.compilerCmd).join(";CONFIG_LINE;")));
|
||||||
ini.SetValue("Project","CppCompiler", toByteArray(mOptions.cppCompilerCmd));
|
ini.SetValue("Project","CppCompiler", toByteArray(textToLines(mOptions.cppCompilerCmd).join(";CONFIG_LINE;")));
|
||||||
ini.SetValue("Project","AssemblerArgs",toByteArray(mOptions.assemblerArgs));
|
ini.SetValue("Project","AssemblerArgs",toByteArray(textToLines(mOptions.assemblerArgs).join(";CONFIG_LINE;")));
|
||||||
ini.SetValue("Project","Linker", toByteArray(mOptions.linkerCmd));
|
ini.SetValue("Project","Linker", toByteArray(textToLines(mOptions.linkerCmd).join(";CONFIG_LINE;")));
|
||||||
ini.SetValue("Project", "ResourceCommand", toByteArray(mOptions.resourceCmd));
|
ini.SetValue("Project", "ResourceCommand", toByteArray(textToLines(mOptions.resourceCmd).join(";CONFIG_LINE;")));
|
||||||
ini.SetLongValue("Project","IsCpp", mOptions.isCpp);
|
ini.SetLongValue("Project","IsCpp", mOptions.isCpp);
|
||||||
ini.SetValue("Project","Icon", toByteArray(extractRelativePath(directory(), mOptions.icon)));
|
ini.SetValue("Project","Icon", toByteArray(extractRelativePath(directory(), mOptions.icon)));
|
||||||
ini.SetValue("Project","ExeOutput", toByteArray(extractRelativePath(directory(),mOptions.exeOutput)));
|
ini.SetValue("Project","ExeOutput", toByteArray(extractRelativePath(directory(),mOptions.exeOutput)));
|
||||||
|
@ -1939,11 +1939,11 @@ void Project::loadOptions(SimpleIni& ini)
|
||||||
}
|
}
|
||||||
|
|
||||||
mOptions.type = static_cast<ProjectType>(ini.GetLongValue("Project", "type", 0));
|
mOptions.type = static_cast<ProjectType>(ini.GetLongValue("Project", "type", 0));
|
||||||
mOptions.compilerCmd = fromByteArray(ini.GetValue("Project", "Compiler", ""));
|
mOptions.compilerCmd = fromByteArray(ini.GetValue("Project", "Compiler", "")).replace(";CONFIG_LINE;","\n");
|
||||||
mOptions.cppCompilerCmd = fromByteArray(ini.GetValue("Project", "CppCompiler", ""));
|
mOptions.cppCompilerCmd = fromByteArray(ini.GetValue("Project", "CppCompiler", "")).replace(";CONFIG_LINE;","\n");
|
||||||
mOptions.linkerCmd = fromByteArray(ini.GetValue("Project", "Linker", ""));
|
mOptions.linkerCmd = fromByteArray(ini.GetValue("Project", "Linker", "")).replace(";CONFIG_LINE;","\n");
|
||||||
mOptions.resourceCmd = fromByteArray(ini.GetValue("Project", "ResourceCommand", ""));
|
mOptions.resourceCmd = fromByteArray(ini.GetValue("Project", "ResourceCommand", "")).replace(";CONFIG_LINE;","\n");
|
||||||
mOptions.assemblerArgs = fromByteArray(ini.GetValue("Project","AssemblerArgs",""));
|
mOptions.assemblerArgs = fromByteArray(ini.GetValue("Project","AssemblerArgs","")).replace(";CONFIG_LINE;","\n");
|
||||||
mOptions.binDirs = absolutePaths(fromByteArray(ini.GetValue("Project", "Bins", "")).split(";",
|
mOptions.binDirs = absolutePaths(fromByteArray(ini.GetValue("Project", "Bins", "")).split(";",
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
|
||||||
Qt::SkipEmptyParts
|
Qt::SkipEmptyParts
|
||||||
|
|
|
@ -14,7 +14,7 @@ qsynedit.subdir = libs/qsynedit
|
||||||
|
|
||||||
APP_NAME = RedPandaCPP
|
APP_NAME = RedPandaCPP
|
||||||
|
|
||||||
APP_VERSION = 2.11
|
APP_VERSION = 2.12
|
||||||
|
|
||||||
# Add the dependencies so that the RedPandaIDE project can add the depended programs
|
# Add the dependencies so that the RedPandaIDE project can add the depended programs
|
||||||
# into the main app bundle
|
# into the main app bundle
|
||||||
|
|
Loading…
Reference in New Issue