Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added neko script build_output.n which installs it as a local haxelib…
… library. Make sure the directory bin exists. Not a perfect build tool. example : neko build_output.n build Then use -D titaniumdesktop in your libraries.
- Loading branch information
Showing
55 changed files
with
173 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.paths | ||
.hxproj | ||
|
||
# from html5 boilerplate - http://html5boilerplate.com/ | ||
# Numerous always-ignore extensions | ||
*.diff | ||
*.err | ||
*.orig | ||
*.log | ||
*.rej | ||
*.swo | ||
*.swp | ||
*.vi | ||
*~ | ||
|
||
# OS or Editor folders | ||
.DS_Store | ||
.cache | ||
.project | ||
.settings | ||
nbproject | ||
thumbs.db | ||
|
||
# Dreamweaver added files | ||
_notes | ||
dwsync.xml | ||
|
||
# Komodo | ||
*.komodoproject | ||
.komodotools | ||
|
||
# Folders to ignore | ||
.hg | ||
.svn | ||
publish | ||
.idea | ||
|
||
# build script local files | ||
build/buildinfo.properties | ||
build/config/buildinfo.properties | ||
|
||
bin/ |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
package ; | ||
|
||
/** | ||
* ... | ||
* @author Skial Bainn | ||
*/ | ||
|
||
import massive.neko.cmd.Command; | ||
import massive.neko.io.FileSys; | ||
import massive.neko.io.File; | ||
import massive.neko.haxelib.Haxelib; | ||
import massive.neko.haxelib.HaxelibTools; | ||
import massive.neko.util.ZipUtil; | ||
import neko.Sys; | ||
|
||
using Arrays; | ||
|
||
class Build extends Command { | ||
|
||
public static var IGNORE:Array<String> = ['builder', 'bin', 'src', '.hg', '.git', 'build_output.n', 'changes.txt', 'readme.txt', 'haXe-titanium desktop.hxproj', '.gitignore', 'example', 'compile.hxml', 'README', 'Main.hx']; | ||
public static var OUTPUT:String = FileSys.getCwd() + 'bin' + File.seperator + 'titaniumdesktop'; | ||
|
||
public function new() { | ||
super(); | ||
} | ||
|
||
override public function initialise():Void { | ||
|
||
} | ||
|
||
override public function execute():Void { | ||
|
||
this.print('working'); | ||
|
||
if (!FileSys.exists(OUTPUT)) { | ||
|
||
this.print('/bin/titaniumdesktop does not exist - creating output directory'); | ||
FileSys.createDirectory(OUTPUT); | ||
|
||
} | ||
|
||
var out:File = File.create(OUTPUT); | ||
var file:File; | ||
|
||
for (n in FileSys.readDirectory(FileSys.getCwd())) { | ||
|
||
if (!IGNORE.exists(n)) { | ||
|
||
//this.print('now copying directory ' + n + ' contents into ' + OUTPUT); | ||
|
||
for (m in FileSys.readDirectory(FileSys.getCwd() + n + File.seperator)) { | ||
|
||
file = File.create(FileSys.getCwd() + n + File.seperator + m); | ||
file.copyInto(out, true); | ||
|
||
} | ||
|
||
} | ||
|
||
} | ||
|
||
this.print('creating haxelib.xml'); | ||
|
||
try { | ||
FileSys.deleteFile(OUTPUT + File.seperator + 'haxelib.xml'); | ||
} catch (e:Dynamic) { | ||
|
||
} | ||
|
||
var haxelib = new Haxelib(File.create(OUTPUT + File.seperator + 'haxelib.xml')); | ||
haxelib.name = 'titaniumdesktop'; | ||
haxelib.url = 'https://github.com/skial/haXe-titanium-desktop'; | ||
haxelib.user = 'skial'; | ||
haxelib.license = 'BSD'; | ||
haxelib.description = 'haXe extern classes for http://www.appcelerator.com/ titanium desktop library.'; | ||
haxelib.version = '0.0.0.0'; | ||
haxelib.versionDescription = 'local test'; | ||
haxelib.save(); | ||
|
||
this.print('creating titaniumdesktop.zip'); | ||
|
||
var zip = File.create(OUTPUT + File.seperator + '..' + File.seperator + 'titaniumdesktop.zip'); | ||
ZipUtil.zipDirectory(zip, out); | ||
|
||
if(neko.Sys.command("haxelib test " + '"' + zip + '"') > 0) { | ||
this.print("This might have failed to install " + zip + " to haxelib. Please check"); | ||
} | ||
|
||
this.print('all done!'); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package ; | ||
|
||
/** | ||
* ... | ||
* @author Skial Bainn | ||
*/ | ||
|
||
import massive.neko.cmd.CommandLineRunner; | ||
|
||
class Main extends CommandLineRunner { | ||
|
||
public static function main() { | ||
var m = new Main(); | ||
} | ||
|
||
public function new() { | ||
|
||
super(); | ||
|
||
this.mapCommand(Build, 'build', ['b'], 'copies all folders into one output folder'); | ||
|
||
this.run(); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-neko ../build_output.n | ||
-main Main | ||
-cp ./ | ||
-lib mlib | ||
-lib thx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters