Skip to content
Open
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
66 changes: 30 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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

Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
*build*
.idea
cmake-build-**
*build*
.DS_Store
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
40 changes: 20 additions & 20 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using namespace declarative;
MainWindow::MainWindow(_<MyUpdater> 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<AButton>("Visit GitHub repo")
.connect(&AView::clicked, this, [] { APlatform::openUrl("https://github.com/aui-framework/aui"); }),
Expand All @@ -20,25 +20,25 @@ MainWindow::MainWindow(_<MyUpdater> updater)
_new<AButton>("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) -> _<AView> {
if (std::any_cast<AUpdater::StatusIdle>(&status)) {
return _new<AButton>("Check for updates").connect(&AView::clicked, AUI_SLOT(updater)::checkForUpdates);
}
if (std::any_cast<AUpdater::StatusCheckingForUpdates>(&status)) {
return Label { "Checking for updates..." };
}
if (auto downloading = std::any_cast<AUpdater::StatusDownloading>(&status)) {
return Vertical {
Label { "Downloading..." },
_new<AProgressBar>() & downloading->progress,
};
}
if (std::any_cast<AUpdater::StatusWaitingForApplyAndRestart>(&status)) {
return _new<AButton>("Apply update and restart")
.connect(&AView::clicked, AUI_SLOT(updater)::applyUpdateAndRestart);
}
return nullptr;
}),
//CustomLayout {} & mUpdater->status.readProjected([&updater = mUpdater](const std::any& status) -> _<AView> {
// if (std::any_cast<AUpdater::StatusIdle>(&status)) {
// return _new<AButton>("Check for updates").connect(&AView::clicked, AUI_SLOT(updater)::checkForUpdates);
// }
// if (std::any_cast<AUpdater::StatusCheckingForUpdates>(&status)) {
// return Label { "Checking for updates..." };
// }
// if (auto downloading = std::any_cast<AUpdater::StatusDownloading>(&status)) {
// return Vertical {
// Label { "Downloading..." },
// _new<AProgressBar>() & downloading->progress,
// };
// }
// if (std::any_cast<AUpdater::StatusWaitingForApplyAndRestart>(&status)) {
// return _new<AButton>("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) },
} });
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ AUI_ENTRY {

_new<MainWindow>(std::move(updater))->show();
return 0;
};
};
Loading