RedPanda-CPP/RedPandaIDE/systemconsts.h

60 lines
1.6 KiB
C
Raw Normal View History

2021-04-11 21:33:08 +08:00
#ifndef SYSTEMCONSTS_H
#define SYSTEMCONSTS_H
#include <QStringList>
2021-04-24 15:57:45 +08:00
#ifdef Q_OS_WIN
#define APP_SETTSINGS_FILENAME "redpandacpp.ini"
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"
#define CLEAN_PROGRAM "rm.exe"
#define CPP_PROGRAM "cpp.exe"
2021-04-24 15:57:45 +08:00
#else
#error "Only support windows now!"
#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"
#define H_EXT "h"
2021-04-20 22:24:33 +08:00
#ifdef Q_OS_WIN
# define PATH_SENSITIVITY Qt::CaseInsensitive
# 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-04-20 22:24:33 +08:00
#elif Q_OS_LINUX
# define PATH_SENSITIVITY Qt::CaseSensitive
# 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-09-03 16:42:29 +08:00
#define DEVCPP_VERSION "0.1.0"
2021-07-26 11:47:54 +08:00
2021-04-11 21:33:08 +08:00
class SystemConsts
{
public:
SystemConsts();
const QStringList& defaultFileFilters() const noexcept;
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);
private:
QStringList mDefaultFileFilters;
};
extern SystemConsts* pSystemConsts;
#endif // SYSTEMCONSTS_H