Skip to content

Commit b5188d7

Browse files
committed
Release 0.3.1
1 parent 0ea809b commit b5188d7

File tree

5 files changed

+74
-21
lines changed

5 files changed

+74
-21
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,51 @@
11
name: CI
22

3-
on:
4-
push:
5-
pull_request:
3+
on: [push, pull_request]
64

75
jobs:
8-
build:
6+
7+
compile_native:
8+
name: Compile (${{ matrix.os }})
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, macos-latest]
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Compile
16+
run: make -j$(nproc)
17+
18+
compile_win:
19+
name: Compile (${{ matrix.target }})
920
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
include:
24+
- target: win32
25+
apt_pkg: gcc-mingw-w64-i686-win32
26+
make_args: PLATFORM=win32
27+
- target: win64
28+
apt_pkg: gcc-mingw-w64-x86-64-win32
29+
make_args: PLATFORM=win64
1030
steps:
1131
- uses: actions/checkout@v4
32+
- name: Install dependencies
33+
run: |
34+
sudo apt update
35+
sudo apt install -y ${{ matrix.apt_pkg }}
1236
- name: Compile
37+
run: make ${{ matrix.make_args }} -j$(nproc)
38+
39+
compile_appimage:
40+
name: Compile (musl, AppImage)
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: Install dependencies
1345
run: |
14-
cd src
15-
make -j$(nproc)
46+
sudo apt update
47+
sudo apt install -y musl-tools
48+
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
49+
chmod +x /usr/local/bin/appimagetool
50+
- name: Compile
51+
run: make PLATFORM=musl NSIGN=1 -j$(nproc) appimage

Makefile

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@ ifeq ($(MAKECMDGOALS),release)
22

33
.PHONY: release
44
release:
5-
$(MAKE) PLATFORM=musl appimage-zip
65
$(MAKE) PLATFORM=musl zip
6+
$(MAKE) PLATFORM=musl appimage-zip
7+
$(MAKE) PLATFORM=musl appimage-release
78
$(MAKE) PLATFORM=win32 zip
89
$(MAKE) PLATFORM=win64 zip
910
mkdir -p release
10-
cp -t release _musl/*.zip _win32/*.zip _win64/*.zip
11+
cp -t release _musl/*.zip _win32/*.zip _win64/*.zip _musl/*.AppImage
1112

1213
else ifeq ($(MAKECMDGOALS),clean-all)
1314

1415
.PHONY: clean-all
1516
clean-all:
16-
$(MAKE) PLATFORM=linux clean
17+
rm -rf release
18+
$(MAKE) clean
1719
$(MAKE) PLATFORM=musl clean
1820
$(MAKE) PLATFORM=win32 clean
1921
$(MAKE) PLATFORM=win64 clean
@@ -43,10 +45,14 @@ TARGET = doom-ascii
4345
CFLAGS += -DNORMALUNIX -DLINUX
4446
endif
4547

46-
OS = $(shell $(CC) -dumpmachine | cut -d'-' -f1-2)
48+
TARGET_TRIPLE = $(subst -, ,$(shell $(CC) -dumpmachine))
49+
ARCH = $(firstword $(TARGET_TRIPLE))
50+
OS = $(word 2,$(TARGET_TRIPLE))
51+
4752
TARGETAPP = doom-ascii.AppImage
48-
TARGETZIP = doom-ascii_$(OS)_$(VERSION).zip
49-
TARGETAPPZIP = doom-ascii_$(OS)_AppImage_$(VERSION).zip
53+
TARGETAPPREL = doom-ascii-$(VERSION)-$(ARCH).AppImage
54+
TARGETZIP = doom-ascii-$(VERSION)-$(ARCH)-$(OS).zip
55+
TARGETAPPZIP = $(TARGETAPPREL).zip
5056

5157
OBJDIR = obj
5258
APPDIR = $(OBJDIR)/io.github.wojciech_graj.doom_ascii.AppDir
@@ -56,7 +62,10 @@ APPOUTDIR = appimage
5662
CFLAGS += -O3 -flto -Wall -D_DEFAULT_SOURCE -DVERSION=$(VERSION) -std=c99 #-DSNDSERV -DUSEASM
5763
LDFLAGS += -flto
5864
LIBS += -lm
65+
66+
ifndef NSIGN
5967
APPFLAGS += --sign
68+
endif
6069

6170
SRC = i_main.c dummy.c am_map.c doomdef.c doomstat.c dstrings.c d_event.c d_items.c d_iwad.c \
6271
d_loop.c d_main.c d_mode.c d_net.c f_finale.c f_wipe.c g_game.c hu_lib.c hu_stuff.c info.c \
@@ -78,6 +87,9 @@ all: $(OUTDIR)/$(TARGET) $(OUTDIR)/.default.cfg
7887
.PHONY: appimage
7988
appimage: $(APPOUTDIR)/$(TARGETAPP) $(APPOUTDIR)/.default.cfg
8089

90+
.PHONY: appimage-release
91+
appimage-release: $(TARGETAPPREL)
92+
8193
.PHONY: zip
8294
zip: $(TARGETZIP)
8395

@@ -100,6 +112,9 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c
100112
@mkdir -p $(@D)
101113
$(CC) $(CFLAGS) -c $< -o $@
102114

115+
$(TARGETAPPREL): $(OBJDIR)/$(TARGETAPP)
116+
cp $< $@
117+
103118
define copy_rule
104119
$1/%: $2/%
105120
@mkdir -p $$(@D)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ You will need a WAD file (game data). If you don't own the game, the shareware v
1313
telnet doom.w-graj.net 666
1414
```
1515

16-
## Build
16+
## Usage
1717
Binaries for Windows and Linux are provided as [github releases](https://github.com/wojciech-graj/doom-ascii/releases).
1818

19-
### Linux / Mac
19+
### Build from Source
20+
#### Linux / MacOS
2021
Requires Make and a C compiler. Creates `_<YOUR OS>/game/doom_ascii`
2122
```sh
2223
make
2324
```
2425

25-
### Windows
26-
Compile on linux. Creates `_<win32|win64>/game/doom_ascii.exe`
26+
### Other
2727
```sh
28-
make PLATFORM=<win32|win64>
28+
make PLATFORM=<|unix|musl|win32|win64> <|zip|appimage|appimage-zip|appimage-release|release|clean|clean-all>
2929
```
3030

3131
## Settings

src/AppDir/usr/share/metainfo/io.github.wojciech_graj.doom_ascii.appdata.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
<description>
1212
<p>
13-
Text-based DOOM in your terminal!
13+
Text-based DOOM in your terminal! A Source-port of doomgeneric. Does not have sound.
14+
15+
You will need a WAD file (game data). If you don't own the game, the shareware version is freely available.
1416
</p>
1517
</description>
1618

@@ -30,8 +32,8 @@
3032

3133
<screenshots>
3234
<screenshot type="default">
33-
<image>https://github.com/wojciech-graj/doom-ascii/blob/master/screenshots/logo.png</image>
34-
<caption>The title screen</caption>
35+
<image>https://w-graj.net/images/doom-ascii/logo.png</image>
36+
<caption>The DOOM title screen</caption>
3537
</screenshot>
3638
</screenshots>
3739

target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[].SUFFIXES:
22

33
ifndef PLATFORM
4-
PLATFORM := linux
4+
PLATFORM := unix
55
export PLATFORM
66
endif
77

0 commit comments

Comments
 (0)