diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 328b753..67f2c8b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,11 +23,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest] - include: - - os: windows-latest - additional_cmake_flags: '-A x64 -DCMAKE_GENERATOR_TOOLSET=v142' - + os: [ubuntu-latest, macos-15, windows-latest] steps: - name: Fetch sources uses: actions/checkout@v4 @@ -46,16 +42,15 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- - - name: Install Windows dependencies - if: runner.os == 'Windows' - run: choco install innosetup + - name: Install dependencies (macOS) + if: runner.os == 'macOS' + run: brew install cmake ninja - - name: Install Linux dependencies + - name: Install dependencies (Linux) if: runner.os == 'Linux' run: | sudo apt-get update sudo apt-get install \ - clang \ pkg-config \ libglew-dev \ zlib1g-dev \ @@ -69,12 +64,28 @@ jobs: ninja-build \ libpulse-dev \ - - name: Install macos dependencies - if: runner.os == 'macos-latest' - run: brew install ninja + - name: Install dependencies (Windows) + if: runner.os == 'Windows' + run: choco install innosetup + + - name: Setup Clang 22 (Linux) + if: runner.os == 'Linux' + run: | + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh 22 all + echo "CC=clang-22" >> $GITHUB_ENV + echo "CXX=clang++-22" >> $GITHUB_ENV + + - name: Setup Clang (Windows) + if: runner.os == 'Windows' + run: | + choco install llvm -y + echo "CC=clang" >> $env:GITHUB_ENV + echo "CXX=clang++" >> $env:GITHUB_ENV - name: Configure CMake - run: cmake -G "${{ matrix.os=='windows-latest' && 'Visual Studio 17 2022' || 'Ninja' }}" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=RelWithDebInfo ${{matrix.additional_cmake_flags}} -DAUI_INSTALL_RUNTIME_DEPENDENCIES=TRUE + run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=RelWithDebInfo ${{ runner.os == 'Windows' && '-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded' || '' }} -DAUI_INSTALL_RUNTIME_DEPENDENCIES=TRUE - name: Build Project run: cmake --build ${{github.workspace}}/build --config RelWithDebInfo @@ -84,11 +95,11 @@ jobs: - name: Run Tests (Windows) if: runner.os == 'Windows' - working-directory: ${{github.workspace}}/build/bin/RelWithDebInfo/ - run: ${{github.workspace}}/build/bin/RelWithDebInfo/Tests.exe + working-directory: ${{github.workspace}}/build/bin + run: ${{github.workspace}}/build/bin/Tests.exe - name: Run Tests (Linux and macOS) - if: runner.os == 'Linux' + if: runner.os != 'Windows' working-directory: ${{github.workspace}}/build/bin run: ${{github.workspace}}/build/bin/Tests @@ -100,27 +111,10 @@ jobs: cmake --build . --config RelWithDebInfo cpack . -CRelWithDebInfo -B artifacts - - name: Pack Windows Portable - if: runner.os == 'Windows' - working-directory: ${{github.workspace}}/build - run: | - cmake . -DAUI_APP_PACKAGING=AUI_PORTABLE_ZIP - cmake --build . --config RelWithDebInfo - cpack . -CRelWithDebInfo -B artifacts - - - name: Pack Linux Portable (ZIP) - if: runner.os == 'Linux' - working-directory: ${{github.workspace}}/build - run: | - cmake . -DAUI_APP_PACKAGING=AUI_PORTABLE_ZIP - cmake --build . --config RelWithDebInfo - cpack . -CRelWithDebInfo -B artifacts - - - name: Pack Linux Portable (tar.gz) - if: runner.os == 'Linux' + - name: Pack Portable working-directory: ${{github.workspace}}/build run: | - cmake . -DAUI_APP_PACKAGING=AUI_PORTABLE_TGZ + cmake . -DAUI_APP_PACKAGING=${{ runner.os == 'Linux' && 'AUI_PORTABLE_TGZ' || 'AUI_PORTABLE_ZIP' }} cmake --build . --config RelWithDebInfo cpack . -CRelWithDebInfo -B artifacts diff --git a/.gitignore b/.gitignore index 3c34c2f..00f8bdc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -*build* \ No newline at end of file +.idea +cmake-build-** +*build* +.DS_Store diff --git a/CMakeLists.txt b/CMakeLists.txt index 7410d4e..48f2895 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ option(BUILD_SHARED_LIBS "Build shared libs" OFF) option(AUIB_FORCE_PRECOMPILED "AUI.Boot: force precompiled dependencies" OFF) option(AUIB_NO_PRECOMPILED "AUI.Boot: disable precompiled dependencies" OFF) -set(AUI_VERSION v8.0.0-rc.13) +set(AUI_VERSION v8.0.0-rc.18) # Use AUI.Boot file( diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 7793c70..34429b2 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -11,7 +11,7 @@ using namespace declarative; MainWindow::MainWindow(_ updater) : AWindow("Project template app", 300_dp, 200_dp), mUpdater(std::move(updater)) { setContents(Centered { Vertical { - Centered { Icon { ":img/icon.svg" } AUI_WITH_STYLE { FixedSize(64_dp) } }, + Centered { Icon { ":img/icon.svg" } AUI_OVERRIDE_STYLE { FixedSize(64_dp) } }, Centered { Label { "Hello world from AUI!" } }, _new("Visit GitHub repo") .connect(&AView::clicked, this, [] { APlatform::openUrl("https://github.com/aui-framework/aui"); }), @@ -20,25 +20,25 @@ MainWindow::MainWindow(_ updater) _new("Submit an issue") .connect( &AView::clicked, this, [] { APlatform::openUrl("https://github.com/aui-framework/aui/issues/new"); }), - CustomLayout {} & mUpdater->status.readProjected([&updater = mUpdater](const std::any& status) -> _ { - if (std::any_cast(&status)) { - return _new("Check for updates").connect(&AView::clicked, AUI_SLOT(updater)::checkForUpdates); - } - if (std::any_cast(&status)) { - return Label { "Checking for updates..." }; - } - if (auto downloading = std::any_cast(&status)) { - return Vertical { - Label { "Downloading..." }, - _new() & downloading->progress, - }; - } - if (std::any_cast(&status)) { - return _new("Apply update and restart") - .connect(&AView::clicked, AUI_SLOT(updater)::applyUpdateAndRestart); - } - return nullptr; - }), + //CustomLayout {} & mUpdater->status.readProjected([&updater = mUpdater](const std::any& status) -> _ { + // if (std::any_cast(&status)) { + // return _new("Check for updates").connect(&AView::clicked, AUI_SLOT(updater)::checkForUpdates); + // } + // if (std::any_cast(&status)) { + // return Label { "Checking for updates..." }; + // } + // if (auto downloading = std::any_cast(&status)) { + // return Vertical { + // Label { "Downloading..." }, + // _new() & downloading->progress, + // }; + // } + // if (std::any_cast(&status)) { + // return _new("Apply update and restart") + // .connect(&AView::clicked, AUI_SLOT(updater)::applyUpdateAndRestart); + // } + // return nullptr; + //}), Label { "Btw, 2 + 2 = {}"_format(sum(2, 2)) }, Label { "Version: " AUI_PP_STRINGIZE(AUI_CMAKE_PROJECT_VERSION) }, } }); diff --git a/src/main.cpp b/src/main.cpp index 5503cf7..ddf7b29 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,4 +8,4 @@ AUI_ENTRY { _new(std::move(updater))->show(); return 0; -}; \ No newline at end of file +};