Thank you for your interest in contributing to the IppPrinter project! This document explains how to set up the development environment, work with the codebase, compile the Windows Installer, and understand the automated CI/CD pipeline.
To build and run this project, make sure you have the following installed:
- .NET 10 SDK (v10.0.301 or later)
- Inno Setup 6 (Required for compiling the installer; can be installed via
choco install innosetup -yin an Administrator shell) - PowerShell 5.1 or PowerShell 7
git clone https://github.com/danielklecha/IppPrinter.git
cd IppPrinterRestore packages and build the solution:
dotnet restore
dotnet buildYou can run the application directly from the CLI. By default, the production profile binds to HTTP port 631 (the standard Internet Printing Protocol port):
dotnet run --project IppPrinter/IppPrinter.csprojThe application includes a self-test command that generates a sample wrapped PDF document using the printer's layout converters.
dotnet run --project IppPrinter/IppPrinter.csproj -- --testThis will create a test_text.pdf file under the executable's jobs/ directory.
The project is configured to run as a Windows Service when started by the Service Control Manager.
The installation package is created using Inno Setup.
IppPrinter/: Core IPP printer server code (ASP.NET Core / .NET 10).Setup/: Installation assets and script.- installer.iss: The Inno Setup definition script.
- Publish-Installer.ps1: A PowerShell automation script to publish the application and compile the installer.
- Add-Printer.ps1: Installs the print driver and registers the printer queue.
- Remove-Printer.ps1: Cleans up the print driver and queue.
-
Open an Administrator PowerShell session.
-
Navigate to the
Setupdirectory. -
Run the build script:
cd Setup .\Publish-Installer.ps1
This script will publish a framework-dependent release target for win-x64, resolve your local Inno Setup compiler (ISCC.exe), compile the installer, and save the final executable in Setup\Output\IppPrinterSetup.exe.
When run, the installer performs the following actions:
- Copies compiled binaries to
C:\Program Files\IppPrinter. - Registers
IppPrinter.exeas a Windows Service set to automatic startup (sc create). - Creates a Windows Firewall rule to allow incoming TCP traffic on port
631. - Starts the Windows Service (
sc start). - Runs
Add-Printer.ps1to configure the printer queue in Windows.
On uninstallation:
- Runs
Remove-Printer.ps1to delete the print queue. - Removes the Windows Firewall rule.
- Stops and deletes the Windows Service.
- Removes all installed files.
We use GitHub Actions to automate versioning and releasing.
The workflow is defined in .github/workflows/create-release.yml.
When you push a tag starting with v (e.g. v1.0.0), the workflow triggers automatically:
- It runs on a Windows runner (
windows-latest). - It extracts the version number from the git tag (e.g.,
1.0.0). - It updates:
- The
<Version>elements inside all*.csprojfiles. - The
#define MyAppVersiondefinition in installer.iss.
- The
- It publishes the packages for
win-x64,linux-x64, andosx-x64. - It compiles the Inno Setup installer.
- It creates a GitHub Release and attaches the platform ZIP files and the
IppPrinter-v<version>-Setup.exeinstaller file as assets.
You can test the IPP server against standard IPP diagnostic tools such as ipptool (from CUPS).
- Install CUPS client tools:
sudo zypper install cups-client cups-backends
- Obtain the host IP address:
ip route
- Run the IPP test suite:
ipptool -t ipp://<HOST_IP>:631/ipp/print ipp-1.1.test