Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 39 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,64 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@main
- name: win64-vstudio-debug
run: python3 fips build win64-vstudio-debug
- name: win64-vstudio-release
run: python3 fips build win64-vstudio-release
- name: chips-test win64-vstudio-debug
run: python3 fips run chips-test win64-vstudio-debug
- uses: denoland/setup-deno@v2
- name: win-vstudio-debug
run: |
./fibs config win-vstudio-debug
./fibs build
./fibs run chips-test
- name: win-vstudio-release
run: |
./fibs config win-vstudio-release
./fibs build
mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@main
- name: osx-make-debug
run: python3 fips build osx-make-debug
- name: osx-make-release
run: python3 fips build osx-make-release
- name: chips-test osx-make-debug
run: python3 fips run chips-test osx-make-debug
- uses: ashutoshvarma/setup-ninja@master
- uses: denoland/setup-deno@v2
- name: macos-ninja-debug
run: |
./fibs config macos-ninja-debug
./fibs build
./fibs run chips-test
- name: macos-ninja-release
run: |
./fibs config macos-ninja-release
./fibs build
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: ashutoshvarma/setup-ninja@master
- uses: denoland/setup-deno@v2
- name: prepare
run: |
sudo apt-get update
sudo apt-get install libglu1-mesa-dev mesa-common-dev xorg-dev libasound-dev
- name: linux-make-debug
run: python3 fips build linux-make-debug
run: |
./fibs config linux-ninja-debug
./fibs build
./fibs run chips-test
- name: linux-make-release
run: python3 fips build linux-make-release
- name: chips-test linux-make-debug
run: python3 fips run chips-test linux-make-debug
run: |
./fibs config linux-ninja-release
./fibs build
emscripten:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: ashutoshvarma/setup-ninja@master
- uses: denoland/setup-deno@v2
- name: install emsdk
run: |
sudo apt-get install ninja-build
python3 fips emsdk install latest
./fibs emsdk install
- name: wasm-ninja-debug
run: python3 fips build wasm-ninja-debug
run: |
./fibs config emsc-ninja-debug
./fibs build
- name: wasm-ninja-release
run: python3 fips build wasm-ninja-release
run: |
./fibs config emsc-ninja-release
./fibs build
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: ashutoshvarma/setup-ninja@master
- uses: denoland/setup-deno@v2
- name: prepare
run: |
sudo apt update
sudo apt install webp
python3 fips emsdk install latest
./fibs emsdk install
- name: build
run: |
python3 fips set local on
python3 fips webpage build
./fibs webpage build
- name: upload-artifact
uses: actions/upload-artifact@main
with:
name: webpage
path: fips-files/deploy/chips-webpage
path: .fibs/webpage
retention-days: 1
deploy:
needs: build
Expand Down
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.fibs/
.vscode/
.DS_Store
fips-files/build/
fips-files/deploy/
.fips-*
CMakeUserPresets.json
*.pyc
CMakeLists.txt
CMake*.json

28 changes: 0 additions & 28 deletions CMakeLists.txt

This file was deleted.

114 changes: 46 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,100 +8,78 @@ Live demos of the example emulators: https://floooh.github.io/tiny8bit

To build and run on Windows, OSX or Linux (exact versions of tools shouldn't matter):

Check prerequisites:
Prerequisites:

```bash
> python --version
Python 2.x or 3.x
> cmake --version
cmake version 3.x
```
- deno (https://docs.deno.com/runtime/getting_started/installation/)
- cmake (at least version 3.21)
- your system's C/C++ toolchain (Clang, GCC, MSVC)

NOTE: on Linux, additional dev packages need to be present for X11, GL and ALSA development.
NOTE: on Linux, additional dev packages need to be present for X11, GL, ALSA and ncurses development.

Create a 'workspace' directory (which will be populated with additional dependencies),
clone and cd into ```chips-test```:
Clone, build and run the CPC emulator:

```bash
> mkdir workspace
> cd workspace
> git clone https://github.com/floooh/chips-test
> cd chips-test
git clone https://github.com/floooh/chips-test
cd chips-test
./fibs build
./fibs run cpc
```

Finally, build and run one of the emulators (for instance the Amstrad CPC):
To see all runnable targets:

```bash
> ./fips build
> ./fips list targets
> ./fips run cpc
./fibs list targets --exe
```

To get optimized builds for performance testing:
To open the project in an IDE:

```bash
# on OSX:
> ./fips set config osx-make-release
> ./fips build
> ./fips run [target]

# on Linux
> ./fips set config linux-make-release
> ./fips build
> ./fips run [target]

# on Windows
> fips set config win64-vstudio-release
> fips build
> fips run [target]
```
# on macOS with Xcode
./fibs config macos-xcode-debug
./fibs open

To open project in IDE:
```bash
# on OSX with Xcode:
> ./fips set config osx-xcode-debug
> ./fips gen
> ./fips open

# on Windows with Visual Studio:
> ./fips set config win64-vstudio-debug
> ./fips gen
> ./fips open

# experimental VSCode support on Win/OSX/Linux:
> ./fips set config [linux|osx|win64]-vscode-debug
> ./fips gen
> ./fips open
# on macOS with VSCOde:
./fibs config macos-vscode-debug
./fibs open

# on Linux with VSCode:
./fibs config linux-vscode-debug
./fibs open

# on Windows with VStudio:
./fibs config win-vstudio-debug
./fibs open
```

To build the WebAssembly demos (Linux or OSX recommended here, Windows
might work too, but this is not well tested).

```bash
# first get ninja (on Windows a ninja.exe comes with the fips build system)
> ninja --version
1.8.2
# now install the emscripten toolchain, this needs a lot of time and memory
> ./fips setup emscripten
...
# from here on as usual...
> ./fips set config wasm-ninja-release
> ./fips build
...
> ./fips list targets
...
> ./fips run c64
...
# check if required tools are installed (ninja and maybe http-server)
./fibs diag tools
# install the Emscripten SDK
./fibs emsdk install
# configure, build and run
./fibs config emsc-ninja-release
./fibs build
./fibs run cpc
# or to open the project in VSCode:
./fibs config emsc-vscode-debug
./fibs open
```

When the above emscripten build steps work, you can also build and test the
entire samples webpage like this:

```bash
> ./fips webpage build
...
> ./fips webpage serve
...
./fibs webpage build
./fibs webpage serve
```

If fibs gets stuck in an error situation, try `./fibs reset` to start over from scratch:

```bash
./fibs reset
```

## Many Thanks To:
Expand Down
6 changes: 0 additions & 6 deletions examples/CMakeLists.txt

This file was deleted.

21 changes: 0 additions & 21 deletions examples/ascii/CMakeLists.txt

This file was deleted.

Loading