ultimatepp/uppsrc/ide/Builders/Build.h
Mirek Fidler 34ff691308 sizeof(wchar) is changed to 4 (32 bits) to support non BMP unicode characters
This might bring some incompatibilities in the code that expects wchar to be 16 bit, which
  escpecially involves dealing with Win32 (and to lesser extend MacOS) APIs, so if your application
  is doing that, please check all instances of WCHAR (UniChar on MacOS) or even wchar
  especially type casts.

  To support host APIs, char16 is introduced (but there is no 16-bit String varian).

  Use ToSystemCharsetW, FromSystemCharsetW to convert texts to Win32 API.

- Support of drawing non-BMP characters in GUI
- Vastly improved character font replacement code (when drawing characters missing with requested font, replacement font is used)
- Last instances of Win32 ANSI calls (those ending with A) are removed
- UTF handling routines are refactored and their's naming is unified
- RTF is now being able to handle non-BMP characters (RTF is used as clipboard format for RichText)

Other minor changes:

- fixed TryRealloc issue
- improved MemoryCheck
- Removed MemoryAlloc48/MemoryFree48
- In theide Background parsing should less often cause delays in the main thread
2021-12-02 12:03:19 +01:00

103 lines
No EOL
3.5 KiB
C++

struct PackageMode : Moveable<PackageMode> {
int debug;
int blitz;
void Serialize(Stream& s) { s / debug / blitz / blitz; }
PackageMode() { debug = blitz = Null; }
};
struct TargetMode {
bool target_override;
String target;
int linkmode;
bool createmap;
String version;
PackageMode def;
VectorMap<String, PackageMode> package;
void Serialize(Stream& s);
TargetMode() { def.debug = def.blitz = 0; target_override = false; linkmode = 0; createmap = false; }
};
String NoCr(const char *s);
int CharFilterSlash(int c);
String GetDefaultMethod();
VectorMap<String, String> GetMethodVars(const String& method);
class MakeBuild {
public:
virtual void ConsoleShow() = 0; // ShowConsole(); console.Sync();
virtual void ConsoleSync() = 0; // console.Sync()
virtual void ConsoleClear() = 0;
virtual void SetupDefaultMethod() = 0;
virtual Vector<String> PickErrors() = 0; //console.PickErrors()
virtual void BeginBuilding(bool clear_console) = 0;
virtual void EndBuilding(bool ok) = 0;
virtual void ClearErrorEditor() = 0;
virtual void DoProcessEvents() = 0;
virtual void ReQualifyCodeBase() = 0;
virtual void SetErrorEditor() = 0;
virtual String GetMain() = 0;
struct TransferFileInfo
{
String sourcepath;
int filetime;
int filesize;
};
ArrayMap<String, TransferFileInfo> transferfilecache;
String method;
int targetmode;
TargetMode debug;
TargetMode release;
String cmdout;
String target;
String onefile;
bool stoponerrors;
bool use_target;
String mainconfigparam;
String add_includes;
String main_conf;
Index<String> cfg;
FileTime start_time;
bool makefile_svn_revision = true;
void CreateHost(Host& host, bool darkmode = false, bool disable_uhd = false);
const TargetMode& GetTargetMode();
Index<String> PackageConfig(const Workspace& wspc, int package, const VectorMap<String, String>& bm,
String mainparam, Host& host, Builder& b, String *target = NULL);
One<Builder> CreateBuilder(Host *host);
String OutDir(const Index<String>& cfg, const String& package,
const VectorMap<String, String>& bm, bool use_target = false);
void PkgConfig(const Workspace& wspc, const Index<String>& config, Index<String>& pkg_config);
bool BuildPackage(const Workspace& wspc, int pkindex, int pknumber, int pkcount,
String mainparam, String outfile, Vector<String>& linkfile, Vector<String>& immfile,
String& linkopt, bool link = false);
void SetHdependDirs();
Vector<String> GetAllUses(const Workspace& wspc, int f, const VectorMap<String, String>& bm,
String mainparam, Host& host, Builder& builder);
Vector<String> GetAllLibraries(const Workspace& wspc, int index,
const VectorMap<String, String>& bm, String mainparam,
Host& host, Builder& builder);
void BuildWorkspace(Workspace& wspc, Host& host, Builder& builder);
bool Build(const Workspace& wspc, String mainparam, String outfile, bool clear_console = true);
bool Build();
void CleanPackage(const Workspace& wspc, int package);
void Clean();
void RebuildAll();
void SaveMakeFile(const String& fn, bool exporting);
void SaveCCJ(const String& fn, bool exporting);
MakeBuild();
private:
static String GetInvalidBuildMethodError(const String& method);
};
extern bool output_per_assembly;