diff --git a/.gitignore b/.gitignore index 95a7151..bea3d3c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ .svn haxe/tmp/ +sys/tmp/ report/ bin/ .DS_Store .mcover -/mlib.sublime-workspace \ No newline at end of file +/mlib.sublime-workspace +/sys/.temp/ +/haxe/.temp/ \ No newline at end of file diff --git a/.mlib b/.mlib index 7b4db11..52ccc9a 100644 --- a/.mlib +++ b/.mlib @@ -1,7 +1,7 @@ - + diff --git a/LICENSE.txt b/LICENSE.txt index c4d7a6f..0f7a63a 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2012 Massive Interactive. All rights reserved. +Copyright 2013 Massive Interactive. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index 0981476..2058037 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ mlib provides a lightweight command based structure for rapidly developing comma Mlib includes several haxe and neko src packages: * massive.haxe (cross platform haxe APIs) -* massive.neko (neko specific APIs for file access, command line, haxe and haxelib integration) +* massive.sys (neko specific APIs for file access, command line, haxe and haxelib integration) * massive.mlib (command line tool (mlib) for managing development and deployment of haxelib projects) @@ -26,7 +26,7 @@ Mlib includes several haxe and neko src packages: **Expanded File APIs** -See [massive.neko.io.File](https://github.com/massiveinteractive/MassiveLib/blob/master/neko/src/massive/neko/io/File.hx) +See [massive.sys.io.File](https://github.com/massiveinteractive/MassiveLib/blob/master/sys/src/massive/sys/io/File.hx) * recursive dir copy/move/delete * platform safe resolution of file paths @@ -34,14 +34,14 @@ See [massive.neko.io.File](https://github.com/massiveinteractive/MassiveLib/blob **Simplified access to command line** -See [massive.neko.cmd.Console](https://github.com/massiveinteractive/MassiveLib/blob/master/neko/src/massive/neko/cmd/Console.hx) +See [massive.sys.cmd.Console](https://github.com/massiveinteractive/MassiveLib/blob/master/sys/src/massive/sys/cmd/Console.hx) * separation of raw system arg into arguments ('foo') and options (-foo bar) * automatic detection and updating of working directory when running in haxelib libraries * convenience methods for prompting user input **Command line tool runner** -See [massive.neko.cmd.CommandLineRunner](https://github.com/massiveinteractive/MassiveLib/blob/master/neko/src/massive/neko/cmd/CommandLineRunner.hx) +See [massive.sys.cmd.CommandLineRunner](https://github.com/massiveinteractive/MassiveLib/blob/master/sys/src/massive/sys/cmd/CommandLineRunner.hx) * lightweight interface for mapping command line arguments to Command classes * automatic generation of command line *help* and command and diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index a0e571e..ea8e676 --- a/build.sh +++ b/build.sh @@ -20,7 +20,7 @@ cd haxe haxe build.hxml echo ' build neko src' -cd ../neko +cd ../sys haxe build.hxml cd ../ diff --git a/haxe/build.hxml b/haxe/build.hxml index 6cc6536..f291029 100644 --- a/haxe/build.hxml +++ b/haxe/build.hxml @@ -1,7 +1,7 @@ # Flash 9+ -main massive.haxe.AllClasses -cp src --swf9 ../bin/haxe_all.swf +-swf ../bin/haxe_all.swf --next @@ -9,6 +9,7 @@ -main massive.haxe.AllClasses -cp src -swf ../bin/haxe8_all.swf +-swf-version 8 --next diff --git a/haxe/src/massive/haxe/AllClasses.hx b/haxe/src/massive/haxe/AllClasses.hx index e663c62..5acc818 100644 --- a/haxe/src/massive/haxe/AllClasses.hx +++ b/haxe/src/massive/haxe/AllClasses.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: diff --git a/haxe/src/massive/haxe/Exception.hx b/haxe/src/massive/haxe/Exception.hx index 51fc060..f497203 100644 --- a/haxe/src/massive/haxe/Exception.hx +++ b/haxe/src/massive/haxe/Exception.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: diff --git a/haxe/src/massive/haxe/log/ILogClient.hx b/haxe/src/massive/haxe/log/ILogClient.hx index e0e0bc6..915a740 100644 --- a/haxe/src/massive/haxe/log/ILogClient.hx +++ b/haxe/src/massive/haxe/log/ILogClient.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: diff --git a/haxe/src/massive/haxe/log/Log.hx b/haxe/src/massive/haxe/log/Log.hx index 33b3e3f..a748e63 100644 --- a/haxe/src/massive/haxe/log/Log.hx +++ b/haxe/src/massive/haxe/log/Log.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: diff --git a/haxe/src/massive/haxe/log/LogClient.hx b/haxe/src/massive/haxe/log/LogClient.hx index f4ba7ac..8fda038 100644 --- a/haxe/src/massive/haxe/log/LogClient.hx +++ b/haxe/src/massive/haxe/log/LogClient.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -50,8 +50,8 @@ class LogClient implements ILogClient msg = Std.string(level) + ": " + message; } - #if neko - neko.Lib.println(msg); + #if sys + Sys.println(msg); #else trace(msg); #end diff --git a/haxe/src/massive/haxe/util/ReflectUtil.hx b/haxe/src/massive/haxe/util/ReflectUtil.hx index 7320859..8e0217a 100644 --- a/haxe/src/massive/haxe/util/ReflectUtil.hx +++ b/haxe/src/massive/haxe/util/ReflectUtil.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: diff --git a/haxe/src/massive/haxe/util/RegExpUtil.hx b/haxe/src/massive/haxe/util/RegExpUtil.hx index c817434..a494667 100644 --- a/haxe/src/massive/haxe/util/RegExpUtil.hx +++ b/haxe/src/massive/haxe/util/RegExpUtil.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: diff --git a/haxe/src/massive/haxe/util/TemplateUtil.hx b/haxe/src/massive/haxe/util/TemplateUtil.hx index f3b81ec..150b10e 100644 --- a/haxe/src/massive/haxe/util/TemplateUtil.hx +++ b/haxe/src/massive/haxe/util/TemplateUtil.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: diff --git a/haxe/test.hxml b/haxe/test.hxml index f245053..e758e1d 100644 --- a/haxe/test.hxml +++ b/haxe/test.hxml @@ -3,16 +3,8 @@ -lib munit -cp test -cp src --swf9 ../bin/haxe_test.swf - ---next - -#Flash 8 --main TestMain --lib munit --cp test --cp src --swf ../bin/haxe8_test.swf +-swf ../bin/haxe_test.swf +-swf-version 11 --next diff --git a/haxe/test/TestMain.hx b/haxe/test/TestMain.hx index 2da95d6..ec4bf21 100644 --- a/haxe/test/TestMain.hx +++ b/haxe/test/TestMain.hx @@ -29,7 +29,6 @@ import massive.munit.TestRunner; #if js import js.Lib; -import js.Dom; #end /** @@ -73,8 +72,8 @@ class TestMain flash.external.ExternalInterface.call("testResult", successful); #elseif js js.Lib.eval("testResult(" + successful + ");"); - #elseif neko - neko.Sys.exit(0); + #elseif sys + Sys.exit(0); #end } // if run from outside browser can get error which we can ignore diff --git a/haxelib.xml b/haxelib.xml index a769d0d..5fc0078 100644 --- a/haxelib.xml +++ b/haxelib.xml @@ -4,6 +4,6 @@ - Lightwieght framework for implementing command line driven haxelib (and neko) tools, and for automating the packaging/management of Haxelib libraries. - Fix for HaxeWrapper and hxcpp errors (bug in nekovm) + Lightweight framework for implementing command line driven haxelib (and neko) tools, and for automating the packaging/management of Haxelib libraries. + Updated for Haxe 3. \ No newline at end of file diff --git a/mlib.n b/mlib.n index 843b8ca..ce11c75 100644 Binary files a/mlib.n and b/mlib.n differ diff --git a/neko/build.hxml b/neko/build.hxml deleted file mode 100644 index 8c44654..0000000 --- a/neko/build.hxml +++ /dev/null @@ -1,5 +0,0 @@ -# Neko --main massive.neko.AllClasses --cp src --cp ../haxe/src --neko ../bin/neko_all.n \ No newline at end of file diff --git a/neko/test/TestSuite.hx b/neko/test/TestSuite.hx deleted file mode 100644 index 3611aad..0000000 --- a/neko/test/TestSuite.hx +++ /dev/null @@ -1,31 +0,0 @@ -import massive.munit.TestSuite; - -import ExampleTest; -import massive.neko.cmd.CommandLineRunnerTest; -import massive.neko.cmd.CommandTest; -import massive.neko.cmd.ConsoleTest; -import massive.neko.io.FileTest; -import massive.neko.util.PathUtilTest; -import massive.neko.util.ZipUtilTest; - -/** - * Auto generated Test Suite for MassiveUnit. - * Refer to munit command line tool for more information (haxelib run munit) - */ - -class TestSuite extends massive.munit.TestSuite -{ - - public function new() - { - super(); - - add(ExampleTest); - add(massive.neko.cmd.CommandLineRunnerTest); - add(massive.neko.cmd.CommandTest); - add(massive.neko.cmd.ConsoleTest); - add(massive.neko.io.FileTest); - add(massive.neko.util.PathUtilTest); - add(massive.neko.util.ZipUtilTest); - } -} diff --git a/neko/.munit b/sys/.munit similarity index 75% rename from neko/.munit rename to sys/.munit index e823f12..8ed852d 100644 --- a/neko/.munit +++ b/sys/.munit @@ -1,6 +1,6 @@ version=0.9.5.2 src=test bin=../bin -report=../report/neko +report=../report/sys hxml=test.hxml classPaths=src diff --git a/sys/build.hxml b/sys/build.hxml new file mode 100644 index 0000000..56d48c6 --- /dev/null +++ b/sys/build.hxml @@ -0,0 +1,5 @@ +# Neko +-main massive.sys.AllClasses +-cp src +-cp ../haxe/src +-neko ../bin/sys_all.n \ No newline at end of file diff --git a/neko/src/massive/neko/AllClasses.hx b/sys/src/massive/AllClasses.hx similarity index 80% rename from neko/src/massive/neko/AllClasses.hx rename to sys/src/massive/AllClasses.hx index 57dfffb..32b041f 100644 --- a/neko/src/massive/neko/AllClasses.hx +++ b/sys/src/massive/AllClasses.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,7 +27,7 @@ * ****/ -package massive.neko; +package massive; import massive.neko.cmd.Command; import massive.neko.cmd.CommandLineRunner; @@ -41,6 +41,19 @@ import massive.neko.io.FileException; import massive.neko.io.FileSys; import massive.neko.util.PathUtil; import massive.neko.util.ZipUtil; +import massive.sys.AllClasses; +import massive.sys.cmd.Command; +import massive.sys.cmd.CommandLineRunner; +import massive.sys.cmd.Console; +import massive.sys.cmd.ICommand; +import massive.sys.haxe.HaxeWrapper; +import massive.sys.haxelib.Haxelib; +import massive.sys.haxelib.HaxelibTools; +import massive.sys.io.File; +import massive.sys.io.FileException; +import massive.sys.io.FileSys; +import massive.sys.util.PathUtil; +import massive.sys.util.ZipUtil; @IgnoreCover class AllClasses diff --git a/sys/src/massive/neko/cmd/Command.hx b/sys/src/massive/neko/cmd/Command.hx new file mode 100644 index 0000000..30fa96e --- /dev/null +++ b/sys/src/massive/neko/cmd/Command.hx @@ -0,0 +1,32 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.neko.cmd; + +typedef Command = massive.sys.cmd.Command; diff --git a/sys/src/massive/neko/cmd/CommandLineRunner.hx b/sys/src/massive/neko/cmd/CommandLineRunner.hx new file mode 100644 index 0000000..e823b88 --- /dev/null +++ b/sys/src/massive/neko/cmd/CommandLineRunner.hx @@ -0,0 +1,34 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.neko.cmd; + +typedef CommandLineRunner = massive.sys.cmd.CommandLineRunner; +typedef CommandDef = massive.sys.cmd.CommandLineRunner.CommandDef; + diff --git a/sys/src/massive/neko/cmd/Console.hx b/sys/src/massive/neko/cmd/Console.hx new file mode 100644 index 0000000..c22cadb --- /dev/null +++ b/sys/src/massive/neko/cmd/Console.hx @@ -0,0 +1,32 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.neko.cmd; + +typedef Console = massive.sys.cmd.Console; \ No newline at end of file diff --git a/sys/src/massive/neko/cmd/ICommand.hx b/sys/src/massive/neko/cmd/ICommand.hx new file mode 100644 index 0000000..8383062 --- /dev/null +++ b/sys/src/massive/neko/cmd/ICommand.hx @@ -0,0 +1,33 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.neko.cmd; + +typedef ICommand = massive.sys.cmd.ICommand; +typedef CommandInstance = massive.sys.cmd.ICommand.CommandInstance; diff --git a/sys/src/massive/neko/haxe/HaxeWrapper.hx b/sys/src/massive/neko/haxe/HaxeWrapper.hx new file mode 100644 index 0000000..0d64f49 --- /dev/null +++ b/sys/src/massive/neko/haxe/HaxeWrapper.hx @@ -0,0 +1,32 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.neko.haxe; + +typedef ICommand = massive.sys.haxe.HaxeWrapper; \ No newline at end of file diff --git a/sys/src/massive/neko/haxelib/Haxelib.hx b/sys/src/massive/neko/haxelib/Haxelib.hx new file mode 100644 index 0000000..20ad3e4 --- /dev/null +++ b/sys/src/massive/neko/haxelib/Haxelib.hx @@ -0,0 +1,33 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.neko.haxelib; + +typedef Haxelib = massive.sys.haxelib.Haxelib; +typedef Dependency = massive.sys.haxelib.Haxelib.Dependency; \ No newline at end of file diff --git a/sys/src/massive/neko/haxelib/HaxelibTools.hx b/sys/src/massive/neko/haxelib/HaxelibTools.hx new file mode 100644 index 0000000..9d0a203 --- /dev/null +++ b/sys/src/massive/neko/haxelib/HaxelibTools.hx @@ -0,0 +1,32 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.neko.haxelib; + +typedef HaxelibTools = massive.sys.haxelib.HaxelibTools; diff --git a/sys/src/massive/neko/io/File.hx b/sys/src/massive/neko/io/File.hx new file mode 100644 index 0000000..a10cd5c --- /dev/null +++ b/sys/src/massive/neko/io/File.hx @@ -0,0 +1,33 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.neko.io; + +typedef File = massive.sys.io.File; +typedef FileType = massive.sys.io.File.FileType; \ No newline at end of file diff --git a/sys/src/massive/neko/io/FileException.hx b/sys/src/massive/neko/io/FileException.hx new file mode 100644 index 0000000..5ba2253 --- /dev/null +++ b/sys/src/massive/neko/io/FileException.hx @@ -0,0 +1,32 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.neko.io; + +typedef FileException = massive.sys.io.FileException; diff --git a/sys/src/massive/neko/io/FileSys.hx b/sys/src/massive/neko/io/FileSys.hx new file mode 100644 index 0000000..c0b0714 --- /dev/null +++ b/sys/src/massive/neko/io/FileSys.hx @@ -0,0 +1,32 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.neko.io; + +typedef FileSys = massive.sys.io.FileSys; \ No newline at end of file diff --git a/sys/src/massive/neko/util/PathUtil.hx b/sys/src/massive/neko/util/PathUtil.hx new file mode 100644 index 0000000..c525e08 --- /dev/null +++ b/sys/src/massive/neko/util/PathUtil.hx @@ -0,0 +1,32 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.neko.util; + +typedef PathUtil = massive.sys.util.PathUtil; \ No newline at end of file diff --git a/sys/src/massive/neko/util/ZipUtil.hx b/sys/src/massive/neko/util/ZipUtil.hx new file mode 100644 index 0000000..8f13532 --- /dev/null +++ b/sys/src/massive/neko/util/ZipUtil.hx @@ -0,0 +1,32 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.neko.util; + +typedef ZipUtil = massive.sys.util.ZipUtil; \ No newline at end of file diff --git a/sys/src/massive/sys/AllClasses.hx b/sys/src/massive/sys/AllClasses.hx new file mode 100644 index 0000000..c56c0fb --- /dev/null +++ b/sys/src/massive/sys/AllClasses.hx @@ -0,0 +1,53 @@ +/**** +* Copyright 2013 Massive Interactive. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are +* permitted provided that the following conditions are met: +* +* 1. Redistributions of source code must retain the above copyright notice, this list of +* conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright notice, this list +* of conditions and the following disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* The views and conclusions contained in the software and documentation are those of the +* authors and should not be interpreted as representing official policies, either expressed +* or implied, of Massive Interactive. +* +****/ + +package massive.sys; + +import massive.sys.cmd.Command; +import massive.sys.cmd.CommandLineRunner; +import massive.sys.cmd.Console; +import massive.sys.cmd.ICommand; +import massive.sys.haxe.HaxeWrapper; +import massive.sys.haxelib.Haxelib; +import massive.sys.haxelib.HaxelibTools; +import massive.sys.io.File; +import massive.sys.io.FileException; +import massive.sys.io.FileSys; +import massive.sys.util.PathUtil; +import massive.sys.util.ZipUtil; + +@IgnoreCover +class AllClasses +{ +@IgnoreCover + public static function main():AllClasses {return new AllClasses();} +@IgnoreCover + public function new(){trace('This is a generated main class');} +} + diff --git a/neko/src/massive/neko/cmd/Command.hx b/sys/src/massive/sys/cmd/Command.hx similarity index 93% rename from neko/src/massive/neko/cmd/Command.hx rename to sys/src/massive/sys/cmd/Command.hx index 72e0742..df1cb9d 100644 --- a/neko/src/massive/neko/cmd/Command.hx +++ b/sys/src/massive/sys/cmd/Command.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,11 +27,11 @@ * ****/ -package massive.neko.cmd; +package massive.sys.cmd; -import massive.neko.cmd.Console; +import massive.sys.cmd.Console; import massive.haxe.log.Log; -import massive.neko.cmd.ICommand; +import massive.sys.cmd.ICommand; /** * An abstract base class for Commands * Includes utility me @@ -90,7 +90,7 @@ class Command implements ICommand private function print(message:Dynamic):Void { - neko.Lib.println(Std.string(message)); + Sys.println(Std.string(message)); } private function error(message:Dynamic, ?code:Int=1, ?posInfos:haxe.PosInfos):Void @@ -103,7 +103,7 @@ class Command implements ICommand private function exit(?code:Int=0):Void { - neko.Sys.exit(code); + Sys.exit(code); } } diff --git a/neko/src/massive/neko/cmd/CommandLineRunner.hx b/sys/src/massive/sys/cmd/CommandLineRunner.hx similarity index 94% rename from neko/src/massive/neko/cmd/CommandLineRunner.hx rename to sys/src/massive/sys/cmd/CommandLineRunner.hx index f8bbe35..52c62e3 100644 --- a/neko/src/massive/neko/cmd/CommandLineRunner.hx +++ b/sys/src/massive/sys/cmd/CommandLineRunner.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,20 +27,20 @@ * ****/ -package massive.neko.cmd; +package massive.sys.cmd; -import massive.neko.cmd.ICommand; -import massive.neko.cmd.Command; +import massive.sys.cmd.ICommand; +import massive.sys.cmd.Command; -import neko.FileSystem; +import sys.FileSystem; import massive.haxe.log.Log; -import massive.neko.io.File; -import massive.neko.cmd.Console; +import massive.sys.io.File; +import massive.sys.cmd.Console; import neko.vm.Thread; -import neko.Lib; -import neko.Sys; -import neko.io.Process; +import Sys; +import Sys; +import sys.io.Process; /** * Base class for application @@ -212,7 +212,7 @@ class CommandLineRunner private function print(message:Dynamic):Void { - neko.Lib.println(Std.string(message)); + Sys.println(Std.string(message)); } private function error(message:Dynamic, ?code:Int=1, ?posInfos:haxe.PosInfos):Void @@ -226,7 +226,7 @@ class CommandLineRunner private function exit(?code:Int=0):Void { - neko.Sys.exit(code); + Sys.exit(code); } /** diff --git a/neko/src/massive/neko/cmd/Console.hx b/sys/src/massive/sys/cmd/Console.hx similarity index 91% rename from neko/src/massive/neko/cmd/Console.hx rename to sys/src/massive/sys/cmd/Console.hx index f4717c7..6a9a373 100644 --- a/neko/src/massive/neko/cmd/Console.hx +++ b/sys/src/massive/sys/cmd/Console.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,17 +27,22 @@ * ****/ -package massive.neko.cmd; +package massive.sys.cmd; -import massive.neko.io.File; -import massive.neko.io.FileException; -import massive.neko.io.FileSys; -import neko.FileSystem; +import massive.sys.io.File; +import massive.sys.io.FileException; +import massive.sys.io.FileSys; +import sys.FileSystem; import neko.vm.Thread; -import neko.Lib; +import Sys; import massive.haxe.log.Log; -import neko.io.Process; +import sys.io.Process; +#if haxe3 +import haxe.ds.StringMap; +#else +private typedef StringMap = Hash; +#end /** * Command Line Interface * @@ -67,8 +72,8 @@ class Console public var dir(default, null):File; - /** Hash of all command line arguments starting with a dash (e.g. '-foo bar') **/ - public var options:Hash; + /** Map of all command line arguments starting with a dash (e.g. '-foo bar') **/ + public var options:StringMap; /** Array of all command line arguments not starting with a dash **/ @@ -88,7 +93,7 @@ class Console this.isHaxelib = isHaxelib; originalDir = File.current; - systemArgs = neko.Sys.args().concat([]); + systemArgs = Sys.args().concat([]); Log.debug("systemArgs: " + systemArgs); init(); @@ -98,7 +103,7 @@ class Console { dir = null; args = []; - options = new Hash(); + options = new StringMap(); currentArg = 0; parseArguments(systemArgs); @@ -115,7 +120,7 @@ class Console return systemArgs.concat([]); } /** - * Re-initialisises all arguments from the original neko.Sys.args() + * Re-initialisises all arguments from the original Sys.args() **/ public function flush(?isHaxelib:Bool = true):Void { @@ -187,12 +192,12 @@ class Console * */ public function prompt(promptMsg:String, rpad:Int=0):String { - neko.Lib.print(StringTools.rpad(promptMsg + " ", " ", rpad) + ": "); + Sys.print(StringTools.rpad(promptMsg + " ", " ", rpad) + ": "); #if haxe_209 var str:String = Sys.stdin().readLine(); #else - var str:String = neko.io.File.stdin().readLine(); + var str:String = Sys.stdin().readLine(); #end if(str.length == 0) @@ -262,7 +267,7 @@ class Console dir = originalDir; } - options = new Hash(); + options = new StringMap(); var option:String = null; diff --git a/neko/src/massive/neko/cmd/ICommand.hx b/sys/src/massive/sys/cmd/ICommand.hx similarity index 95% rename from neko/src/massive/neko/cmd/ICommand.hx rename to sys/src/massive/sys/cmd/ICommand.hx index 38a4031..db48634 100644 --- a/neko/src/massive/neko/cmd/ICommand.hx +++ b/sys/src/massive/sys/cmd/ICommand.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,9 +27,9 @@ * ****/ -package massive.neko.cmd; +package massive.sys.cmd; -import massive.neko.cmd.Console; +import massive.sys.cmd.Console; /** * A command represents a single action or task in the system. */ diff --git a/neko/src/massive/neko/haxe/HaxeWrapper.hx b/sys/src/massive/sys/haxe/HaxeWrapper.hx similarity index 93% rename from neko/src/massive/neko/haxe/HaxeWrapper.hx rename to sys/src/massive/sys/haxe/HaxeWrapper.hx index e7ad5c7..b3ea4ed 100644 --- a/neko/src/massive/neko/haxe/HaxeWrapper.hx +++ b/sys/src/massive/sys/haxe/HaxeWrapper.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,15 +27,15 @@ * ****/ -package massive.neko.haxe; +package massive.sys.haxe; -import neko.FileSystem; -import neko.io.File; -import massive.neko.io.File; +import sys.FileSystem; +import sys.io.File; +import massive.sys.io.File; import neko.vm.Thread; -import neko.Lib; -import neko.Sys; -import neko.io.Process; +import Sys; +import Sys; +import sys.io.Process; /** * This is a simple wrapper for running haxe from within neko @@ -110,7 +110,7 @@ class HaxeWrapper var str:String = ""; //str = stderr.readLine(); message = Thread.readMessage(false); - //neko.Lib.println(" " + str); + //Sys.println(" " + str); } catch(e:haxe.io.Eof) { @@ -141,9 +141,9 @@ class HaxeWrapper { str = StringTools.trim(str); - neko.Lib.println(indent + str); + Sys.println(indent + str); - neko.Sys.stdout().flush(); + Sys.stdout().flush(); } static public function convertHXMLStringToArgs(hxml:String):String diff --git a/neko/src/massive/neko/haxelib/Haxelib.hx b/sys/src/massive/sys/haxelib/Haxelib.hx similarity index 96% rename from neko/src/massive/neko/haxelib/Haxelib.hx rename to sys/src/massive/sys/haxelib/Haxelib.hx index d3041f6..ba30a74 100644 --- a/neko/src/massive/neko/haxelib/Haxelib.hx +++ b/sys/src/massive/sys/haxelib/Haxelib.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,10 +27,16 @@ * ****/ -package massive.neko.haxelib; +package massive.sys.haxelib; import haxe.xml.Fast; -import massive.neko.io.File; +import massive.sys.io.File; + +#if haxe3 +import haxe.ds.StringMap; +#else +private typedef StringMap = Hash; +#end class Haxelib { @@ -43,7 +49,7 @@ class Haxelib public var user:String; public var tags:Array; - public var dependencies:Hash; + public var dependencies:StringMap; public var description:String; public var version(get_version, set_version):String; @@ -64,7 +70,7 @@ class Haxelib user = ""; tags = []; - dependencies = new Hash(); + dependencies = new StringMap(); description = ""; versionDescription = ""; diff --git a/neko/src/massive/neko/haxelib/HaxelibTools.hx b/sys/src/massive/sys/haxelib/HaxelibTools.hx similarity index 88% rename from neko/src/massive/neko/haxelib/HaxelibTools.hx rename to sys/src/massive/sys/haxelib/HaxelibTools.hx index 087c29d..b9d8401 100644 --- a/neko/src/massive/neko/haxelib/HaxelibTools.hx +++ b/sys/src/massive/sys/haxelib/HaxelibTools.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,10 +27,10 @@ * ****/ -package massive.neko.haxelib; -import neko.io.Process; -import massive.neko.io.File; -import massive.neko.util.ZipUtil; +package massive.sys.haxelib; +import sys.io.Process; +import massive.sys.io.File; +import massive.sys.util.ZipUtil; import massive.haxe.util.RegExpUtil; class HaxelibTools { @@ -69,7 +69,7 @@ class HaxelibTools if(exitCode > 0) return null; - if(neko.Sys.systemName() == "Windows") + if(Sys.systemName() == "Windows") { path = path.split("/").join("\\"); } @@ -102,19 +102,19 @@ class HaxelibTools public static function installZip(zip:File):Void { - neko.Lib.println("Installing to haxelib..."); + Sys.println("Installing to haxelib..."); - if(neko.Sys.command("haxelib test " + zip) > 0) + if(Sys.command("haxelib test " + zip) > 0) { - throw "Failed to install pacakge to haxelib " + zip; + throw "Failed to install package to haxelib " + zip; } } public static function submit(zip:File):Void { - neko.Lib.println("Submitting to haxelib..."); + Sys.println("Submitting to haxelib..."); - if(neko.Sys.command("haxelib submit " + zip) > 0) + if(Sys.command("haxelib submit " + zip) > 0) { throw "Failed to submit package to haxelib " + zip; } diff --git a/neko/src/massive/neko/io/File.hx b/sys/src/massive/sys/io/File.hx similarity index 89% rename from neko/src/massive/neko/io/File.hx rename to sys/src/massive/sys/io/File.hx index de91ee6..1d624ee 100644 --- a/neko/src/massive/neko/io/File.hx +++ b/sys/src/massive/sys/io/File.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,49 +27,27 @@ * ****/ -/**************************************** **************************************** - * Copyright 2010 Massive Interactive. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Massive Interactive. - */ -package massive.neko.io; +package massive.sys.io; -import neko.io.Path; -import neko.Lib; +import haxe.io.Path; +import Sys; import massive.haxe.log.Log; -import massive.neko.util.PathUtil; +import massive.sys.util.PathUtil; import haxe.PosInfos; +#if haxe3 +import haxe.ds.StringMap; +#else +private typedef StringMap = Hash; +#end class File { public static var seperator(get_seperator, null):String; public static var current(get_current, null):File; private static var tempCount:Int = 0; - private static var temp:Hash = new Hash(); + private static var temp:StringMap = new StringMap(); private static function get_current():File { @@ -181,7 +159,7 @@ class File } } } - temp = new Hash(); + temp = new StringMap(); } /** @@ -190,7 +168,7 @@ class File public var exists(get_exists, null):Bool; /** - * @return true if it is a valid directory path. This is different from neko.FileSystem.isDirectory() that throws error if the path doesn't exist. + * @return true if it is a valid directory path. This is different from sys.FileSystem.isDirectory() that throws error if the path doesn't exist. */ public var isDirectory(get_isDirectory, null):Bool; @@ -742,7 +720,7 @@ class File { if(!targetFile.exists || overwrite == true) { - neko.io.File.copy(file.nativePath, targetFile.nativePath); + sys.io.File.copy(file.nativePath, targetFile.nativePath); } } } @@ -754,7 +732,7 @@ class File if(!targetFile.exists || overwrite == true) { - neko.io.File.copy(nativePath, targetFile.nativePath); + sys.io.File.copy(nativePath, targetFile.nativePath); } } } @@ -845,7 +823,7 @@ class File setInternalPath(raw, FileType.FILE); } - var out = neko.io.File.write(nativePath, binary); + var out = sys.io.File.write(nativePath, binary); out.writeString(Std.string(value)); out.flush(); out.close(); @@ -870,7 +848,7 @@ class File try { - return neko.io.File.getContent(nativePath); + return sys.io.File.getContent(nativePath); } catch(e:Dynamic) { @@ -1003,9 +981,9 @@ class File { switch(type) { - case FileType.DIRECTORY: return path.dir.split(seperator).pop(); - case FileType.FILE: return path.file; - case FileType.UNKNOWN: return path.toString().split(seperator).pop(); + case DIRECTORY: return path.dir.split(seperator).pop(); + case FILE: return path.file; + case UNKNOWN: return path.toString().split(seperator).pop(); } return null; @@ -1014,23 +992,24 @@ class File private function get_fileName():String { - switch(type) + var r = switch(type) { - case FileType.DIRECTORY: return null; - case FileType.FILE: return name + (extension != null ? "." + extension : ""); - case FileType.UNKNOWN: return name; + case DIRECTORY: null; + case FILE: name + (extension != null ? "." + extension : ""); + case UNKNOWN: name; } + return r; } private function get_extension():String { - switch(type) + var r = switch(type) { - - case FileType.FILE: return path.ext; + case FILE: return path.ext; default: return null; } + return r; } private function get_nativePath():String diff --git a/neko/src/massive/neko/io/FileException.hx b/sys/src/massive/sys/io/FileException.hx similarity index 95% rename from neko/src/massive/neko/io/FileException.hx rename to sys/src/massive/sys/io/FileException.hx index 848e82a..67274a7 100644 --- a/neko/src/massive/neko/io/FileException.hx +++ b/sys/src/massive/sys/io/FileException.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,7 +27,7 @@ * ****/ -package massive.neko.io; +package massive.sys.io; import massive.haxe.Exception; import haxe.PosInfos; diff --git a/neko/src/massive/neko/io/FileSys.hx b/sys/src/massive/sys/io/FileSys.hx similarity index 86% rename from neko/src/massive/neko/io/FileSys.hx rename to sys/src/massive/sys/io/FileSys.hx index 20317cb..846c026 100644 --- a/neko/src/massive/neko/io/FileSys.hx +++ b/sys/src/massive/sys/io/FileSys.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,13 +27,13 @@ * ****/ -package massive.neko.io; +package massive.sys.io; #if haxe_209 import sys.FileSystem; import sys.FileStat; #else -import neko.FileSystem; +import sys.FileSystem; #end class FileSys @@ -46,7 +46,7 @@ class FileSys { if(isWindows == null) { - isWindows = neko.Sys.systemName().indexOf("Win") == 0; + isWindows = Sys.systemName().indexOf("Win") == 0; } return isWindows; } @@ -55,7 +55,7 @@ class FileSys { if(isMac == null) { - isMac = neko.Sys.systemName().indexOf("Mac") == 0; + isMac = Sys.systemName().indexOf("Mac") == 0; } return isMac; } @@ -64,7 +64,7 @@ class FileSys { if(isLinux == null) { - isLinux = neko.Sys.systemName().indexOf("Linux") == 0; + isLinux = Sys.systemName().indexOf("Linux") == 0; } return isLinux; } @@ -93,7 +93,7 @@ class FileSys */ public static function getCwd():String { - var path:String = neko.Sys.getCwd(); + var path:String = Sys.getCwd(); if(isWindows) { @@ -113,7 +113,7 @@ class FileSys path = safePath(path); try { - neko.Sys.setCwd(path); + Sys.setCwd(path); } catch(e:Dynamic) { @@ -126,7 +126,7 @@ class FileSys path = safePath(path); try { - return neko.FileSystem.exists(path); + return sys.FileSystem.exists(path); } catch(e:Dynamic) { @@ -140,7 +140,7 @@ class FileSys try { - return neko.FileSystem.isDirectory(path); + return sys.FileSystem.isDirectory(path); } catch(e:Dynamic) { @@ -155,7 +155,7 @@ class FileSys try { - return neko.FileSystem.readDirectory(path); + return sys.FileSystem.readDirectory(path); } catch(e:Dynamic) { @@ -170,7 +170,7 @@ class FileSys try { - neko.FileSystem.createDirectory(path); + sys.FileSystem.createDirectory(path); } catch(e:Dynamic) { @@ -185,7 +185,7 @@ class FileSys try { - neko.FileSystem.deleteDirectory(path); + sys.FileSystem.deleteDirectory(path); } catch(e:Dynamic) { @@ -199,7 +199,7 @@ class FileSys try { - neko.FileSystem.deleteFile(path); + sys.FileSystem.deleteFile(path); } catch(e:Dynamic) { @@ -213,7 +213,7 @@ class FileSys path = safePath(path); try { - return neko.FileSystem.stat(path); + return sys.FileSystem.stat(path); } catch(e:Dynamic) { diff --git a/neko/src/massive/neko/util/PathUtil.hx b/sys/src/massive/sys/util/PathUtil.hx similarity index 94% rename from neko/src/massive/neko/util/PathUtil.hx rename to sys/src/massive/sys/util/PathUtil.hx index b80e7ec..139d6cc 100644 --- a/neko/src/massive/neko/util/PathUtil.hx +++ b/sys/src/massive/sys/util/PathUtil.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,7 +27,7 @@ * ****/ -package massive.neko.util; +package massive.sys.util; class PathUtil { @@ -59,7 +59,7 @@ class PathUtil static public function cleanUpPath(path:String):String { - var seperator:String = neko.Sys.getCwd().indexOf("\\") > 0 ? "\\" : "/"; + var seperator:String = Sys.getCwd().indexOf("\\") > 0 ? "\\" : "/"; if(seperator == "/") { diff --git a/neko/src/massive/neko/util/ZipUtil.hx b/sys/src/massive/sys/util/ZipUtil.hx similarity index 65% rename from neko/src/massive/neko/util/ZipUtil.hx rename to sys/src/massive/sys/util/ZipUtil.hx index cbf2841..b405cc0 100644 --- a/neko/src/massive/neko/util/ZipUtil.hx +++ b/sys/src/massive/sys/util/ZipUtil.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -27,18 +27,22 @@ * ****/ -package massive.neko.util; +package massive.sys.util; -import neko.Lib; -import massive.neko.io.FileSys; -import neko.io.Path; +import massive.sys.io.FileSys; +import haxe.io.Path; +import haxe.io.Bytes; +import massive.sys.io.File; +import sys.FileSystem; +#if haxe3 +import haxe.zip.Reader; +import haxe.zip.Writer; +#else import neko.zip.Reader; import neko.zip.Writer; -import haxe.io.Bytes; - -import massive.neko.io.File; -import neko.FileSystem; +private typedef Entry = neko.zip.Reader.ZipEntry; +#end class ZipUtil { @@ -57,7 +61,7 @@ class ZipUtil var cwd:String = FileSys.getCwd(); // get entries - var entries:Array = convertDirectoryToZipEntries(sourceDir, filter, exclude); + var entries:List = convertDirectoryToZipEntries(sourceDir, filter, exclude); // zip entries if(!file.exists) @@ -65,8 +69,13 @@ class ZipUtil file.writeString(""); } - var zip = neko.io.File.write(file.nativePath, true); - neko.zip.Writer.writeZip(zip, entries, -1); + var zip = sys.io.File.write(file.nativePath, true); + #if haxe3 + var writer = new Writer(zip); + writer.write(entries); + #else + Writer.writeZip(zip, entries, 1); + #end zip.close(); // return to previous working directory @@ -74,22 +83,48 @@ class ZipUtil } - public static function convertDirectoryToZipEntries(dir:File, ?filter:EReg, ?exclude:Bool=false):Array + public static function convertDirectoryToZipEntries(dir:File, ?filter:EReg, ?exclude:Bool=false):List { var files:Array = dir.getRecursiveDirectoryListing(filter, exclude); - var entries:Array = []; + var entries:List = new List(); var date = Date.now(); for (file in files) { - var bytes:Bytes = file.isDirectory ? null: neko.io.File.getBytes(file.nativePath); + var stat = sys.FileSystem.stat(file.nativePath); + + var bytes:Bytes = file.isDirectory ? null: sys.io.File.getBytes(file.nativePath); var name:String = dir.getRelativePath(file) + (file.isDirectory ? File.seperator : ""); - var entry = { fileTime:date, fileName:name, data:bytes }; - //neko.Lib.print("Added " + entry.fileName + "\n"); - entries.push(entry); + #if haxe3 + var entry:Entry = { + fileTime:date, + fileName:name, + fileSize:stat.size, + data:bytes, + dataSize:bytes != null ? bytes.length : 0, + compressed:false, + crc32:0, + extraFields:new List() + } + + #else + var entry:Entry = { + fileName : name, + fileSize : stat.size, + fileTime : date, + compressed : false, + compressedSize : 0, + data : bytes, + crc32 : null + } + #end + + + //Sys.print("Added " + entry.fileName + "\n"); + entries.add(entry); } return entries; diff --git a/neko/test.hxml b/sys/test.hxml similarity index 73% rename from neko/test.hxml rename to sys/test.hxml index 66b4db9..daf577a 100644 --- a/neko/test.hxml +++ b/sys/test.hxml @@ -4,4 +4,4 @@ -cp test -cp src -cp ../haxe/src --neko ../bin/neko_test.n \ No newline at end of file +-neko ../bin/sys_test.n \ No newline at end of file diff --git a/neko/test/ExampleTest.hx b/sys/test/ExampleTest.hx similarity index 100% rename from neko/test/ExampleTest.hx rename to sys/test/ExampleTest.hx diff --git a/neko/test/TestMain.hx b/sys/test/TestMain.hx similarity index 97% rename from neko/test/TestMain.hx rename to sys/test/TestMain.hx index 2da95d6..ec4bf21 100644 --- a/neko/test/TestMain.hx +++ b/sys/test/TestMain.hx @@ -29,7 +29,6 @@ import massive.munit.TestRunner; #if js import js.Lib; -import js.Dom; #end /** @@ -73,8 +72,8 @@ class TestMain flash.external.ExternalInterface.call("testResult", successful); #elseif js js.Lib.eval("testResult(" + successful + ");"); - #elseif neko - neko.Sys.exit(0); + #elseif sys + Sys.exit(0); #end } // if run from outside browser can get error which we can ignore diff --git a/sys/test/TestSuite.hx b/sys/test/TestSuite.hx new file mode 100644 index 0000000..1b11db9 --- /dev/null +++ b/sys/test/TestSuite.hx @@ -0,0 +1,31 @@ +import massive.munit.TestSuite; + +import ExampleTest; +import massive.sys.cmd.CommandLineRunnerTest; +import massive.sys.cmd.CommandTest; +import massive.sys.cmd.ConsoleTest; +import massive.sys.io.FileTest; +import massive.sys.util.PathUtilTest; +import massive.sys.util.ZipUtilTest; + +/** + * Auto generated Test Suite for MassiveUnit. + * Refer to munit command line tool for more information (haxelib run munit) + */ + +class TestSuite extends massive.munit.TestSuite +{ + + public function new() + { + super(); + + add(ExampleTest); + add(massive.sys.cmd.CommandLineRunnerTest); + add(massive.sys.cmd.CommandTest); + add(massive.sys.cmd.ConsoleTest); + add(massive.sys.io.FileTest); + add(massive.sys.util.PathUtilTest); + add(massive.sys.util.ZipUtilTest); + } +} diff --git a/neko/test/massive/neko/cmd/CommandLineRunnerMock.hx b/sys/test/massive/sys/cmd/CommandLineRunnerMock.hx similarity index 87% rename from neko/test/massive/neko/cmd/CommandLineRunnerMock.hx rename to sys/test/massive/sys/cmd/CommandLineRunnerMock.hx index a31669a..5152abc 100644 --- a/neko/test/massive/neko/cmd/CommandLineRunnerMock.hx +++ b/sys/test/massive/sys/cmd/CommandLineRunnerMock.hx @@ -1,8 +1,8 @@ -package massive.neko.cmd; +package massive.sys.cmd; import haxe.PosInfos; -import massive.neko.cmd.CommandLineRunner; -import massive.neko.cmd.Console; +import massive.sys.cmd.CommandLineRunner; +import massive.sys.cmd.Console; class CommandLineRunnerMock extends CommandLineRunner { diff --git a/neko/test/massive/neko/cmd/CommandLineRunnerTest.hx b/sys/test/massive/sys/cmd/CommandLineRunnerTest.hx similarity index 97% rename from neko/test/massive/neko/cmd/CommandLineRunnerTest.hx rename to sys/test/massive/sys/cmd/CommandLineRunnerTest.hx index 1500c15..18cd7b3 100644 --- a/neko/test/massive/neko/cmd/CommandLineRunnerTest.hx +++ b/sys/test/massive/sys/cmd/CommandLineRunnerTest.hx @@ -1,12 +1,12 @@ -package massive.neko.cmd; +package massive.sys.cmd; import massive.munit.Assert; -import massive.neko.cmd.CommandLineRunner; -import massive.neko.cmd.CommandMock; +import massive.sys.cmd.CommandLineRunner; +import massive.sys.cmd.CommandMock; import massive.haxe.log.Log; -import massive.neko.cmd.Console; -import massive.neko.cmd.ConsoleMock; +import massive.sys.cmd.Console; +import massive.sys.cmd.ConsoleMock; class CommandLineRunnerTest { diff --git a/neko/test/massive/neko/cmd/CommandMock.hx b/sys/test/massive/sys/cmd/CommandMock.hx similarity index 94% rename from neko/test/massive/neko/cmd/CommandMock.hx rename to sys/test/massive/sys/cmd/CommandMock.hx index c6b1ea1..db7c444 100644 --- a/neko/test/massive/neko/cmd/CommandMock.hx +++ b/sys/test/massive/sys/cmd/CommandMock.hx @@ -1,4 +1,4 @@ -package massive.neko.cmd; +package massive.sys.cmd; import haxe.PosInfos; diff --git a/neko/test/massive/neko/cmd/CommandTest.hx b/sys/test/massive/sys/cmd/CommandTest.hx similarity index 98% rename from neko/test/massive/neko/cmd/CommandTest.hx rename to sys/test/massive/sys/cmd/CommandTest.hx index 84f6130..dec63f7 100644 --- a/neko/test/massive/neko/cmd/CommandTest.hx +++ b/sys/test/massive/sys/cmd/CommandTest.hx @@ -1,4 +1,4 @@ -package massive.neko.cmd; +package massive.sys.cmd; import massive.munit.Assert; diff --git a/neko/test/massive/neko/cmd/ConsoleMock.hx b/sys/test/massive/sys/cmd/ConsoleMock.hx similarity index 91% rename from neko/test/massive/neko/cmd/ConsoleMock.hx rename to sys/test/massive/sys/cmd/ConsoleMock.hx index 7a7d43e..e6eec28 100644 --- a/neko/test/massive/neko/cmd/ConsoleMock.hx +++ b/sys/test/massive/sys/cmd/ConsoleMock.hx @@ -1,6 +1,6 @@ -package massive.neko.cmd; +package massive.sys.cmd; -import massive.neko.io.FileSys; +import massive.sys.io.FileSys; import haxe.PosInfos; class ConsoleMock extends Console diff --git a/neko/test/massive/neko/cmd/ConsoleTest.hx b/sys/test/massive/sys/cmd/ConsoleTest.hx similarity index 98% rename from neko/test/massive/neko/cmd/ConsoleTest.hx rename to sys/test/massive/sys/cmd/ConsoleTest.hx index 23a3a57..d98fd90 100644 --- a/neko/test/massive/neko/cmd/ConsoleTest.hx +++ b/sys/test/massive/sys/cmd/ConsoleTest.hx @@ -1,7 +1,7 @@ -package massive.neko.cmd; +package massive.sys.cmd; -import massive.neko.io.File; -import massive.neko.io.FileSys; +import massive.sys.io.File; +import massive.sys.io.FileSys; import massive.munit.Assert; class ConsoleTest diff --git a/neko/test/massive/neko/cmd/SkippableCommandMock.hx b/sys/test/massive/sys/cmd/SkippableCommandMock.hx similarity index 92% rename from neko/test/massive/neko/cmd/SkippableCommandMock.hx rename to sys/test/massive/sys/cmd/SkippableCommandMock.hx index 5995d0d..e3a5f24 100644 --- a/neko/test/massive/neko/cmd/SkippableCommandMock.hx +++ b/sys/test/massive/sys/cmd/SkippableCommandMock.hx @@ -1,4 +1,4 @@ -package massive.neko.cmd; +package massive.sys.cmd; import haxe.PosInfos; diff --git a/neko/test/massive/neko/io/FileTest.hx b/sys/test/massive/sys/io/FileTest.hx similarity index 99% rename from neko/test/massive/neko/io/FileTest.hx rename to sys/test/massive/sys/io/FileTest.hx index 135aca9..2304c72 100644 --- a/neko/test/massive/neko/io/FileTest.hx +++ b/sys/test/massive/sys/io/FileTest.hx @@ -1,13 +1,13 @@ -package massive.neko.io; +package massive.sys.io; import massive.munit.util.Timer; import massive.munit.Assert; import massive.munit.async.AsyncFactory; -import massive.neko.cmd.Console; -import massive.neko.io.File; -import massive.neko.io.FileException; +import massive.sys.cmd.Console; +import massive.sys.io.File; +import massive.sys.io.FileException; /** * Auto generated ExampleTest for MassiveUnit. diff --git a/neko/test/massive/neko/util/PathUtilTest.hx b/sys/test/massive/sys/util/PathUtilTest.hx similarity index 98% rename from neko/test/massive/neko/util/PathUtilTest.hx rename to sys/test/massive/sys/util/PathUtilTest.hx index ca5937a..8c30393 100644 --- a/neko/test/massive/neko/util/PathUtilTest.hx +++ b/sys/test/massive/sys/util/PathUtilTest.hx @@ -1,4 +1,4 @@ -package massive.neko.util; +package massive.sys.util; import massive.munit.util.Timer; import massive.munit.Assert; diff --git a/neko/test/massive/neko/util/ZipUtilTest.hx b/sys/test/massive/sys/util/ZipUtilTest.hx similarity index 78% rename from neko/test/massive/neko/util/ZipUtilTest.hx rename to sys/test/massive/sys/util/ZipUtilTest.hx index d09c91b..cacdb75 100644 --- a/neko/test/massive/neko/util/ZipUtilTest.hx +++ b/sys/test/massive/sys/util/ZipUtilTest.hx @@ -1,13 +1,15 @@ -package massive.neko.util; +package massive.sys.util; import massive.munit.util.Timer; import massive.munit.Assert; import massive.munit.async.AsyncFactory; +import massive.sys.io.File; +import massive.sys.util.ZipUtil; +import massive.sys.cmd.Console; -import massive.neko.io.File; -import massive.neko.util.ZipUtil; -import massive.neko.cmd.Console; - +import haxe.zip.Writer; +import haxe.zip.Reader; +import haxe.zip.Entry; class ZipUtilTest { @@ -64,12 +66,12 @@ class ZipUtilTest var dir:File = current.resolvePath("tmp1"); var file:File = dir.resolvePath("file.txt", true); - var files:Array = ZipUtil.convertDirectoryToZipEntries(dir); + var files:List = ZipUtil.convertDirectoryToZipEntries(dir); Assert.isTrue(files.length == 1); - var entry:Dynamic = files[0]; - + var entry:Entry = files.first(); + Assert.areEqual("file.txt", entry.fileName); Assert.isNotNull(entry.data); Assert.isNotNull(entry.fileTime); @@ -77,8 +79,9 @@ class ZipUtilTest try { var zipFile:File = current.resolvePath("tmp.zip"); - var zip = neko.io.File.write(zipFile.nativePath, true); - neko.zip.Writer.writeZip(zip, files, -1); + var zip = sys.io.File.write(zipFile.nativePath, true); + var writer = new Writer(zip); + writer.write(files); zip.close(); Assert.isTrue(zipFile.exists); } diff --git a/test.sh b/test.sh index f96bd60..643062e 100644 --- a/test.sh +++ b/test.sh @@ -3,5 +3,5 @@ set -e cd haxe haxelib run munit test -coverage -cd ../neko +cd ../sys haxelib run munit test -neko -coverage \ No newline at end of file diff --git a/tool/build.hxml b/tool/build.hxml index 769b28d..e356db0 100644 --- a/tool/build.hxml +++ b/tool/build.hxml @@ -1,6 +1,6 @@ -main massive.mlib.Mlib -cp src --cp ../neko/src +-cp ../sys/src -cp ../haxe/src -neko ../mlib.n diff --git a/tool/src/massive/mlib/AllClasses.hx b/tool/src/massive/mlib/AllClasses.hx index 33ea8a2..31b3e70 100644 --- a/tool/src/massive/mlib/AllClasses.hx +++ b/tool/src/massive/mlib/AllClasses.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: diff --git a/tool/src/massive/mlib/Mlib.hx b/tool/src/massive/mlib/Mlib.hx index cfe8e14..09fe0c7 100644 --- a/tool/src/massive/mlib/Mlib.hx +++ b/tool/src/massive/mlib/Mlib.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -31,11 +31,11 @@ package massive.mlib; import massive.haxe.log.Log; import massive.haxe.util.TemplateUtil; -import massive.neko.cmd.CommandLineRunner; -import massive.neko.cmd.Console; -import massive.neko.cmd.ICommand; -import massive.neko.haxelib.Haxelib; -import massive.neko.io.File; +import massive.sys.cmd.CommandLineRunner; +import massive.sys.cmd.Console; +import massive.sys.cmd.ICommand; +import massive.sys.haxelib.Haxelib; +import massive.sys.io.File; import massive.mlib.cmd.MlibCommand; import massive.mlib.cmd.ConfigMlibCommand; diff --git a/tool/src/massive/mlib/MlibSettings.hx b/tool/src/massive/mlib/MlibSettings.hx index 7e2bfa5..efd5fd0 100644 --- a/tool/src/massive/mlib/MlibSettings.hx +++ b/tool/src/massive/mlib/MlibSettings.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -29,12 +29,18 @@ package massive.mlib; -import massive.neko.io.File; +import massive.sys.io.File; import haxe.xml.Fast; -import massive.neko.util.PathUtil; +import massive.sys.util.PathUtil; import massive.haxe.util.RegExpUtil; import massive.haxe.Exception; +#if haxe3 +import haxe.ds.StringMap; +#else +private typedef StringMap = Hash; +#end + class MlibSettings { public var file(default, set_file):File; @@ -43,14 +49,14 @@ class MlibSettings public var resources:Array; public var bin:File; - private var resourcesByType:Hash>; + private var resourcesByType:StringMap>; public function new(?file:File):Void { this.file = file; resources = new Array(); - resourcesByType = new Hash(); + resourcesByType = new StringMap(); if(file != null && file.exists) { diff --git a/tool/src/massive/mlib/cmd/ConfigMlibCommand.hx b/tool/src/massive/mlib/cmd/ConfigMlibCommand.hx index 568a451..42467bf 100644 --- a/tool/src/massive/mlib/cmd/ConfigMlibCommand.hx +++ b/tool/src/massive/mlib/cmd/ConfigMlibCommand.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -29,8 +29,8 @@ package massive.mlib.cmd; -import massive.neko.haxelib.Haxelib; -import massive.neko.io.File; +import massive.sys.haxelib.Haxelib; +import massive.sys.io.File; import massive.haxe.log.Log; class ConfigMlibCommand extends MlibCommand diff --git a/tool/src/massive/mlib/cmd/GenerateAllClassesCommand.hx b/tool/src/massive/mlib/cmd/GenerateAllClassesCommand.hx index 6dfcb0c..af0f5f6 100644 --- a/tool/src/massive/mlib/cmd/GenerateAllClassesCommand.hx +++ b/tool/src/massive/mlib/cmd/GenerateAllClassesCommand.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -30,9 +30,9 @@ package massive.mlib.cmd; import massive.haxe.util.RegExpUtil; -import massive.neko.io.File; +import massive.sys.io.File; import massive.haxe.log.Log; -import massive.neko.util.PathUtil; +import massive.sys.util.PathUtil; import massive.mlib.MlibSettings; class GenerateAllClassesCommand extends MlibCommand diff --git a/tool/src/massive/mlib/cmd/IncrementHaxelibVersionCommand.hx b/tool/src/massive/mlib/cmd/IncrementHaxelibVersionCommand.hx index d4878a9..e4e6255 100644 --- a/tool/src/massive/mlib/cmd/IncrementHaxelibVersionCommand.hx +++ b/tool/src/massive/mlib/cmd/IncrementHaxelibVersionCommand.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -29,8 +29,8 @@ package massive.mlib.cmd; -import massive.neko.haxelib.Haxelib; -import massive.neko.io.File; +import massive.sys.haxelib.Haxelib; +import massive.sys.io.File; import massive.haxe.log.Log; class IncrementHaxelibVersionCommand extends MlibCommand diff --git a/tool/src/massive/mlib/cmd/InstallToHaxelibCommand.hx b/tool/src/massive/mlib/cmd/InstallToHaxelibCommand.hx index ba79ab4..c1aca57 100644 --- a/tool/src/massive/mlib/cmd/InstallToHaxelibCommand.hx +++ b/tool/src/massive/mlib/cmd/InstallToHaxelibCommand.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -29,8 +29,8 @@ package massive.mlib.cmd; -import massive.neko.haxelib.HaxelibTools; -import massive.neko.io.File; +import massive.sys.haxelib.HaxelibTools; +import massive.sys.io.File; import massive.haxe.log.Log; class InstallToHaxelibCommand extends MlibCommand diff --git a/tool/src/massive/mlib/cmd/MlibCommand.hx b/tool/src/massive/mlib/cmd/MlibCommand.hx index 9e64d6a..2674ef0 100644 --- a/tool/src/massive/mlib/cmd/MlibCommand.hx +++ b/tool/src/massive/mlib/cmd/MlibCommand.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -28,8 +28,8 @@ ****/ package massive.mlib.cmd; -import massive.neko.cmd.Command; -import massive.neko.haxelib.Haxelib; +import massive.sys.cmd.Command; +import massive.sys.haxelib.Haxelib; import massive.mlib.MlibSettings; class MlibCommand extends Command diff --git a/tool/src/massive/mlib/cmd/PackageForHaxelibCommand.hx b/tool/src/massive/mlib/cmd/PackageForHaxelibCommand.hx index fa31d5c..a133e9d 100644 --- a/tool/src/massive/mlib/cmd/PackageForHaxelibCommand.hx +++ b/tool/src/massive/mlib/cmd/PackageForHaxelibCommand.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -29,15 +29,15 @@ package massive.mlib.cmd; -import massive.neko.haxelib.Haxelib; -import massive.neko.io.File; +import massive.sys.haxelib.Haxelib; +import massive.sys.io.File; import massive.haxe.log.Log; import massive.haxe.Exception; -import massive.neko.util.ZipUtil; -import massive.neko.haxelib.HaxelibTools; +import massive.sys.util.ZipUtil; +import massive.sys.haxelib.HaxelibTools; import massive.haxe.util.RegExpUtil; -import massive.neko.util.PathUtil; +import massive.sys.util.PathUtil; class PackageForHaxelibCommand extends MlibCommand { diff --git a/tool/src/massive/mlib/cmd/PreProcessHxmlCommand.hx b/tool/src/massive/mlib/cmd/PreProcessHxmlCommand.hx index c1fc8a2..0b07ccc 100644 --- a/tool/src/massive/mlib/cmd/PreProcessHxmlCommand.hx +++ b/tool/src/massive/mlib/cmd/PreProcessHxmlCommand.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -29,8 +29,8 @@ package massive.mlib.cmd; -import massive.neko.haxelib.Haxelib; -import massive.neko.io.File; +import massive.sys.haxelib.Haxelib; +import massive.sys.io.File; import massive.haxe.log.Log; import massive.haxe.util.RegExpUtil; diff --git a/tool/src/massive/mlib/cmd/SubmitToHaxelibCommand.hx b/tool/src/massive/mlib/cmd/SubmitToHaxelibCommand.hx index a419ba1..f1ca838 100644 --- a/tool/src/massive/mlib/cmd/SubmitToHaxelibCommand.hx +++ b/tool/src/massive/mlib/cmd/SubmitToHaxelibCommand.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -29,8 +29,8 @@ package massive.mlib.cmd; -import massive.neko.haxelib.HaxelibTools; -import massive.neko.io.File; +import massive.sys.haxelib.HaxelibTools; +import massive.sys.io.File; import massive.haxe.log.Log; class SubmitToHaxelibCommand extends MlibCommand diff --git a/tool/src/massive/mlib/cmd/UpdateSourceLicenseCommand.hx b/tool/src/massive/mlib/cmd/UpdateSourceLicenseCommand.hx index 6b5ecaa..f2b06d3 100644 --- a/tool/src/massive/mlib/cmd/UpdateSourceLicenseCommand.hx +++ b/tool/src/massive/mlib/cmd/UpdateSourceLicenseCommand.hx @@ -1,5 +1,5 @@ /**** -* Copyright 2012 Massive Interactive. All rights reserved. +* Copyright 2013 Massive Interactive. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: @@ -29,8 +29,8 @@ package massive.mlib.cmd; -import massive.neko.haxelib.HaxelibTools; -import massive.neko.io.File; +import massive.sys.haxelib.HaxelibTools; +import massive.sys.io.File; import massive.haxe.log.Log; import massive.mlib.MlibSettings;