diff --git a/NEWS.md b/NEWS.md index 6c8c80e4..c2e7c67a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,8 @@ Red Panda C++ Version 0.12.7 - change: make current build system follow FHS specifications - fix: crash when close settings dialog in Ubuntu 20.04 (but we'll leak memory now...) + - enhancement: add raylib.h to autolink + - fix: shouldn't generate default autolink settings in linux Red Panda C++ Version 0.12.6 - fix: heartbeat for gdb server async command shouldn't disable actions diff --git a/RedPandaIDE/autolinkmanager.cpp b/RedPandaIDE/autolinkmanager.cpp index 143cb76e..c7d8c421 100644 --- a/RedPandaIDE/autolinkmanager.cpp +++ b/RedPandaIDE/autolinkmanager.cpp @@ -41,6 +41,7 @@ void AutolinkManager::load() QString filename=dir.filePath(DEV_AUTOLINK_FILE); QFile file(filename); if (!file.exists()) { +#ifdef Q_OS_WIN QFile preFile(":/config/autolink.json"); if (!preFile.open(QFile::ReadOnly)) { throw FileError(QObject::tr("Can't open file '%1' for read.") @@ -54,6 +55,9 @@ void AutolinkManager::load() file.write(content); file.close(); preFile.close(); +#else + return; +#endif } if (file.open(QFile::ReadOnly)) { QByteArray content = file.readAll(); diff --git a/RedPandaIDE/resources/autolink.json b/RedPandaIDE/resources/autolink.json index 8c3a3ffb..1ffd73d3 100644 --- a/RedPandaIDE/resources/autolink.json +++ b/RedPandaIDE/resources/autolink.json @@ -1,33 +1,38 @@ -[{ - "header": "ege.h", - "links": "-lgraphics -luuid -lmsimg32 -lgdi32 -limm32 -lole32 -loleaut32 -lwinmm -lgdiplus" -}, -{ - "header": "GL/gl.h", - "links": "-lopengl32" -}, -{ - "header": "GL/glu.h", - "links": "-lglu32 -lopengl32" -}, -{ - "header": "GL/freeglut.h", - "links": "-lfreeglut -lwinmm" -}, -{ - "header": "GL/glut.h", - "links": "-lfreeglut -lwinmm" -}, -{ - "header": "GL/glew.h", - "links": "-lglew32 -lopengl32" -}, -{ - "header": "GLFW/glfw3.h", - "links": "-lglfw3 -lgdi32" -}, -{ - "header": "turtle.h", - "links": "-lturtle" -} +[ + { + "header": "GL/freeglut.h", + "links": "-lfreeglut -lwinmm" + }, + { + "header": "GL/gl.h", + "links": "-lopengl32" + }, + { + "header": "GL/glew.h", + "links": "-lglew32 -lopengl32" + }, + { + "header": "GL/glu.h", + "links": "-lglu32 -lopengl32" + }, + { + "header": "GL/glut.h", + "links": "-lfreeglut -lwinmm" + }, + { + "header": "GLFW/glfw3.h", + "links": "-lglfw3 -lgdi32" + }, + { + "header": "ege.h", + "links": "-lgraphics -luuid -lmsimg32 -lgdi32 -limm32 -lole32 -loleaut32 -lwinmm -lgdiplus" + }, + { + "header": "raylib.h", + "links": "-lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal -lwinmm" + }, + { + "header": "turtle.h", + "links": "-lturtle" + } ]