Skip to content

Commit 0a50d60

Browse files
authored
Merge pull request #57 from tsoding/remove-sdl2
Remove SDL version of Sowon entirely
2 parents 36a5523 + 0302889 commit 0a50d60

7 files changed

Lines changed: 305 additions & 617 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- name: install dependencies
1010
run: |
1111
sudo apt-get update
12-
sudo apt-get install -qq libsdl2-dev
12+
sudo apt-get install -qq libgl-dev libxcursor-dev libxrandr-dev libxi-dev
1313
- name: build sowon
1414
run: |
1515
make
@@ -22,7 +22,7 @@ jobs:
2222
- name: install dependencies
2323
run: |
2424
sudo apt-get update
25-
sudo apt-get install -qq libsdl2-dev
25+
sudo apt-get install -qq libgl-dev libxcursor-dev libxrandr-dev libxi-dev
2626
- name: build sowon
2727
run: |
2828
make
@@ -32,8 +32,6 @@ jobs:
3232
runs-on: macOS-latest
3333
steps:
3434
- uses: actions/checkout@v1
35-
- name: install dependencies
36-
run: brew install sdl2 pkg-config
3735
- name: build sowon
3836
run: |
3937
make
@@ -43,11 +41,6 @@ jobs:
4341
runs-on: windows-latest
4442
steps:
4543
- uses: actions/checkout@v4
46-
- name: download sdl2
47-
run: |
48-
curl -fsSL -o SDL2-devel-2.0.12-VC.zip https://www.libsdl.org/release/SDL2-devel-2.0.12-VC.zip
49-
tar -xf SDL2-devel-2.0.12-VC.zip
50-
mv SDL2-2.0.12 SDL2
5144
- name: build sowon
5245
shell: cmd
5346
run: |

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ sowon_rgfw
33
build/
44
*.kra
55
*~
6-
SDL2
76
*.obj
87
*.exe
98
.dSYM/

Makefile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
UNAMEOS = $(shell uname)
22

33
COMMON_CFLAGS= -Wall -Wextra -ggdb -std=c99 -pedantic -Ithirdparty -Ibuild -DPENGER
4-
SDL2_CFLAGS= `pkg-config --cflags sdl2` $(COMMON_CFLAGS)
54
RGFW_CFLAGS= $(COMMON_CFLAGS)
65
COMMON_LIBS= -lm
7-
SDL2_LIBS= `pkg-config --libs sdl2` $(COMMON_LIBS)
86
ifeq ($(UNAMEOS),Darwin)
97
RGFW_LIBS= $(COMMON_LIBS) -framework CoreVideo -framework Cocoa -framework OpenGL -framework IOKit
108
else
@@ -14,13 +12,10 @@ PREFIX?= /usr/local
1412
INSTALL?= install
1513

1614
.PHONY: all
17-
all: Makefile sowon sowon_rgfw man
18-
19-
sowon_rgfw: src/main_rgfw.c build/digits.h build/penger_walk_sheet.h
20-
$(CC) $(RGFW_CFLAGS) -o sowon_rgfw src/main_rgfw.c $(RGFW_LIBS)
15+
all: Makefile sowon man
2116

2217
sowon: src/main.c build/digits.h build/penger_walk_sheet.h
23-
$(CC) $(SDL2_CFLAGS) -o sowon src/main.c $(SDL2_LIBS)
18+
$(CC) $(RGFW_CFLAGS) -o sowon src/main.c $(RGFW_LIBS)
2419

2520
build/digits.h: build/png2c ./assets/digits.png
2621
./build/png2c ./assets/digits.png digits > build/digits.h
@@ -42,12 +37,11 @@ man: docs/sowon.6.gz
4237

4338
.PHONY: clean
4439
clean:
45-
rm -r sowon sowon_rgfw build docs/sowon.6.gz
40+
rm -r sowon build docs/sowon.6.gz
4641

4742
.PHONY: install
4843
install: all
4944
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
5045
$(INSTALL) -C ./sowon $(DESTDIR)$(PREFIX)/bin
51-
$(INSTALL) -C ./sowon_rgfw $(DESTDIR)$(PREFIX)/bin
5246
$(INSTALL) -d $(DESTDIR)$(PREFIX)/man/man6
5347
$(INSTALL) -C docs/sowon.6.gz $(DESTDIR)$(PREFIX)/man/man6

README.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,17 @@
66

77
## Build
88

9-
Dependencies: [SDL2](https://www.libsdl.org/download-2.0.php)
9+
### Ubuntu
1010

11-
### Debian
1211
```console
13-
$ sudo apt-get install libsdl2-dev
12+
$ sudo apt-get install -qq libgl-dev libxcursor-dev libxrandr-dev libxi-dev
1413
$ make
1514
$ ./sowon
1615
```
1716

1817
### MacOS
1918

2019
```console
21-
$ brew install sdl2 pkg-config
2220
$ make
2321
$ ./sowon
2422
```
@@ -27,15 +25,10 @@ $ ./sowon
2725

2826
#### Visual Studio
2927

30-
- Enter the Visual Studio Command Line Development Environment https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line
31-
- Basically just find `vcvarsall.bat` and run `vcvarsall.bat x64` inside of cmd
32-
- Download [SDL2 VC Development Libraries](https://libsdl.org/release/SDL2-devel-2.0.12-VC.zip) and copy it to `path\to\sowon`
28+
- Enter the Visual Studio Command Line Development Environment <https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line>. Basically just find `vcvarsall.bat` and run `vcvarsall.bat x64` inside of cmd
3329

3430
```console
3531
> cd path\to\sowon
36-
> tar -xf SDL2-devel-2.0.12-VC.zip
37-
> move SDL2-2.0.12 SDL2
38-
> del SDL2-devel-2.0.12-VC.zip
3932
> build_msvc
4033
```
4134

build_msvc.bat

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22
rem launch this from msvc-enabled console
33

44
set COMMON_CXXFLAGS=/std:c++17 /O2 /FC /W4 /nologo /I thirdparty /I build
5-
set SDL2_CXXFLAGS=%COMMON_CXXFLAGS% /I SDL2\include
65
set RGFW_CXXFLAGS=%COMMON_CXXFLAGS%
76
set COMMON_LIBS=Shell32.lib
8-
set SDL2_LIBS=%COMMON_LIBS% SDL2\lib\x64\SDL2.lib SDL2\lib\x64\SDL2main.lib -SUBSYSTEM:windows
97
set RGFW_LIBS=%COMMON_LIBS% -SUBSYSTEM:windows /entry:mainCRTStartup
108

119
mkdir build
1210
cl.exe %COMMON_CXXFLAGS% /Febuild\png2c src\png2c.c /link %COMMON_LIBS% -SUBSYSTEM:console
1311
build\png2c.exe assets\digits.png digits > build\digits.h
1412
build\png2c.exe assets\penger_walk_sheet.png penger > build\penger_walk_sheet.h
15-
cl.exe %SDL2_CXXFLAGS% /Fesowon src/main.c /link %SDL2_LIBS%
16-
cl.exe %RGFW_CXXFLAGS% /Fesowon_rgfw src/main_rgfw.c /link %RGFW_LIBS%
13+
cl.exe %RGFW_CXXFLAGS% /Fesowon src/main.c /link %RGFW_LIBS%

0 commit comments

Comments
 (0)