summaryrefslogtreecommitdiffstats
path: root/platform/javascript/export/export.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Set the `title` tag in the HTML5 export immediatelyHugo Locurcio2020-04-221-0/+1
| | | | | This makes the project title display without having to wait for the project to finish loading.
* Replace NULL with nullptrlupoDharkael2020-04-021-2/+2
|
* [HTML5] Refactor JS, threads support, closures.Fabio Alessandrelli2020-03-111-0/+8
| | | | | | | | | | - Refactored the Engine code, splitted across files. - Use MODULARIZE option to build emscripten code into it's own closure. - Enable lto support (saves ~2MiB in release). - Enable optional closure compiler pass for JS and generated code. - Enable optional pthreads support. - Can now build with tools=yes (not much to see yet). - Dropped some deprecated code for older toolchains.
* Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-261-14/+13
| | | | | | | | | | | | | | | | Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
* Remove obsolete GLES3 backendRémi Verschelde2020-02-131-4/+2
| | | | | | | | | | | | | | Due to the port to Vulkan and complete redesign of the rendering backend, the `drivers/gles3` code is no longer usable in this state and is not planned to be ported to the new architecture. The GLES2 backend is kept (while still disabled and non-working) as it will eventually be ported to serve as the low-end renderer for Godot 4.0. Some GLES3 features might be selectively ported to the updated GLES2 backend if there's a need for them, and extensions we can use for that. So long, OpenGL driver bugs!
* Texture refactorJuan Linietsky2020-02-111-4/+4
| | | | | | | | -Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
* Export and reference the icon as favicon when exporting to HTML5Hugo Locurcio2020-02-011-15/+40
| | | | | | This makes the project icon display immediately as a favicon when opening the page, without having to wait for the project to finish loading.
* Properly close files served by debug HTTP server.Fabio Alessandrelli2020-01-141-2/+9
|
* Add mime type to responses from debug HTTP server.Fabio Alessandrelli2020-01-141-0/+7
| | | | | Get rid of warnings in firefox mentioning performance loss when no mime type is given for wasm files.
* Export: Improve usability of command line interfaceRémi Verschelde2020-01-071-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm barely scratching the surface of the changes needed to make the --export command line interface easy to use, but this should already improve things somewhat. - Streamline `can_export()` templates check in all platforms, checking first for the presence of official templates, then of any defined custom template, and reporting on the absence of any. Shouldn't change the actual return value much which is still true if either release or debug is usable - we might want to change that eventually and better validate against the requested target. - Fix discrepancy between platforms using `custom_package/debug` and `custom_template/debug` (resp. `release`). All now use `custom_template`, which will break compatibility for `export_presets.cfg` with earlier projects (but is easy to fix). - Use `can_export()` when attempting a command line export and report the same errors that would be shown in the editor. - Improve error reporting after a failed export attempt, handling missing template and invalid path more gracefully. - Cleanup of unused stuff in EditorNode around the export workflow. - Improve --export documentation in --help a bit. Fixes #16949 (at least many of the misunderstandings listed there). Fixes #18470.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Implement HTTP server for HTML5 exportFabio Alessandrelli2019-10-231-8/+220
| | | | | | | | Since most browsers no longer allow making async requests from a page loaded from `file://`, we now need a proper HTTP server to load the exported HTML5 game. This should also allow us to get the debugger to work over a WebSocket connection.
* Improve EditorExportPlatform interface.Fabio Alessandrelli2019-10-231-8/+8
| | | | | Convert all get_device* methods to get_option* and normalize their usage as icon, label, tooltip.
* Remove dependency on the editor directory being in the build's include path.Marcel Admiraal2019-10-101-1/+1
| | | | | | | - Add or remove the necessary subdirectorires to the includes to remove dependency on the editor directory being in the build's include path. - Ensure includes in modified files conform to style guideline. - Remove editor from the build include path.
* Export: Remove temp files from cache after exportRémi Verschelde2019-08-121-2/+11
| | | | | | | | | So far we left most temporary files lying around, so this attempts to fix that. I added a helper method to DirAccess to factor out the boilerplate of creating a DirAccess, checking if the file exists, remove it or print an error on failure.
* Made use of semicolons more consitent, fixed formattingJohnJLight2019-06-191-1/+1
|
* HTML5: Fix ETC export for GLES2 fallback on mobileRémi Verschelde2019-03-111-0/+3
|
* Fix directory check when exporting projectvolzhs2019-03-061-1/+1
| | | | Fix #26702
* Merge pull request #26626 from rluders/misleading-error-message-exportRémi Verschelde2019-03-051-0/+4
|\ | | | | Fixing misleading error message when trying to export
| * Fixes misleading error message when trying to exportRicardo Lüders2019-03-051-0/+4
| | | | | | | | | | | | | | This patch fixes the misleading error message when users try to "export all" into an invalid destination path. Closes #26539
* | Fix HTML5 quick preview URLbruvzg2019-03-051-1/+1
|/
* Improve VRAM texture compression checks for mobile/webRémi Verschelde2019-03-031-14/+19
| | | | | | | | | | | For HTML5, we need to support S3TC if running on desktop, and ETC or ETC2 for mobile, so make this explicit. Add logic to check for ETC2 support on GLES3, and remove incorrect ETC feature for GLES3 on Android. Fix ETC check invalidating templates on HTML5. Fixes #26476.
* -Properly handle missing ETC support on exportJuan Linietsky2019-02-261-0/+6
| | | | | -Added ability for resource importers to save metadata -Added ability for resource importers to validate depending on project settings
* ExportDialog: Make error messages translatableRémi Verschelde2019-01-211-2/+2
| | | | Also fix missing newlines that caused #24202.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Export for OS X on OS X now lets you select .dmg or .zipMarcelo Fernandez2018-11-011-3/+5
|
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+1
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Fix file hintsMarcin Zawiejski2018-08-231-3/+3
| | | | Fixes file hints so the file dialog actually displays the files with given extension (e.g. *.apk).
* BPTC supportelasota2018-08-211-0/+3
|
* fix Android/HTML5 custom templates option does not workAlessandro2018-08-201-6/+27
|
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* Use local path for custom HTML5 shell exportLeon Krause2018-05-101-1/+1
|
* HTML export: Make s3tc the standard Texture Formatx12122018-01-201-3/+3
|
* Fix HTML5 feature tagsLeon Krause2018-01-121-2/+2
| | | | | | | 'HTML5' is the platform tag, the 'JavaScript' tag indicates availability of the JavaScript.eval singleton. Also report texture compression support.
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Fixed missing parenthesisArtem Varaksa2018-01-041-1/+1
|
* Add missing translation in Javascript export dialogRémi Verschelde2018-01-041-9/+9
| | | | Also remove newlines from translated strings.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Updated Linux template extensions to match architecture.Nathan Warden2017-12-121-2/+2
|
* Made Vector::ptrw explicit for writing, compiler was sometimes using the ↵Juan Linietsky2017-11-251-2/+2
| | | | | | wrong function, leading to unnecesary copy on writes and reduced performance.
* Allow configuring iOS exportRuslan Mustakov2017-11-211-0/+1
| | | | | | | | | | | | | | | | | - EditorExportPlugin's _export_begin accepts all the arguments related to the current export (is_debug, path, flags). - EditorExportPlugin API is extended with methods allowing to configure iOS export: add_ios_framework, add_ios_plist_content, add_ios_linker_flags, add_ios_bundle_file. - iOS export template now contains Godot as a static library so that it can be linked with third-party Frameworks and GDNative static libraries. - Adds method to DirAccess for recursive copying of a directory. - Fixes iOS export to work with Xcode 9 (released recently).
* Merge pull request #13061 from eska014/html5-exportRémi Verschelde2017-11-201-12/+56
|\ | | | | Export boot splash image and add option for custom HTML shell file in HTML5 export
| * Export boot splash and add custom HTML file option in HTML5 exportLeon Krause2017-11-201-12/+56
| |
* | Merge pull request #12988 from akien-mga/xdg-home-pathsRémi Verschelde2017-11-201-1/+1
|\ \ | |/ |/| Add support for XDG Base Directory spec
| * Use new XDG folders to dehardcode pathsRémi Verschelde2017-11-191-1/+1
| |
| * EditorSettings: Rename settings_path to settings_dirRémi Verschelde2017-11-171-1/+1
| | | | | | | | Also to prepare for upcoming refactoring for XDG support.
* | Remove asm.js support from HTML5 platformLeon Krause2017-11-181-55/+8
|/ | | | | Since WebGL 2.0 is required, requiring WebAssembly support as well has little impact on compatibility.
* Merge pull request #11154 from eska014/html5-startup-revampPoommetee Ketson2017-09-121-28/+2
|\ | | | | HTML5 start-up overhaul with download progress display
| * HTML5 start-up overhaulLeon Krause2017-09-111-28/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Implement promise-based JS interface for custom HTML page integration - Add download progress callback - Add progress bar and indeterminate spinner to default HTML page - Try downloading files multiple times when failing - Get rid of godotfs.js - Separate steps for engine initialization, game initialization and game start - Allow multiple games on one HTML page - Substitution placeholders only used in .html file - Placeholders renamed: $GODOT_BASE => $GODOT_BASENAME, $GODOT_TMEM -> $GODOT_TOTAL_MEMORY - Emscripten Module is now Engine.RuntimeEnvironment (no longer a global)
* | Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|/