We use msys2 for creating the Windows installer and development on Windows.
Download msys2 (msys2-x86_64-xxx.exe) and follow the install instructions on the msys2 startpage (Important!)
- Fork the master branch on gitlab.com
- Execute
C:\msys64\msys2_shell.cmd -mingw64 - Run
pacman -S gitto install git - Run
git clone https://gitlab.com/USERNAME/gajim.git - Run
cd gajim - Create a virtual environment with access to MSYS packages:
python -m venv .venv --system-site-packages - Activate the newly created environment:
source .venv/bin/activate - Execute
./win/dev_env.shto install all the needed dependencies - Launch Gajim
gajim
For GTK Inspector to work, add the following registry key
HKEY_CURRENT_USER\Software\GSettings\org\gtk\gtk4\settings\debug
DWORD (32 bits) enable-inspector-keybinding = 1
Afterwards press CTRL + SHIFT + I to activate GTK Inspector
Follow the steps in the Development section, but instead of ./dev_env.sh execute ./build.sh.
Both the installer and the portable installer should appear in C:\msys64\home\USER\gajim\win\_build_root.
To test Gajim's Microsoft Store msix bundle, the following steps are necessary:
- Either build the msixbundle locally by running
./build.shas described above, or download a nightly build and place it inC:\msys64\home\USER\gajim\win\_build_root\Gajim.msixbundle - Run
./unpack_msixbundle.sh, which unpacks the bundle toC:\msys64\home\USER\gajim\win\_build_root\unpack\Gajim - Open
C:\msys64\home\USER\gajim\win\_build_root\unpack\Gajimin a PowerShell - For easier debugging, change
bin\Gajim.exetobin\Gajim-Debug.exeinAppxManifest.xml, like this:<Application Id="Gajim" Executable="bin\Gajim-Debug.exe" EntryPoint="Windows.FullTrustApplication"> - Now register the app by running
Add-AppxPackage –Register AppxManifest.xmlfrom a PowerShell - Registering the app again requires a version bump in
AppxManifest.xml(or uninstalling the Gajim app)
To modify code, you can replace .pyc files by their equivalent .py files from this repo. Gajim's code within the App installation can be found in C:\msys64\home\USER\gajim\win\_build_root\unpack\Gajim\lib\python3.11\site-packages\gajim. Code changes do not require to re-register the app.