- fix: .rc file shouldn't be syntax checked

This commit is contained in:
Roy Qu 2022-01-08 13:39:47 +08:00
parent 6bc943ba9c
commit 04b18b1648
21 changed files with 82 additions and 22 deletions

View File

@ -1,7 +1,7 @@
Red Panda C++ Version 0.13.1 Red Panda C++ Version 0.13.1
- enhancement: suppoort localization info in project templates - enhancement: suppoort localization info in project templates
- change: template / project files use utf-8 encoding instead of ANSI - change: template / project files use utf-8 encoding instead of ANSI
- fix: .rc file shouldn't be syntax checked
Red Panda C++ Version 0.12.7 Red Panda C++ Version 0.12.7
- change: make current build system follow FHS specifications - change: make current build system follow FHS specifications

View File

@ -478,9 +478,10 @@ void MainWindow::updateCompileActions()
Editor * e = mEditorList->getEditor(); Editor * e = mEditorList->getEditor();
if (e) { if (e) {
FileType fileType = getFileType(e->filename()); FileType fileType = getFileType(e->filename());
qDebug()<<(int)fileType<<e->isNew();
if (fileType == FileType::CSource if (fileType == FileType::CSource
|| fileType == FileType::CppSource || e->isNew()) || fileType == FileType::CppSource || e->isNew())
editorCanCompile = true; editorCanCompile = true;
} }
if (mCompilerManager->compiling() || mCompilerManager->running() || mDebugger->executing() if (mCompilerManager->compiling() || mCompilerManager->running() || mDebugger->executing()
|| (!hasProject && !editorCanCompile) ) { || (!hasProject && !editorCanCompile) ) {
@ -1323,7 +1324,12 @@ void MainWindow::checkSyntaxInBack(Editor *e)
// if not devEditor.AutoCheckSyntax then // if not devEditor.AutoCheckSyntax then
// Exit; // Exit;
//not c or cpp file //not c or cpp file
if (!e->highlighter() || e->highlighter()->getName()!=SYN_HIGHLIGHTER_CPP) FileType fileType = getFileType(e->filename());
if (fileType != FileType::CSource
&& fileType != FileType::CppSource
&& fileType != FileType::CHeader
&& fileType != FileType::CppHeader
)
return; return;
if (mCompilerManager->backgroundSyntaxChecking()) if (mCompilerManager->backgroundSyntaxChecking())
return; return;

View File

@ -1,5 +1,5 @@
[Template] [Template]
ver=1 ver=2
Name=Windows Application Name=Windows Application
Name[zh_CN]=Windows应用程序 Name[zh_CN]=Windows应用程序
Icon=Windows.ico Icon=Windows.ico

View File

@ -1,5 +1,5 @@
[Template] [Template]
ver=1 ver=2
Name=Console Application Name=Console Application
Name[zh_CN]=控制台程序 Name[zh_CN]=控制台程序
Icon=ConsoleToo.ico Icon=ConsoleToo.ico

View File

@ -1,9 +1,12 @@
[Template] [Template]
ver=1 ver=2
Name=Static Library Name=Static Library
Name[zh_CN]=静态链接库
Icon=StaticLib.ico Icon=StaticLib.ico
Description=A static library (.a) Description=A static library (.a)
Description[zh_CN]=静态链接库(.a)
Category=Basic Category=Basic
Category[zh_CN]=基础
[Unit0] [Unit0]
CName= CName=

View File

@ -1,9 +1,12 @@
[Template] [Template]
ver=1 ver=2
Name=DLL Name=DLL
Name[zh_CN]=动态链接库
Icon=DLL.ico Icon=DLL.ico
Description=A Dynamic Link Library (DLL) Description=A Dynamic Link Library (DLL)
Description[zh_CN]=动态链接库(DLL)
Category=Basic Category=Basic
Category[zh_CN]=基础
[Unit0] [Unit0]
CName=dllmain.c CName=dllmain.c

View File

@ -1,9 +1,12 @@
[Template] [Template]
ver=1 ver=2
Name=Empty Project Name=Empty Project
Name[zh_CN]=空项目
Icon=Empty.ico Icon=Empty.ico
Description=An empty project Description=An empty project
Description[zh_CN]=一个空项目
Category=Basic Category=Basic
Category[zh_CN]=基础
[Unit0] [Unit0]
CName= CName=

View File

@ -1,12 +1,16 @@
[Template] [Template]
ver=1 ver=2
Name=GLUT Name=GLUT
Icon=CL_GLUT.ico Icon=CL_GLUT.ico
Description=A simple GLUT program Description=A simple GLUT program
Description[zh_CN]=一个简单的GLUT程序
Category=Multimedia Category=Multimedia
Category[zh_CN]=多媒体
[Unit0] [Unit0]
CppName=main.cpp CppName=main.cpp
C=CL_GLUT_cpp.txt C=CL_GLUT_cpp.txt
[Project] [Project]
UnitCount=1 UnitCount=1
Type=0 Type=0

View File

@ -1,12 +1,16 @@
[Template] [Template]
ver=1 ver=2
Name=Graphics.h Name=Graphics.h
Icon=CL_Graphics.ico Icon=CL_Graphics.ico
Description=A simple program use Easy Graphics Engine Description=A simple program use Easy Graphics Engine
Description[zh_CN]=使用EGE库的简单绘图程序
Category=Multimedia Category=Multimedia
Category[zh_CN]=多媒体
[Unit0] [Unit0]
CppName=main.cpp CppName=main.cpp
Cpp=CL_Graphics_cpp.txt Cpp=CL_Graphics_cpp.txt
[Project] [Project]
UnitCount=1 UnitCount=1
Type=0 Type=0

View File

@ -1,12 +1,17 @@
[Template] [Template]
ver=1 ver=2
Name=Turtle Graphics Name=Turtle Graphics
Name[zh_CN]=海龟作图
Icon=CL_Turtle.ico Icon=CL_Turtle.ico
Description=A simple program using Turtle Graphics (https://github.com/royqh1979/libturtle) Description=A simple program using Turtle Graphics
Description[zh_CN]=简单的海龟作图程序 (https://github.com/royqh1979/libturtle)
Category=Multimedia Category=Multimedia
Category[zh_CN]=多媒体
[Unit0] [Unit0]
CppName=main.cpp CppName=main.cpp
Cpp=CL_Turtle_cpp.txt Cpp=CL_Turtle_cpp.txt
[Project] [Project]
UnitCount=1 UnitCount=1
Type=0 Type=0

View File

@ -1,8 +1,10 @@
[Template] [Template]
ver=1 ver=2
Name=File Editor Name=File Editor
Name[zh_CN]=文件编辑器
Icon=Editor.ico Icon=Editor.ico
Description=A simple Win32 file editor Description=A simple Win32 file editor
Description[zh_CN]=一个简单的Win32文件编辑器
Category=Win32 Category=Win32
[Unit0] [Unit0]

View File

@ -2,20 +2,27 @@
ver=2 ver=2
Name=GLFW Name=GLFW
Description=A simple GLFW program Description=A simple GLFW program
Description[zh_CN]=一个简单的GLFW程序
Icon=GLFW.ico Icon=GLFW.ico
Category=Multimedia Category=Multimedia
Category[zh_CN]=多媒体
[Unit0] [Unit0]
CppName=main.cpp CppName=main.cpp
Cpp=GLFW_main.cpp.txt Cpp=GLFW_main.cpp.txt
[Unit1] [Unit1]
CppName=shader.h CppName=shader.h
Cpp=GLFW_shader.h.txt Cpp=GLFW_shader.h.txt
[Unit2] [Unit2]
CppName=shader.frag CppName=shader.frag
Cpp=GLFW_shader.frag.txt Cpp=GLFW_shader.frag.txt
[Unit3] [Unit3]
CppName=shader.vs CppName=shader.vs
Cpp=GLFW_shader.vs.txt Cpp=GLFW_shader.vs.txt
[Project] [Project]
UnitCount=4 UnitCount=4
Type=1 Type=1

View File

@ -1,9 +1,12 @@
[Template] [Template]
ver=1 ver=2
Name=Hello World Name=Hello World
Name[zh_CN]=世界,你好!
Icon=Communication.ico Icon=Communication.ico
Description=A classic Hello World program Description=A classic Hello World program
Description[zh_CN]=一个经典的“世界,你好!”程序
Category=Console Category=Console
Category=控制台
[Unit0] [Unit0]
CName=main.c CName=main.c

View File

@ -1,9 +1,12 @@
[Template] [Template]
ver=1 ver=2
Name=Input Loop Name=Input Loop
Name[zh_CN]=输入循环
Icon=ConsoleToo.ico Icon=ConsoleToo.ico
Description=A console with an input loop Description=A console with an input loop
Description[zh_CN]=一个带输入循环的控制台程序
Category=Console Category=Console
Category[zh_CN]=控制台
[Unit0] [Unit0]
CName=main.c CName=main.c

View File

@ -1,9 +1,11 @@
[Template] [Template]
ver=1 ver=2
Name=Jackpot Name=Jackpot
Icon=Games.ico Icon=Games.ico
Description=A number guessing game Description=A number guessing game
Description[zh_CN]=一个数字猜测游戏
Category=Console Category=Console
Category[zh_CN]=控制台
[Unit0] [Unit0]
CName=main.c CName=main.c

View File

@ -1,8 +1,10 @@
[Template] [Template]
ver=1 ver=2
Name=MDI Editor Name=MDI Editor
Name[zh_CN]=MDI编辑器
Icon=Windows.ico Icon=Windows.ico
Description=A Win32 MDI file editor Description=A Win32 MDI file editor
Description[zh_CN]=一个Win32多文档界面(MDI)文件编辑器
Category=Win32 Category=Win32
[Unit0] [Unit0]

View File

@ -1,9 +1,11 @@
[Template] [Template]
ver=1 ver=2
Name=OpenGL Name=OpenGL
Icon=Pizza.ico Icon=Pizza.ico
Description=A basic OpenGL program Description=A basic OpenGL program
Description[zh_CN]=一个基本的OpenGL程序
Category=Multimedia Category=Multimedia
Category[zh_CN]=多媒体
[Unit0] [Unit0]
CName=main.c CName=main.c

View File

@ -1,9 +1,11 @@
[Template] [Template]
ver=1 ver=2
Name=OpenMP Name=OpenMP
Icon=File Management.ico Icon=File Management.ico
Description=A OpenMP multithreading example Description=A OpenMP multithreading example
Description[zh_CN]=一个OpenMP多线程示例
Category=Console Category=Console
Category[zh_CN]=控制台
[Unit0] [Unit0]
CName=main.c CName=main.c

View File

@ -1,15 +1,20 @@
[Template] [Template]
ver=1 ver=2
Name=Single Dialog Application Name=Single Dialog Application
Name[zh_CN]=单对话框应用程序
Icon=Single Dialog Application.ico Icon=Single Dialog Application.ico
Description=An Appliction use a dialog as the main UI Description=An Appliction use a dialog as the main UI
Description[zh_CN]=使用一个对话框作为主用户界面简单程序
Category=Win32 Category=Win32
[Unit0] [Unit0]
CName=main.c CName=main.c
C=Single_Dialog_Application_main.c.txt C=Single_Dialog_Application_main.c.txt
[Unit1] [Unit1]
CName=resource.rc CName=resource.rc
C=Single_Dialog_Application_resource.rc.txt C=Single_Dialog_Application_resource.rc.txt
[Unit2] [Unit2]
CName=resource.h CName=resource.h
C=Single_Dialog_Application_resource.h.txt C=Single_Dialog_Application_resource.h.txt

View File

@ -1,9 +1,11 @@
[Template] [Template]
ver=1 ver=2
Name=std::thread Name=std::thread
Icon=Software.ico Icon=Software.ico
Description=A C++ multithreading example Description=A C++ multithreading example
Description[zh_CN]=一个C++多线程示例
Category=Console Category=Console
Category[zh_CN]=控制台
[Unit0] [Unit0]
CName=main.c CName=main.c

View File

@ -1,8 +1,10 @@
[Template] [Template]
ver=1 ver=2
Name=Animation Example Name=Animation Example
Name[zh_CN]=动画示例
Icon=Windows.ico Icon=Windows.ico
Description=A Win32 painting example Description=A Win32 painting example
Description[zh_CN]=一个Win32绘图示例
Category=Win32 Category=Win32
[Unit0] [Unit0]