Skip to content

Simple GTK2 C++ application template with a fully configured build system for PostmarketOS (with setup guide).

License

Notifications You must be signed in to change notification settings

progzone122/posgtkhello

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

posgtkhello

Simple GTK2 C++ application template with a fully configured build system for PostmarketOS (with setup guide).

Quick to start doing sh*t

Preparing

  1. Install pmbootstrap (RTFM)
  2. 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
  1. 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
  2. Clone the template into the directory you created in the previous step

    cd community
    git clone https://github.com/progzone122/posgtkhello

Build for the host system

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

Build for the actual device

  1. 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"
    ...
  2. 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
  3. 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
  4. Run the application
    posgtkhello
    

Sideload

You'll definitely love using the sideload.sh script to automatically upload the .apk package via ssh directly to your device!

  1. Connect the device to the same LAN, install the openssh package, and enable the sshd service (RTFM)
  2. 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
    ...
  3. Run the sideload.sh script and agree to automatically install the package via SSH

4. Run the application
posgtkhello

Sh*t done?

Close all pmbootstrap sessions

pmbootstrap shutdown

Made with ❤️ by DiabloSat

About

Simple GTK2 C++ application template with a fully configured build system for PostmarketOS (with setup guide).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published