Simple GTK2 C++ application template with a fully configured build system for PostmarketOS (with setup guide).
- Install pmbootstrap (RTFM)
- Customize the pmbootstrap environment FOR YOUR DEVICE
Note
If it possible, use default paths when initializing the environment.
Otherwise, you will have to configure the paths in the config.sh
file
pmbootstrap init
-
Navigate to the pmaports directory in the initialized environment and create a new directory.
The path for the “default” configuration is as follows:cd $HOME/.local/var/pmbootstrap/cache_git/pmaports mkdir -p community
-
Clone the template into the directory you created in the previous step
cd community git clone https://github.com/progzone122/posgtkhello
You can test the app before you build it for a real device.
Note
You may need additional packages for this section
sudo pacman -S cmake make g++ tar gzip
./build.sh
./build/posgtkhello
- Specify the correct device architecture in APKBUILD.
The device architecture can be obtained from the PostmarketOS documentation for the device or from the terminal.# File: APKBUILD ... arch="armhf" ...
- Run the
build.sh
script with the--release
argument
After this step, an .apk package will be created that will be ready to be installed in PostmarketOS./build.sh --release
- Move the obtained .apk package to your device by any means and install it by allowing untrusted packages.
sudo apk add posgtkhello-1.0-r0.apk --allow-untrusted
- Run the application
posgtkhello
You'll definitely love using the sideload.sh
script to automatically upload the .apk package via ssh directly to your device!
- Connect the device to the same LAN, install the
openssh
package, and enable thesshd
service (RTFM) - Configure the settings for sideload in the
config.sh
file# File: config.sh ... # SSH sideload settings SSH_USER=user SSH_HOST=192.168.1.123 SSH_PORT=22 DIR_SIDELOAD="/home/$SSH_USER" # <- Path where the package will be uploaded ...
- Run the sideload.sh script and agree to automatically install the package via SSH
posgtkhello
Close all pmbootstrap sessions
pmbootstrap shutdown
Made with ❤️ by DiabloSat