From 45c94a1d395f560c015c6b1a7a3fc3558f7de395 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+orbitalquark@users.noreply.github.com> Date: Tue, 1 Mar 2022 22:18:50 -0500 Subject: Build with GTK3 by default on Linux using new textadept-build:v2.0 Docker image. Build with GTK 2 using new GTK2 flag. --- .github/workflows/release.yml | 16 ++-------------- README.md | 4 ++-- docs/manual.md | 6 +++--- src/Dockerfile | 5 ++--- src/Makefile | 4 ++-- 5 files changed, 11 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ecea38c..26e56752 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,25 +12,13 @@ on: jobs: build: - runs-on: ubuntu-18.04 - container: ghcr.io/orbitalquark/textadept-build:v1.0 + runs-on: ubuntu-20.04 + container: ghcr.io/orbitalquark/textadept-build:v2.0 outputs: version: ${{ steps.build.outputs.version }} steps: - name: Checkout uses: actions/checkout@v2 - - name: Git init if necessary - shell: bash - run: | - # If git version is less than 2.18, a git clone will not be made in this container. In - # that case, make a temporary repository so "make release" can archive the repo's - # contents for release. - if [[ -d .git ]]; then exit 0; fi - git init - git add . - git config --global user.email "none@example.com" - git config --global user.name "none" - git commit -m 'none' - name: Checkout textadept-build dependencies uses: actions/checkout@v2 with: diff --git a/README.md b/README.md index eb91e572..f8105fba 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ Command | Description `make deps` | Downloads and builds all of Textadept's core dependencies `make deps NIGHTLY=1` | Optionally downloads and builds bleeding-edge dependencies `make` | Builds Textadept, provided all dependencies are in place -`make GTK3=1` | Builds Textadept using GTK 3.x +`make GTK2=1` | Builds Textadept using GTK 2.x instead of GTK 3.x `make DEBUG=1` | Optionally builds Textadept with debug symbols `make curses` | Builds the terminal version of Textadept `make win-deps` | Downloads and builds Textadept's Windows dependencies @@ -107,7 +107,7 @@ Command | Description `make osx` | Cross-compiles Textadept for macOS When building within Docker, the relevant container [image][] is -`ghcr.io/orbitalquark/textadept-build:v1.0`. +`ghcr.io/orbitalquark/textadept-build:v2.0`. For more information on compiling Textadept, please see the [manual][]. diff --git a/docs/manual.md b/docs/manual.md index 60c894c9..e439bf6f 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -1507,7 +1507,7 @@ Command | Description `make deps` | Downloads and builds all of Textadept's core dependencies `make deps NIGHTLY=1` | Optionally downloads and builds bleeding-edge dependencies `make` | Builds Textadept, provided all dependencies are in place -`make GTK3=1` | Builds Textadept using GTK 3.x +`make GTK2=1` | Builds Textadept using GTK 2.x instead of GTK 3 `make DEBUG=1` | Optionally builds Textadept with debug symbols `make install` | Optionally installs Textadept (to */usr/local* by default) `make textadept` | Builds only the GUI version of Textadept @@ -1540,9 +1540,9 @@ Also, if you want to compile with Clang, you will have to run something like: You can use [Docker][] to build Textadept for Windows, macOS, or Linux. The [image][] required to do so is about 2.5GB in size. For example: - localhost$ docker pull ghcr.io/orbitalquark/textadept-build:v1.0 + localhost$ docker pull ghcr.io/orbitalquark/textadept-build:v2.0 localhost$ docker run -t -i -v /path/to/textadept:/ta -w /ta/src \ - ghcr.io/orbitalquark/textadept-build:v1.0 + ghcr.io/orbitalquark/textadept-build:v2.0 container# make deps container# make container# exit diff --git a/src/Dockerfile b/src/Dockerfile index 89d9de9f..2e92c806 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:bionic +FROM ubuntu:focal LABEL maintainer="textadept" # Fetch packages for: @@ -13,7 +13,7 @@ RUN echo "Fetching packages" \ build-essential ca-certificates curl git gnupg mercurial unzip wget zip \ mingw-w64 \ clang cmake libc++-dev libssl-dev libxml2-dev llvm-dev lzma-dev uuid-dev \ - libgtk2.0-dev libncurses5-dev libncursesw5-dev \ + libgtk2.0-dev libgtk-3-dev libncurses-dev \ luadoc discount \ && apt-get clean @@ -28,7 +28,6 @@ RUN echo "Building osxcross" \ && unzip *.zip && mv osxcross-* /opt/osxcross && rm *.zip \ && wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/${sdk}.tar.xz \ && tar xJf ${sdk}.tar.xz \ - && cp -r /usr/include/c++/v1 ${sdk}/usr/include/c++ \ && tar czf /opt/osxcross/tarballs/${sdk}.tar.gz ${sdk} \ && rm -r ${sdk}* \ && cd /opt/osxcross \ diff --git a/src/Makefile b/src/Makefile index 38d21e31..d177e272 100644 --- a/src/Makefile +++ b/src/Makefile @@ -7,7 +7,7 @@ CXXFLAGS := -Os -std=c++17 WGET = wget -O $@ # Define these once for speed and reference them later. -ifndef GTK3 +ifdef GTK2 gtk_flags_linux := $(shell pkg-config --cflags gtk+-2.0 gmodule-2.0) else gtk_flags_linux := $(shell pkg-config --cflags gtk+-3.0 gmodule-2.0) -Wno-deprecated-declarations @@ -248,7 +248,7 @@ else $(linux_exes): CXX := c++ endif $(linux_exes): LDFLAGS := -rdynamic -Wl,--retain-symbols-file -Wl,$(shell pwd)/lua.sym -ifndef GTK3 +ifdef GTK2 ../textadept: LDFLAGS += $(shell pkg-config --libs gtk+-2.0 gmodule-2.0) else ../textadept: LDFLAGS += $(shell pkg-config --libs gtk+-3.0 gmodule-2.0) -- cgit v1.2.3