Android fixes
This commit is contained in:
@@ -127,5 +127,22 @@ if (export_version_info) {
|
|||||||
project.add_assets(dir + "/version.json", { destination: "data/{name}" });
|
project.add_assets(dir + "/version.json", { destination: "data/{name}" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let export_data_list = flags.android; // .apk contents
|
||||||
|
if (export_data_list) {
|
||||||
|
let root = "../" + flags.name.toLowerCase();
|
||||||
|
let data_list = {
|
||||||
|
"/data/plugins": fs_readdir("../base/assets/plugins").concat(fs_readdir(root + "/assets/plugins")).join(","),
|
||||||
|
"/data/export_presets": fs_readdir(root + "/assets/export_presets").join(","),
|
||||||
|
"/data/keymap_presets": fs_readdir(root + "/assets/keymap_presets").join(","),
|
||||||
|
"/data/locale": fs_readdir("../base/assets/locale").join(","),
|
||||||
|
"/data/meshes": fs_readdir(root + "/assets/meshes").join(","),
|
||||||
|
"/data/themes": fs_readdir("../base/assets/themes").join(","),
|
||||||
|
};
|
||||||
|
let dir = "../" + flags.name.toLowerCase() + "/build";
|
||||||
|
fs_ensuredir(dir);
|
||||||
|
fs_writefile(dir + "/data_list.json", JSON.stringify(data_list));
|
||||||
|
project.add_assets(dir + "/data_list.json", { destination: "data/{name}" });
|
||||||
|
}
|
||||||
|
|
||||||
project.flatten();
|
project.flatten();
|
||||||
return project;
|
return project;
|
||||||
|
|||||||
+13
-16
@@ -33,9 +33,9 @@ let file_cloud_sizes: map_t<string, i32> = null;
|
|||||||
|
|
||||||
let _file_init_cloud_bytes_done: ()=>void;
|
let _file_init_cloud_bytes_done: ()=>void;
|
||||||
|
|
||||||
// ///if arm_android
|
///if arm_android
|
||||||
// let file_internal: map_t<string, string[]> = null; // .apk contents
|
let file_internal: map_t<string, string[]> = null; // .apk contents
|
||||||
// ///end
|
///end
|
||||||
|
|
||||||
function file_read_directory(path: string): string[] {
|
function file_read_directory(path: string): string[] {
|
||||||
if (starts_with(path, "cloud")) {
|
if (starts_with(path, "cloud")) {
|
||||||
@@ -48,19 +48,16 @@ function file_read_directory(path: string): string[] {
|
|||||||
return empty;
|
return empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ///if arm_android
|
///if arm_android
|
||||||
// path = string_replace_all(path, "//", "/");
|
path = string_replace_all(path, "//", "/");
|
||||||
// if (file_internal == null) {
|
if (file_internal == null) {
|
||||||
// file_internal = [];
|
let s: string = sys_buffer_to_string(data_get_blob("/data/data_list.json"));
|
||||||
// map_set(file_internal, "/data/plugins", BuildMacros.readDirectory("out/data/plugins"));
|
file_internal = json_parse_to_map(s);
|
||||||
// map_set(file_internal, "/data/export_presets", BuildMacros.readDirectory("out/data/export_presets"));
|
}
|
||||||
// map_set(file_internal, "/data/keymap_presets", BuildMacros.readDirectory("out/data/keymap_presets"));
|
if (map_get(file_internal, path) != null) {
|
||||||
// map_set(file_internal, "/data/locale", BuildMacros.readDirectory("out/data/locale"));
|
return string_split(map_get(file_internal, path), ",");
|
||||||
// map_set(file_internal, "/data/meshes", BuildMacros.readDirectory("out/data/meshes"));
|
}
|
||||||
// map_set(file_internal, "/data/themes", BuildMacros.readDirectory("out/data/themes"));
|
///end
|
||||||
// }
|
|
||||||
// if (file_internal.exists(path)) return map_get(file_internal, path);
|
|
||||||
// ///end
|
|
||||||
|
|
||||||
let files: string[] = string_split(iron_read_directory(path), "\n");
|
let files: string[] = string_split(iron_read_directory(path), "\n");
|
||||||
///if arm_windows
|
///if arm_windows
|
||||||
|
|||||||
Reference in New Issue
Block a user