#include "global.h" static char *export_player_readme = "\ To start the player locally, use 'python -m http.server'\ and open http://localhost:8000/ in the browser.\n\ "; static char *export_player_index = "\ \n\ \n\ \n\ \n\ Player\n\ \n\ \n\ \n\ \n\
\n\
\n\

Player

\n\

This browser does not support WebGPU or it is disabled.

\n\
\n\
\n\ \n\ \n\ \n\ \n\ "; static void export_player_run_on_download(char *url, buffer_t *ab) {} void export_player_run(char *path) { char *path_base = path_base_dir(path); char *_project_filepath = string_copy(project_filepath); project_filepath = string("%s/%s", path_base, "start.arm"); bool _pack_assets_on_save = context_raw->pack_assets_on_save; context_raw->pack_assets_on_save = true; export_arm_run_project(); context_raw->pack_assets_on_save = _pack_assets_on_save; project_filepath = _project_filepath; if (box_export_h_export_player_target->i == PLAYER_TARGET_WEB) { char *start_js = string("%s/start.js", path_base); iron_file_download("https://armorpaint.app/start.js", &export_player_run_on_download, 0, start_js); char *start_wasm = string("%s/start.wasm", path_base); iron_file_download("https://armorpaint.app/start.wasm", &export_player_run_on_download, 0, start_wasm); char *readme_txt = string("%s/readme.txt", path_base); iron_file_save_bytes(readme_txt, sys_string_to_buffer(export_player_readme), 0); char *index_html = string("%s/index.html", path_base); iron_file_save_bytes(index_html, sys_string_to_buffer(export_player_index), 0); } else if (box_export_h_export_player_target->i == PLAYER_TARGET_WINDOWS) { char *player_bin_src = string("%s%s%s", iron_internal_files_location(), PATH_SEP, "ArmorPaint.exe"); char *player_bin_to = string("%s/player.exe", path_base); file_copy(player_bin_src, player_bin_to); } else if (box_export_h_export_player_target->i == PLAYER_TARGET_LINUX) { char *player_bin_src = string("%s%s%s", iron_internal_files_location(), PATH_SEP, "ArmorPaint"); char *player_bin_to = string("%s/player", path_base); file_copy(player_bin_src, player_bin_to); } else if (box_export_h_export_player_target->i == PLAYER_TARGET_MACOS) { console_error("Not implemented"); } }