Merge HXProject defaults and exclude architectures at end
This commit is contained in:
@@ -19,6 +19,7 @@ import lime.tools.IconHelper;
|
||||
import lime.tools.JavaHelper;
|
||||
import lime.tools.NekoHelper;
|
||||
import lime.tools.NodeJSHelper;
|
||||
import lime.tools.Orientation;
|
||||
import lime.tools.Platform;
|
||||
import lime.tools.PlatformTarget;
|
||||
import lime.tools.ProjectHelper;
|
||||
@@ -38,6 +39,82 @@ class MacPlatform extends PlatformTarget
|
||||
{
|
||||
super(command, _project, targetFlags);
|
||||
|
||||
var defaults = new HXProject();
|
||||
|
||||
defaults.meta = {
|
||||
title: "MyApplication",
|
||||
description: "",
|
||||
packageName: "com.example.myapp",
|
||||
version: "1.0.0",
|
||||
company: "",
|
||||
companyUrl: "",
|
||||
buildNumber: null,
|
||||
companyId: ""
|
||||
};
|
||||
|
||||
defaults.app =
|
||||
{
|
||||
main: "Main",
|
||||
file: "MyApplication",
|
||||
path: "bin",
|
||||
preloader: "",
|
||||
swfVersion: 17,
|
||||
url: "",
|
||||
init: null
|
||||
};
|
||||
|
||||
defaults.window =
|
||||
{
|
||||
width: 800,
|
||||
height: 600,
|
||||
parameters: "{}",
|
||||
background: 0xFFFFFF,
|
||||
fps: 30,
|
||||
hardware: true,
|
||||
display: 0,
|
||||
resizable: true,
|
||||
borderless: false,
|
||||
orientation: Orientation.AUTO,
|
||||
vsync: false,
|
||||
fullscreen: false,
|
||||
allowHighDPI: true,
|
||||
alwaysOnTop: false,
|
||||
antialiasing: 0,
|
||||
allowShaders: true,
|
||||
requireShaders: false,
|
||||
depthBuffer: true,
|
||||
stencilBuffer: true,
|
||||
colorDepth: 32,
|
||||
maximized: false,
|
||||
minimized: false,
|
||||
hidden: false,
|
||||
title: ""
|
||||
};
|
||||
|
||||
switch (System.hostArchitecture)
|
||||
{
|
||||
case ARMV6: defaults.architectures = [ARMV6];
|
||||
case ARMV7: defaults.architectures = [ARMV7];
|
||||
case X86: defaults.architectures = [X86];
|
||||
case X64: defaults.architectures = [X64];
|
||||
default: defaults.architectures = [];
|
||||
}
|
||||
|
||||
defaults.window.allowHighDPI = false;
|
||||
|
||||
for (i in 1...project.windows.length)
|
||||
{
|
||||
defaults.windows.push(defaults.window);
|
||||
}
|
||||
|
||||
defaults.merge(project);
|
||||
project = defaults;
|
||||
|
||||
for (excludeArchitecture in project.excludeArchitectures)
|
||||
{
|
||||
project.architectures.remove(excludeArchitecture);
|
||||
}
|
||||
|
||||
for (architecture in project.architectures)
|
||||
{
|
||||
if (architecture == Architecture.X64)
|
||||
|
||||
Reference in New Issue
Block a user