Skip to content

Warrning. deprecated can_build signature. #118

@Valeryn4

Description

@Valeryn4

OS target (Android/iOS): All

Godot version: 3.2+

Issue description:

Warning: module 'admob' uses a deprecated `can_build` signature in its config.py file, it should be `can_build(env, platform)`.
Warning: module 'share' uses a deprecated `can_build` signature in its config.py file, it should be `can_build(env, platform)`.

In all modules, obsolete functions are used. Why not fix it? It takes a few minutes.

before

def can_build(plat):
    return plat == "iphone" or plat == "android"

after

def can_build(env, platform):
    return platform == "iphone" or platform == "android"

I would also suggest modular compilation for the iPhone, and maybe this might work for the android. Further reducing compilation time and testing time.
Now, if I change the modules - it takes a very long link and assembly

for example, you can take modules/arkit or modules/camera
SCsub:

Import('env')
Import('env_modules')

env_my_modules = env_modules.Clone() ##create new module

if (env["platform"] == "iphone"):
   modules_sources = [] ##create array source files
   env_my_modules.add_source_files(modules_sources, "*.cpp") ##add all CPP
   env_my_modules.add_source_files(modules_sources, "ios/src/*.mm") ##add all MM
   
   mod_lib = env_modules.add_library('#bin/libgodot_my_module' + env['LIBSUFFIX'], #add lib
   modules_sources)

in console iphone after build

$ lipo -create bin/libgodot_my_module.iphone.opt.arm.a bin/libgodot_my_module.iphone.opt.arm64.a bin/libgodot_my_module.iphone.opt.x86.a bin/libgodot_my_module.iphone.opt.x86_64.a -output bin/libgodot_my_module.iphone.release.fat.a
$ cp bin/libgodot_my_module.iphone.release.fat.a ~/godot_template_iphone/
$ zip -r iphone_my_template.zip ~/godot_template_iphone/*

Copy file to template directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions