Skip to content

Commit efdc9d8

Browse files
committed
Initial commit
0 parents  commit efdc9d8

87 files changed

Lines changed: 24988 additions & 0 deletions

Some content is hidden

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

.github/workflows/build.yml

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: Build ZIBO Keyboard Input Plugin
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
name: Build Plugin
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
matrix:
16+
os: [windows-latest, macos-latest, ubuntu-latest]
17+
include:
18+
- os: windows-latest
19+
platform: windows
20+
artifact_name: win.xpl
21+
- os: macos-latest
22+
platform: mac
23+
artifact_name: mac.xpl
24+
- os: ubuntu-latest
25+
platform: linux
26+
artifact_name: lin.xpl
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Set up Python
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: '3.x'
35+
36+
- name: Install dependencies (Windows)
37+
if: runner.os == 'Windows'
38+
run: |
39+
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
40+
shell: pwsh
41+
42+
- name: Verify CMake installation (Windows)
43+
if: runner.os == 'Windows'
44+
run: |
45+
# Restart PowerShell session to ensure environment variables take effect
46+
$env:PATH = [System.Environment]::GetEnvironmentVariable("PATH", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("PATH", "User")
47+
cmake --version
48+
shell: pwsh
49+
50+
- name: Install dependencies (macOS)
51+
if: runner.os == 'macOS'
52+
run: |
53+
brew install cmake
54+
55+
- name: Install dependencies (Linux)
56+
if: runner.os == 'Linux'
57+
run: |
58+
sudo apt-get update
59+
sudo apt-get install -y cmake build-essential
60+
61+
- name: Run configuration tests
62+
run: |
63+
python test_cross_platform.py
64+
65+
- name: Build plugin (Windows)
66+
if: runner.os == 'Windows'
67+
run: |
68+
# Ensure environment variables are set correctly
69+
$env:PATH = [System.Environment]::GetEnvironmentVariable("PATH", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("PATH", "User")
70+
python build_all.py --platform ${{ matrix.platform }}
71+
shell: pwsh
72+
73+
- name: Build plugin (Unix)
74+
if: runner.os != 'Windows'
75+
run: |
76+
python build_all.py --platform ${{ matrix.platform }}
77+
78+
- name: Upload artifacts
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: zibo-keyboard-plugin-${{ matrix.platform }}
82+
path: build/${{ matrix.artifact_name }}
83+
retention-days: 30
84+
85+
release:
86+
name: Create Release Package
87+
needs: build
88+
runs-on: ubuntu-latest
89+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
90+
91+
steps:
92+
- uses: actions/checkout@v4
93+
94+
- name: Download all artifacts
95+
uses: actions/download-artifact@v4
96+
with:
97+
path: artifacts/
98+
99+
- name: Create release package
100+
run: |
101+
mkdir -p release/ZIBOKeyboardInput
102+
cp artifacts/zibo-keyboard-plugin-windows/win.xpl release/ZIBOKeyboardInput/
103+
cp artifacts/zibo-keyboard-plugin-mac/mac.xpl release/ZIBOKeyboardInput/
104+
cp artifacts/zibo-keyboard-plugin-linux/lin.xpl release/ZIBOKeyboardInput/
105+
106+
# Create installation instructions file
107+
cat > release/ZIBOKeyboardInput/README.txt << 'EOF'
108+
ZIBO Keyboard Input Plugin Installation Guide
109+
===========================================
110+
111+
Choose the correct plugin file for your platform:
112+
- Windows: win.xpl
113+
- macOS: mac.xpl
114+
- Linux: lin.xpl
115+
116+
Installation:
117+
1. Copy the appropriate .xpl file to your X-Plane installation
118+
2. Place it in: Resources/plugins/ZIBOKeyboardInput/
119+
3. Restart X-Plane
120+
121+
Usage:
122+
- Load ZIBO 737 aircraft in X-Plane
123+
- Bind keys to these commands in Settings > Keyboard:
124+
* 3370Tech/ZIBO_Keyboard/Toggle_Keyboard_Input_Captain
125+
* 3370Tech/ZIBO_Keyboard/Toggle_Keyboard_Input_FO
126+
- Toggle keyboard input on/off as needed
127+
128+
Build: $(date '+%Y-%m-%d %H:%M:%S') UTC
129+
Commit: ${{ github.sha }}
130+
EOF
131+
132+
cd release
133+
tar -czf ZIBOKeyboardInput.tar.gz ZIBOKeyboardInput/
134+
135+
- name: Upload release package
136+
uses: actions/upload-artifact@v4
137+
with:
138+
name: zibo-keyboard-plugin-all-platforms
139+
path: release/ZIBOKeyboardInput.tar.gz
140+
retention-days: 90

.gitignore

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Build directories
2+
/build/
3+
build/
4+
5+
# CMake generated files
6+
CMakeCache.txt
7+
CMakeFiles/
8+
cmake_install.cmake
9+
Makefile
10+
*.cmake
11+
12+
# Compiled files
13+
*.o
14+
*.obj
15+
*.xpl
16+
*.so
17+
*.dll
18+
*.dylib
19+
20+
# macOS system files
21+
.DS_Store
22+
.DS_Store?
23+
._*
24+
.Spotlight-V100
25+
.Trashes
26+
Icon?
27+
ehthumbs.db
28+
Thumbs.db
29+
30+
# IDE related files
31+
.vscode/
32+
.idea/
33+
*.swp
34+
*.swo
35+
*~
36+
37+
# Temporary files
38+
*.tmp
39+
*.temp
40+
*.log
41+
42+
# Backup files
43+
*.bak
44+
*.backup
45+
*.orig
46+
47+
# Compiler and toolchain related
48+
*.user
49+
*.vcxproj.user
50+
*.suo
51+
*.sdf
52+
*.opensdf
53+
*.pdb
54+
*.idb
55+
56+
# Xcode related
57+
*.xcodeproj/
58+
*.xcworkspace/
59+
DerivedData/
60+
61+
# Visual Studio related
62+
.vs/
63+
x64/
64+
Release/
65+
Debug/
66+
67+
# Python related files
68+
/__pycache__/
69+
*.py[cod]
70+
*$py.class
71+
.Python
72+
.env
73+
.venv
74+
env/
75+
venv/
76+
ENV/
77+
env.bak/
78+
venv.bak/
79+
pip-log.txt
80+
pip-delete-this-directory.txt

0 commit comments

Comments
 (0)