Skip to content

Commit ab7827d

Browse files
authored
feat: an attempt for potential first release (#1)
* chore: tests * tests * fix? * linux deps * test build * add some packaging stuff for macos * very shit makefile * test * more alerts * Update main.rs tt * disallow drag on linux * picky * cli * Update mod.rs * refactor * reorganize and add some scaffolding for the install button * the basics for now * Update frame.rs * Update frame.rs * certs * Update frame.rs * WHY WERE YOU HERE * some fixes * more actions * remove this stuff * this too * asd * Update build.yml * Update build.yml * fix again * please * Update build.yml * install * lkibux ui * Update mod.rs * Update Windows build command and upload artifacts Changed the build command for Windows to use 'cargo build' instead of 'cargo bundle'. Added .exe files to the upload artifacts. * style changes + config dir * for now disallow multiple teams * remove some useless stuff * basic modifications * add this back * Update main.rs * temporary fix for LC * notoar * Update build.yml * lets try to debug this issue * Revert "lets try to debug this issue" This reverts commit 01d5c02. * a * Update build.yml * Update build.yml * Update build.yml * seperate workflow? * oh my god?? * improve actions * fix ts * FIX TS AGAIN * FIX TS AGAINN * bryh * HOPEFULLYLYY * chmod ts * last times the charm! * refactor certificate * fix name changing + readd back bundle mods for plumesign * stuggd * todos * improve ui code * add p12 gen support * add some keeps * remove some stuff for now * delete some cache after deselect * comment out more stuff * add simple icon for mac
1 parent d72efce commit ab7827d

68 files changed

Lines changed: 2842 additions & 1232 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
root = true
22

33
[*]
4-
indent_style = tab
4+
indent_style = space
55
indent_size = 4
66
end_of_line = lf
77
charset = utf-8
@@ -10,4 +10,5 @@ insert_final_newline = true
1010

1111
[*.{yml,yaml}]
1212
indent_style = space
13-
indent_size = 2
13+
indent_size = 2
14+

.github/workflows/build.yml

Lines changed: 199 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,226 @@
1-
name: "Build"
1+
name: "Build & Bundle"
22
on:
33
push:
44
branches:
55
- main
6-
76
workflow_dispatch:
87

9-
release:
10-
types: [published]
8+
env:
9+
BINARY_NAME: plumeimpactor
10+
BUNDLE_NAME: Impactor
1111

1212
jobs:
13-
build:
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
platform:
18-
- ubuntu-22.04
19-
- windows-latest
20-
- macos-latest
21-
22-
runs-on: ${{ matrix.platform }}
13+
build-linux:
14+
runs-on: ubuntu-22.04
2315
steps:
2416
- uses: actions/checkout@v4
25-
2617
- name: Cache Rust dependencies
2718
uses: actions/cache@v4
2819
with:
2920
path: |
3021
~/.cargo/registry
3122
~/.cargo/git
3223
target
33-
key: ${{ matrix.platform }}-cargo-${{ hashFiles('**/Cargo.lock') }}
34-
restore-keys: |
35-
${{ runner.os }}-cargo-
24+
key: linux-cargo-${{ hashFiles('**/Cargo.lock') }}
25+
restore-keys: linux-cargo-
3626

3727
- name: Install Rust stable
3828
uses: dtolnay/rust-toolchain@stable
29+
30+
- name: Install Linux dependencies
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install libgtk-3-dev libpng-dev libjpeg-dev libgl1-mesa-dev libglu1-mesa-dev libxkbcommon-dev libexpat1-dev libtiff-dev
34+
35+
- name: Build Dependencies
36+
run: |
37+
cargo install patch-crate
38+
cargo fetch --locked || true
39+
cargo patch-crate --force
40+
cargo install cargo-bundle
41+
mkdir -p build/out
42+
43+
- name: Build & Bundle (Linux)
44+
run: |
45+
cargo bundle --bin ${{ env.BINARY_NAME }} --package ${{ env.BINARY_NAME }} --release --format appimage
46+
cp -R target/release/bundle/appimage/*.AppImage build/out/
47+
48+
- name: Upload Bundles
49+
uses: actions/upload-artifact@v4
3950
with:
40-
targets: ${{ (matrix.platform == 'macos-latest') && 'aarch64-apple-darwin' || '' }}
51+
name: ${{ env.BINARY_NAME }}-linux
52+
path: build/out/*
53+
54+
build-windows:
55+
runs-on: windows-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
- name: Cache Rust dependencies
59+
uses: actions/cache@v4
60+
with:
61+
path: |
62+
~/.cargo/registry
63+
~/.cargo/git
64+
target
65+
key: windows-cargo-${{ hashFiles('**/Cargo.lock') }}
66+
restore-keys: windows-cargo-
67+
68+
- name: Install Rust stable
69+
uses: dtolnay/rust-toolchain@stable
4170

4271
- name: Setup Windows dependencies
43-
if: runner.os == 'Windows'
4472
run: choco install strawberryperl make --no-progress
4573

46-
- name: Setup MSVC environment
47-
if: runner.os == 'Windows'
74+
- name: Setup Windows MSVC environment
4875
uses: ilammy/msvc-dev-cmd@v1
4976

50-
- name: Build
51-
run: cargo build --bin plumeimpactor --release
77+
- name: Build Dependencies
78+
run: |
79+
cargo install patch-crate
80+
cargo fetch --locked || true
81+
cargo patch-crate --force
82+
mkdir -p build/out
83+
84+
- name: Build & Bundle (Windows)
85+
run: |
86+
cargo build --bin ${{ env.BINARY_NAME }} --release
87+
cp target/release/${{ env.BINARY_NAME }}.exe build/out
88+
89+
- name: Upload Bundles
90+
uses: actions/upload-artifact@v4
91+
with:
92+
name: ${{ env.BINARY_NAME }}-windows
93+
path: build/out/*
94+
95+
build-macos-arm:
96+
runs-on: macos-latest
97+
steps:
98+
- uses: actions/checkout@v4
99+
- name: Cache Rust dependencies
100+
uses: actions/cache@v4
101+
with:
102+
path: |
103+
~/.cargo/registry
104+
~/.cargo/git
105+
target
106+
key: macos-arm-cargo-${{ hashFiles('**/Cargo.lock') }}
107+
restore-keys: macos-arm-cargo-
108+
109+
- name: Install Rust stable
110+
uses: dtolnay/rust-toolchain@stable
111+
with:
112+
targets: aarch64-apple-darwin
113+
114+
- name: Build Dependencies
115+
run: |
116+
cargo install patch-crate
117+
cargo fetch --locked || true
118+
cargo patch-crate --force
119+
mkdir -p build/out
120+
121+
- name: Build (macOS ARM)
122+
run: |
123+
cargo build --bin ${{ env.BINARY_NAME }} --release
124+
strip target/release/${{ env.BINARY_NAME }}
125+
cp target/release/${{ env.BINARY_NAME }} build/out/${{ env.BINARY_NAME }}-arm
126+
127+
- name: Upload ARM Slice
128+
uses: actions/upload-artifact@v4
129+
with:
130+
name: ${{ env.BINARY_NAME }}-macos-slice-arm
131+
path: build/out/${{ env.BINARY_NAME }}-arm
132+
133+
build-macos-intel:
134+
runs-on: macos-15-intel
135+
steps:
136+
- uses: actions/checkout@v4
137+
- name: Cache Rust dependencies
138+
uses: actions/cache@v4
139+
with:
140+
path: |
141+
~/.cargo/registry
142+
~/.cargo/git
143+
target
144+
key: macos-intel-cargo-${{ hashFiles('**/Cargo.lock') }}
145+
restore-keys: macos-intel-cargo-
146+
147+
- name: Install Rust stable
148+
uses: dtolnay/rust-toolchain@stable
149+
150+
- name: Build Dependencies
151+
run: |
152+
cargo install patch-crate
153+
cargo fetch --locked || true
154+
cargo patch-crate --force
155+
mkdir -p build/out
156+
157+
- name: Build (macOS Intel)
158+
run: |
159+
cargo build --bin ${{ env.BINARY_NAME }} --release
160+
strip target/release/${{ env.BINARY_NAME }}
161+
cp target/release/${{ env.BINARY_NAME }} build/out/${{ env.BINARY_NAME }}-intel
162+
163+
- name: Upload Intel Slice
164+
uses: actions/upload-artifact@v4
165+
with:
166+
name: ${{ env.BINARY_NAME }}-macos-slice-intel
167+
path: build/out/${{ env.BINARY_NAME }}-intel
168+
169+
build-macos-universal:
170+
runs-on: macos-latest
171+
needs: [build-macos-arm, build-macos-intel]
172+
steps:
173+
- uses: actions/checkout@v4
174+
175+
- name: Get ARM Slice
176+
uses: actions/download-artifact@v4
177+
with:
178+
name: ${{ env.BINARY_NAME }}-macos-slice-arm
179+
path: build/slices
180+
181+
- name: Get Intel Slice
182+
uses: actions/download-artifact@v4
183+
with:
184+
name: ${{ env.BINARY_NAME }}-macos-slice-intel
185+
path: build/slices
186+
187+
- name: Setup Certificates
188+
uses: apple-actions/import-codesign-certs@v5
189+
with:
190+
p12-file-base64: ${{ secrets.DEV_ID_P12_BASE64 }}
191+
p12-password: ${{ secrets.DEV_ID_P12_PASSWORD }}
192+
193+
- name: Create Universal Binary
194+
run: |
195+
mkdir -p build/universal
196+
lipo -create -output build/universal/${{ env.BINARY_NAME }} build/slices/${{ env.BINARY_NAME }}-arm build/slices/${{ env.BINARY_NAME }}-intel
197+
chmod +x build/universal/${{ env.BINARY_NAME }}
198+
199+
- name: Bundle
200+
run: |
201+
mkdir -p build/dmg
202+
cp -R package/macos/${{ env.BUNDLE_NAME }}.app build/dmg/${{ env.BUNDLE_NAME }}.app
203+
mkdir -p build/dmg/${{ env.BUNDLE_NAME }}.app/Contents/MacOS
204+
mv build/universal/${{ env.BINARY_NAME }} build/dmg/${{ env.BUNDLE_NAME }}.app/Contents/MacOS/${{ env.BINARY_NAME }}
205+
206+
- name: Codesign
207+
run: |
208+
codesign --deep --force --options runtime \
209+
--sign "${{ secrets.DEV_ID_IDENTITY_NAME }}" build/dmg/${{ env.BUNDLE_NAME }}.app
210+
211+
- name: Create DMG
212+
run: |
213+
mkdir -p build/out
214+
ln -s /Applications build/dmg/Applications
215+
hdiutil create -volname ${{ env.BUNDLE_NAME }} -srcfolder build/dmg -ov -format UDZO build/out/${{ env.BUNDLE_NAME }}.dmg
216+
217+
- name: Notarize DMG
218+
run: |
219+
xcrun notarytool submit build/out/${{ env.BUNDLE_NAME }}.dmg --apple-id "${{ secrets.APPLE_ID_EMAIL }}" --password "${{ secrets.APPLE_ID_PASSWORD }}" --team-id "${{ secrets.APPLE_ID_TEAM }}" --wait
220+
xcrun stapler staple build/out/${{ env.BUNDLE_NAME }}.dmg
221+
222+
- name: Upload Universal DMG
223+
uses: actions/upload-artifact@v4
224+
with:
225+
name: ${{ env.BINARY_NAME }}-macos-universal
226+
path: build/out/${{ env.BUNDLE_NAME }}.dmg

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ state.plist
33
.zsign_cache
44
*.DS_Store
55
/tests
6+
/build

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"rust-lang.rust-analyzer",
4+
"editorconfig.editorconfig"
5+
]
6+
}

0 commit comments

Comments
 (0)