Compare commits

...

4 Commits

Author SHA1 Message Date
Joseph Cloutier
4b3baea57e Merge branch 'develop' into cppia 2023-04-19 00:33:05 -04:00
Joseph Cloutier
b9375d99e1 Fix reference to deleted class. 2023-04-18 17:58:56 -04:00
Joseph Cloutier
f38d397d0a Merge branch 'develop' into cppia 2023-04-18 17:48:33 -04:00
Valentin Lemière
7de57c29c1 Add cppia subtarget, still missing host rebuild 2016-08-21 18:33:16 +02:00
9 changed files with 57 additions and 5 deletions

1
.gitignore vendored
View File

@@ -12,6 +12,7 @@ ndll/*/*.lib
ndll/*/hl*
ndll/*/*.dll
templates/bin/hl/*
templates/cppia/bin/*
project/all_objs
project/obj
project/vc*.pdb

View File

View File

@@ -2,4 +2,5 @@
-cp ::OUTPUT_DIR::/haxe
-cppia ::CPPIA_FILE::
--macro keep("::APP_MAIN::")
-debug
-debug
-D cppia

View File

@@ -2,4 +2,5 @@
-cp ::OUTPUT_DIR::/haxe
-cppia ::CPPIA_FILE::
--macro keep("::APP_MAIN::")
-D final
-D final
-D cppia

View File

@@ -1,4 +1,5 @@
-main ApplicationMain ::HAXE_FLAGS::
-cp ::OUTPUT_DIR::/haxe
-cppia ::CPPIA_FILE::
--macro keep("::APP_MAIN::")
--macro keep("::APP_MAIN::")
-D cppia

View File

@@ -938,7 +938,7 @@ class CommandLineTools
Log.println(" \x1b[1mcs\x1b[0m -- Alias for host platform (using \x1b[1m-cs\x1b[0m)");
Log.println(" \x1b[1mhl/hashlink\x1b[0m -- Alias for host platform (using \x1b[1m-hl\x1b[0m)");
#if (lime >= "7.6.0")
// Log.println(" \x1b[1mcppia\x1b[0m -- Alias for host platform (using \x1b[1m-cppia\x1b[0m)");
Log.println(" \x1b[1mcppia\x1b[0m -- Alias for host platform (using \x1b[1m-cppia\x1b[0m)");
#end
Log.println(" \x1b[1muwp\x1b[0;3m/\x1b[0m\x1b[1mwinjs\x1b[0m -- Alias for \x1b[1mwindows -uwp\x1b[0m");
// Log.println (" \x1b[1miphone\x1b[0;3m/\x1b[0m\x1b[1miphoneos\x1b[0m -- \x1b[1mios\x1b[0m");
@@ -1052,7 +1052,7 @@ class CommandLineTools
Log.println(" \x1b[3m(windows|mac|linux)\x1b[0m \x1b[1m-cs\x1b[0m -- Build for C# instead of C++");
Log.println(" \x1b[3m(windows|mac|linux)\x1b[0m \x1b[1m-hl\x1b[0m -- Build for HashLink instead of C++");
#if (lime >= "7.6.0")
// Log.println(" \x1b[3m(windows|mac|linux)\x1b[0m \x1b[1m-cppia\x1b[0m -- Build for CPPIA instead of C++");
Log.println(" \x1b[3m(windows|mac|linux)\x1b[0m \x1b[1m-cppia\x1b[0m -- Build for CPPIA instead of C++");
#end
Log.println(" \x1b[3m(windows)\x1b[0m \x1b[1m-winjs\x1b[0m -- Build for WinJS instead of C++ (implies UWP)");
Log.println(" \x1b[3m(windows)\x1b[0m \x1b[1m-uwp\x1b[0m -- Build for Universal Windows Platform");

View File

@@ -149,6 +149,10 @@ class LinuxPlatform extends PlatformTarget
{
targetType = "nodejs";
}
else if (project.targetFlags.exists("cppia"))
{
targetType = "cppia";
}
else if (project.targetFlags.exists("java"))
{
targetType = "java";
@@ -229,6 +233,12 @@ class LinuxPlatform extends PlatformTarget
// NekoHelper.createExecutable (project.templatePaths, "linux" + (is64 ? "64" : ""), targetDirectory + "/obj/ApplicationMain.n", executablePath);
// NekoHelper.copyLibraries (project.templatePaths, "linux" + (is64 ? "64" : ""), applicationDirectory);
}
else if (targetType == "cppia")
{
System.runCommand("", "haxe", [hxml]);
if (noOutput) return;
}
else if (targetType == "java")
{
var libPath = Path.combine(Haxelib.getPath(new Haxelib("lime")), "templates/java/lib/");
@@ -506,6 +516,12 @@ class LinuxPlatform extends PlatformTarget
{
ProjectHelper.recursiveSmartCopyTemplate(project, "cpp/static", targetDirectory + "/obj", context);
}
if (targetType == "cppia")
{
System.copyFileTemplate(project.templatePaths, "cppia/bin/host-linux" + (is64 ? "64" : ""), executablePath);
System.copyFileTemplate(project.templatePaths, "cppia/bin/export_classes.info", targetDirectory + "/haxe/export_classes.info");
}
// context.HAS_ICON = IconHelper.createIcon (project.icons, 256, 256, Path.combine (applicationDirectory, "icon.png"));
for (asset in project.assets)

View File

@@ -147,6 +147,10 @@ class MacPlatform extends PlatformTarget
{
targetType = "nodejs";
}
else if (project.targetFlags.exists("cppia"))
{
targetType = "cppia";
}
else if (project.targetFlags.exists("cs"))
{
targetType = "cs";
@@ -245,6 +249,12 @@ class MacPlatform extends PlatformTarget
// NekoHelper.createExecutable (project.templatePaths, "Mac" + (is64 ? "64" : ""), targetDirectory + "/obj/ApplicationMain.n", executablePath);
// NekoHelper.copyLibraries (project.templatePaths, "Mac" + (is64 ? "64" : ""), executableDirectory);
}
else if (targetType == "cppia")
{
System.runCommand("", "haxe", [hxml]);
if (noOutput) return;
}
else if (targetType == "cs")
{
System.runCommand("", "haxe", [hxml]);
@@ -475,6 +485,12 @@ class MacPlatform extends PlatformTarget
{
ProjectHelper.recursiveSmartCopyTemplate(project, "cpp/static", targetDirectory + "/obj", context);
}
if (targetType == "cppia")
{
System.copyFileTemplate(project.templatePaths, "cppia/bin/host-mac" + (is64 ? "64" : ""), executablePath);
System.copyFileTemplate(project.templatePaths, "cppia/bin/export_classes.info", targetDirectory + "/haxe/export_classes.info");
}
System.copyFileTemplate(project.templatePaths, "mac/Info.plist", targetDirectory + "/bin/" + project.app.file + ".app/Contents/Info.plist", context);
System.copyFileTemplate(project.templatePaths, "mac/Entitlements.plist",

View File

@@ -156,6 +156,10 @@ class WindowsPlatform extends PlatformTarget
{
targetType = "nodejs";
}
else if (project.targetFlags.exists("cppia"))
{
targetType = "cppia";
}
else if (project.targetFlags.exists("cs"))
{
targetType = "cs";
@@ -367,6 +371,12 @@ class WindowsPlatform extends PlatformTarget
// NekoHelper.createExecutable (project.templatePaths, "windows" + (is64 ? "64" : ""), targetDirectory + "/obj/ApplicationMain.n", executablePath);
// NekoHelper.copyLibraries (project.templatePaths, "windows" + (is64 ? "64" : ""), applicationDirectory);
}
else if (targetType == "cppia")
{
System.runCommand("", "haxe", [hxml]);
if (noOutput) return;
}
else if (targetType == "cs")
{
System.runCommand("", "haxe", [hxml]);
@@ -879,6 +889,12 @@ class WindowsPlatform extends PlatformTarget
{
ProjectHelper.recursiveSmartCopyTemplate(project, "cpp/static", targetDirectory + "/obj", context);
}
if (targetType == "cppia")
{
System.copyFileTemplate(project.templatePaths, "cppia/bin/host-windows", executablePath);
System.copyFileTemplate(project.templatePaths, "cppia/bin/export_classes.info", targetDirectory + "/haxe/export_classes.info");
}
/*if (IconHelper.createIcon (project.icons, 32, 32, Path.combine (applicationDirectory, "icon.png"))) {