[build] up haxe dependencies
This commit is contained in:
@@ -1,23 +1,14 @@
|
|||||||
const AdobeAir = require('../tasks/adobeAir');
|
const AdobeAir = require('../tasks/adobeAir');
|
||||||
const Haxe = require('../tasks/haxe');
|
const Haxe = require('../tasks/haxe');
|
||||||
const FlashPlayer = require('../tasks/flashplayer');
|
const FlashPlayer = require('../tasks/flashplayer');
|
||||||
|
const packageInfo = require('../package.json');
|
||||||
const packages = [
|
|
||||||
{name:'openfl', version:'6.5.3'},
|
|
||||||
{name:'lime', version:'5.9.1'},
|
|
||||||
{name:'promhx', version:'1.1.0'},
|
|
||||||
{name:'protohx', version:'0.4.6'},
|
|
||||||
{name:'yaml', version:'1.3.0'},
|
|
||||||
{name:'haxework', git:'git@bitbucket.org:shmyga/haxework.git'},
|
|
||||||
{name:'orm', version:'2.1.0'},
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
const prepareOne = (value) => {
|
const prepareOne = (value) => {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case Haxe.ID:
|
case Haxe.ID:
|
||||||
const haxe = new Haxe();
|
const haxe = new Haxe();
|
||||||
return haxe.prepare().then(() => haxe.install(packages));
|
return haxe.prepare().then(() => haxe.install(packageInfo.haxeDependencies));
|
||||||
case AdobeAir.ID:
|
case AdobeAir.ID:
|
||||||
return new AdobeAir().prepare();
|
return new AdobeAir().prepare();
|
||||||
case FlashPlayer.ID:
|
case FlashPlayer.ID:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ user = 'holop'
|
|||||||
|
|
||||||
# git
|
# git
|
||||||
set :application, app
|
set :application, app
|
||||||
set :repo_url, "git@bitbucket.org:shmyga/#{app}.git"
|
set :repo_url, "git@bitbucket.org:infernalgames/#{app}.git"
|
||||||
set :user, user
|
set :user, user
|
||||||
set :deploy_to, "/home/#{user}/repo/#{app}"
|
set :deploy_to, "/home/#{user}/repo/#{app}"
|
||||||
|
|
||||||
|
|||||||
@@ -26,5 +26,14 @@
|
|||||||
"unzip-stream": "^0.2.1",
|
"unzip-stream": "^0.2.1",
|
||||||
"vinyl-fs": "^3.0.1",
|
"vinyl-fs": "^3.0.1",
|
||||||
"yargs": "^10.0.3"
|
"yargs": "^10.0.3"
|
||||||
|
},
|
||||||
|
"haxeDependencies": {
|
||||||
|
"lime": "6.0.1",
|
||||||
|
"openfl": "7.0.0",
|
||||||
|
"promhx": "1.1.0",
|
||||||
|
"protohx": "0.4.6",
|
||||||
|
"yaml": "1.3.0",
|
||||||
|
"haxework": "git@bitbucket.org:shmyga/haxework.git",
|
||||||
|
"orm": "2.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,12 @@
|
|||||||
<source path="src/client/haxe"/>
|
<source path="src/client/haxe"/>
|
||||||
<source path="src-gen/haxe"/>
|
<source path="src-gen/haxe"/>
|
||||||
<assets path="src/client/resources" rename="resources" include="*"/>
|
<assets path="src/client/resources" rename="resources" include="*"/>
|
||||||
<haxelib name="openfl"/>
|
<haxelib name="lime" version="6.0.1"/>
|
||||||
<haxelib name="protohx"/>
|
<haxelib name="openfl" version="7.0.0"/>
|
||||||
|
<haxelib name="promhx" version="1.1.0"/>
|
||||||
|
<haxelib name="protohx" version="0.4.6"/>
|
||||||
<haxelib name="haxework" version="git"/>
|
<haxelib name="haxework" version="git"/>
|
||||||
<haxelib name="yaml"/>
|
<haxelib name="yaml" version="1.3.0"/>
|
||||||
<!--<window width="760" height="600"/>-->
|
<!--<window width="760" height="600"/>-->
|
||||||
<haxeflag name="-D" value="swf-gpu"/>
|
<haxeflag name="-D" value="swf-gpu"/>
|
||||||
<haxeflag name="-D" value="native-trace"/>
|
<haxeflag name="-D" value="native-trace"/>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class Client implements IConnectionHandler {
|
|||||||
Provider.set(IConnection, new ru.m.connect.js.JsConnection("localhost", 5001));
|
Provider.set(IConnection, new ru.m.connect.js.JsConnection("localhost", 5001));
|
||||||
#end
|
#end
|
||||||
|
|
||||||
Provider.get(IConnection).handler.addListener(this);
|
//Provider.get(IConnection).handler.addListener(this);
|
||||||
|
|
||||||
view = new MainView();
|
view = new MainView();
|
||||||
Provider.set(IFrameSwitcher, view.switcher);
|
Provider.set(IFrameSwitcher, view.switcher);
|
||||||
|
|||||||
@@ -76,6 +76,11 @@ class Haxe extends Sdk {
|
|||||||
return this.haxelib(args);
|
return this.haxelib(args);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!Array.isArray(packages)) {
|
||||||
|
packages = Object.entries(packages).map(([k, v]) => ({name: k, version: v}));
|
||||||
|
}
|
||||||
|
console.log('packages', packages);
|
||||||
|
|
||||||
for (let pack of packages) {
|
for (let pack of packages) {
|
||||||
const args = [];
|
const args = [];
|
||||||
let version = null;
|
let version = null;
|
||||||
@@ -83,6 +88,11 @@ class Haxe extends Sdk {
|
|||||||
args.push('install', pack);
|
args.push('install', pack);
|
||||||
} else if (typeof pack === 'object') {
|
} else if (typeof pack === 'object') {
|
||||||
version = pack.version;
|
version = pack.version;
|
||||||
|
console.log('z', version.substr(0, 3));
|
||||||
|
if (version.substr(0, 3) === 'git') {
|
||||||
|
pack.git = version;
|
||||||
|
version = null;
|
||||||
|
}
|
||||||
if (pack.git) {
|
if (pack.git) {
|
||||||
args.push('git', pack.name, pack.git);
|
args.push('git', pack.name, pack.git);
|
||||||
if (pack.branch) args.push(pack.branch);
|
if (pack.branch) args.push(pack.branch);
|
||||||
@@ -93,7 +103,12 @@ class Haxe extends Sdk {
|
|||||||
args.push('--always');
|
args.push('--always');
|
||||||
}
|
}
|
||||||
let path = `${this.path}/lib/${args[1]}`;
|
let path = `${this.path}/lib/${args[1]}`;
|
||||||
if (version) path += `/${version.replace(/\./g, ',')}`;
|
if (version) {
|
||||||
|
path += `/${version.replace(/\./g, ',')}`;
|
||||||
|
} else if (pack.git) {
|
||||||
|
path += '/git';
|
||||||
|
}
|
||||||
|
console.log('p', path);
|
||||||
if (!fs.existsSync(path)) {
|
if (!fs.existsSync(path)) {
|
||||||
promise = promise.then(next(args));
|
promise = promise.then(next(args));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user