Thank you for your interest in contributing to Winland Server! This document provides guidelines and instructions for contributing.
Before creating a bug report, please:
- Check if the issue already exists
- Use the latest version
- Collect relevant logs
Bug Report Template:
**Description:**
Clear description of the bug
**Steps to Reproduce:**
1. Step one
2. Step two
3. ...
**Expected Behavior:**
What should happen
**Actual Behavior:**
What actually happens
**Environment:**
- Device: [e.g., Pixel 7]
- Android Version: [e.g., Android 13]
- Winland Version: [e.g., 1.0.0]
- Root: [Yes/No, Magisk/KernelSU version]
**Logs:**Paste relevant logs here
We welcome feature suggestions! Please:
- Check if the feature was already suggested
- Explain the use case
- Describe the expected behavior
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Commit with clear messages
- Push to your fork
- Open a Pull Request
- Android Studio Arctic Fox (2020.3.1) or newer
- Android NDK r25c or newer
- CMake 3.22+
- Python 3.8+
- Git
# Clone repository
git clone https://github.com/yourusername/winland-server.git
cd winland-server
# Setup environment
bash scripts/setup-dev.sh
# Build everything
bash scripts/build-automation.sh all
# Or use Android Studio
# Open the project in Android Studio and click "Build"winland-server/
├── app/ # Android application
│ ├── src/main/
│ │ ├── cpp/ # JNI and native code
│ │ ├── java/ # Java source files
│ │ └── res/ # Android resources
│ └── build.gradle # App build configuration
├── src/ # Native source code
│ ├── native/ # Core Wayland compositor
│ │ ├── wayland_compositor.c
│ │ ├── egl_display.c
│ │ ├── input_handler.c
│ │ └── ...
│ ├── bridge/ # Bridges (audio, USB, clipboard)
│ │ ├── audio_bridge.c
│ │ ├── usb_redirect.c
│ │ └── clipboard_bridge.c
│ └── protocols/ # Wayland protocol definitions
├── scripts/ # Build and utility scripts
├── docs/ # Documentation
└── tests/ # Unit tests
- Follow Linux kernel coding style
- Use 4 spaces for indentation
- Maximum line length: 100 characters
- Use meaningful variable names
// Good
int surface_attach_buffer(struct wl_surface *surface,
struct wl_buffer *buffer)
{
if (!surface || !buffer) {
return -EINVAL;
}
surface->buffer = buffer;
return 0;
}
// Bad
int attach(struct wl_surface*s,struct wl_buffer*b){
if(!s||!b)return -1;
s->buffer=b;
return 0;
}- Follow Android coding conventions
- Use 4 spaces for indentation
- Class names: PascalCase
- Method names: camelCase
- Constants: UPPER_SNAKE_CASE
// Good
public class WinlandService extends Service {
private static final String TAG = "WinlandService";
public void startServer() {
// Implementation
}
}
// Bad
public class winlandservice extends Service{
private static final String tag="WinlandService";
public void StartServer(){
// Implementation
}
}# Run native tests
cd build
ctest --output-on-failure
# Run Android tests
./gradlew test# Start the server
adb shell am start -n com.winland.server/.MainActivity
# Run integration tests
python3 tests/integration_test.py- Server starts without errors
- Wayland clients can connect
- Input (touch, keyboard) works
- Audio playback works
- Window management works
- Tiling layouts work
- VNC server works
- Debug overlay displays correctly
- Update README.md for user-facing changes
- Update docs/ for technical changes
- Add inline comments for complex code
- Update CHANGELOG.md
Please report security vulnerabilities privately:
- Email: security@winland-server.dev
- Do NOT open public issues
- Validate all inputs
- Use safe string functions
- Check buffer bounds
- Don't log sensitive information
- Use least privilege principle
Use conventional commits format:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringtest: Test changeschore: Build/dependency changes
Examples:
feat(tiling): add spiral layout
Implement Fibonacci spiral tiling layout
similar to i3's spiral mode.
Closes #123
fix(egl): fix buffer swap on Mali GPUs
Workaround for Mali driver bug that caused
flickering during buffer swaps.
Fixes #456
- Follow Material Design guidelines
- Support dark mode
- Ensure accessibility
- Test on different screen sizes
- Use vector drawables when possible
- Provide all density versions
- Follow Android icon guidelines
-
Update version in:
app/build.gradleCMakeLists.txtREADME.md
-
Update
CHANGELOG.md -
Create release branch:
git checkout -b release/v1.0.0
-
Build release APK:
./gradlew assembleRelease
-
Tag and release:
git tag -a v1.0.0 -m "Release version 1.0.0" git push origin v1.0.0
- Be respectful and constructive
- Provide context in discussions
- Ask questions if unclear
- Help others in the community
By contributing, you agree that your contributions will be licensed under the MIT License.
Every contribution, no matter how small, helps make Winland Server better. Thank you for your support!