[all] fixes for windows
This commit is contained in:
59
README.md
Normal file → Executable file
59
README.md
Normal file → Executable file
@@ -8,6 +8,7 @@
|
||||
* Universal project config for simple HaXe build and OpenFL build.
|
||||
* Branch project config for many build presets (many OpenFL apps in one project).
|
||||
* Packaging linux output in DEB.
|
||||
* Packaging windows output in exe install with InnoSetup.
|
||||
* Create html wrapper for flash output.
|
||||
|
||||
### Flaws
|
||||
@@ -15,9 +16,7 @@
|
||||
* Hardcode build output in {projectDir}/target (need param in Project.Config).
|
||||
* HTML5 run output not caught.
|
||||
* Adobe AIR Build System in progress.
|
||||
* Packaging Windows application in progress (with [Inno Setup](http://www.jrsoftware.org/isinfo.php))
|
||||
* OpenFL android build failed due to problems with Android NDK
|
||||
|
||||
* Windows target depends Visual Studio 2017 build tools
|
||||
|
||||
## API
|
||||
|
||||
@@ -60,10 +59,15 @@ create gulp tasks in module:
|
||||
<config.name>:<platform>:test
|
||||
|
||||
<config.name>:flash:html
|
||||
|
||||
<config.name>:linux:archive
|
||||
<config.name>:linux:deb
|
||||
|
||||
<config.name>:windows:archive
|
||||
<config.name>:windows:installer
|
||||
```
|
||||
|
||||
eg: ```gulp app:flash:build```
|
||||
eg: ```gulp app:flash:test```
|
||||
|
||||
## Example
|
||||
|
||||
@@ -75,12 +79,12 @@ eg: ```gulp app:flash:build```
|
||||
"devDependencies": {
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-clean": "^0.4.0",
|
||||
"gulp-haxetool": "^0.0.21"
|
||||
"gulp-haxetool": "^0.1.0"
|
||||
},
|
||||
"haxeDependencies": {
|
||||
"lime": "6.0.1",
|
||||
"openfl": "7.0.0",
|
||||
"hxcpp": "3.4.188"
|
||||
"lime": "7.6.0",
|
||||
"openfl": "8.9.2",
|
||||
"hxcpp": "4.0.19"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -108,7 +112,7 @@ class Main {
|
||||
const gulp = require('gulp');
|
||||
const gulpClean = require('gulp-clean');
|
||||
const packageInfo = require('./package.json');
|
||||
const {Sdk, Haxe, Project} = require('gulp-haxetool');
|
||||
const {System, Sdk, Haxe, Project} = require('gulp-haxetool');
|
||||
|
||||
//Sdk.dir = '/opt/sdk';
|
||||
|
||||
@@ -144,19 +148,38 @@ const project = new Project(
|
||||
Project.Platform.FLASH,
|
||||
Project.Platform.HTML5,
|
||||
Project.Platform.LINUX,
|
||||
Project.Platform.WINDOWS,
|
||||
],
|
||||
config
|
||||
).bind(module);
|
||||
|
||||
module.exports.default = gulp.series(
|
||||
|
||||
const defaultSeries = [
|
||||
exports.clean,
|
||||
exports.install,
|
||||
module.exports['app:flash:build'],
|
||||
module.exports['app:html5:build'],
|
||||
module.exports['app:linux:build'],
|
||||
module.exports['app:flash:html'],
|
||||
module.exports['app:linux:deb'],
|
||||
);
|
||||
module.exports['app:html5:build'],
|
||||
];
|
||||
|
||||
if (System.isLinux) {
|
||||
defaultSeries.push(
|
||||
module.exports['app:linux:build'],
|
||||
module.exports['app:linux:archive'],
|
||||
module.exports['app:linux:deb'],
|
||||
|
||||
module.exports['app:android:build'],
|
||||
);
|
||||
}
|
||||
|
||||
if (System.isWindows) {
|
||||
defaultSeries.push(
|
||||
module.exports['app:windows:build'],
|
||||
module.exports['app:windows:archive'],
|
||||
module.exports['app:windows:installer'],
|
||||
);
|
||||
}
|
||||
|
||||
module.exports.default = gulp.series(defaultSeries);
|
||||
```
|
||||
|
||||
Build for all platforms: `gulp default`
|
||||
@@ -165,6 +188,10 @@ Build app for specific platform: `gulp app:flash:build`
|
||||
|
||||
Build and run flash app in flashplayer: `gulp app:flash:test`
|
||||
|
||||
Build and run html5 app in brpwser: `gulp app:html5:test`
|
||||
Build and run html5 app in browser: `gulp app:html5:test`
|
||||
|
||||
Build and run linux app native: `gulp app:linux:test`
|
||||
|
||||
Build and run windows app native: `gulp app:windows:test`
|
||||
|
||||
Build and run android app: `gulp app:android:test`
|
||||
|
||||
Reference in New Issue
Block a user