Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iTerm2: macOS 13 codesign build failure fix
temporary python 3 patch for macOS 12
- Loading branch information
1 parent
a72bfa8
commit 3834a9b
Showing
2 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
diff --git a/sources/PTYSession.m b/sources/PTYSession.m | ||
index 28724c40c3..8132d872b3 100644 | ||
--- sources/PTYSession.m | ||
+++ sources/PTYSession.m | ||
@@ -2261,7 +2261,7 @@ - (NSDictionary *)environmentForNewJobFromEnvironment:(NSDictionary *)environmen | ||
substitutions:(NSDictionary *)substitutions { | ||
DLog(@"environmentForNewJobFromEnvironment:%@ substitutions:%@", | ||
environment, substitutions); | ||
- NSMutableDictionary *env = [[environment mutableCopy] autorelease]; | ||
+ NSMutableDictionary *env = environment ? [[environment mutableCopy] autorelease] : [NSMutableDictionary dictionary]; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
i0ntempest
Author
Member
|
||
if (env[TERM_ENVNAME] == nil) { | ||
env[TERM_ENVNAME] = _termVariable; | ||
} | ||
diff --git a/tools/updateVersion.py b/tools/updateVersion.py | ||
index 82ec7ce5c5..e5c58aff9f 100755 | ||
--- tools/updateVersion.py | ||
+++ tools/updateVersion.py | ||
@@ -1,41 +1,37 @@ | ||
-#!/usr/bin/python | ||
+#!/usr/bin/python3 | ||
|
||
-import commands | ||
import os | ||
-import sys | ||
import time | ||
+import subprocess | ||
|
||
try: | ||
- del os.environ["MACOSX_DEPLOYMENT_TARGET"] | ||
+ del os.environ["MACOSX_DEPLOYMENT_TARGET"] | ||
except KeyError: | ||
- pass | ||
+ pass | ||
from Foundation import NSMutableDictionary | ||
|
||
if os.environ["CONFIGURATION"] == "Development": | ||
- cmd = "git log -1 --format=\"%H\"" | ||
- status, output = commands.getstatusoutput(cmd) | ||
- if status != 0: | ||
- sys.exit(status) | ||
+ cmd = "git log -1 --format=\"%H\"" | ||
+ output = subprocess.check_output(cmd, shell=True).decode("utf-8") | ||
|
||
- revision = "git.unknown" | ||
- for line in output.split("\n"): | ||
- if len(line.strip()) > 0: | ||
- revision = "git." + line.strip()[:10] | ||
- break | ||
+ revision = "git.unknown" | ||
+ for line in output.split("\n"): | ||
+ if len(line.strip()) > 0: | ||
+ revision = "git." + line.strip()[:10] | ||
+ break | ||
|
||
elif os.environ["CONFIGURATION"] == "Nightly": | ||
- revision = time.strftime("%Y%m%d-nightly") | ||
+ revision = time.strftime("%Y%m%d-nightly") | ||
else: | ||
- revision = time.strftime("%Y%m%d") | ||
+ revision = time.strftime("%Y%m%d") | ||
|
||
buildDir = os.environ["BUILT_PRODUCTS_DIR"] | ||
infoFile = os.environ["INFOPLIST_PATH"] | ||
path = os.path.join(buildDir, infoFile) | ||
plist = NSMutableDictionary.dictionaryWithContentsOfFile_(path) | ||
version = open("version.txt").read().strip() % {"extra": revision} | ||
-print "Updating versions:", infoFile, version | ||
+print("Updating versions:", infoFile, version) | ||
plist["CFBundleShortVersionString"] = version | ||
plist["CFBundleGetInfoString"] = version | ||
plist["CFBundleVersion"] = version | ||
plist.writeToFile_atomically_(path, 1) | ||
- |
Is this related to the python change?
This changes the compiled code so the revision (when this patch is used) needs to be increased.