2021-07-31 17:46:09 +02:00
|
|
|
#if defined(OS_WINDOWS)
|
2021-07-31 18:33:55 +02:00
|
|
|
|
2021-08-22 20:22:46 +02:00
|
|
|
#define RESOURCE(name, path) \
|
|
|
|
__asm__ ( \
|
|
|
|
".section .rodata\n" \
|
|
|
|
".global " #name "\n" \
|
|
|
|
".global " #name "_size\n" \
|
|
|
|
#name ":\n" \
|
|
|
|
".incbin \"" path "\"\n" \
|
|
|
|
#name "_size:\n" \
|
|
|
|
".int " #name "_size - " #name "\n" \
|
|
|
|
".align 8\n" \
|
|
|
|
)
|
|
|
|
|
|
|
|
#define RESOURCE_NULL_TERMINATED(name, path) \
|
|
|
|
__asm__ ( \
|
|
|
|
".section .rodata\n" \
|
|
|
|
".global " #name "\n" \
|
|
|
|
".global " #name "_size\n" \
|
|
|
|
#name ":\n" \
|
|
|
|
".incbin \"" path "\"\n" \
|
|
|
|
".byte 0\n" \
|
|
|
|
#name "_size:\n" \
|
|
|
|
".int " #name "_size - " #name "\n" \
|
|
|
|
".align 8\n" \
|
|
|
|
)
|
2021-07-31 18:33:55 +02:00
|
|
|
|
2021-08-17 18:24:15 +02:00
|
|
|
#elif defined(OS_MACOS)
|
|
|
|
|
2021-10-09 23:07:58 +02:00
|
|
|
#define RESOURCE(name, path) \
|
2021-08-22 20:22:46 +02:00
|
|
|
__asm__ ( \
|
2021-10-09 23:07:58 +02:00
|
|
|
".global _" #name ";\n" \
|
|
|
|
".global _" #name "_size;\n" \
|
|
|
|
"_" #name ":\n" \
|
2021-08-22 20:22:46 +02:00
|
|
|
".incbin \"" path "\";\n" \
|
2021-10-09 23:07:58 +02:00
|
|
|
".align 8;\n" \
|
|
|
|
"_" #name "_size:\n" \
|
|
|
|
".int _" #name "_size - _" #name ";\n" \
|
2021-08-22 20:22:46 +02:00
|
|
|
".align 8;\n" \
|
|
|
|
)
|
|
|
|
|
|
|
|
#define RESOURCE_NULL_TERMINATED(name, path) \
|
|
|
|
__asm__ ( \
|
2021-10-09 23:07:58 +02:00
|
|
|
".global _" #name ";\n" \
|
|
|
|
".global _" #name "_size;\n" \
|
|
|
|
"_" #name ":\n" \
|
2021-08-22 20:22:46 +02:00
|
|
|
".incbin \"" path "\";\n" \
|
|
|
|
".byte 0\n" \
|
2021-10-09 23:07:58 +02:00
|
|
|
".align 8;\n" \
|
|
|
|
"_" #name "_size:\n" \
|
|
|
|
".int _" #name "_size - _" #name ";\n" \
|
2021-08-22 20:22:46 +02:00
|
|
|
".align 8;\n" \
|
|
|
|
)
|
2021-08-17 18:24:15 +02:00
|
|
|
|
|
|
|
#elif defined(OS_LINUX)
|
2021-07-31 17:46:09 +02:00
|
|
|
|
2021-08-22 20:22:46 +02:00
|
|
|
#define RESOURCE(name, path) \
|
|
|
|
__asm__ ( \
|
|
|
|
".section .rodata\n" \
|
|
|
|
".global " #name "\n" \
|
|
|
|
".global " #name "_size\n" \
|
|
|
|
#name ":\n" \
|
|
|
|
".incbin \"" path "\"\n" \
|
|
|
|
".byte 0\n" \
|
|
|
|
".type " #name ", @object\n" \
|
|
|
|
".size " #name "_size, 1\n" \
|
|
|
|
#name "_size:\n" \
|
|
|
|
".int " #name "_size - " #name "\n" \
|
|
|
|
".align 8\n" \
|
|
|
|
)
|
|
|
|
|
|
|
|
#define RESOURCE_NULL_TERMINATED(name, path) \
|
|
|
|
__asm__ ( \
|
|
|
|
".section .rodata\n" \
|
|
|
|
".global " #name "\n" \
|
|
|
|
".global " #name "_size\n" \
|
|
|
|
#name ":\n" \
|
|
|
|
".incbin \"" path "\"\n" \
|
|
|
|
".byte 0\n" \
|
|
|
|
".type " #name ", @object\n" \
|
|
|
|
".size " #name "_size, 1\n" \
|
|
|
|
#name "_size:\n" \
|
|
|
|
".int " #name "_size - " #name "\n" \
|
|
|
|
".align 8\n" \
|
|
|
|
)
|
2021-07-31 17:46:09 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2021-07-31 17:10:19 +02:00
|
|
|
|
|
|
|
RESOURCE(banner_light, "../../../res/resources/banner_light.png");
|
|
|
|
RESOURCE(banner_dark, "../../../res/resources/banner_dark.png");
|
|
|
|
RESOURCE(splash, "../../../res/resources/splash.png");
|
2021-08-18 22:36:46 +02:00
|
|
|
RESOURCE(imhex_logo, "../../../res/resources/logo.png");
|
2021-07-31 17:10:19 +02:00
|
|
|
|
2021-08-22 20:22:46 +02:00
|
|
|
RESOURCE_NULL_TERMINATED(cacert, "../../../res/resources/cacert.pem");
|