endif
PRJ_CFLAGS += \
- $(if $(DEBUG), -g, -O2 -ffast-math) $(FPIC) -w
+ $(if $(DEBUG), -g, -O2 -ffast-math) $(FPIC) -w \
+ -DECERE_DOCUMENTOR
ECFLAGS += -module $(MODULE)
ECFLAGS += \
"Version" : 0.2,
"ModuleName" : "documentor",
"Options" : {
+ "PreprocessorDefinitions" : [
+ "ECERE_DOCUMENTOR"
+ ],
"TargetFileName" : "documentor",
"Libraries" : [
"ecere"
PRJ_CFLAGS += \
$(if $(DEBUG), -g, -O2 -ffast-math) $(FPIC) -w \
- -DMAKEFILE_GENERATOR
+ -DECERE_EPJ2MAKE
ECFLAGS += -module $(MODULE)
ECFLAGS += \
"Options" : {
"Warnings" : "All",
"PreprocessorDefinitions" : [
- "MAKEFILE_GENERATOR"
+ "ECERE_EPJ2MAKE"
],
"TargetType" : "Executable",
"TargetFileName" : "epj2make",
$(if $(DEBUG), -g, -O2 -ffast-math) $(FPIC) -w \
$(FVISIBILITY) \
-DREPOSITORY_VERSION="\"$(REPOSITORY_VER)\"" \
- -I../extras/include
+ -I../extras/include \
+ -DECERE_IDE
ECFLAGS += -module $(MODULE)
ECFLAGS += \
"Options" : {
"Warnings" : "All",
"PreprocessorDefinitions" : [
- "GDB_DEBUG_GUI"
+ "GDB_DEBUG_GUI",
+ "ECERE_IDE"
],
"IncludeDirs" : [
"../extras/include"
-#if defined(__WIN32__)
-#define MessageBox _MessageBox
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef MessageBox
-#endif
-
#ifdef ECERE_STATIC
public import static "ecere"
#else
import "OldIDESettings"
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
+import "process"
+#endif
+
define MaxRecent = 9;
enum DirTypes { includes, libraries, executables };
}
}
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
struct LanguageOption
{
const String name;
settings.language = code;
settingsContainer.Save();
-#if defined(__WIN32__)
- // Set LANGUAGE environment variable
- {
- HKEY key = null;
- uint16 wLanguage[256];
- DWORD status;
- wLanguage[0] = 0;
-
- RegCreateKeyEx(HKEY_CURRENT_USER, "Environment", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status);
- if(key)
- {
- UTF8toUTF16Buffer(code, wLanguage, sizeof(wLanguage) / sizeof(uint16));
- RegSetValueExW(key, L"ECERE_LANGUAGE", 0, REG_EXPAND_SZ, (byte *)wLanguage, (uint)(wcslen(wLanguage)+1) * 2);
- RegCloseKey(key);
- }
- }
-#endif
+ setEcereLanguageInWinRegEnvironment(code);
if(eClass_IsDerived(app._class, class(GuiApplication)))
{
delete command;
return restart;
}
+#endif
private:
-import "ide"
+import "ecere"
#ifdef __WIN32__
static bool CALLBACK EnumWindowsBringToTop(HWND hwnd, LPARAM lParam)
return pid;
#endif
}
+
+void setEcereLanguageInWinRegEnvironment(const char * languageCode)
+{
+#ifdef __WIN32__
+ HKEY key = null;
+ uint16 wLanguage[256];
+ DWORD status;
+ wLanguage[0] = 0;
+
+ RegCreateKeyEx(HKEY_CURRENT_USER, "Environment", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, null, &key, &status);
+ if(key)
+ {
+ UTF8toUTF16Buffer(languageCode, wLanguage, sizeof(wLanguage) / sizeof(uint16));
+ RegSetValueExW(key, L"ECERE_LANGUAGE", 0, REG_EXPAND_SZ, (byte *)wLanguage, (uint)(wcslen(wLanguage)+1) * 2);
+ RegCloseKey(key);
+ }
+#endif
+}
import "DynamicString"
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
import "ide"
// We should have the .sln/.vcproj generation even on other platforms
// e.g. detect from an environment variable pointing to a Windows drive
void OnLoad(GlobalSettingsData data)
{
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
IDESettings settings = (IDESettings)data;
globalSettingsDialog.ideSettings = settings;
ide.updateRecentMenus();
}
};
-#ifdef MAKEFILE_GENERATOR
+#if defined(ECERE_DOCUMENTOR) || defined(ECERE_EPJ2MAKE)
CompilerConfig defaultCompiler;
#endif
CompilerConfig GetCompilerConfig()
{
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
CompilerConfig compiler = null;
if(ide && ide.workspace)
compiler = ideSettings.GetCompilerConfig(ide.workspace.activeCompiler);
int GetBitDepth()
{
-#ifdef MAKEFILE_GENERATOR
- return 0; // todo: improve this somehow? add bit depth command line option?
-#else
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
return ide.workspace ? ide.workspace.bitDepth : 0;
+#else
+ return 0; // todo: improve this somehow? add bit depth command line option?
#endif
}
Map<String, Map<String, NameCollisionInfo>> configsNameCollisions { };
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
FileMonitor fileMonitor
{
this, FileChange { modified = true };
bool GetConfigIsInActiveDebugSession(ProjectConfig config)
{
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
return ide.project == this && ide.debugger && ide.debugger.prjConfig == config && ide.debugger.isActive;
#else
return false;
bool GetConfigIsInDebugSession(ProjectConfig config)
{
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
return ide.project == this && ide.debugger && ide.debugger.prjConfig == config && ide.debugger.isPrepared;
#else
return false;
void SetPath(bool projectsDirs, CompilerConfig compiler, ProjectConfig config, int bitDepth)
{
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
ide.SetPath(projectsDirs, compiler, config, bitDepth);
#endif
}
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
bool Save(const char * fileName)
{
File f;
sprintf(string, "%s%s%s.Makefile", projectName, config ? "-" : "", config ? config.name : "");
}
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
ProjectNode GetObjectFileNode(const char * filePath, const char * objectFileExt)
{
ProjectNode node = null;
return project;
}
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
static GccVersionInfo GetGccVersionInfo(CompilerConfig compiler, const String compilerCommand)
{
GccVersionInfo result = unknown;
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
import "ide"
#endif
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
import "ide"
#else
#ifdef ECERE_STATIC
import "Project"
static define app = ((GuiApplication)__thisModule);
-#endif // #ifndef MAKEFILE_GENERATOR
+#endif
#define OPTION(x) ((uint)(uintptr)(&((ProjectOptions)0).x))
static void OutputLog(const char * string)
{
-#ifdef MAKEFILE_GENERATOR
- printf("%s", string);
-#else
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
ide.outputView.buildBox.Log(string);
-#endif // #ifdef MAKEFILE_GENERATOR
+#else
+ printf("%s", string);
+#endif
}
bool eString_PathInsideOfMore(const char * path, const char * of, char * pathRest)
return node;
}
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
void OnDisplay(Surface surface, int x, int y, int width, ProjectView projectView, Alignment alignment, DataDisplayFlags displayFlags)
{
char label[MAX_FILENAME];
}
}
}
-#endif // #ifndef MAKEFILE_GENERATOR
+#endif
int OnCompare(ProjectNode b)
{