Merge: Unite app.nit metadata annotations common to Android and iOS
authorJean Privat <jean@pryen.org>
Fri, 3 Apr 2015 01:27:33 +0000 (08:27 +0700)
committerJean Privat <jean@pryen.org>
Fri, 3 Apr 2015 01:27:33 +0000 (08:27 +0700)
* Rename the annotation `java_package` to `app_namespace`.
* Move up `app_name`, `app_version` and `app_namespace` and their default values from the Android platform.
* Apply these annotations in iOS too.
* Use the annotations in Hello iOS.

Pull-Request: #1233
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

1  2 
src/compiler/abstract_compiler.nit

@@@ -300,15 -300,8 +300,8 @@@ class MakefileToolchai
        # Get the default name of the executable to produce
        fun default_outname: String
        do
-               var mainmodule = compiler.mainmodule
-               # Search a non fictive module
-               var res = mainmodule.name
-               while mainmodule.is_fictive do
-                       mainmodule = mainmodule.in_importation.direct_greaters.first
-                       res = mainmodule.name
-               end
-               return res
+               var mainmodule = compiler.mainmodule.first_real_mmodule
+               return mainmodule.name
        end
  
        # Combine options and platform informations to get the final path of the outfile
@@@ -2204,9 -2197,6 +2197,9 @@@ redef class AMethPropde
                        else if pname == "atoi" then
                                v.ret(v.new_expr("atoi({arguments[0]});", ret.as(not null)))
                                return true
 +                      else if pname == "fast_cstring" then
 +                              v.ret(v.new_expr("{arguments[0]} + {arguments[1]}", ret.as(not null)))
 +                              return true
                        else if pname == "new" then
                                v.ret(v.new_expr("(char*)nit_alloc({arguments[1]})", ret.as(not null)))
                                return true