Skip to content

Commit 3f4b82c

Browse files
wip embedded python
1 parent 909a149 commit 3f4b82c

File tree

17 files changed

+320
-1283
lines changed

17 files changed

+320
-1283
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,22 @@ jobs:
3232
needs: build-and-deploy-python-package
3333
steps:
3434
- uses: actions/checkout@v2
35+
- name: Set up Python
36+
uses: actions/setup-python@v2
37+
with:
38+
python-version: '3.8'
39+
- name: Install Python dependencies
40+
run: |
41+
python -m pip install --upgrade pip
42+
pip install pyinstaller
43+
pip install -r requirements.txt
44+
- name: Build portable distribution
45+
run: pyinstaller --distpath ./kbs-dist kbs.spec
46+
- name: Copy runtime to application
47+
run: |
48+
New-Item -ItemType Directory -Force -Path ./application/.runtime
49+
Copy-Item -Path ./kbs-dist/kbs/* -Destination ./application/.runtime -Recurse -Force
50+
shell: pwsh
3551
- name: Install Node.js
3652
uses: actions/setup-node@v1
3753
with:

.github/workflows/dev-build.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build Dev
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
8+
jobs:
9+
build-desktop-app:
10+
runs-on: windows-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: '3.8'
17+
- name: Install Python dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install pyinstaller
21+
pip install -r requirements.txt
22+
- name: Build portable distribution
23+
run: pyinstaller --distpath ./kbs-dist kbs.spec
24+
- name: Copy runtime to application
25+
run: |
26+
New-Item -ItemType Directory -Force -Path ./application/.runtime
27+
Copy-Item -Path ./kbs-dist/kbs/* -Destination ./application/.runtime -Recurse -Force
28+
shell: pwsh
29+
- name: Install Node.js
30+
uses: actions/setup-node@v1
31+
with:
32+
node-version: '18'
33+
- name: Install dependencies
34+
run: npm install
35+
working-directory: ./application
36+
- name: Package Webpack
37+
run: npm run package
38+
working-directory: ./application
39+
- name: Build Installer
40+
run: npm run make-installer:win
41+
working-directory: ./application
42+
env:
43+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
44+
- name: Rename Installer
45+
run: mv "dist/Keyboard Sounds Setup *.exe" "dist/Keyboard-Sounds-Setup-windows-x64.exe"
46+
working-directory: ./application
47+
- name: Rename Blockmap
48+
run: mv "dist/Keyboard Sounds Setup *.exe.blockmap" "dist/Keyboard-Sounds-Setup-windows-x64.exe.blockmap"
49+
working-directory: ./application
50+
- name: Upload artifacts
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: build-artifacts
54+
path: |
55+
application/dist/Keyboard-Sounds-Setup-windows-x64.exe
56+
application/dist/Keyboard-Sounds-Setup-windows-x64.exe.blockmap

application/.runtime/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

application/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
".webpack/**/**/*",
1616
"node_modules/**/**/*"
1717
],
18+
"extraResources": [
19+
{
20+
"from": ".runtime",
21+
"to": ".runtime"
22+
}
23+
],
1824
"directories": {
1925
"buildResources": "src/ui"
2026
},

0 commit comments

Comments
 (0)