From 9ba905a2094e1d8e7ed774c7b814e9eebeeb7920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9renger=20Dalle-Cort?= Date: Thu, 16 Jan 2025 23:25:57 -0500 Subject: [PATCH] fix(web): .htaccess location and copy --- .htaccess | 15 --------------- rake/_utils.rb | 13 +------------ 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 .htaccess diff --git a/.htaccess b/.htaccess deleted file mode 100644 index e327a7bd7..000000000 --- a/.htaccess +++ /dev/null @@ -1,15 +0,0 @@ -#Alternate default index pages -DirectoryIndex nodable.html index.html - -# https://emscripten.org/docs/compiling/WebAssembly.html#web-server-setup - -Header add Access-Control-Allow-Origin "nodable.42borgata.com" -Header add Cross-Origin-Opener-Policy "same-origin" -Header add Cross-Origin-Embedder-Policy "require-corp" -Header add Cross-Origin-Resource-Policy "cross-origin" - -Options +MultiViews -RemoveType .gz -AddEncoding x-gzip .gz -AddType application/octet-stream .data -AddType application/wasm .wasm diff --git a/rake/_utils.rb b/rake/_utils.rb index 1d84167e8..b7470a3b7 100644 --- a/rake/_utils.rb +++ b/rake/_utils.rb @@ -62,7 +62,6 @@ module TargetType :cxx_flags, :linker_flags, :assets, # List of patterns like: "" or ":" - :assets_nopreload, # same but won't be included in the binary keyword_init: true # If the optional keyword_init keyword argument is set to true, .new takes keyword arguments instead of normal arguments. ) @@ -77,7 +76,6 @@ def new_empty_target(name, type) target.cxx_flags = [] target.linker_flags = [] target.assets = FileList[] - target.assets_nopreload = FileList[] target.defines = [] target.compiler_flags = [] target.link_library = [] @@ -218,16 +216,7 @@ def tasks_for_target(target) desc "Compile #{target.name}" task :build => get_binary(target) do - - # Copy assets (in PLATFORM_WEB we skip this because we incorporate files as *.data) - if PLATFORM_DESKTOP - target.assets.each do |pattern| - copy_asset(pattern) - end - end - - # Copy assets that must never be preloaded - target.assets_nopreload.each do |pattern| + target.assets.each do |pattern| copy_asset(pattern) end end