windows support

This commit is contained in:
Nishi 2025-11-25 11:08:13 +09:00
commit b9004acd79
Signed by: nishi
GPG key ID: 27EF69B208EB9343
16 changed files with 208 additions and 32 deletions

View file

@ -2,6 +2,10 @@
#include <MDE/Core/String.h>
#include <MDE/Core/Directory.h>
#ifdef _WIN32
#include <windows.h>
#endif
void MDEFileCopy(const char* src, const char* dst) {
char buffer[4096];
FILE* in;
@ -65,6 +69,13 @@ char* MDEFileOptimizeAbsolutePath(const char* path) {
}
char* MDEFileAbsolutePath(const char* path) {
#ifdef _WIN32
char* r = malloc(MAX_PATH);
GetFullPathName(path, MAX_PATH, r, NULL);
return r;
#else
char* p;
char* r;
@ -83,4 +94,5 @@ char* MDEFileAbsolutePath(const char* path) {
free(p);
return r;
#endif
}