From ab51c1d5910c22844710e7f89ed0ceabf5c0a8fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Sun, 9 Feb 2014 09:37:01 -0500 Subject: [PATCH] example: update mnit examples with android version MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- examples/mnit_dino/Makefile | 4 ++++ examples/mnit_dino/src/dino_android.nit | 31 +++++++++++++++++++++++++++ examples/mnit_moles/Makefile | 4 ++++ examples/mnit_moles/src/moles_android.nit | 22 +++++++++++++++++++ examples/mnit_simple/Makefile | 4 ++++ examples/mnit_simple/src/simple_android.nit | 22 +++++++++++++++++++ 6 files changed, 87 insertions(+) create mode 100644 examples/mnit_dino/src/dino_android.nit create mode 100644 examples/mnit_moles/src/moles_android.nit create mode 100644 examples/mnit_simple/src/simple_android.nit diff --git a/examples/mnit_dino/Makefile b/examples/mnit_dino/Makefile index a20273b..0ae0d15 100644 --- a/examples/mnit_dino/Makefile +++ b/examples/mnit_dino/Makefile @@ -4,6 +4,10 @@ linux: mkdir -p bin ../../bin/nitg --global -o bin/dino src/dino_linux.nit +android: + mkdir -p bin + ../../bin/nitg --global --no-stacktrace -o bin/dino.apk src/dino_android.nit + doc: mkdir -p doc ../../bin/nitdoc -d doc/ src/dino.nit src/dino_linux.nit diff --git a/examples/mnit_dino/src/dino_android.nit b/examples/mnit_dino/src/dino_android.nit new file mode 100644 index 0000000..ecf1ea7 --- /dev/null +++ b/examples/mnit_dino/src/dino_android.nit @@ -0,0 +1,31 @@ +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# Copyright 2012-2013 Alexis Laferrière +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module dino_android + +import dino + +import mnit_android + +redef class ImageSet + redef fun start_over_path do return "images/play_again_mobile.png" +end + +redef class SplashScreen + redef fun splash_play_path do return "images/splash_play_mobile.png" +end + +super diff --git a/examples/mnit_moles/Makefile b/examples/mnit_moles/Makefile index 799e70e..27292c5 100644 --- a/examples/mnit_moles/Makefile +++ b/examples/mnit_moles/Makefile @@ -4,5 +4,9 @@ linux: mkdir -p bin ../../bin/nitg --global -o bin/moles src/moles_linux.nit +android: + mkdir -p bin + ../../bin/nitg --global --no-stacktrace -o bin/moles.apk src/moles_android.nit + clean: rm -rf bin diff --git a/examples/mnit_moles/src/moles_android.nit b/examples/mnit_moles/src/moles_android.nit new file mode 100644 index 0000000..e0e92c6 --- /dev/null +++ b/examples/mnit_moles/src/moles_android.nit @@ -0,0 +1,22 @@ +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# Copyright 2012-2014 Alexis Laferrière +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module moles_android + +import moles +import mnit_android + +super diff --git a/examples/mnit_simple/Makefile b/examples/mnit_simple/Makefile index 94a928a..14f36b0 100644 --- a/examples/mnit_simple/Makefile +++ b/examples/mnit_simple/Makefile @@ -4,5 +4,9 @@ linux: mkdir -p bin ../../bin/nitg --global -o bin/simple src/simple_linux.nit +android: + mkdir -p bin + ../../bin/nitg --global --no-stacktrace -o bin/simple.apk src/simple_android.nit + clean: rm -rf bin diff --git a/examples/mnit_simple/src/simple_android.nit b/examples/mnit_simple/src/simple_android.nit new file mode 100644 index 0000000..5ac07b2 --- /dev/null +++ b/examples/mnit_simple/src/simple_android.nit @@ -0,0 +1,22 @@ +# This file is part of NIT ( http://www.nitlanguage.org ). +# +# Copyright 2012-2014 Alexis Laferrière +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module simple_android + +import simple +import mnit_android + +super -- 1.7.9.5