2021-04-11 21:33:08 +08:00
|
|
|
#ifndef SYSTEMCONSTS_H
|
|
|
|
#define SYSTEMCONSTS_H
|
|
|
|
|
|
|
|
#include <QStringList>
|
|
|
|
|
2021-10-27 17:01:58 +08:00
|
|
|
#define DEVCPP_VERSION "0.7.4"
|
2021-09-29 22:55:53 +08:00
|
|
|
|
2021-04-13 22:17:18 +08:00
|
|
|
#define APP_SETTSINGS_FILENAME "redpandacpp.ini"
|
2021-10-20 11:14:49 +08:00
|
|
|
#ifdef Q_OS_WIN
|
2021-04-15 11:18:14 +08:00
|
|
|
#define GCC_PROGRAM "gcc.exe"
|
|
|
|
#define GPP_PROGRAM "g++.exe"
|
|
|
|
#define GDB_PROGRAM "gdb.exe"
|
|
|
|
#define GDB32_PROGRAM "gdb32.exe"
|
|
|
|
#define MAKE_PROGRAM "mingw32-make.exe"
|
|
|
|
#define WINDRES_PROGRAM "windres.exe"
|
|
|
|
#define GPROF_PROGRAM "gprof.exe"
|
2021-09-13 22:45:50 +08:00
|
|
|
#define CLEAN_PROGRAM "del /q /f"
|
2021-04-15 11:18:14 +08:00
|
|
|
#define CPP_PROGRAM "cpp.exe"
|
2021-10-20 11:14:49 +08:00
|
|
|
#elif defined(Q_OS_LINUX)
|
|
|
|
#define GCC_PROGRAM "gcc"
|
|
|
|
#define GPP_PROGRAM "g++"
|
|
|
|
#define GDB_PROGRAM "gdb"
|
|
|
|
#define GDB32_PROGRAM "gdb32"
|
|
|
|
#define MAKE_PROGRAM "make"
|
|
|
|
#define GPROF_PROGRAM "gprof"
|
|
|
|
#define CLEAN_PROGRAM "rm -rf"
|
|
|
|
#define CPP_PROGRAM "cpp"
|
2021-04-24 15:57:45 +08:00
|
|
|
#else
|
2021-10-20 11:14:49 +08:00
|
|
|
#error "Only support windows and linux now!"
|
2021-04-24 15:57:45 +08:00
|
|
|
#endif
|
2021-04-15 11:18:14 +08:00
|
|
|
|
2021-09-07 10:28:40 +08:00
|
|
|
#define DEV_PROJECT_EXT "dev"
|
|
|
|
#define RC_EXT "rc"
|
2021-09-15 11:23:42 +08:00
|
|
|
#define RES_EXT "res"
|
2021-09-07 10:28:40 +08:00
|
|
|
#define H_EXT "h"
|
2021-09-13 10:48:44 +08:00
|
|
|
#define OBJ_EXT "o"
|
2021-09-13 19:09:15 +08:00
|
|
|
#define DEF_EXT "def"
|
|
|
|
#define LIB_EXT "a"
|
|
|
|
#define GCH_EXT "gch"
|
2021-09-17 09:56:52 +08:00
|
|
|
#define ICON_EXT "ico"
|
2021-09-16 12:03:10 +08:00
|
|
|
#define TEMPLATE_EXT "template"
|
2021-09-07 16:49:35 +08:00
|
|
|
#define DEV_INTERNAL_OPEN "$__DEV_INTERNAL_OPEN"
|
2021-09-27 20:17:24 +08:00
|
|
|
#define DEV_LASTOPENS_FILE "lastopens.ini"
|
2021-09-30 11:20:43 +08:00
|
|
|
#define DEV_SYMBOLUSAGE_FILE "symbolusage.json"
|
|
|
|
#define DEV_CODESNIPPET_FILE "codesnippets.json"
|
2021-10-20 12:11:36 +08:00
|
|
|
#define DEV_NEWFILETEMPLATES_FILE "newfiletemplate.txt"
|
2021-10-06 23:19:18 +08:00
|
|
|
#define DEV_AUTOLINK_FILE "autolink.json"
|
|
|
|
#define DEV_SHORTCUT_FILE "shortcuts.json"
|
2021-10-08 00:06:41 +08:00
|
|
|
#define DEV_TOOLS_FILE "tools.json"
|
2021-10-21 17:31:25 +08:00
|
|
|
#define DEV_BOOKMARK_FILE "bookmarks.json"
|
2021-10-21 19:33:11 +08:00
|
|
|
#define DEV_BREAKPOINTS_FILE "breakpoints.json"
|
|
|
|
#define DEV_WATCH_FILE "watch.json"
|
2021-10-06 23:19:18 +08:00
|
|
|
|
2021-04-20 22:24:33 +08:00
|
|
|
#ifdef Q_OS_WIN
|
|
|
|
# define PATH_SENSITIVITY Qt::CaseInsensitive
|
2021-09-14 12:10:43 +08:00
|
|
|
# define PATH_SEPARATOR ";"
|
2021-04-20 22:24:33 +08:00
|
|
|
# define NULL_FILE "NUL"
|
2021-09-06 08:45:53 +08:00
|
|
|
# define EXECUTABLE_EXT "exe"
|
|
|
|
# define STATIC_LIB_EXT "a"
|
|
|
|
# define DYNAMIC_LIB_EXT "dll"
|
2021-09-06 12:58:29 +08:00
|
|
|
# define MAKEFILE_NAME "makefile.win"
|
2021-10-20 11:14:49 +08:00
|
|
|
#elif defined(Q_OS_LINUX)
|
2021-04-20 22:24:33 +08:00
|
|
|
# define PATH_SENSITIVITY Qt::CaseSensitive
|
2021-09-14 12:10:43 +08:00
|
|
|
# define PATH_SEPARATOR ":"
|
2021-04-20 22:24:33 +08:00
|
|
|
# define NULL_FILE "/dev/null"
|
2021-09-06 08:45:53 +08:00
|
|
|
# define EXECUTABLE_EXT ""
|
|
|
|
# define STATIC_LIB_EXT "a"
|
|
|
|
# define DYNAMIC_LIB_EXT "d"
|
2021-09-06 12:58:29 +08:00
|
|
|
# define MAKEFILE_NAME "makefile"
|
2021-04-20 22:24:33 +08:00
|
|
|
#else
|
|
|
|
#error "Only support windows and linux now!"
|
|
|
|
#endif
|
2021-04-13 22:17:18 +08:00
|
|
|
|
2021-04-11 21:33:08 +08:00
|
|
|
class SystemConsts
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SystemConsts();
|
|
|
|
const QStringList& defaultFileFilters() const noexcept;
|
2021-08-30 18:36:44 +08:00
|
|
|
const QString& defaultCFileFilter() const noexcept;
|
|
|
|
const QString& defaultCPPFileFilter() const noexcept;
|
2021-08-30 19:52:38 +08:00
|
|
|
const QString& defaultAllFileFilter() const noexcept;
|
2021-04-11 21:33:08 +08:00
|
|
|
void addDefaultFileFilter(const QString& name, const QString& fileExtensions);
|
2021-09-14 23:56:08 +08:00
|
|
|
const QStringList &iconFileFilters() const;
|
|
|
|
const QString& iconFileFilter() const;
|
|
|
|
void setIconFileFilters(const QStringList &newIconFileFilters);
|
|
|
|
|
|
|
|
const QStringList &codecNames() const;
|
|
|
|
|
2021-04-11 21:33:08 +08:00
|
|
|
private:
|
2021-09-16 23:51:05 +08:00
|
|
|
void addFileFilter(QStringList& filters, const QString& name, const QString& fileExtensions);
|
2021-04-11 21:33:08 +08:00
|
|
|
QStringList mDefaultFileFilters;
|
2021-09-14 23:56:08 +08:00
|
|
|
QStringList mIconFileFilters;
|
|
|
|
QStringList mCodecNames;
|
2021-04-11 21:33:08 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
extern SystemConsts* pSystemConsts;
|
|
|
|
#endif // SYSTEMCONSTS_H
|