Move embedded executables from Resources to MacOS directory

This commit is contained in:
Allan Odgaard
2021-05-19 13:48:01 +02:00
parent 5d87b8ef9b
commit 2f09c4562b
4 changed files with 8 additions and 7 deletions

View File

@@ -23,7 +23,8 @@ target "${dirname}" {
prefix "${target}.app/Contents"
files resources/* icons/*.icns @PrivilegedTool @mate @tm_query "Resources"
files resources/* icons/*.icns @PrivilegedTool "Resources"
files @mate @tm_query "MacOS"
files about/* "Resources/About"
files Info.plist "."
copy support/* "SharedSupport"

View File

@@ -12,10 +12,10 @@ windowTitle = '$TM_DISPLAYNAME$windowTitleProject$windowTitleSCM'
LANG = "en_US.UTF-8"
LC_CTYPE = "en_US.UTF-8"
TM_APP_PATH = "${CWD/\/Contents\/Resources$//}"
TM_MATE = "$CWD/mate"
TM_MATE = "${TM_APP_PATH}/Contents/MacOS/mate"
MATEFLAGS = "--no-recent"
TM_QUERY = "$CWD/tm_query"
TM_SCM_COMMIT_WINDOW = "$CWD/CommitWindowTool"
TM_QUERY = "${TM_APP_PATH}/Contents/MacOS/tm_query"
TM_SCM_COMMIT_WINDOW = "${TM_APP_PATH}/Contents/MacOS/CommitWindowTool"
[ attr.untitled ]
fileType = text.plain

View File

@@ -2,7 +2,7 @@ target "${dirname}" {
require OakAppKit OakFoundation OakTextView bundles document io ns plist regexp text
headers src/CommitWindow.h
sources src/*.mm
files @CommitWindowTool "Resources"
files @CommitWindowTool "MacOS"
frameworks Cocoa
}

View File

@@ -261,7 +261,7 @@ static bool uninstall_mate (std::string const& path)
- (void)installMateAs:(NSString*)dstPath
{
if(NSString* srcPath = [[NSBundle mainBundle] pathForResource:@"mate" ofType:nil])
if(NSString* srcPath = [NSBundle.mainBundle pathForAuxiliaryExecutable:@"mate"])
{
if(install_mate(to_s(srcPath), to_s(dstPath)))
{
@@ -328,7 +328,7 @@ static bool uninstall_mate (std::string const& path)
{
NSString* oldMate = [[NSUserDefaults.standardUserDefaults stringForKey:kUserDefaultsMateInstallPathKey] stringByExpandingTildeInPath];
NSString* oldVersion = [NSUserDefaults.standardUserDefaults stringForKey:kUserDefaultsMateInstallVersionKey];
NSString* newMate = [[NSBundle mainBundle] pathForResource:@"mate" ofType:nil];
NSString* newMate = [NSBundle.mainBundle pathForAuxiliaryExecutable:@"mate"];
if(oldMate && newMate)
{