Skip to content

Commit

Permalink
mac m2 update
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Nov 9, 2023
1 parent 67e1096 commit f6038ee
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 23 deletions.
8 changes: 5 additions & 3 deletions mdserver/mdserver.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@
82F8CFEA1A70E5FC00B9FD25 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1230;
LastUpgradeCheck = 1500;
ORGANIZATIONNAME = midoks.cachecha.com;
TargetAttributes = {
82F8CFF11A70E5FC00B9FD25 = {
Expand Down Expand Up @@ -589,7 +589,7 @@
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = mdserver/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 4.0.2;
PRODUCT_BUNDLE_IDENTIFIER = "com.midoks.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -605,7 +605,7 @@
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = mdserver/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 4.0.2;
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.midoks.$(PRODUCT_NAME:rfc1034identifier)";
Expand All @@ -628,6 +628,7 @@
);
INFOPLIST_FILE = mdserverTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = "com.midoks.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/mdserver.app/Contents/MacOS/mdserver";
Expand All @@ -645,6 +646,7 @@
);
INFOPLIST_FILE = mdserverTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = "com.midoks.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/mdserver.app/Contents/MacOS/mdserver";
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1230"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion mdserver/mdserver/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ -(void)alert:(NSString *)content
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:@"提示"];
[alert setInformativeText:content];
[alert setAlertStyle:NSInformationalAlertStyle];
[alert setAlertStyle:NSAlertStyleInformational];
[alert runModal];
}

Expand Down
4 changes: 2 additions & 2 deletions mdserver/mdserver/Controller/HostNameController.m
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ -(IBAction)remove:(id)sender
[alert setInformativeText:@"你是否确认删除有设置路径的配置"];
[alert addButtonWithTitle:@"确定"];
[alert addButtonWithTitle:@"取消"];
[alert setAlertStyle:NSInformationalAlertStyle];
[alert setAlertStyle:NSAlertStyleInformational];
NSModalResponse r = [alert runModal];

if (r != 1000) {
Expand Down Expand Up @@ -324,7 +324,7 @@ -(IBAction)save:(id)sender
[alert setInformativeText:@"你是否重新启动服务?"];
[alert addButtonWithTitle:@"确定"];
[alert addButtonWithTitle:@"取消"];
[alert setAlertStyle:NSInformationalAlertStyle];
[alert setAlertStyle:NSAlertStyleInformational];
NSModalResponse r = [alert runModal];

if (1001 == r) {
Expand Down
31 changes: 16 additions & 15 deletions mdserver/mdserver/NSCommon.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ +(void)alert:(NSString *)content
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:@"提示"];
[alert setInformativeText:content];
[alert setAlertStyle:NSInformationalAlertStyle];
[alert setAlertStyle:NSAlertStyleInformational];
[alert runModal];
}

Expand All @@ -29,7 +29,7 @@ +(void)alert:(NSString *)content delayedClose:(float)t
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:@"提示"];
[alert setInformativeText:content];
[alert setAlertStyle:NSInformationalAlertStyle];
[alert setAlertStyle:NSAlertStyleInformational];
[alert runModal];

//[alert cl];
Expand Down Expand Up @@ -130,22 +130,23 @@ +(NSString *)getAppDir
#pragma mark 获取运行根目录
+ (NSString *)getRootDir
{
char path[1024];
unsigned size = 1024;

_NSGetExecutablePath(path, &size);
path[size] = '\0';

NSString *str = [NSString stringWithFormat:@"%s", path];
str = [self getDirName:str];
str = [self getDirName:str];
str = [self getDirName:str];
str = [self getDirName:str];
// char path[1024];
// unsigned size = 1024;
//
// _NSGetExecutablePath(path, &size);
// path[size] = '\0';
//
// NSString *str = [NSString stringWithFormat:@"%s", path];
// str = [self getDirName:str];
// str = [self getDirName:str];
// str = [self getDirName:str];
// str = [self getDirName:str];

// str = [NSString stringWithFormat:@"%@/mdserver/", str];
// NSLog(@"debug:%@", str);
str = [NSString stringWithFormat:@"/Applications/mdserver/%@", @""];
return str;
// return str;
NSString *root_path = [NSString stringWithFormat:@"/Applications/mdserver/%@", @""];
return root_path;
}

+(NSString *)getBundleName{
Expand Down
2 changes: 1 addition & 1 deletion mdserver/mdserver/NSTextField+Copypast.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ @implementation NSTextField (Copypast)

- (BOOL)performKeyEquivalent:(NSEvent *)event
{
if (([event modifierFlags] & NSDeviceIndependentModifierFlagsMask) == NSCommandKeyMask) {
if (([event modifierFlags] & NSEventModifierFlagDeviceIndependentFlagsMask) == NSEventModifierFlagCommand) {
// The command key is the ONLY modifier key being pressed.
if ([[event charactersIgnoringModifiers] isEqualToString:@"x"]) {
return [NSApp sendAction:@selector(cut:) to:[[self window] firstResponder] from:self];
Expand Down

0 comments on commit f6038ee

Please sign in to comment.