Merge pull request #1661 from tobil4sk/mingw-fixes-develop
Allow cross compiling Windows projects with MinGW
This commit is contained in:
@@ -138,7 +138,7 @@ class WindowsPlatform extends PlatformTarget
|
||||
{
|
||||
targetType = "winjs";
|
||||
}
|
||||
else if (project.targetFlags.exists("neko") || project.target != cast System.hostPlatform)
|
||||
else if (project.targetFlags.exists("neko"))
|
||||
{
|
||||
targetType = "neko";
|
||||
}
|
||||
@@ -496,6 +496,24 @@ class WindowsPlatform extends PlatformTarget
|
||||
CPPHelper.compile(project, targetDirectory + "/obj", flags);
|
||||
|
||||
System.copyFile(targetDirectory + "/obj/ApplicationMain" + (project.debug ? "-debug" : "") + ".exe", executablePath);
|
||||
|
||||
if (project.targetFlags.exists("mingw"))
|
||||
{
|
||||
var libraries = ["libwinpthread-1.dll", "libstdc++-6.dll"];
|
||||
if (is64)
|
||||
{
|
||||
libraries.push("libgcc_s_seh-1.dll");
|
||||
}
|
||||
else
|
||||
{
|
||||
libraries.push("libgcc_s_dw2-1.dll");
|
||||
}
|
||||
|
||||
for (library in libraries)
|
||||
{
|
||||
System.copyIfNewer(targetDirectory + "/obj/" + library, Path.combine(applicationDirectory, library));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user