Skip to content

Commit

Permalink
Add MacOS dependencies in make
Browse files Browse the repository at this point in the history
  • Loading branch information
Otfried Cheong committed Nov 3, 2024
1 parent f5d0ccc commit 8fd1f5f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 35 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/macos-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,23 @@ jobs:
cd src
make -j
make app
- name: Add dependencies
make dependencies
- name: Sign
run: |
FW1=build/Ipe.app/Contents/Frameworks
FW2=build/IpePresenter.app/Contents/Frameworks
HEADERS=build/Ipe.app/Contents/Headers
install -m 0755 osxlibs/lib/libpng16.16.dylib $FW1
install -m 0755 osxlibs/lib/libpng16.16.dylib $FW2
install -m 0755 osxlibs/lib/libpixman-1.0.dylib $FW1
install -m 0755 osxlibs/lib/libpixman-1.0.dylib $FW2
install -m 0755 osxlibs/lib/libfreetype.6.dylib $FW1
install -m 0755 osxlibs/lib/libfreetype.6.dylib $FW2
install -m 0755 osxlibs/lib/libcairo.2.dylib $FW1
install -m 0755 osxlibs/lib/libcairo.2.dylib $FW2
install -m 0755 osxlibs/lib/liblua54.dylib $FW1
mkdir -p $HEADERS
install -m 0644 src/include/*.h $HEADERS
codesign --force --deep -s - build/Ipe.app
codesign --force --deep -s - build/IpePresenter.app
- name: Create archive
- name: Build dmgs
run: |
cd build
tar czvf ../ipe-mac-arm.tar.gz Ipe.app IpePresenter.app
VERSION=`grep -E -o "^IPEVERS.*$" src/config.mak | grep -E -o "[0-9.]+"`
echo "Ipe version is $VERSION"
source venv/bin/activate
dmgbuild -s src/ipe/dmg.py "Ipe $VERSION" ipe-$VERSION-mac-arm.dmg
dmgbuild -s src/ipe/dmg.py -D app=build/IpePresenter.app \
"IpePresenter $VERSION" ipepresenter-$VERSION-mac-arm.dmg
- name: Upload result
uses: actions/upload-artifact@v4
with:
name: ipe-mac-arm
path: ipe-mac-arm.tar.gz
path: ipe*.dmg
retention-days: 2
- run: 'echo "Status ${{ job.status }}"'
17 changes: 2 additions & 15 deletions .github/workflows/macos-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,9 @@ jobs:
cd src
make -j
make app
- name: Add dependencies
make dependencies
- name: Sign
run: |
FW1=build/Ipe.app/Contents/Frameworks
FW2=build/IpePresenter.app/Contents/Frameworks
HEADERS=build/Ipe.app/Contents/Headers
install -m 0755 osxlibs/lib/libpng16.16.dylib $FW1
install -m 0755 osxlibs/lib/libpng16.16.dylib $FW2
install -m 0755 osxlibs/lib/libpixman-1.0.dylib $FW1
install -m 0755 osxlibs/lib/libpixman-1.0.dylib $FW2
install -m 0755 osxlibs/lib/libfreetype.6.dylib $FW1
install -m 0755 osxlibs/lib/libfreetype.6.dylib $FW2
install -m 0755 osxlibs/lib/libcairo.2.dylib $FW1
install -m 0755 osxlibs/lib/libcairo.2.dylib $FW2
install -m 0755 osxlibs/lib/liblua54.dylib $FW1
mkdir -p $HEADERS
install -m 0644 src/include/*.h $HEADERS
codesign --force --deep -s - build/Ipe.app
codesign --force --deep -s - build/IpePresenter.app
- name: Build dmgs
Expand Down
12 changes: 11 additions & 1 deletion src/ipe/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,21 @@ app:
$(INSTALL_FILES) $(BUILDDIR)/ipe.icns $(RESOURCEDIR)
$(INSTALL_FILES) ../../artwork/icons.ipe $(RESOURCEDIR)/icons

dependencies:
$(INSTALL_PROGRAMS) $(IPEDEPS)/lib/libpng16.16.dylib $(buildlib)
$(INSTALL_PROGRAMS) $(IPEDEPS)/lib/libpixman-1.0.dylib $(buildlib)
$(INSTALL_PROGRAMS) $(IPEDEPS)/lib/libfreetype.6.dylib $(buildlib)
$(INSTALL_PROGRAMS) $(IPEDEPS)/lib/libcairo.2.dylib $(buildlib)
$(INSTALL_PROGRAMS) $(IPEDEPS)/lib/liblua54.dylib $(buildlib)
mkdir -p $(BUNDLEDIR)/Headers
$(INSTALL_FILES) ../include/*.h $(BUNDLEDIR)/Headers

endif

install: $(TARGET)
$(INSTALL_DIR) $(INSTALL_ROOT)$(IPEBINDIR)
$(INSTALL_DIR) $(INSTALL_ROOT)$(IPEMANDIR)
# $(INSTALL_DIR) $(INSTALL_ROOT)$(IPEDOCDIR)

$(INSTALL_DIR) $(INSTALL_ROOT)$(IPELUADIR)
$(INSTALL_DIR) $(INSTALL_ROOT)$(IPESTYLEDIR)
$(INSTALL_DIR) $(INSTALL_ROOT)$(IPESCRIPTDIR)
Expand All @@ -120,4 +129,5 @@ install: $(TARGET)
$(INSTALL_FILES) ../../artwork/ipe_logo.ipe $(INSTALL_ROOT)$(IPEICONDIR)
$(INSTALL_FILES) ../../artwork/ipe.iconset/icon_128x128.png $(INSTALL_ROOT)$(IPEICONDIR)


# --------------------------------------------------------------------
7 changes: 7 additions & 0 deletions src/ipepresenter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ app:
$(call dll_symlinks,ipe)
$(call dll_symlinks,ipecairo)
$(call dll_symlinks,ipecanvas)

dependencies:
$(INSTALL_PROGRAMS) $(IPEDEPS)/lib/libpng16.16.dylib $(buildlib)
$(INSTALL_PROGRAMS) $(IPEDEPS)/lib/libpixman-1.0.dylib $(buildlib)
$(INSTALL_PROGRAMS) $(IPEDEPS)/lib/libfreetype.6.dylib $(buildlib)
$(INSTALL_PROGRAMS) $(IPEDEPS)/lib/libcairo.2.dylib $(buildlib)

endif

# --------------------------------------------------------------------

0 comments on commit 8fd1f5f

Please sign in to comment.