Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building and running on Mac OS X 10.15 using PostgreSQL 15 #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Adaptors/PostgreSQL/PostgreSQLChannel.m
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ - (NSArray *)describeTableNames
EOSQLExpression *expression;

expression = [[[[[self adaptorContext] adaptor] expressionClass] alloc] init];
[expression setStatement:@"SELECT c.oid AS tableoid, n.nspname AS schemaname, c.relname AS tablename, pg_get_userbyid(c.relowner) AS tableowner, c.relhasindex AS hasindexes, c.relhasrules AS hasrules, (c.reltriggers > 0) AS hastriggers FROM (pg_class c LEFT JOIN pg_namespace n ON ((n.oid = c.relnamespace))) WHERE ((c.relkind = 'r'::\"char\") OR (c.relkind = 's'::\"char\"))"];
[expression setStatement:@"SELECT c.oid AS tableoid, n.nspname AS schemaname, c.relname AS tablename, pg_get_userbyid(c.relowner) AS tableowner, c.relhasindex AS hasindexes, c.relhasrules AS hasrules, (c.relhastriggers = 'yes') AS hastriggers FROM (pg_class c LEFT JOIN pg_namespace n ON ((n.oid = c.relnamespace))) WHERE ((c.relkind = 'r'::\"char\") OR (c.relkind = 's'::\"char\"))"];

NS_DURING
[self evaluateExpression:expression];
Expand Down Expand Up @@ -819,7 +819,7 @@ - (EOEntity *)_createEntityForTableNamed:(NSString *)name
EOEntity *entity;

expression = [[[[[self adaptorContext] adaptor] expressionClass] alloc] init];
[expression setStatement:EOFormat(@"SELECT c.oid AS tableoid, n.nspname AS schemaname, c.relname AS tablename, pg_get_userbyid(c.relowner) AS tableowner, c.relhasindex AS hasindexes, c.relhasrules AS hasrules, (c.reltriggers > 0) AS hastriggers FROM (pg_class c LEFT JOIN pg_namespace n ON ((n.oid = c.relnamespace))) WHERE ((c.relkind = 'r'::\"char\") OR (c.relkind = 's'::\"char\")) AND (c.relname = '%@' AND n.nspname = 'public')", name)];
[expression setStatement:EOFormat(@"SELECT c.oid AS tableoid, n.nspname AS schemaname, c.relname AS tablename, pg_get_userbyid(c.relowner) AS tableowner, c.relhasindex AS hasindexes, c.relhasrules AS hasrules, (c.relhastriggers = 'yes') AS hastriggers FROM (pg_class c LEFT JOIN pg_namespace n ON ((n.oid = c.relnamespace))) WHERE ((c.relkind = 'r'::\"char\") OR (c.relkind = 's'::\"char\")) AND (c.relname = '%@' AND n.nspname = 'public')", name)];
[self evaluateExpression:expression];
row = [self fetchRowWithZone:NULL];
[self cancelFetch];
Expand Down Expand Up @@ -946,9 +946,9 @@ - (EOEntity *)_createEntityForTableNamed:(NSString *)name
- (EOModel *)describeModelWithTableNames:(NSArray *)tableNames
{
EOModel *model;
int x;
int numTableNames;
NSString *EOName;
NSInteger x;
NSInteger numTableNames;
NSString *EOName;

model = [[EOModel allocWithZone:[self zone]] init];
EOName = [[[[self adaptorContext] adaptor] connectionDictionary] objectForKey:@"databaseName"];
Expand Down
20 changes: 20 additions & 0 deletions Adaptors/PostgreSQLInterface copy-Info.plist
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was committed by mistake. Removed with the next commit.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>PostgreSQLInterface</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
</dict>
</plist>
6 changes: 6 additions & 0 deletions EOModeler/EOModeler.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,7 @@
buildSettings = {
COPY_PHASE_STRIP = NO;
DEBUGGING_SYMBOLS = Yes;
EOAdaptorDebugEnabled = YES;
FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
GCC_DYNAMIC_NO_PIC = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
Expand All @@ -1448,6 +1449,7 @@
GCC_PREFIX_HEADER = EOModeler_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = /Applications;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_BUNDLE_IDENTIFIER = com.ajr.EOModeler;
PRODUCT_NAME = EOModeler;
WRAPPER_EXTENSION = app;
Expand All @@ -1458,13 +1460,15 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
EOAdaptorDebugEnabled = NO;
FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = EOModeler_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = /Applications;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_BUNDLE_IDENTIFIER = com.ajr.EOModeler;
PRODUCT_NAME = EOModeler;
WRAPPER_EXTENSION = app;
Expand All @@ -1474,13 +1478,15 @@
70BEAF1509590ED1005ACB45 /* Default */ = {
isa = XCBuildConfiguration;
buildSettings = {
EOAdaptorDebugEnabled = NO;
FRAMEWORK_SEARCH_PATHS = /Library/Frameworks;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = EOModeler_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = /Applications;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_BUNDLE_IDENTIFIER = com.ajr.EOModeler;
PRODUCT_NAME = EOModeler;
WRAPPER_EXTENSION = app;
Expand Down
6 changes: 3 additions & 3 deletions EOModeler/Fixes/NSComboBoxCellFix.m
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not know a fix for these lines. But it compiled without.

Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ - (id)_ajrInitWithCoder:(NSCoder *)coder
case NSMiniControlSize:
[self setFont:[[NSFontManager sharedFontManager] convertFont:[self font] toSize:[NSFont smallSystemFontSize] - 2.0]];
break;
case NSControlSizeLarge:
[self setFont:[[NSFontManager sharedFontManager] convertFont:[self font] toSize:[NSFont systemFontSize] + 2.0]];
break;
// case NSControlSizeLarge:
// [self setFont:[[NSFontManager sharedFontManager] convertFont:[self font] toSize:[NSFont systemFontSize] + 2.0]];
// break;
}

return self;
Expand Down