Skip to content

Commit b7ea3a7

Browse files
authored
Merge pull request #5 from Kataglyphis/develop
Develop
2 parents 9614aed + 3f8a952 commit b7ea3a7

File tree

25 files changed

+599
-316
lines changed

25 files changed

+599
-316
lines changed

.github/workflows/dart.yml

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,25 @@ name: Build + run + test on Linux
77

88
on:
99
push:
10-
branches: ["main"]
10+
branches: ["main", "develop"]
1111
pull_request:
12-
branches: ["main"]
12+
branches: ["main", "develop"]
13+
14+
env:
15+
APP_NAME: kataglyphis-inference-engine
1316

1417
jobs:
1518
build:
1619
runs-on: ubuntu-24.04
1720

1821
steps:
19-
- uses: actions/[email protected]
20-
21-
- name: Prepare python env for sphynx
22-
run: |
23-
pip install -r requirements.txt
24-
- name: Create docs
25-
run: |
26-
cd docs
27-
make html
28-
29-
- name: 📂 Sync files to dev domain
30-
uses: SamKirkland/[email protected]
31-
with:
32-
server: ${{ secrets.SERVER }}
33-
username: ${{ secrets.USERNAME }}
34-
password: ${{ secrets.PW }}
35-
local-dir: "./docs/build/html/"
22+
- uses: actions/[email protected]
3623

3724
- name: Setup Flutter SDK
3825
uses: flutter-actions/[email protected]
3926
with:
4027
channel: stable
41-
version: 3.32.0
28+
version: 3.35.4
4229

4330
- name: Install dependencies
4431
run: |
@@ -82,9 +69,29 @@ jobs:
8269
- name: "Build Linux Desktop App"
8370
run: |
8471
flutter build linux --release
72+
73+
# skip if running after your build and checkout; otherwise download artifact
74+
- name: Create tar.gz
75+
run: |
76+
mkdir -p out
77+
cp -r build/linux/x64/release/bundle out/${APP_NAME}-bundle
78+
tar -C out -czf ${APP_NAME}-linux-x64.tar.gz ${APP_NAME}-bundle
79+
80+
- name: Upload artifact
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: ${{ env.APP_NAME }}-linux-tar
84+
path: ${{ env.APP_NAME }}-linux-x64.tar.gz
8585

86-
# Build Linux Desktop App (Dev Branch) with a fallback
87-
- name: "Build Linux Desktop App"
88-
continue-on-error: true
86+
87+
- name: Build docs
8988
run: |
90-
flutter build linux --release
89+
dart doc
90+
91+
- name: 📂 Sync files to domain
92+
uses: SamKirkland/[email protected]
93+
with:
94+
server: ${{ secrets.SERVER }}
95+
username: ${{ secrets.USERNAME }}
96+
password: ${{ secrets.PW }}
97+
local-dir: "./doc/api/"
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Windows CMake (clang-cl)
2+
3+
on: [ push, pull_request ]
4+
5+
env:
6+
BUILD_DIR_RELEASE: build/windows/x64/runner
7+
8+
jobs:
9+
build-clang:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/[email protected]
15+
16+
- name: Setup Flutter SDK
17+
uses: flutter-actions/[email protected]
18+
with:
19+
channel: stable
20+
version: 3.35.4
21+
22+
- name: Install dependencies
23+
run: |
24+
git submodule update --init --recursive
25+
flutter pub get
26+
cd ExternalLib/jotrockenmitlockenrepo
27+
flutter pub get
28+
29+
# Uncomment this step to verify the use of 'dart format' on each commit.
30+
- name: Verify formatting
31+
continue-on-error: true
32+
run: dart format --output=none --set-exit-if-changed .
33+
34+
# Consider passing '--fatal-infos' for slightly stricter analysis.
35+
- name: Analyze project source
36+
continue-on-error: true
37+
run: dart analyze
38+
39+
# Your project will need to have tests in test/ and a dependency on
40+
# package:test for this step to succeed. Note that Flutter projects will
41+
# want to change this to 'flutter test'.
42+
- name: Run tests
43+
continue-on-error: true
44+
run: |
45+
flutter test
46+
47+
- name: Enable Flutter Windows Desktop
48+
run: |
49+
flutter config --enable-windows-desktop
50+
51+
# this is a bit hacky; creates ephemeral project but we remove build artifacts
52+
# for we build it our own in next step
53+
- name: "Create ephemeral project"
54+
continue-on-error: true
55+
run: |
56+
flutter build windows
57+
Remove-Item -Recurse -Force .\build
58+
59+
- name: "Configure Windows Desktop App"
60+
run: |
61+
62+
cmake `
63+
"${{ github.workspace }}/windows" `
64+
-B "${{ github.workspace }}/build/windows/x64" `
65+
-G "Ninja" `
66+
-DFLUTTER_TARGET_PLATFORM=windows-x64 `
67+
-DCMAKE_CXX_COMPILER='clang-cl' `
68+
-DCMAKE_CXX_COMPILER_TARGET=x86_64-pc-windows-msvc
69+
shell: pwsh
70+
71+
# Build Windows Desktop App for Production (Main Branch)
72+
- name: "Build Rust crate"
73+
run: |
74+
cd rust
75+
cargo install flutter_rust_bridge_codegen
76+
cargo build --release
77+
cp "${{ github.workspace }}/rust/target/release/rust_lib_kataglyphis_inference_engine.dll" `
78+
"${{ github.workspace }}/build/windows/x64/plugins/rust_lib_kataglyphis_inference_engine"
79+
shell: pwsh
80+
81+
# Build Windows Desktop App for Production (Main Branch)
82+
#flutter build windows --release
83+
- name: "Build Windows Desktop App"
84+
run: |
85+
cmake --build "${{ github.workspace }}/build/windows/x64" --config Release --target install --verbose
86+
shell: pwsh
87+
88+
# see also the install commands in the bottom of the CMakeLists.txt
89+
- name: Upload files & Zip
90+
uses: actions/[email protected]
91+
with:
92+
name: windows-files
93+
path: |
94+
${{ env.BUILD_DIR_RELEASE }}/**/*.exe
95+
${{ env.BUILD_DIR_RELEASE }}/**/*.dll
96+
${{ env.BUILD_DIR_RELEASE }}/data/**/*

.metadata

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: "dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668"
7+
revision: "b25305a8832cfc6ba632a7f87ad455e319dccce8"
88
channel: "stable"
99

1010
project_type: app
@@ -13,26 +13,11 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
17-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
18-
- platform: android
19-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
20-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
21-
- platform: ios
22-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
23-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
24-
- platform: linux
25-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
26-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
27-
- platform: macos
28-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
29-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
30-
- platform: web
31-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
32-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
16+
create_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8
17+
base_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8
3318
- platform: windows
34-
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
35-
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
19+
create_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8
20+
base_revision: b25305a8832cfc6ba632a7f87ad455e319dccce8
3621

3722
# User provided section
3823

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "Flutter",
99
"type": "dart",
1010
"request": "launch",
11-
"program": "lib/main.dart"
11+
"program": "lib/main.dart",
1212
},
1313
{
1414
"name": "Kataglyphis-Inference-Engine",
@@ -19,7 +19,7 @@
1919
"name": "Kataglyphis-Inference-Engine (profile mode)",
2020
"request": "launch",
2121
"type": "dart",
22-
"flutterMode": "profile"
22+
"flutterMode": "profile",
2323
},
2424
{
2525
"name": "Kataglyphis-Inference-Engine (release mode)",

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"idf.pythonInstallPath": "/home/jones/miniforge3/bin/python"
3+
}

README.md

Lines changed: 29 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,33 @@ Upgrading the flutter/dart bridge dependencies is as simple as this command:
117117
cargo install flutter_rust_bridge_codegen && flutter_rust_bridge_codegen generate
118118
```
119119

120+
### Windows
121+
For windows we absolutely do not want to be dependent on MSVC compiler.
122+
Therefore I use [clang-cl](https://clang.llvm.org/docs/MSVCCompatibility.html).
123+
Using clang-cl instead of MSVC needed adjustment. Therefore i give some instructions here.
124+
125+
#### Flutter generated cmake project
126+
Adjust the CXX-Flags in the auto-generated Cmake project. Find the folloeing line
127+
and adjust accordingly:
128+
129+
```cmake
130+
# comment this line
131+
# target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
132+
# add the following:
133+
# target_compile_options(${TARGET} PRIVATE /W3 /WX /wd4100 -Wno-cast-function-type-mismatch -Wno-unused-function)
134+
```
135+
136+
Now you can build the project by running following commands:
137+
**__Attention:__** Adjust paths accordingly.
138+
139+
```powershell
140+
cd rust
141+
cargo build --release
142+
cp rust\target\release\rust_lib_kataglyphis_inference_engine.dll build\windows\x64\plugins\rust_lib_kataglyphis_inference_engine
143+
cmake C:\GitHub\Kataglyphis-Inference-Engine\windows -B C:\GitHub\Kataglyphis-Inference-Engine\build\windows\x64 -G "Ninja" -DFLUTTER_TARGET_PLATFORM=windows-x64 -DCMAKE_CXX_COMPILER="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\bin\clang-cl.exe" -DCMAKE_CXX_COMPILER_TARGET=x86_64-pc-windows-msvc
144+
cmake --build C:\GitHub\Kataglyphis-Inference-Engine\build\windows\x64 --config Release --target install --verbose
145+
```
146+
120147
## Tests
121148

122149
<!-- ROADMAP -->
@@ -160,40 +187,5 @@ Project Link: [https://github.com/Kataglyphis/...](https://github.com/Kataglyphi
160187

161188
Some very helpful literature, tutorials, etc.
162189

163-
<!-- CMake/C++
164-
* [Cpp best practices](https://github.com/cpp-best-practices/cppbestpractices)
165-
166-
Vulkan
167-
* [Udemy course by Ben Cook](https://www.udemy.com/share/102M903@JMHgpMsdMW336k2s5Ftz9FMx769wYAEQ7p6GMAPBsFuVUbWRgq7k2uY6qBCG6UWNPQ==/)
168-
* [Vulkan Tutorial](https://vulkan-tutorial.com/)
169-
* [Vulkan Raytracing Tutorial](https://developer.nvidia.com/rtx/raytracing/vkray)
170-
* [Vulkan Tutorial; especially chapter about integrating imgui](https://frguthmann.github.io/posts/vulkan_imgui/)
171-
* [NVidia Raytracing tutorial with Vulkan](https://nvpro-samples.github.io/vk_raytracing_tutorial_KHR/)
172-
* [Blog from Sascha Willems](https://www.saschawillems.de/)
173-
174-
Physically Based Shading
175-
* [Advanced Global Illumination by Dutre, Bala, Bekaert](https://www.oreilly.com/library/view/advanced-global-illumination/9781439864951/)
176-
* [The Bible: PBR book](https://pbr-book.org/3ed-2018/Reflection_Models/Microfacet_Models)
177-
* [Real shading in Unreal engine 4](https://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf)
178-
* [Physically Based Shading at Disney](https://blog.selfshadow.com/publications/s2012-shading-course/burley/s2012_pbs_disney_brdf_notes_v3.pdf)
179-
* [RealTimeRendering](https://www.realtimerendering.com/)
180-
* [Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs](https://hal.inria.fr/hal-01024289/)
181-
* [Sampling the GGX Distribution of Visible Normals](https://pdfs.semanticscholar.org/63bc/928467d760605cdbf77a25bb7c3ad957e40e.pdf)
182-
183-
Path tracing
184-
* [NVIDIA Path tracing Tutorial](https://github.com/nvpro-samples/vk_mini_path_tracer/blob/main/vk_mini_path_tracer/main.cpp) -->
185-
186-
<!-- MARKDOWN LINKS & IMAGES -->
187-
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
188-
[contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=for-the-badge
189-
[contributors-url]: https://github.com/othneildrew/Best-README-Template/graphs/contributors
190-
[forks-shield]: https://img.shields.io/github/forks/othneildrew/Best-README-Template.svg?style=for-the-badge
191-
[forks-url]: https://github.com/othneildrew/Best-README-Template/network/members
192-
[stars-shield]: https://img.shields.io/github/stars/othneildrew/Best-README-Template.svg?style=for-the-badge
193-
[stars-url]: https://github.com/othneildrew/Best-README-Template/stargazers
194-
[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=for-the-badge
195-
[issues-url]: https://github.com/othneildrew/Best-README-Template/issues
196-
[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=for-the-badge
197-
[license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt
198-
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
199-
[linkedin-url]: https://www.linkedin.com/in/jonas-heinle-0b2a301a0/
190+
CMake/C++
191+
* [clang-cl](https://clang.llvm.org/docs/MSVCCompatibility.html)

dartdoc_options.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# “additional-docs” tells Dartdoc: “Here are extra markdown files to render
2+
# as top-level pages in the generated doc site.” Each entry is a path
3+
# (relative to the project root).
4+
dartdoc:
5+
categories:
6+
awesome:
7+
markdown: docs/INTRODUCTION.md
8+
displayName: Awesome
9+
great:
10+
markdown: docs/INTRODUCTION.md
11+
displayName: Great
12+
categoryOrder: [awesome, great]
13+
showUndocumentedCategories: true
14+
additional-docs:
15+
- docs/INTRODUCTION.md

0 commit comments

Comments
 (0)