Compare commits

..

3 Commits

Author SHA1 Message Date
ahigerd 43afb3e194
Merge f415084807 into 4007e19736 2024-12-31 01:26:41 +01:00
Vicki Pfau 4007e19736 CMake: Fix entitlements plist filename 2024-12-29 17:38:14 -08:00
Vicki Pfau ad0d3972a6 Updater: Fix rewriting folders and files on Windows (fixes #3384) 2024-12-28 22:47:13 -08:00
3 changed files with 14 additions and 9 deletions

View File

@ -48,6 +48,7 @@ Misc:
- Qt: Show a dummy shader settings tab if shaders aren't supported
- Res: Port NSO-gba-colors shader (closes mgba.io/i/2834)
- Scripting: Add `callbacks:oneshot` for single-call callbacks
- Updater: Fix rewriting folders and files on Windows (fixes mgba.io/i/3384)
0.10.4: (2024-12-07)
Emulation fixes:

View File

@ -529,7 +529,7 @@ if(APPLE)
set(DEPLOY_OPTIONS ${DEPLOY_OPTIONS} -R "${CROSS_ROOT}")
endif()
if($ENV{CODESIGN_IDENTITY})
set(DEPLOY_OPTIONS ${DEPLOY_OPTIONS} -s "$ENV{CODESIGN_IDENTITY}" -E "${PROJECT_SOURCE_DIR}/res/entitlements.xml")
set(DEPLOY_OPTIONS ${DEPLOY_OPTIONS} -s "$ENV{CODESIGN_IDENTITY}" -E "${PROJECT_SOURCE_DIR}/res/entitlements.plist")
endif()
install(CODE "execute_process(COMMAND \"${PROJECT_SOURCE_DIR}/tools/deploy-mac.py\" -v ${DEPLOY_OPTIONS} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${APPDIR}/${PROJECT_NAME}.app\")")
endif()

View File

@ -133,14 +133,11 @@ bool extractArchive(struct VDir* archive, const char* root, bool prefix) {
errno = 0;
vfOut = VFileOpen(path, O_WRONLY | O_CREAT | O_TRUNC);
if (!vfOut) {
if (errno == EACCES) {
#ifdef _WIN32
Sleep(1000);
#else
sleep(1);
#endif
vfOut = VFileOpen(path, O_WRONLY | O_CREAT | O_TRUNC);
} else if (errno == EISDIR) {
int error = errno;
struct stat st;
if (error == EISDIR || (stat(path, &st) >= 0 && S_ISDIR(st.st_mode))) {
// Windows maps STATUS_FILE_IS_A_DIRECTORY to ERROR_ACCESS_DENIED,
// which then gets mapped to EACCESS, because everything is awful
fprintf(logfile, "rm -r %s\n", path);
if (!rmdirRecursive(VDirOpen(path))) {
return false;
@ -151,6 +148,13 @@ bool extractArchive(struct VDir* archive, const char* root, bool prefix) {
RemoveDirectoryW(wpath);
#else
rmdir(path);
#endif
vfOut = VFileOpen(path, O_WRONLY | O_CREAT | O_TRUNC);
} else if (error == EACCES || error == ETXTBSY) {
#ifdef _WIN32
Sleep(1000);
#else
sleep(1);
#endif
vfOut = VFileOpen(path, O_WRONLY | O_CREAT | O_TRUNC);
}