Skip to content

Commit ba35496

Browse files
authored
fix macos release packaging
1 parent e4edc9c commit ba35496

File tree

5 files changed

+25
-4
lines changed

5 files changed

+25
-4
lines changed

.github/actions/osxcross/action.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,17 @@ runs:
138138
139139
- shell: bash
140140
run: |
141-
patch -i ${GITHUB_ACTION_PATH}/macports.patch ${OSXCROSS_FOLDER}/target/bin/osxcross-macports
141+
OUT=$(patch -N -i ${GITHUB_ACTION_PATH}/macports.patch ${OSXCROSS_FOLDER}/target/bin/osxcross-macports) || echo "${OUT}" | grep "Skipping patch" -q || (echo "$OUT" && false);
142+
143+
- uses: actions/checkout@v4
144+
with:
145+
repository: auriamg/macdylibbundler
146+
path: ${{env.OSXCROSS_FOLDER}}/dylibbundler
147+
148+
- shell: bash
149+
run: |
150+
echo "::group::Install dylibbundler"
151+
cd ${OSXCROSS_FOLDER}/dylibbundler
152+
make
153+
echo "${OSXCROSS_FOLDER}/dylibbundler" >> $GITHUB_PATH
154+
echo "::endgroup::"

.github/workflows/meson.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ jobs:
210210
-Dinstall_data=false -Dinstall_runner=false -Dfmod_dir=Contents/Frameworks \
211211
--bindir=Contents/MacOS \
212212
--prefix="/" \
213+
-Ddylibbundler_args="-ns -s ${{env.OSXCROSS_TARGET}}/macports/pkgs/opt/local/lib/ \
214+
-s ${{env.OSXCROSS_TARGET}}/macports/pkgs/opt/local/libexec/onetbb/lib/" \
213215
build
214216
215217
- name: Build
@@ -221,7 +223,7 @@ jobs:
221223
- name: Create App Bundle
222224
if: ${{inputs.upload_artefacts}}
223225
run: |
224-
DESTDIR="/tmp/Cortex Command.app" meson install -C build
226+
meson install --destdir="/tmp/Cortex Command.app" -C build
225227
226228
- name: Tar files
227229
if: ${{inputs.upload_artefacts}}

Resources/bundle_dylibs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
dylibbundler -od -b -x "${MESON_INSTALL_DESTDIR_PREFIX}/Contents/MacOS/${1}" \
44
-d "${MESON_INSTALL_DESTDIR_PREFIX}/Contents/Frameworks" \
55
-p "@executable_path/../Frameworks" \
6-
-s "${MESON_SOURCE_ROOT}/external/lib/macos"
6+
-s "${MESON_SOURCE_ROOT}/external/lib/macos" ${2}

Resources/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ elif host_machine.system() == 'darwin'
1414
install_data('ccicon.icns', install_dir : 'Contents/Resources')
1515
# install_data('Info.plist', install_dir : 'Contents')
1616
configure_file(input: 'Info.plist', output: 'Info.plist', install: true, install_dir:'Contents', install_mode: 'rw-r--r--', configuration: conf_data)
17-
meson.add_install_script('bundle_dylibs.sh', elfname)
17+
meson.add_install_script('bundle_dylibs.sh', elfname, get_option('dylibbundler_args'))
1818
endif

meson_options.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
option('debug_type', type: 'combo', choices: ['full','minimal','release'], value:'minimal', description: 'Enable certain Debug features, that might slow down the game')
22
option('data_install_dir', type:'string', value:'share/CortexCommand', description: 'Where to install the data files relative to prefix directory')
3+
34
option('install_fmod', type:'boolean', value: true, description: 'Wether to install the fmod library.')
45
option('fmod_dir', type:'string', value:'lib/CortexCommand/', description: 'Where to install the fmod library relative to prefix directory.')
6+
57
option('install_data', type: 'boolean', value: true, description: 'Whether to install the data repo.')
68
option('install_runner', type: 'boolean', value: true, description: 'Whether to install the runner script.')
9+
10+
option('dylibbundler_args', type: 'string', value: '', description: 'Additional arguments passed to the bundle_dylibs script for macos')
11+
712
option('sane_warnings', type: 'boolean', value: false, description: 'Disable certain warnings, that are reasonably safe to ignore, though we should fix them at some point.')
813
option('use_prebuilt_libraries', type: 'boolean', value: true, description: 'On windows use the prebuilt libraries')
914

1015
option('tracy_enable', type: 'boolean', value: true, description: 'Enable Tracy Profiler')
1116
option('tracy_callstack', type : 'integer', value : 0, description : 'Enfore callstack collection for tracy regions')
1217
option('tracy_on_demand', type : 'boolean', value : true, description : 'On-demand profiling')
1318
option('tracy_debuginfod', type : 'boolean', value : false, description : 'Enable debuginfod support')
19+
1420
option('use_pch', type : 'feature', value : 'auto')

0 commit comments

Comments
 (0)