From 65a9465bc163d9dd142eaeac5567783868fd03c4 Mon Sep 17 00:00:00 2001 From: Kazunari Sekigawa Date: Wed, 30 Apr 2025 06:39:46 +0900 Subject: [PATCH] To use Ruby 3.3.8 from MacPorts and fix some Python syntax warnings --- macbuild/build4mac_env.py | 2 +- macbuild/makeDMG4mac.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/macbuild/build4mac_env.py b/macbuild/build4mac_env.py index 3be1c22de..e3527edf6 100755 --- a/macbuild/build4mac_env.py +++ b/macbuild/build4mac_env.py @@ -192,7 +192,7 @@ RubySequoia = { 'exe': '/System/Library/Frameworks/Ruby.framework/Versions # install with 'sudo port install ruby33' # [Key Type Name] = 'MP33' Ruby33MacPorts = { 'exe': '/opt/local/bin/ruby3.3', - 'inc': '/opt/local/include/ruby-3.3.7', + 'inc': '/opt/local/include/ruby-3.3.8', 'lib': '/opt/local/lib/libruby.3.3.dylib' } diff --git a/macbuild/makeDMG4mac.py b/macbuild/makeDMG4mac.py index 972a36374..b7e7aa9da 100755 --- a/macbuild/makeDMG4mac.py +++ b/macbuild/makeDMG4mac.py @@ -424,7 +424,7 @@ def CheckPkgDirectory(): #------------------------------------------------------ # [5] Check the occupied disk space #------------------------------------------------------ - command = "\du -sm %s" % DefaultBundleName + command = r"\du -sm %s" % DefaultBundleName sizeApp = int( os.popen(command).read().strip("\n").split("\t")[0] ) #------------------------------------------------------ @@ -671,14 +671,14 @@ def MakeTargetDMGFile(msg=""): imageDest = "%s/.background" % MountDir if not os.path.isdir(imageDest): os.mkdir(imageDest) - command = "\cp -p %s %s/%s" % (imageSrc, imageDest, BackgroundPNG) + command = r"\cp -p %s %s/%s" % (imageSrc, imageDest, BackgroundPNG) os.system(command) #-------------------------------------------------------- # (6) Create a symbolic link to /Applications #-------------------------------------------------------- print( ">>> (6) Creating a symbolic link to /Applications..." ) - command = "\ln -s %s %s/%s" % (RootApplications, MountDir, RootApplications) + command = r"\ln -s %s %s/%s" % (RootApplications, MountDir, RootApplications) os.system(command) #-------------------------------------------------------- @@ -702,7 +702,7 @@ def MakeTargetDMGFile(msg=""): print( ">>> (8) Copying the volume icon..." ) iconsSrc = "macbuild/Resources/%s" % VolumeIcons iconsDest = "%s/.VolumeIcon.icns" % MountDir - command1 = "\cp -p %s %s" % (iconsSrc, iconsDest) + command1 = r"\cp -p %s %s" % (iconsSrc, iconsDest) command2 = "SetFile -c icnC %s" % iconsDest os.system(command1) sleep(2) @@ -713,7 +713,7 @@ def MakeTargetDMGFile(msg=""): # (9) Change the permission #-------------------------------------------------------- print( ">>> (9) Changing permission to 755..." ) - command = "\chmod -Rf 755 %s &> /dev/null" % MountDir + command = r"\chmod -Rf 755 %s &> /dev/null" % MountDir os.system(command) #--------------------------------------------------------