4242 os : macos-latest
4343 cc : " clang"
4444 cxx : " clang++"
45- cmake_arch_args : " -DCMAKE_OSX_ARCHITECTURES=x86_64" #
46- - name : " macOS Apple Silicon (arm64)" # Added for ARM64 build
45+ cmake_arch_args : " -DCMAKE_OSX_ARCHITECTURES=x86_64"
46+ - name : " macOS Apple Silicon (arm64)"
4747 build_dir : " macos-arm64"
4848 os : macos-latest
4949 cc : " clang"
@@ -162,10 +162,7 @@ jobs:
162162 - name : macdeployqt (macOS)
163163 if : matrix.config.os == 'macos-latest'
164164 run : |
165- # First, find where the actual binary was installed
166- echo "Looking for qtedit4 binary:"
167165 find "dist/${{ matrix.config.build_dir }}" -name "qtedit4" -type f
168- # Check if we have an app bundle or just a binary
169166 if [ -d "dist/${{ matrix.config.build_dir }}/usr/bin/qtedit4.app" ]; then
170167 echo "Found existing app bundle"
171168 APP_PATH="dist/${{ matrix.config.build_dir }}/usr/bin/qtedit4.app"
@@ -175,6 +172,7 @@ jobs:
175172 mkdir -p "$APP_PATH/Contents/Resources"
176173 mkdir -p "$APP_PATH/Contents/Frameworks"
177174 mkdir -p "$APP_PATH/Contents/PlugIns"
175+
178176 if [ -f "dist/${{ matrix.config.build_dir }}/usr/bin/qtedit4" ]; then
179177 cp "dist/${{ matrix.config.build_dir }}/usr/bin/qtedit4" "$APP_PATH/Contents/MacOS/"
180178 chmod +x "$APP_PATH/Contents/MacOS/qtedit4"
@@ -195,38 +193,24 @@ jobs:
195193 cp -r resources/* "$APP_PATH/Contents/Resources/"
196194 echo "Copied resources to app bundle"
197195 fi
198- if [ -d "share/icons" ]; then
196+ if [ -d "dist/${{ matrix.config.build_dir }}/usr/ share/icons" ]; then
199197 mkdir -p "$APP_PATH/Contents/Resources/share/icons"
200- cp -r share/icons/* "$APP_PATH/Contents/Resources/share/icons/"
201- echo "Copied icon theme to app bundle"
202- elif [ -d "../share/icons" ]; then
203- mkdir -p "$APP_PATH/Contents/Resources/share/icons"
204- cp -r ../share/icons/* "$APP_PATH/Contents/Resources/share/icons/"
205- echo "Copied icon theme to app bundle from ../share/icons"
198+ cp -r "dist/${{ matrix.config.build_dir }}/usr/share/icons/"* "$APP_PATH/Contents/Resources/share/icons/"
199+ echo "Copied icon theme to app bundle from installed directory"
206200 else
207- echo "Warning: No icon theme found in share/icons or .. /share/icons"
201+ echo "Warning: No icon theme found in dist/${{ matrix.config.build_dir }}/usr /share/icons"
208202 fi
209- ls -la "$APP_PATH/Contents/MacOS/"
210203 macdeployqt "$APP_PATH" -verbose=2 -always-overwrite
211- echo "App bundle contents after macdeployqt:"
212- ls -la "$APP_PATH/Contents/"
213- if [ -d "$APP_PATH/Contents/Frameworks" ]; then
214- echo "Bundled Qt Frameworks:"
215- ls -la "$APP_PATH/Contents/Frameworks/"
216- else
217- echo "WARNING: No Frameworks directory found!"
218- fi
219204 - name : Create ZIP archive (macOS)
220205 if : matrix.config.os == 'macos-latest'
221206 run : |
222207 cd "dist/${{ matrix.config.build_dir }}/usr/bin"
223- zip -r "../../../../qtedit4-${{ matrix.config.build_dir }}-qt${{ matrix.qt_version }}-${{ env.version }}.zip" qtedit4.app # Updated filename
208+ zip -r "../../../../qtedit4-${{ matrix.config.build_dir }}-qt${{ matrix.qt_version }}-${{ env.version }}.zip" qtedit4.app
224209 shell : bash
225210 - name : Create DMG (macOS)
226211 if : matrix.config.os == 'macos-latest'
227212 run : |
228213 brew install create-dmg
229- du -sh "dist/${{ matrix.config.build_dir }}/usr/bin/qtedit4.app"
230214 mkdir -p dmg_temp
231215 cp -r "dist/${{ matrix.config.build_dir }}/usr/bin/qtedit4.app" dmg_temp/
232216 create-dmg \
0 commit comments