Skip to content

Conversation

artificiel
Copy link
Contributor

adds a layer so the emscripten product is packaged as:

bin/$APP_NAME/index.html

this makes it possible to directly upload the bin/APP_NAME directly on a server, and "implicitly" publish it as http://server.name/APP_NAME without renaming anything

(previous behaviour requires renaming the bin directory, and even then would still produce a redundant name such as http://server.name/APP_NAME/APP_NAME.html)

fix #7592

@ofTheo
Copy link
Member

ofTheo commented Aug 28, 2023

does the emrun command work as expected with this change?

ie: emrun bin/3DPrimitivesExample/index.html

edit:

I see you can do emrun bin/3DPrimitivesExample/
What about the data folder? does that get copied to bin/3DPrimitivesExample/ with this change?

@artificiel
Copy link
Contributor Author

my (superficial) understanding is that bin/data dir gets processed into a .data file by the --preload-file option (which currently is a problem if there is no data directory present: #7593)

so I did just now:

% cd $OF_ROOT/examples/graphics/imageSubsectionExample
% emmake make 
% scp -r bin/imageSubsectionExample #####@varia.artificiel.org:/usr/www/of/
index.wasm                     100% 6537KB  47.5MB/s   00:00    
index.html                     100% 5370   574.5KB/s   00:00    
index.js                       100%  181KB   8.4MB/s   00:00    
index.data                     100%  140KB   6.4MB/s   00:00    

which can be experienced at http://varia.artificiel.org/of/imageSubsectionExample

@ofTheo ofTheo merged commit f68ff52 into openframeworks:master Aug 28, 2023
@ofTheo
Copy link
Member

ofTheo commented Aug 28, 2023

Thanks @artificiel 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emscripten: name the generated .html index.html instead of ${projectName}.html?

2 participants