-
Notifications
You must be signed in to change notification settings - Fork 32
Setup and Running
Follow these instructions to get the PCLink server running on your local machine from the source code.
- Python 3.8+: Ensure you have a modern version of Python installed.
- Pip: Python's package installer.
-
Clone the Repository: If you have the project source, navigate to the root directory.
-
Install Dependencies: The project uses several Python packages. The easiest way to install all dependencies is:
# Install from requirements.txt pip install -r requirements.txt # Or install the package in development mode (recommended) pip install -e ".[dev]"
Key dependencies include:
-
fastapi>=0.95.0- Web framework -
uvicorn[standard]>=0.22.0- ASGI server -
websockets>=12.0- WebSocket support -
psutil>=5.9.0- System information -
pynput>=1.7.6- Input control -
cryptography>=41.0.0- SSL/TLS support -
requests>=2.31.0- HTTP client -
pystray>=0.19.0- System tray integration
Note: Some dependencies like
pywin32are Windows-specific and will be installed automatically on Windows systems. -
The server is designed to be run as a Python module from the root of the project directory.
-
Navigate to the project's root directory (the one containing the
srcfolder). -
Run the application using the following command:
python -m src.pclink.main
Alternatively, if the project is installed as a package, you can simply run:
pclink
Upon first launch, the server will perform pre-flight checks, generate a self-signed SSL certificate, and create necessary configuration files in your user's application data directory.
The server will start, and you can access the Web UI by navigating to https://localhost:38080 in your web browser.
The server accepts a few command-line arguments to change its behavior:
-
--startup: Runs the application in headless/background mode. This is used when the application is configured to start automatically with the operating system. -
--helpor-h: Displays a help message with usage instructions.
The launcher.py script is intended for use in packaged, standalone executables (e.g., created with PyInstaller) and is not typically run directly during development. It handles special setup tasks for distributed applications, such as setting up Windows Firewall rules.