diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 54146ca..5e7f43b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -152,13 +152,18 @@ jobs: - 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: Create DMG + uses: L-Super/create-dmg-actions@v1.0.3 + with: + dmg_name: 'ThunderHub' + src_dir: 'release/install-root/hub/ThunderHub.app' - name: Upload Thunder Hub uses: actions/upload-artifact@v4 with: - name: ThunderEngine-macosx-arm64.7z - path: ThunderEngine-macosx-arm64.7z + name: ThunderHub.dmg + path: ThunderHub.dmg github: name: Upload to GitHub releases @@ -212,6 +217,5 @@ jobs: 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 + asset_path: ThunderHub.dmg + asset_name: ThunderHub.dmg diff --git a/build/windows/setup.iss b/build/windows/setup.iss index e9707ae..b697c29 100644 --- a/build/windows/setup.iss +++ b/build/windows/setup.iss @@ -5,7 +5,7 @@ #define MyAppName "Thunder Hub" #define MyAppVersion "2026.1" #define MyAppURL "https://thunderengine.org/" -#define MyAppExeName "Hub.exe" +#define MyAppExeName "ThunderHub.exe" [Setup] ; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. diff --git a/hub/install/downloader.h b/hub/install/downloader.h index 6a6ec4b..34efca3 100644 --- a/hub/install/downloader.h +++ b/hub/install/downloader.h @@ -5,7 +5,7 @@ #include "extractor.h" -class Sdk; +struct Sdk; class QFile; class QNetworkAccessManager; diff --git a/hub/install/installmodel.cpp b/hub/install/installmodel.cpp index 9088ebd..7041cb6 100644 --- a/hub/install/installmodel.cpp +++ b/hub/install/installmodel.cpp @@ -19,6 +19,7 @@ #include #include "downloader.h" +#include "settings.h" namespace { const char *gInstalls("Installs"); @@ -27,10 +28,6 @@ namespace { const char *gAssets("assets"); const char *gUrl("browser_download_url"); - const char *gWindows("windows"); - const char *gLinux("linux"); - const char *gMacOSX("macosx"); - const char *gName("name"); const char *gSize("size"); } @@ -38,12 +35,17 @@ namespace { void Sdk::checkInstalled() { static const QStringList ignoreList = {".", "..", "include", "resources"}; static const QMap aliases = { - {"emscripten", "webgl"} + {"emscripten", "webgl"}, + {"macos", "macosx"} }; installed = QFileInfo::exists(path); root = QFileInfo(path).path() + "/../../../"; +#ifdef Q_OS_MACOS + root += "../../../"; +#endif + QDirIterator it(root); while(it.hasNext()) { QString name(QFileInfo(it.next()).fileName()); @@ -190,15 +192,15 @@ void InstallModel::onUpdateCheckFinished() { } #ifdef Q_OS_WINDOWS - if(m.platform == gWindows) { + if(m.platform == "windows") { m.optional = false; } #elif defined(Q_OS_LINUX) - if(m.platform == gLinux) { + if(m.platform == "linux") { m.optional = false; } #elif defined(Q_OS_MACOS) - if(m.platform == gMacOSX) { + if(m.platform == "macosx") { m.optional = false; } #endif @@ -298,8 +300,15 @@ void InstallModel::locateSdk() { name += ".exe"; #endif - QString path = QFileDialog::getOpenFileName(nullptr, tr("Locate the ") + EDITOR_NAME, "/", name); +#ifdef Q_OS_MACOS + name += ".app"; +#endif + + QString path = QFileDialog::getOpenFileName(nullptr, tr("Locate the ") + EDITOR_NAME, Settings::instance()->sdkDir(), name); if(!path.isEmpty()) { +#ifdef Q_OS_MACOS + path += "/Contents/MacOS/WorldEditor"; +#endif QFileInfo info(path); QProcess probe(this); @@ -391,7 +400,7 @@ void InstallModel::explorer(const QString &version) { #if defined(Q_OS_WIN) QProcess::startDetached("explorer.exe", { "/select,", QDir::toNativeSeparators(path) }); -#elif defined(Q_OS_MAC) +#elif defined(Q_OS_MACOS) QStringList scriptArgs; scriptArgs << QLatin1String("-e") << QString::fromLatin1("tell application \"Finder\" to reveal POSIX file \"%1\"") diff --git a/thunder-hub.qbs b/thunder-hub.qbs index 5dfee31..0694c56 100644 --- a/thunder-hub.qbs +++ b/thunder-hub.qbs @@ -6,7 +6,7 @@ Project { id: thunder property string COMPANY_NAME: "ThunderEngine" - property string PRODUCT_NAME: "Hub" + property string PRODUCT_NAME: "ThunderHub" property string PRODUCT_VERSION: "2026.1" property string EDITOR_NAME: "WorldEditor"