Files
armorpaint/paint/sources/io/import_plugin.c
T

16 lines
531 B
C
Raw Normal View History

2026-03-09 13:17:15 +01:00
2026-06-04 11:00:05 +02:00
#include "../global.h"
2026-03-09 13:17:15 +01:00
2026-03-07 21:12:59 +01:00
void import_plugin_run(char *path) {
2026-03-06 12:56:38 +01:00
if (!path_is_plugin(path)) {
console_error(strings_unknown_asset_format());
return;
}
2026-03-07 21:12:59 +01:00
char *filename = substring(path, string_last_index_of(path, PATH_SEP) + 1, string_length(path));
2026-03-10 21:00:00 +01:00
char *dst_path = string("%s%splugins%s%s", path_data(), PATH_SEP, PATH_SEP, filename);
2026-08-21 22:40:25 +02:00
file_copy(path, dst_path); // Copy to plugin folder
2026-03-07 21:12:59 +01:00
box_preferences_files_plugin = NULL; // Refresh file list
2026-03-15 11:37:45 +01:00
console_info(string("%s %s", tr("Plugin imported:"), filename));
2026-03-06 12:56:38 +01:00
}