Skip to content

Commit

Permalink
Fix: Apple builds.
Browse files Browse the repository at this point in the history
Add: Apple icon and plist that uses it.
  • Loading branch information
Bloodbat committed Aug 21, 2024
1 parent 379a340 commit 1ef50a6
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 15 deletions.
49 changes: 49 additions & 0 deletions Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?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>pjeditor</string>
<key>CFBundleName</key>
<string>Sanguine PJ Editor</string>
<key>CFBundleIdentifier</key>
<string>laserpienteylarosaproducciones.pjeditor.pjeditor</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>pjed</string>
<key>CFBundleShortVersionString</key>
<string>0.1</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>*</string>
</array>
<key>CFBundleTypeOSTypes</key>
<array>
<string>fold</string>
<string>disk</string>
<string>****</string>
</array>
</dict>
</array>
<key>CFBundleIconFile</key>
<string>pj_editor_icon</string>
<key>CFBundleDisplayName</key>
<string>Sanguine PJ Editor</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
29 changes: 16 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ COMPILERFLAGS = -MObjFPC -Scghim -CX -O3 -Xs -XX -l -vewnhibq -Fusrc -Fu. -FEbin
ifeq ($(OS),Windows_NT)
ARCH_WIN = 1
CPU_X64 = 1
undefine ARCH_UNKNOWN
ARCH_UNKNOWN = 0
else
UNAME_OS := $(shell uname -s)
ifeq ($(UNAME_OS),Linux)
ARCH_LIN = 1
CPU_X64 = 1
undefine ARCH_UNKNOWN
ARCH_UNKNOWN = 0
endif
ifeq ($(UNAME_OS),Darwin)
ARCH_MAC = 1
undefine ARCH_UNKNOWN
ARCH_UNKNOWN = 0
endif
endif

ifdef ARCH_UNKNOWN
ifeq (ARCH_UNKNOWN,1)
$(error Could not determine machine type.)
endif

Expand Down Expand Up @@ -87,10 +87,8 @@ ifndef NOARM
fpc $(COMPILERFLAGS) $(COMPILERFLAGSARM) $(EXTRAFLAGS) sanguinetagupdater.pas
endif
ifndef NOFAT
cd bin
lipo -create -output sanguinetagupdater sanguinetagupdater_arm sanguinetagupdater_intel
strip sanguinetagupdater
cd ..
lipo -create -output ./bin/sanguinetagupdater ./bin/sanguinetagupdater_arm ./bin/sanguinetagupdater_intel
strip ./bin/sanguinetagupdater
endif
# MISSING!!! CODESIGN stuff!!!
@echo codesign should be here!
Expand All @@ -103,10 +101,11 @@ ifndef NOARM
lazbuild --bm="Release MacOS ARM" pjeditor.lpi
endif
ifndef NOFAT
cd bin
lipo -create -output pjeditor pjeditor_arm pjeditor_intel
strip pjeditor
cd ..
lipo -create -output ./bin/pjeditor ./bin/pjeditor_arm ./bin/pjeditor_intel
strip ./bin/pjeditor
cp ./bin/pjeditor ./bin/pjeditor.app/Contents/MacOS
cp ./iconsrc/pj_editor_icon.icns ./bin/pjeditor.app/Contents/Resources
cp ./info.plist ./bin/pjeditor.app/Contents
endif
# MISSING!!! CODESIGN stuff!!!
@echo codesign should be here!
Expand All @@ -116,10 +115,14 @@ outputfolders:
-mkdir $(LIBX64FOLDER)
-mkdir $(LIBARMFOLDER)
-mkdir bin
-mkdir ./bin/pjeditor.app
-mkdir ./bin/pjeditor.app/Contents
-mkdir ./bin/pjeditor.app/Contents/MacOS
-mkdir ./bin/pjeditor.app/Contents/Resources
endif

clean:
-rm -r lib

cleanall: clean
-rm -r bin
-rm -r bin
Binary file added iconsrc/pj_editor_icon.icns
Binary file not shown.
2 changes: 0 additions & 2 deletions pjeditor.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
<SmartLinkUnit Value="True"/>
<TargetProcessor Value="COREAVX"/>
<TargetCPU Value="x86_64"/>
<TargetOS Value="macos"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
Expand Down Expand Up @@ -87,7 +86,6 @@
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<TargetCPU Value="aarch64"/>
<TargetOS Value="macos"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
Expand Down

0 comments on commit 1ef50a6

Please sign in to comment.