diff --git a/SConstruct b/SConstruct index e8f7e277..8a771ca6 100644 --- a/SConstruct +++ b/SConstruct @@ -120,6 +120,14 @@ elif env["platform"] == "android": env.Append(LIBPATH=[env['fmod_lib_dir'] + 'android/core/lib/' + arch_dir, env['fmod_lib_dir'] + 'android/studio/lib/' + arch_dir]) env.Append(LIBS=[libfmod, libfmodstudio]) +elif env["platform"] == "web": + libfmodstudio = os.path.join(fmod_lib_dir, 'web/studio/lib/fastcomp/bitcode/', 'fmodstudio%s.bc' % lfix) + + env.Append(CPPPATH=[env['fmod_lib_dir'] + 'web/core/inc/', env['fmod_lib_dir'] + 'web/studio/inc/']) + env.Append(LIBPATH=[env['fmod_lib_dir'] + 'web/core/lib/fastcomp/bitcode/', env['fmod_lib_dir'] + 'web/studio/lib/fastcomp/bitcode/']) + # Instead of LIBS, directly add to LINKFLAGS for explicit paths + env.Append(LINKFLAGS=[libfmodstudio]) + #Output is placed in the addons directory of the demo project directly target = "{}{}/{}.{}.{}".format( target_path, env["platform"], target_name, env["platform"], env["target"] @@ -196,8 +204,9 @@ def copy_fmod_libraries(self, arg, env, executor = None): source_files = [env.Glob(os.path.join(source_dir, '*.*')) for source_dir in [fmod_core_lib_dir, fmod_studio_lib_dir]] [[shutil.copy(str(file), addon_fmod_libs_output) for file in files] for files in source_files] - -copy_fmod_libraries_action = Action('', copy_fmod_libraries) -AddPostAction(library, copy_fmod_libraries_action) +# web bundles everything inside the final .wasm - no need to export libs +if env["platform"] != "web": + copy_fmod_libraries_action = Action('', copy_fmod_libraries) + AddPostAction(library, copy_fmod_libraries_action) Default(library) \ No newline at end of file diff --git a/demo/addons/fmod/fmod.gdextension b/demo/addons/fmod/fmod.gdextension index bc101dfd..73a7c5b0 100644 --- a/demo/addons/fmod/fmod.gdextension +++ b/demo/addons/fmod/fmod.gdextension @@ -18,6 +18,9 @@ android.debug.arm64 = "res://addons/fmod/libs/android/arm64/libGodotFmod.android android.release.arm64 = "res://addons/fmod/libs/android/arm64/libGodotFmod.android.template_release.arm64.so" ios.debug = "res://addons/fmod/libs/ios/libGodotFmod.ios.template_debug.universal.dylib" ios.release = "res://addons/fmod/libs/ios/libGodotFmod.ios.template_release.universal.dylib" +web.editor = "res://addons/fmod/libs/web/libGodotFmod.web.editor.wasm32.wasm" +web.debug = "res://addons/fmod/libs/web/libGodotFmod.web.template_debug.wasm32.wasm" +web.release = "res://addons/fmod/libs/web/libGodotFmod.web.template_release.wasm32.wasm" [icons] FmodEventEmitter2D = "res://addons/fmod/icons/fmod_icon.svg" diff --git a/demo/export_presets.cfg b/demo/export_presets.cfg index f4347b9b..c7a6052d 100644 --- a/demo/export_presets.cfg +++ b/demo/export_presets.cfg @@ -35,14 +35,14 @@ package/signed=true package/app_category=2 package/retain_data_on_uninstall=false package/exclude_from_recents=false +package/show_in_android_tv=false +package/show_in_app_library=true +package/show_as_launcher_app=false launcher_icons/main_192x192="" launcher_icons/adaptive_foreground_432x432="" launcher_icons/adaptive_background_432x432="" graphics/opengl_debug=false xr_features/xr_mode=0 -xr_features/hand_tracking=0 -xr_features/hand_tracking_frequency=0 -xr_features/passthrough=0 screen/immersive_mode=true screen/support_small=true screen/support_normal=true @@ -200,6 +200,9 @@ permissions/write_sms=false permissions/write_social_stream=false permissions/write_sync_settings=false permissions/write_user_dictionary=false +xr_features/hand_tracking=0 +xr_features/hand_tracking_frequency=0 +xr_features/passthrough=0 graphics/32_bits_framebuffer=true xr_features/degrees_of_freedom=0 one_click_deploy/clear_previous_install=false @@ -251,6 +254,7 @@ application/product_name="" application/file_description="" application/copyright="" application/trademarks="" +application/export_angle=0 ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" ssh_remote_deploy/port="22" @@ -304,6 +308,7 @@ application/short_version="1.0" application/version="1.0" application/icon_interpolation=4 application/launch_screens_interpolation=4 +application/export_project_only=false capabilities/access_wifi=false capabilities/push_notifications=false user_data/accessible_from_files_app=false @@ -398,6 +403,7 @@ application/version="1.0" application/copyright="" application/copyright_localized={} application/min_macos_version="10.12" +application/export_angle=0 display/high_res=true xcode/platform_build="14C18" xcode/sdk_version="13.1" @@ -431,6 +437,7 @@ codesign/entitlements/app_sandbox/files_downloads=0 codesign/entitlements/app_sandbox/files_pictures=0 codesign/entitlements/app_sandbox/files_music=0 codesign/entitlements/app_sandbox/files_movies=0 +codesign/entitlements/app_sandbox/files_user_selected=0 codesign/entitlements/app_sandbox/helper_executables=[] codesign/custom_options=PackedStringArray() notarization/notarization=0 @@ -467,3 +474,41 @@ open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}" ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\") rm -rf \"{temp_dir}\"" + +[preset.4] + +name="Web" +platform="Web" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="../../../../Desktop/exp/test/index.html" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false + +[preset.4.options] + +custom_template/debug="" +custom_template/release="" +variant/extensions_support=true +vram_texture_compression/for_desktop=true +vram_texture_compression/for_mobile=false +html/export_icon=true +html/custom_html_shell="" +html/head_include="" +html/canvas_resize_policy=2 +html/focus_canvas_on_start=true +html/experimental_virtual_keyboard=false +progressive_web_app/enabled=false +progressive_web_app/offline_page="" +progressive_web_app/display=1 +progressive_web_app/orientation=0 +progressive_web_app/icon_144x144="" +progressive_web_app/icon_180x180="" +progressive_web_app/icon_512x512="" +progressive_web_app/background_color=Color(0, 0, 0, 1)