Skip to content

Commit 9399867

Browse files
committed
removed the thirdparty lib from previous project and added a build workflow
1 parent 6cb76e8 commit 9399867

6 files changed

Lines changed: 113 additions & 31 deletions

File tree

.github/workflows/build.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
os: [macos-latest, ubuntu-latest, windows-latest]
14+
15+
runs-on: ${{ matrix.os }}
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Get commit hash
21+
id: commit_hash
22+
run: |
23+
HASH=$(git rev-parse --short=6 HEAD)
24+
echo "hash=$HASH" >> $GITHUB_OUTPUT
25+
26+
- name: Set version
27+
id: version
28+
run: |
29+
VERSION="0.1.${{ steps.commit_hash.outputs.hash }}"
30+
echo "version=$VERSION" >> $GITHUB_OUTPUT
31+
echo "Building version: $VERSION"
32+
33+
- name: Install dependencies (Ubuntu)
34+
if: matrix.os == 'ubuntu-latest'
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y qt6-base-dev qt6-base-dev-tools cmake build-essential
38+
39+
- name: Install dependencies (macOS)
40+
if: matrix.os == 'macos-latest'
41+
run: |
42+
brew install qt@6 cmake
43+
44+
- name: Install dependencies (Windows)
45+
if: matrix.os == 'windows-latest'
46+
shell: pwsh
47+
run: |
48+
choco install qt6 cmake --yes --no-progress
49+
50+
- name: Set Qt6 path (macOS)
51+
if: matrix.os == 'macos-latest'
52+
run: |
53+
export PATH="/opt/homebrew/opt/qt@6/bin:$PATH"
54+
echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/qt@6" >> $GITHUB_ENV
55+
56+
- name: Set Qt6 path (Ubuntu)
57+
if: matrix.os == 'ubuntu-latest'
58+
run: |
59+
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt6
60+
echo "CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake/Qt6" >> $GITHUB_ENV
61+
62+
- name: Configure CMake
63+
shell: bash
64+
run: |
65+
mkdir build
66+
cd build
67+
cmake .. -DCMAKE_BUILD_TYPE=Release
68+
69+
- name: Build
70+
shell: bash
71+
run: |
72+
cd build
73+
cmake --build . --config Release -j4
74+
75+
- name: Create release artifact (Linux/macOS)
76+
if: matrix.os != 'windows-latest'
77+
shell: bash
78+
run: |
79+
mkdir -p release
80+
cd build
81+
if [ "${{ matrix.os }}" == "macos-latest" ]; then
82+
cp "Plot Genius" ../release/plot-genius-${{ steps.version.outputs.version }}-macos
83+
else
84+
cp "Plot Genius" ../release/plot-genius-${{ steps.version.outputs.version }}-linux
85+
fi
86+
87+
- name: Create release artifact (Windows)
88+
if: matrix.os == 'windows-latest'
89+
shell: pwsh
90+
run: |
91+
New-Item -ItemType Directory -Force -Path release
92+
Copy-Item "build\Plot Genius.exe" "release\plot-genius-${{ steps.version.outputs.version }}-windows.exe"
93+
94+
- name: Upload artifacts
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: plot-genius-${{ steps.version.outputs.version }}-${{ matrix.os }}
98+
path: release/*

README.md

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,29 @@
11
Plot Genius
22

3-
A cross-platform mathematical function plotting application built with Qt6 and C++.
4-
5-
Description
6-
7-
Plot Genius is a graphing application for visualizing mathematical functions. Users can input equations, view them on a graph, and interact with the viewport through panning and zooming. The application supports multiple equations, customizable appearance, and automatic theme detection.
3+
A cross-platform mathematical function plotting application.
84

95
Features
106

117
- Parse and evaluate mathematical expressions
12-
- Visualize functions on an interactive graph
13-
- Pan and zoom with mouse gestures
14-
- Manage multiple equations with add, remove, and clear all
15-
- Export graphs as PNG or JPEG images
16-
- Customize graph appearance and colors
17-
- Automatic light and dark theme support
18-
- Cross-platform support for Windows, macOS, and Linux
8+
- Interactive graph with pan and zoom
9+
- Multiple equation management
10+
- Graph export (PNG/JPEG)
11+
- Customizable appearance
12+
- Automatic theme detection
1913

2014
Building
2115

2216
Requirements:
2317
- C++17 compiler
24-
- CMake 3.16 or higher
25-
- Qt6 with Core, Widgets, and Gui components
26-
27-
Build steps:
28-
1. Create build directory: mkdir build && cd build
29-
2. Configure: cmake ..
30-
3. Build: cmake --build . -j4
31-
32-
Project Structure
33-
34-
- src/core: Equation parsing and evaluation
35-
- src/graph: Graph state and viewport management
36-
- src/math: Mathematical utilities
37-
- src/ui: Qt-based user interface
38-
- include: Header files organized by module
18+
- CMake 3.16+
19+
- Qt6 (Core, Widgets, Gui)
20+
21+
Build:
22+
```bash
23+
mkdir build && cd build
24+
cmake ..
25+
cmake --build . -j4
26+
```
3927

4028
License
4129

thirdparty/glad

Submodule glad deleted from 56e406e

thirdparty/glfw

Submodule glfw deleted from e7ea71b

thirdparty/glm

Submodule glm deleted from 2d4c4b4

thirdparty/imgui

Submodule imgui deleted from dcf0d8c

0 commit comments

Comments
 (0)