|
|
@ -140,11 +140,12 @@ create_temp_project_dirs: |
|
|
|
if not exist $(PROJECT_BUILD_PATH)\res\drawable-hdpi mkdir $(PROJECT_BUILD_PATH)\res\drawable-hdpi |
|
|
|
if not exist $(PROJECT_BUILD_PATH)\res\values mkdir $(PROJECT_BUILD_PATH)\res\values |
|
|
|
if not exist $(PROJECT_BUILD_PATH)\assets mkdir $(PROJECT_BUILD_PATH)\assets |
|
|
|
if not exist $(PROJECT_BUILD_PATH)\assets\$(PROJECT_RESOURCES_PATH) mkdir $(PROJECT_BUILD_PATH)\assets\$(PROJECT_RESOURCES_PATH) |
|
|
|
if not exist $(PROJECT_BUILD_PATH)\obj\screens mkdir $(PROJECT_BUILD_PATH)\obj\screens |
|
|
|
$(foreach dir, $(PROJECT_SOURCE_DIRS), $(call create_dir, $(dir))) |
|
|
|
|
|
|
|
define create_dir |
|
|
|
if not exist $(PROJECT_BUILD_PATH)\obj\$(1) mkdir $(PROJECT_BUILD_PATH)\obj\$(1) |
|
|
|
if not exist $(PROJECT_BUILD_PATH)\obj\$(1) mkdir $(PROJECT_BUILD_PATH)\obj\$(1) |
|
|
|
endef |
|
|
|
|
|
|
|
# Copy required shared libs for integration into APK
|
|
|
@ -165,13 +166,14 @@ endif |
|
|
|
|
|
|
|
# Copy project required resources: strings.xml, icon.png, assets
|
|
|
|
# NOTE: Required strings.xml is generated and game resources are copied to assets folder
|
|
|
|
# TODO: Review xcopy usage, it can not be found in some systems!
|
|
|
|
copy_project_resources: |
|
|
|
copy $(APP_ICON_LDPI) $(PROJECT_BUILD_PATH)\res\drawable-ldpi\icon.png /Y |
|
|
|
copy $(APP_ICON_MDPI) $(PROJECT_BUILD_PATH)\res\drawable-mdpi\icon.png /Y |
|
|
|
copy $(APP_ICON_HDPI) $(PROJECT_BUILD_PATH)\res\drawable-hdpi\icon.png /Y |
|
|
|
@echo ^<?xml version="1.0" encoding="utf-8"^?^> > $(PROJECT_BUILD_PATH)/res/values/strings.xml |
|
|
|
@echo ^<resources^>^<string name="app_name"^>$(APP_LABEL_NAME)^</string^>^</resources^> >> $(PROJECT_BUILD_PATH)/res/values/strings.xml |
|
|
|
if exist $(PROJECT_RESOURCES_PATH) xcopy $(PROJECT_RESOURCES_PATH) $(PROJECT_BUILD_PATH)\assets /Y /E /F |
|
|
|
if exist $(PROJECT_RESOURCES_PATH) C:\Windows\System32\xcopy $(PROJECT_RESOURCES_PATH) $(PROJECT_BUILD_PATH)\assets\$(PROJECT_RESOURCES_PATH) /Y /E /F |
|
|
|
|
|
|
|
# Generate NativeLoader.java to load required shared libraries
|
|
|
|
# NOTE: Probably not the bet way to generate this file... but it works.
|
|
|
@ -186,7 +188,7 @@ endif |
|
|
|
ifeq ($(RAYLIB_LIBTYPE),SHARED) |
|
|
|
@echo System.loadLibrary("raylib"); >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java |
|
|
|
endif |
|
|
|
@echo System.loadLibrary("raylib_game"); >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java |
|
|
|
@echo System.loadLibrary("$(PROJECT_LIBRARY_NAME)"); >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java |
|
|
|
@echo } >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java |
|
|
|
@echo } >> $(PROJECT_BUILD_PATH)/src/com/$(APP_COMPANY_NAME)/$(APP_PRODUCT_NAME)/NativeLoader.java |
|
|
|
|
|
|
|