Skip to content

Commit

Permalink
Add macOS app folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Dadoum committed Dec 27, 2023
1 parent 45cecda commit 882d5d6
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 68 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/build-qt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
- name: Build
run: dub build -b release-debug --compiler=ldc2 :qt-frontend

- name: Rename
run: mv "${{github.workspace}}/bin/sideloader" "${{github.workspace}}/bin/sideloader-x86_64"

- name: Rename
run: mv "${{github.workspace}}/bin/sideloader" "${{github.workspace}}/bin/sideloader-qt-linux-x86_64"

Expand Down Expand Up @@ -131,11 +128,11 @@ jobs:

- name: Build bundle
run: |
cp bin/sideloader ${{github.workspace}}/macos/resources/Sideloader.app/Contents/MacOS
cp -r $Qt5_DIR/plugins ${{github.workspace}}/macos/resources/Sideloader.app/Contents/
cp -r $Qt5_DIR/lib/Qt{Core,Gui,Widgets,DBus,PrintSupport}.framework ${{github.workspace}}/macos/resources/Sideloader.app/Contents/Frameworks
rm -rf ${{github.workspace}}/macos/resources/Sideloader.app/Contents/Frameworks/Qt{Core,Gui,Widgets,DBus,PrintSupport}.framework/Versions/5/Headers/
tar -czpvf Sideloader-qt.app.tgz -C ${{github.workspace}}/macos/resources/ Sideloader.app
cp bin/sideloader ${{github.workspace}}/frontends/common/resources/macos/Sideloader.app/Contents/MacOS
cp -r $Qt5_DIR/plugins ${{github.workspace}}/frontends/common/resources/macos/Sideloader.app/Contents/
cp -r $Qt5_DIR/lib/Qt{Core,Gui,Widgets,DBus,PrintSupport}.framework ${{github.workspace}}/frontends/common/resources/macos/Sideloader.app/Contents/Frameworks
rm -rf ${{github.workspace}}/frontends/common/resources/macos/Sideloader.app/Contents/Frameworks/Qt{Core,Gui,Widgets,DBus,PrintSupport}.framework/Versions/5/Headers/
tar -czpvf Sideloader-qt.app.tgz -C ${{github.workspace}}/frontends/common/resources/macos/ Sideloader.app
- uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -231,11 +228,11 @@ jobs:

- name: Build bundle
run: |
cp bin/sideloader ${{github.workspace}}/macos/resources/Sideloader.app/Contents/MacOS
cp -r $Qt5_DIR/plugins ${{github.workspace}}/macos/resources/Sideloader.app/Contents/
cp -r $Qt5_DIR/lib/Qt{Core,Gui,Widgets,DBus,PrintSupport}.framework ${{github.workspace}}/macos/resources/Sideloader.app/Contents/Frameworks
rm -rf ${{github.workspace}}/macos/resources/Sideloader.app/Contents/Frameworks/Qt{Core,Gui,Widgets,DBus,PrintSupport}.framework/Versions/5/Headers/
tar -czpvf Sideloader-qt.app.tgz -C ${{github.workspace}}/macos/resources/ Sideloader.app
cp bin/sideloader ${{github.workspace}}/frontends/common/resources/macos/Sideloader.app/Contents/MacOS
cp -r $Qt5_DIR/plugins ${{github.workspace}}/frontends/common/resources/macos/Sideloader.app/Contents/
cp -r $Qt5_DIR/lib/Qt{Core,Gui,Widgets,DBus,PrintSupport}.framework ${{github.workspace}}/frontends/common/resources/macos/Sideloader.app/Contents/Frameworks
rm -rf ${{github.workspace}}/frontends/common/resources/macos/Sideloader.app/Contents/Frameworks/Qt{Core,Gui,Widgets,DBus,PrintSupport}.framework/Versions/5/Headers/
tar -czpvf Sideloader-qt.app.tgz -C ${{github.workspace}}/frontends/common/resources/macos/ Sideloader.app
- uses: actions/upload-artifact@v3
with:
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>sideloader</string>
<key>CFBundleGetInfoString</key>
<string>Sideloader</string>
<key>CFBundleIdentifier</key>
<string>dev.dadoum.Sideloader</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Sideloader</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.0</string>
<key>CFBundleVersion</key>
<string>0.0.0</string>
<key>NSHumanReadableCopyright</key>
<string>2023 Dadoum, license available on the official repo</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
Empty file.
Empty file.
4 changes: 2 additions & 2 deletions frontends/qt/dub.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"dependencies": {
"sideloader": { "path": "../../" },
"dqt": {
"repository": "git+https://github.com/Dadoum/dqt.git",
"version": "9034b54601834d86306c1e0bce53a99f5971c84a"
"repository": "git+https://github.com/tim-dlang/dqt.git",
"version": "101a998ee7f84e83543b04938ac6a67f673c9779"
}
}
}
46 changes: 0 additions & 46 deletions frontends/qt/dub.selections.json

This file was deleted.

1 change: 1 addition & 0 deletions frontends/qt/dub.selections.json
15 changes: 8 additions & 7 deletions frontends/qt/source/main.d
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import slf4d;
import slf4d.default_provider;
import slf4d.provider;

version(Windows) {
import graphical_app;
}

import constants;
import utils;

Expand All @@ -40,11 +36,16 @@ int main(string[] args) {
}

signal(SIGSEGV, cast(Parameters!signal[1]) &SIGSEGV_trace);
configureLoggingProvider(new shared DefaultProvider(true, level));
version(Windows) {
import graphical_app;
SetUnhandledExceptionFilter(&SIGSEGV_win);

version (Windows) {
configureSegfaultHandler();
import logging;
auto loggingProvider = new shared OutputDebugStringLoggingProvider(level);
} else {
auto loggingProvider = new shared DefaultProvider(true, level);
}
configureLoggingProvider(loggingProvider);

scope qtApp = new QApplication(Runtime.cArgs.argc, Runtime.cArgs.argv);
auto w = new MainWindow();
Expand Down

0 comments on commit 882d5d6

Please sign in to comment.