Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 49 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
- name: Get version
id: get-version
run: |
if [[ "$THUNDER_RELEASE" == 'true' ]]; then echo "::set-output name=version::${VERSION}" ; fi
if [[ "$THUNDER_RELEASE" != 'true' ]]; then echo "::set-output name=version::${VERSION}-SNAPSHOT" ; fi
echo "::set-output name=release::${THUNDER_RELEASE}"
if [[ "$THUNDER_RELEASE" == 'true' ]]; then echo "version=${VERSION}" >> $GITHUB_OUTPUT ; fi
if [[ "$THUNDER_RELEASE" != 'true' ]]; then echo "version=${VERSION}-SNAPSHOT" >> $GITHUB_OUTPUT ; fi
echo "release=${THUNDER_RELEASE}" >> $GITHUB_OUTPUT

linux:
name: Linux
Expand Down Expand Up @@ -125,11 +125,45 @@ jobs:
with:
name: ThundeHub.exe
path: release/ThunderHub.exe

osx:
name: MacOS
runs-on: macos-15
needs: version

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Qt
run: |
sudo ./build/install-qt.sh --version ${QT_VERSION} qtbase qtsvg qtimageformats qtdeclarative qttools | tee -a $GITHUB_PATH
sudo ./build/install-qt.sh --version ${QTCREATOR_VERSION} qtcreator | tee -a $GITHUB_PATH

- name: Setup Qbs
run: |
qbs --version
qbs setup-toolchains --detect
qbs config defaultProfile xcode
qbs config --list

- name: Build Thunder Hub
run: |
qbs install --all-products config:release profile:xcode-macosx-arm64
7z a -t7z ThunderEngine-macosx-arm64.7z release/install-root

- name: Upload Thunder Hub
uses: actions/upload-artifact@v4
with:
name: ThunderEngine-macosx-arm64.7z
path: ThunderEngine-macosx-arm64.7z

github:
name: Upload to GitHub releases
runs-on: ubuntu-latest
needs: [version, linux, windows]
needs: [version, linux, windows, osx]

if: github.repository == 'thunder-engine/thunder' && needs.version.outputs.release == 'true'

Expand Down Expand Up @@ -162,9 +196,9 @@ jobs:
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ThunderHub-windows-x64.7z
asset_name: ThunderHub-windows-x64.7z
asset_content_type: application/x-7z-compressed
asset_path: ThundeHub.exe
asset_name: ThundeHub.exe
asset_content_type: application/vnd.microsoft.portable-executable

- name: Upload Linux
uses: actions/upload-release-asset@v1
Expand All @@ -173,3 +207,11 @@ jobs:
asset_path: ThunderHub-linux-x86_64.7z
asset_name: ThunderHub-linux-x86_64.7z
asset_content_type: application/x-7z-compressed

- name: Upload OSX
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ThunderEngine-macosx-arm64.7z
asset_name: ThunderEngine-macosx-arm64.7z
asset_content_type: application/x-7z-compressed
47 changes: 25 additions & 22 deletions build/install.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -56,48 +56,46 @@ Product {

files: {
var list = [];
var libs = ["Core", "Gui", "Network", "OpenGL", "QmlCore", "Qml", "QmlMeta", "QmlModels", "QmlNetwork", "QmlWorkerScript",
"QmlXmlListModel", "QuickControls2Basic", "QuickControls2BasicStyleImpl", "QuickControls2", "QuickControls2Impl",
"Quick", "QuickDialogs2", "QuickDialogs2QuickImpl", "QuickDialogs2Utils", "QuickLayouts", "QuickTemplates2",
"QuickWidgets", "Svg", "Xml", "Widgets"]
if (!Qt.core.frameworkBuild) {
var libPrefix = (qbs.targetOS.contains("linux") ? "lib" : "") + "Qt" + Qt.core.versionMajor
var libPostfix = ((qbs.targetOS.contains("windows") && qbs.debugInformation) ? "d": "") + cpp.dynamicLibrarySuffix
var libs = ["Core", "Gui", "Network", "OpenGL", "QmlCore", "Qml", "QmlMeta", "QmlModels", "QmlNetwork", "QmlWorkerScript",
"QmlXmlListModel", "QuickControls2Basic", "QuickControls2BasicStyleImpl", "QuickControls2", "QuickControls2Impl",
"Quick", "QuickDialogs2", "QuickDialogs2QuickImpl", "QuickDialogs2Utils", "QuickLayouts", "QuickTemplates2",
"QuickWidgets", "Svg", "Xml", "Widgets"]
if(qbs.targetOS.contains("linux")) {
for(var it in libs) {
list.push(libPrefix + libs[it] + libPostfix + "." + Qt.core.versionMajor + "." + Qt.core.versionMinor + "." + Qt.core.versionPatch)
list.push(libPrefix + libs[it] + libPostfix + "." + Qt.core.versionMajor)
}

list.push("libicudata.so.73", "libicudata.so.73.2")
list.push("libicui18n.so.73", "libicui18n.so.73.2")
list.push("libicuuc.so.73", "libicuuc.so.73.2")

list.push(libPrefix + "DBus" + libPostfix + "." + Qt.core.versionMajor + "." + Qt.core.versionMinor + "." + Qt.core.versionPatch)
list.push(libPrefix + "DBus" + libPostfix + "." + Qt.core.versionMajor)
libs.push("DBus")
libs.push("XcbQpa")

list.push(libPrefix + "XcbQpa" + libPostfix + "." + Qt.core.versionMajor + "." + Qt.core.versionMinor + "." + Qt.core.versionPatch)
list.push(libPrefix + "XcbQpa" + libPostfix + "." + Qt.core.versionMajor)
for(var it in libs) {
list.push(libPrefix + libs[it] + libPostfix + "." + Qt.core.versionMajor + "." + Qt.core.versionMinor + "." + Qt.core.versionPatch)
list.push(libPrefix + libs[it] + libPostfix + "." + Qt.core.versionMajor)
}
} else {
for(var it in libs) {
list.push(libPrefix + libs[it] + libPostfix)
}
}
} else {
list.push("**/QtCore.framework/**")
list.push("**/QtXml.framework/**")
list.push("**/QtNetwork.framework/**")
list.push("**/QtQml.framework/**")
list.push("**/QtQuick.framework/**")
list.push("**/QtQuickWidgets.framework/**")
list.push("**/QtSvg.framework/**")
libs.push("DBus")
libs.push("XcbQpa")

var libPrefix = "**/Qt"
var libPostfix = ".framework/**"
for(var it in libs) {
list.push(libPrefix + libs[it] + libPostfix)
}
}
return list
}
qbs.install: true
qbs.installDir: {
if(qbs.targetOS.contains("darwin")) {
return install.BIN_PATH + "/" + install.bundle + "../Frameworks/"
return install.BIN_PATH + "/" + install.bundle + "/Frameworks/"
} else if(qbs.targetOS.contains("windows")) {
return install.BIN_PATH + "/" + install.bundle
}
Expand Down Expand Up @@ -165,7 +163,12 @@ Product {
files.push("QtQuick/**/*.so")
files.push("QtQml/XmlListModel/**/*.so")
} else {
files.push("*")
files.push("QtQml/WorkerScript/**/*.dylib")
files.push("QtQml/WorkerScript/**/plugins.qmltypes")
files.push("QtQml/WorkerScript/**/qmldir")

files.push("QtQuick/**/*.dylib")
files.push("QtQml/XmlListModel/**/*.dylib")
}
return files
}
Expand Down
4 changes: 2 additions & 2 deletions hub/ThunderHub.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Project {
bundle.infoPlist: ({
"NSHumanReadableCopyright": "(C) 2007-" + ThunderHub.COPYRIGHT_YEAR + " by " + ThunderHub.COPYRIGHT_AUTHOR
})
bundle.identifierPrefix: "com.thunderengine.hub"
bundle.identifierPrefix: "com.thunderengine"

consoleApplication: false

Expand Down Expand Up @@ -74,7 +74,7 @@ Project {
files: [
"res/icons/thunder.icns"
]
qbs.installDir: ThunderHub.BIN_PATH + "/" + ThunderHub.bundle + "../Resources"
qbs.installDir: ThunderHub.QML_PATH + "/../Resources"
qbs.installPrefix: ThunderHub.PREFIX
}
}
Expand Down
2 changes: 1 addition & 1 deletion hub/res/app-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<key>NSHumanReadableCopyright</key>
<string>(C) 2007-2018 by Evgeniy Prikazchikov</string>
<key>CFBundleIconFile</key>
<string>thunder-hub</string>
<string>thunder</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
Expand Down
10 changes: 5 additions & 5 deletions thunder-hub.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import qbs.TextFile
Project {
id: thunder

property string COMPANY_NAME: "FrostSpear"
property string COMPANY_NAME: "ThunderEngine"
property string PRODUCT_NAME: "Hub"
property string PRODUCT_VERSION: "2026.1"
property string EDITOR_NAME: "WorldEditor"

property string bundle: {
if(qbs.targetOS.contains("darwin")) {
return PRODUCT_NAME + ".app/Contents/MacOS/"
return "/" + PRODUCT_NAME + ".app/Contents"
}
return "";
}
Expand All @@ -39,10 +39,10 @@ Project {
property string RESOURCE_ROOT: "res"

property string PREFIX: ""
property string PLATFORM_PATH: bundle + "hub"
property string PLATFORM_PATH: "hub"
property string BIN_PATH: PLATFORM_PATH
property string QTPLUGINS_PATH: BIN_PATH + "/plugins"
property string QML_PATH: BIN_PATH + "/qml"
property string QTPLUGINS_PATH: BIN_PATH + bundle + "/plugins"
property string QML_PATH: BIN_PATH + bundle + "/qml"

property stringList defines: {
var result = [
Expand Down