From 1594925c41931c65e37405aec2ab05d4cab037d7 Mon Sep 17 00:00:00 2001 From: Portal <93601172+PortalG@users.noreply.github.com> Date: Sun, 8 Mar 2026 09:09:03 -0400 Subject: [PATCH 1/3] Replaced rsync implementation with cp and tar, and made Robocopy copy with more aggressive patterns. --- CMakeLists.txt | 74 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c6eb80ede..25851ea531 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,6 +99,7 @@ if(CMAKE_HOST_WIN32) "${CMAKE_CURRENT_SOURCE_DIR}/x64/Release" "${CMAKE_CURRENT_BINARY_DIR}" /S /MT /R:0 /W:0 /NP + /XF "*.msscmp" ) message(STATUS "Starting asset copy...") execute_process( @@ -106,45 +107,58 @@ if(CMAKE_HOST_WIN32) "${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client" "${CMAKE_CURRENT_BINARY_DIR}" /S /MT /R:0 /W:0 /NP - /XF "*.cpp" "*.c" "*.h" "*.hpp" "*.asm" - "*.xml" "*.lang" "*.vcxproj" "*.vcxproj.*" "*.sln" - "*.docx" "*.xls" - "*.bat" "*.cmd" "*.ps1" "*.py" - "*Test*" - /XD "Durango*" "Orbis*" "PS*" "Xbox" - ) - message(STATUS "Patching Windows64Media...") - execute_process( - COMMAND robocopy.exe - "${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/DurangoMedia" - "${CMAKE_CURRENT_BINARY_DIR}/Windows64Media" - /S /MT /R:0 /W:0 /NP - /XF "*.h" "*.xml" "*.lang" "*.bat" + /XF + "*.c" "*.cpp" "*.h" "*.hpp" "*.xui" "*.inl" "*.asm" # Source code. + "*.vcxproj" "*.vcxproj.*" "*.sln" "*.cd" # Project files. + "*.xml" "*.lang" "*.resx" "*.loc" # Language files. + "*.docx" "*.xls" # Office documents. + "*.bat" "*.cmd" "*.ps1" "*.py" # Scripts. + "*.lib" "*.lib.*" # Static lib. + "*.swf" "*.msscmp" "*.wav" # Uncompiled/unused res. + "*Test*" # Test files. (who could have guessed) + "MediaPS*" "MediaOrbis.arc" "MediaDurango.arc" # Console media. + "ReadMe.txt" "Network Implementation Notes.txt" # Extra. + /XD + "Durango*" "Orbis*" "PS*" "Xbox" # Console data. + "sce_sys" "TROPDIR" # Playstation data. + "Graphics" "DummyTexturePack" "GameConfig" # Extra. ) + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Windows64/GameHDD") elseif(CMAKE_HOST_UNIX) message(STATUS "Starting redist copy...") execute_process( - COMMAND rsync -av "${CMAKE_CURRENT_SOURCE_DIR}/x64/Release/" "${CMAKE_CURRENT_BINARY_DIR}/" + COMMAND cp -av "${CMAKE_CURRENT_SOURCE_DIR}/x64/Release/" "${CMAKE_CURRENT_BINARY_DIR}/" ) message(STATUS "Starting asset copy...") execute_process( - COMMAND rsync -av - "--exclude=*.cpp" "--exclude=*.c" "--exclude=*.h" "--exclude=*.hpp" "--exclude=*.asm" - "--exclude=*.xml" "--exclude=*.lang" "--exclude=*.vcxproj" "--exclude=*.vcxproj.*" "--exclude=*.sln" - "--exclude=*.docx" "--exclude=*.xls" - "--exclude=*.bat" "--exclude=*.cmd" "--exclude=*.ps1" "--exclude=*.py" - "--exclude=*Test*" - "--exclude=Durango*" "--exclude=Orbis*" "--exclude=PS*" "--exclude=Xbox" - "${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/" "${CMAKE_CURRENT_BINARY_DIR}/" - ) - message(STATUS "Patching Windows64Media...") - execute_process( - COMMAND rsync -av - "--exclude=*.h" "--exclude=*.xml" "--exclude=*.lang" "--exclude=*.bat" - "${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/DurangoMedia/" "${CMAKE_CURRENT_BINARY_DIR}/Windows64Media/" + COMMAND tar + "--exclude=*.c" "--exclude=*.cpp" "--exclude=*.h" "--exclude=*.hpp" # Source code. + "--exclude=*.xui" "--exclude=*.inl" "--exclude=*.asm" + "--exclude=*.vcxproj" "--exclude=*.vcxproj.*" # Project files. + "--exclude=*.sln" "--exclude=*.cd" + "--exclude=*.xml" "--exclude=*.lang" # Language files. + "--exclude=*.resx" "--exclude=*.loc" + "--exclude=*.docx" "--exclude=*.xls" # Office documents. + "--exclude=*.bat" "--exclude=*.cmd" # Scripts. + "--exclude=*.ps1" "--exclude=*.py" + "--exclude=*.lib" "--exclude=*.lib.*" # Static lib. + "--exclude=*.swf" "--exclude=*.msscmp" "--exclude=*.wav" # Uncompiled/unused res. + "--exclude=*Test*" # Test files. (who could have guessed) + "--exclude=MediaPS*" "--exclude=MediaOrbis.arc" # Console media. + "--exclude=MediaDurango.arc" + "--exclude=ReadMe.txt" "--exclude=Network Implementation Notes.txt" # Extra. + + "--exclude=Durango*" "--exclude=Orbis*" # Console data. + "--exclude=PS*" "--exclude=Xbox" + "--exclude=sce_sys" "--exclude=TROPDIR" # Playstation data. + "--exclude=Graphics" "--exclude=DummyTexturePack" # Extra. + "--exclude=GameConfig" + -cf - -C "${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/" . + COMMAND tar -xvf - -C "${CMAKE_CURRENT_BINARY_DIR}/" ) + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Windows64/GameHDD") else() - message(FATAL_ERROR "Redist and asset copying is only supported on Windows (Robocopy) and Unix systems (rsync).") + message(FATAL_ERROR "Redist and asset copying is only supported on Windows (Robocopy) and Unix systems (cp, tar).") endif() set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT MinecraftClient) From 208d33d3f403f2435402ca558c042e6712de7d7d Mon Sep 17 00:00:00 2001 From: Portal <93601172+PortalG@users.noreply.github.com> Date: Mon, 9 Mar 2026 09:57:34 -0400 Subject: [PATCH 2/3] Cleaned up formating and fixed typos. --- CMakeLists.txt | 60 +++++++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 25851ea531..d89897abdb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,7 +120,7 @@ if(CMAKE_HOST_WIN32) "ReadMe.txt" "Network Implementation Notes.txt" # Extra. /XD "Durango*" "Orbis*" "PS*" "Xbox" # Console data. - "sce_sys" "TROPDIR" # Playstation data. + "sce_sys" "TROPDIR" # PlayStation data. "Graphics" "DummyTexturePack" "GameConfig" # Extra. ) file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Windows64/GameHDD") @@ -132,31 +132,45 @@ elseif(CMAKE_HOST_UNIX) message(STATUS "Starting asset copy...") execute_process( COMMAND tar - "--exclude=*.c" "--exclude=*.cpp" "--exclude=*.h" "--exclude=*.hpp" # Source code. - "--exclude=*.xui" "--exclude=*.inl" "--exclude=*.asm" - "--exclude=*.vcxproj" "--exclude=*.vcxproj.*" # Project files. - "--exclude=*.sln" "--exclude=*.cd" - "--exclude=*.xml" "--exclude=*.lang" # Language files. - "--exclude=*.resx" "--exclude=*.loc" - "--exclude=*.docx" "--exclude=*.xls" # Office documents. - "--exclude=*.bat" "--exclude=*.cmd" # Scripts. - "--exclude=*.ps1" "--exclude=*.py" - "--exclude=*.lib" "--exclude=*.lib.*" # Static lib. - "--exclude=*.swf" "--exclude=*.msscmp" "--exclude=*.wav" # Uncompiled/unused res. - "--exclude=*Test*" # Test files. (who could have guessed) - "--exclude=MediaPS*" "--exclude=MediaOrbis.arc" # Console media. - "--exclude=MediaDurango.arc" - "--exclude=ReadMe.txt" "--exclude=Network Implementation Notes.txt" # Extra. - - "--exclude=Durango*" "--exclude=Orbis*" # Console data. - "--exclude=PS*" "--exclude=Xbox" - "--exclude=sce_sys" "--exclude=TROPDIR" # Playstation data. - "--exclude=Graphics" "--exclude=DummyTexturePack" # Extra. - "--exclude=GameConfig" + "--exclude=*.c" "--exclude=*.cpp" "--exclude=*.h" "--exclude=*.hpp" # Source code. + "--exclude=*.xui" "--exclude=*.inl" "--exclude=*.asm" + + "--exclude=*.vcxproj" "--exclude=*.vcxproj.*" # Project files. + "--exclude=*.sln" "--exclude=*.cd" + + "--exclude=*.xml" "--exclude=*.lang" # Language files. + "--exclude=*.resx" "--exclude=*.loc" + + "--exclude=*.docx" "--exclude=*.xls" # Office documents. + + "--exclude=*.bat" "--exclude=*.cmd" # Scripts. + "--exclude=*.ps1" "--exclude=*.py" + + "--exclude=*.lib" "--exclude=*.lib.*" # Static lib. + + "--exclude=*.swf" "--exclude=*.msscmp" "--exclude=*.wav" # Uncompiled/unused res. + + "--exclude=*Test*" # Test files. (who could have guessed) + + "--exclude=MediaPS*" "--exclude=MediaOrbis.arc" # Console media. + "--exclude=MediaDurango.arc" + + "--exclude=ReadMe.txt" "--exclude=Network Implementation Notes.txt" # Extra. + + + + "--exclude=Durango*" "--exclude=Orbis*" # Console data. + "--exclude=PS*" "--exclude=Xbox" + + "--exclude=sce_sys" "--exclude=TROPDIR" # PlayStation data. + + "--exclude=Graphics" "--exclude=DummyTexturePack" # Extra. + "--exclude=GameConfig" + -cf - -C "${CMAKE_CURRENT_SOURCE_DIR}/Minecraft.Client/" . COMMAND tar -xvf - -C "${CMAKE_CURRENT_BINARY_DIR}/" ) - file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Windows64/GameHDD") + file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Windows64/GameHDD/") else() message(FATAL_ERROR "Redist and asset copying is only supported on Windows (Robocopy) and Unix systems (cp, tar).") endif() From e8e78419fbe203959a22b579b7027408b91ac3d0 Mon Sep 17 00:00:00 2001 From: Portal <93601172+PortalG@users.noreply.github.com> Date: Sat, 21 Mar 2026 05:04:19 -0400 Subject: [PATCH 3/3] Replaced rsync with tar and cp. --- cmake/CopyFileScript.cmake | 8 ++++---- cmake/CopyFolderScript.cmake | 17 +++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/cmake/CopyFileScript.cmake b/cmake/CopyFileScript.cmake index a6b2f8397b..9b3668860e 100644 --- a/cmake/CopyFileScript.cmake +++ b/cmake/CopyFileScript.cmake @@ -39,12 +39,12 @@ if(CMAKE_HOST_WIN32) elseif(CMAKE_HOST_UNIX) execute_process( - COMMAND rsync -av ${COPY_SOURCE} "${COPY_DEST}/" - RESULT_VARIABLE rs + COMMAND cp -av "${COPY_SOURCE}/" "${COPY_DEST}/" + RESULT_VARIABLE cp ) - if(rs GREATER 0) # Any non-zero exit code indicates an error - message(FATAL_ERROR "rsync failed (exit code ${rs})") + if(cp GREATER 0) # Any non-zero exit code indicates an error + message(FATAL_ERROR "cp failed (exit code ${cp})") endif() else() message(FATAL_ERROR "Unsupported host platform for asset copying.") diff --git a/cmake/CopyFolderScript.cmake b/cmake/CopyFolderScript.cmake index e725b68dce..d2bfa76ea9 100644 --- a/cmake/CopyFolderScript.cmake +++ b/cmake/CopyFolderScript.cmake @@ -46,24 +46,25 @@ if(CMAKE_HOST_WIN32) message(FATAL_ERROR "robocopy failed (exit code ${rc})") endif() elseif(CMAKE_HOST_UNIX) - set(rsync_args -av) + set(tar_args) foreach(pattern IN LISTS EXCLUDE_FILES) - list(APPEND rsync_args "--exclude=${pattern}") + list(APPEND tar_args "--exclude=${pattern}") endforeach() foreach(pattern IN LISTS EXCLUDE_FOLDERS) - list(APPEND rsync_args "--exclude=${pattern}") + list(APPEND tar_args "--exclude=${pattern}") endforeach() - # Trailing slashes ensure rsync copies contents, not the directory itself + # Trailing slashes ensure tar copies contents, not the directory itself execute_process( - COMMAND rsync ${rsync_args} "${COPY_SOURCE}/" "${COPY_DEST}/" - RESULT_VARIABLE rs + COMMAND tar ${tar_args} -cf - -C "${COPY_SOURCE}/" . + COMMAND tar -xvf - -C "${COPY_DEST}/" + RESULT_VARIABLE tr ) - if(rs GREATER 0) # Any non-zero exit code indicates an error - message(FATAL_ERROR "rsync failed (exit code ${rs})") + if(tr GREATER 0) # Any non-zero exit code indicates an error + message(FATAL_ERROR "tar failed (exit code ${tr})") endif() else() message(FATAL_ERROR "Unsupported host platform for asset copying.")