Skip to content

AchetaGames/gtk4-cross

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GTK4 Cross compile for Windows

Image building

To create required images, clone the repository and cd into the root.

To build any images other than the base one, you will need to have prebuilt the base image.

Base image

docker build gtk4-cross-base -t gtk4-cross-base

Rust image

docker build gtk4-cross-rust -t gtk4-cross-rust

Cross compilation

Rust project

Create a container inside your project and run it

docker run -ti -v `pwd`:/mnt gtk4-cross-rust

Then run build.sh to build the project and package.sh to package it into a zip file.

package.zip will be present in your project directory.

Image creation

If you want to create your own project builder

  • create a new directory with your own name gtk4-cross-<language> (<language> should be replaced with whatever your project relies on and makes it recognisable)
  • cd into the new directory
  • create a file build.sh that's going to contain your building code.
  • link package.sh from the root into the directory
ln ../package.sh package.sh
  • create a new Dockerfile, and put in the following boilerplate to have a runnable container.
FROM gtk4-cross-base

ADD build.sh /usr/bin
RUN chmod +x /usr/bin/build.sh

ADD package.sh /usr/bin
RUN chmod +x /usr/bin/package.sh

CMD ["/bin/bash"]
  • build the image
docker build gtk4-cross-<language> -t gtk4-cross-<language>
  • use the image
docker run -ti -v `pwd`:/mnt gtk4-cross-<language>
  • add a section about your new builder to this README.md
  • contribute :)

About

A Docker container for cross-compiling gtk4 programs to Windows.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 54.8%
  • Dockerfile 45.2%