File tree Expand file tree Collapse file tree 4 files changed +16
-5
lines changed
Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,6 @@ APP_DIR="$(pwd)/${BUNDLE_NAME}"
1111EXECUTABLE_SRC=" $( pwd) /out/heidisql"
1212EXECUTABLE_TRG=" ${APP_DIR} /Contents/MacOS/${APP_NAME} "
1313
14- # Directory that contains your ini files
15- INI_SOURCE_DIR=" $( pwd) /extra/ini" # change if needed
16-
1714# Homebrew prefix (auto-detected; override if needed)
1815BREW_PREFIX=" $( brew --prefix 2> /dev/null || echo " /opt/homebrew" ) "
1916
@@ -80,13 +77,16 @@ cat > "${APP_DIR}/Contents/Info.plist" <<EOF
8077 <string>15.0</string>
8178 <key>NSHighResolutionCapable</key>
8279 <true/>
80+ <key>CFBundleIconFile</key>
81+ <string>heidisql</string>
8382</dict>
8483</plist>
8584EOF
8685
8786
8887# ## COPY INI FILES INTO RESOURCES
89- cp ${INI_SOURCE_DIR} /* .ini " ${APP_DIR} /Contents/MacOS/"
88+ cp extra/ini/* .ini " ${APP_DIR} /Contents/Resources/"
89+ cp res/heidisql.icns " ${APP_DIR} /Contents/Resources/"
9090
9191
9292# ## FUNCTION: COPY A DYLIB AND ITS DEPENDENCIES
Original file line number Diff line number Diff line change @@ -358,6 +358,7 @@ TAppSettings = class(TObject)
358358 // function GetTempDir: String;
359359 function GetAppDir : String;
360360 function GetLibDir : String;
361+ function GetResourcesDir : String;
361362 procedure SaveUnicodeFile (Filename: String; Text: String; Encoding: TEncoding);
362363 procedure OpenTextFile (const Filename: String; out Stream: TFileStream; var Encoding: TEncoding);
363364 function DetectEncoding (Stream: TStream): TEncoding;
@@ -1317,6 +1318,16 @@ function GetLibDir: String;
13171318 { $ENDIF}
13181319end ;
13191320
1321+ function GetResourcesDir : String;
1322+ begin
1323+ // point to resources dir in macOS app bundle
1324+ { $IFDEF DARWIN}
1325+ Result := GetAppDir + ' ..' + DirectorySeparator + ' Resources' + DirectorySeparator;
1326+ { $ELSE}
1327+ Result := GetAppDir;
1328+ { $ENDIF}
1329+ end ;
1330+
13201331{ **
13211332 Save a textfile with unicode
13221333}
Original file line number Diff line number Diff line change @@ -11382,7 +11382,7 @@ constructor TSQLFunctionList.Create(AOwner: TDBConnection; SQLFunctionsFileOrder
1138211382
1138311383 TryFiles := Explode(' ,' , SQLFunctionsFileOrder);
1138411384 for TryFile in TryFiles do begin
11385- IniFilePath := GetAppDir + ' functions-' +TryFile+' .ini' ;
11385+ IniFilePath := GetResourcesDir + ' functions-' +TryFile+' .ini' ;
1138611386 FOwner.Log(lcDebug, ' Trying ' +IniFilePath);
1138711387 if FileExists(IniFilePath) then begin
1138811388 FOwner.Log(lcInfo, ' Reading function definitions from ' +IniFilePath);
You can’t perform that action at this time.
0 commit comments