Skip to content

Commit 3cd478f

Browse files
committed
Update readme
1 parent ca32381 commit 3cd478f

File tree

4 files changed

+120
-153
lines changed

4 files changed

+120
-153
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Build (Reusable)
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build-macos:
8+
runs-on: macos-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Cache SDL
13+
uses: actions/cache@v4
14+
with:
15+
path: MacOS/frameworks/sdl
16+
key: sdl-macos-2.32.10-${{ runner.os }}-${{ runner.arch }}
17+
restore-keys: |
18+
sdl-macos-2.32.10-
19+
20+
- name: Install build dependencies
21+
run: |
22+
brew install cmake pkg-config nasm
23+
24+
- name: Build macOS (x86_64 + arm64)
25+
run: |
26+
cd MacOS
27+
make
28+
29+
- name: Zip application bundle
30+
run: zip -r -y "MacOS/release/Kiwi8-${{ github.ref_name }}-macOS.zip" "MacOS/release/Kiwi8.app"
31+
32+
- name: Upload macOS build artifact
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: Kiwi8-macOS
36+
path: MacOS/release/Kiwi8-${{ github.ref_name }}-macOS.zip
37+
retention-days: 7
38+
39+
build-windows:
40+
runs-on: windows-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- name: Cache SDL
45+
uses: actions/cache@v4
46+
with:
47+
path: Windows/frameworks/sdl
48+
key: sdl-windows-2.32.10-${{ runner.os }}-${{ runner.arch }}
49+
restore-keys: |
50+
sdl-windows-2.32.10-
51+
52+
- name: Configures build environment for AMD64
53+
uses: ilammy/msvc-dev-cmd@v1
54+
with:
55+
arch: amd64
56+
57+
- name: Build Windows (x64)
58+
shell: cmd
59+
run: |
60+
cd Windows
61+
nmake
62+
63+
- name: Create Zip Archive
64+
run: Compress-Archive -Path Windows\release\* -DestinationPath Windows\release\Kiwi8-${{ github.ref_name }}-Windows.zip
65+
66+
- name: Upload Windows build artifact
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: Kiwi8-Windows
70+
path: Windows\release\Kiwi8-${{ github.ref_name }}-Windows.zip
71+
retention-days: 7

.github/workflows/build.yml

Lines changed: 4 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -4,79 +4,9 @@ on:
44
push:
55
branches:
66
- develop
7-
8-
# pull_request:
9-
# types:
10-
# - closed
11-
# branches:
12-
# - develop
7+
- feature/*
8+
- main
139

1410
jobs:
15-
build-macos:
16-
runs-on: macos-latest
17-
steps:
18-
- uses: actions/checkout@v4
19-
20-
- name: Cache SDL
21-
uses: actions/cache@v4
22-
with:
23-
path: MacOS/frameworks/sdl
24-
key: sdl-2.32.10-${{ runner.os }}-${{ runner.arch }}
25-
restore-keys: |
26-
sdl-2.32.10-macOS
27-
28-
- name: Install build dependencies
29-
run: |
30-
brew install cmake pkg-config nasm
31-
32-
- name: Build macOS (x86_64 + arm64)
33-
run: |
34-
cd MacOS
35-
make
36-
37-
- name: Zip application bundle
38-
run: zip -r -y "MacOS/release/Kiwi8.zip" "MacOS/release/Kiwi8.app"
39-
40-
- name: Upload macOS build artifact
41-
uses: actions/upload-artifact@v4
42-
if: success()
43-
with:
44-
name: Kiwi8-macOS
45-
path: MacOS/release/Kiwi8.zip
46-
retention-days: 7
47-
48-
build-windows:
49-
runs-on: windows-latest
50-
steps:
51-
- uses: actions/checkout@v4
52-
53-
- name: Cache SDL
54-
uses: actions/cache@v4
55-
with:
56-
path: Windows/frameworks/sdl
57-
key: sdl-2.32.10-${{ runner.os }}-${{ runner.arch }}
58-
restore-keys: |
59-
sdl-2.32.10-Windows
60-
61-
- name: Configures build environment for AMD64
62-
uses: ilammy/msvc-dev-cmd@v1
63-
with:
64-
arch: amd64
65-
66-
- name: Build Windows (x64)
67-
shell: cmd
68-
run: |
69-
cd Windows
70-
nmake
71-
72-
- name: Create Zip Archive
73-
run: Compress-Archive -Path Windows\release\* -DestinationPath Windows\release\Kiwi8.zip
74-
75-
- name: Upload Windows build artifact
76-
uses: actions/upload-artifact@v4
77-
if: success()
78-
with:
79-
name: Kiwi8-Windows
80-
path: |
81-
Windows/release/Kiwi8.zip
82-
retention-days: 7
11+
build:
12+
uses: ./.github/workflows/build-reusable.yml

.github/workflows/release.yml

Lines changed: 12 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -5,64 +5,22 @@ on:
55
types: [published]
66

77
jobs:
8-
build-macos:
9-
runs-on: macos-latest
10-
steps:
11-
- uses: actions/checkout@v4
12-
13-
- name: Cache SDL
14-
uses: actions/cache@v4
15-
with:
16-
path: MacOS/frameworks/sdl
17-
key: sdl-macos-2.32.10-${{ runner.os }}-${{ runner.arch }}
18-
restore-keys: |
19-
sdl-macos-2.32.10-
20-
21-
- name: Install build dependencies
22-
run: |
23-
brew install cmake pkg-config nasm
24-
25-
- name: Build macOS (x86_64 + arm64)
26-
run: |
27-
cd MacOS
28-
make
29-
30-
- name: Zip application bundle
31-
run: zip -r -y "MacOS/release/Kiwi8-macOS.zip" "MacOS/release/Kiwi8.app"
32-
33-
- name: Upload to Release
34-
uses: softprops/action-gh-release@v2
35-
with:
36-
files: MacOS/release/Kiwi8-macOS.zip
8+
build:
9+
uses: ./.github/workflows/build-reusable.yml
3710

38-
build-windows:
39-
runs-on: windows-latest
11+
upload-to-release:
12+
needs: build
13+
runs-on: ubuntu-latest
4014
steps:
41-
- uses: actions/checkout@v4
42-
43-
- name: Cache SDL
44-
uses: actions/cache@v4
45-
with:
46-
path: Windows/frameworks/sdl
47-
key: sdl-windows-2.32.10-${{ runner.os }}-${{ runner.arch }}
48-
restore-keys: |
49-
sdl-windows-2.32.10-
15+
- name: Download all artifacts
16+
uses: actions/download-artifact@v4
5017

51-
- name: Configures build environment for AMD64
52-
uses: ilammy/msvc-dev-cmd@v1
18+
- name: Upload macOS to Release
19+
uses: softprops/action-gh-release@v2
5320
with:
54-
arch: amd64
55-
56-
- name: Build Windows (x64)
57-
shell: cmd
58-
run: |
59-
cd Windows
60-
nmake
61-
62-
- name: Create Zip Archive
63-
run: Compress-Archive -Path Windows\release\* -DestinationPath Windows\release\Kiwi8-Windows.zip
21+
files: Kiwi8-macOS/Kiwi8-macOS.zip
6422

65-
- name: Upload to Release
23+
- name: Upload Windows to Release
6624
uses: softprops/action-gh-release@v2
6725
with:
68-
files: Windows\release\Kiwi8-Windows.zip
26+
files: Kiwi8-Windows/Kiwi8-Windows.zip

README.md

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# Kiwi8
22

3-
**v1.03**
4-
53
![boot](/images/screenshots/boot.png)
64

75
A cross-platform Chip-8 interpreter written
8-
in C++ using SDL2, ImGui, and OpenGL.
6+
in C-style C++ using SDL2, ImGui, and OpenGL.
97

108
**[Compatibility Notes](https://github.com/tomdaley92/Kiwi8/issues/9)**
119

@@ -32,39 +30,49 @@ in C++ using SDL2, ImGui, and OpenGL.
3230

3331
## Building on Windows
3432

35-
Microsoft's Visual C++ Build Tools
36-
(vcvarsall/cl/nmake) are assumed to be
37-
installed and added to PATH.
33+
Microsoft's Visual C++ Build Tools must be installed and added to your **PATH**:
34+
35+
>vcvarsall<br>
36+
>nmake<br>
37+
>cl<br>
3838
39-
1. Configure Windows Development environment:
39+
1. Change current working directory
4040

4141
```cmd
42-
vcvarsall x86
42+
cd Windows
4343
```
4444

45-
1. Build with `nmake`:
45+
1. Configure environment for 64-bit architecture
4646

47-
```zsh
48-
cd Windows; nmake
47+
```cmd
48+
vcvarsall.bat x86_amd64
4949
```
5050

51-
1. Open the command prompt and navigate
52-
to the Kiwi8/Windows directory.
53-
1. Type `vcvarsall x86` to load the
54-
windows development environment.
55-
1. Type `nmake`.
51+
1. Compile with Microsoft's `nmake` utility
52+
53+
```cmd
54+
nmake
55+
```
5656

5757
## Building on MacOS
5858

59-
Apple's Xcode command line tools
60-
(clang++/make/install_name_tool)
61-
are assumed to be installed and
62-
added to PATH.
59+
Apple's Xcode command line tools must be installed and added to your **PATH**:
60+
61+
>make<br>
62+
>clang++<br>
63+
>install_name_tool<br>
64+
>otool<br>
65+
66+
1. Change current working directory
67+
68+
```bash
69+
cd MacOS
70+
```
6371

64-
1. Build with `make`:
72+
1. Compile with GNU's `make` utility
6573

66-
```zsh
67-
make -C MacOS
74+
```bash
75+
make
6876
```
6977

7078
## Resources
@@ -78,10 +86,10 @@ added to PATH.
7886

7987
---
8088

81-
_"I would highly recommend this project to anyone
89+
_"I highly recommend this project to anyone
8290
wanting to get their feet wet with emulator
8391
programming, video-game programming, or even
84-
cross-platform development. It has been a great
92+
cross-platform development. It's been a great
8593
educational excercise involving major aspects
8694
of modern day applications such as input handling,
8795
user-interface design, 2D graphics rendering,

0 commit comments

Comments
 (0)