Skip to content

Commit

Permalink
Updated README (#22)
Browse files Browse the repository at this point in the history
* Reordered README.md and added docker pull examples.

* Formatted markdown.
  • Loading branch information
MGlolenstine authored Oct 25, 2022
1 parent 90a995f commit cbc09b5
Showing 1 changed file with 34 additions and 18 deletions.
52 changes: 34 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,21 @@

Images can be found on [DockerHub](https://hub.docker.com/r/mglolenstine/gtk4-cross/tags) or [GitHub container repository](https://github.com/MGlolenstine/gtk4-cross/pkgs/container/gtk4-cross).

## Image building
### To pull from DockerHub

To create required images, clone the repository and cd into the root.
Example for GTK 4.6:

To build any images other than the base one, you will need to have prebuilt the base image.
```bash
docker pull mglolenstine/gtk4-cross:rust-gtk-4.6
```

### Build script
### To pull from GitHub container repository

There's a file `build_image.sh` present in the root of the repository.
It takes environment variables and one cmdline argument to build the image you want.
Example for GTK 4.6:

|ENV|Default|Description|
|---|---|---|
|GTK|"main"|GTK version to be built|
|ADW|"main"|ADW version to be built|
|BASE|"gtk4-cross-base-$GTK-$ADW"|Base image name for Docker, only used on images built on top of the base image|
|TAG|"$IMAGE-$GTK-$ADW"|A name set for the output image|

The script takes one argument, which can be
|Argument|Description|
|---|---|
|`base`|Which builds the base image.|
|`rust`|Which builds the rust image.|
```bash
docker pull ghcr.io/mglolenstine/gtk4-cross:rust-gtk-4.6
```

## Cross compilation

Expand All @@ -48,6 +40,30 @@ Then run `build` to build the project and `package` to package it into a zip fil

`package.zip` will be present in your project directory.

## 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.

### Build script

There's a file `build_image.sh` present in the root of the repository.
It takes environment variables and one cmdline argument to build the image you want.

|ENV|Default|Description|
|---|---|---|
|GTK|"main"|GTK version to be built|
|ADW|"main"|ADW version to be built|
|BASE|"gtk4-cross-base-$GTK-$ADW"|Base image name for Docker, only used on images built on top of the base image|
|TAG|"$IMAGE-$GTK-$ADW"|A name set for the output image|

The script takes one argument, which can be
|Argument|Description|
|---|---|
|`base`|Which builds the base image.|
|`rust`|Which builds the rust image.|

## Image creation

If you want to create your own project builder
Expand Down

0 comments on commit cbc09b5

Please sign in to comment.