Skip to content
Closed
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
DejaVuSansMono.ttf
build/
build-linux/
bin/
*.d
*.exe
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ cmake_minimum_required(VERSION 3.7)

project(NevolutionX)

configure_file(sampleconfig.json config.json COPYONLY)

foreach(runtime_file IN ITEMS Resources/480.png Resources/720.png Resources/vegur.ttf)
get_filename_component(runtime_name "${runtime_file}" NAME)
configure_file("${runtime_file}" "${runtime_name}" COPYONLY)
endforeach()

INCLUDE(FindPkgConfig)

PKG_SEARCH_MODULE(SDL2TTF REQUIRED SDL2_ttf)
Expand Down
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,36 @@ ls bin/
480.png 720.png default.xbe vegur.ttf
```

### Optional Nix development shell

On Linux, the included flake provides the nxdk and native-build prerequisites
without installing them globally. Clone nxdk next to this repository, then
enter the shell and build:

```sh
git clone --recursive https://github.com/XboxDev/nxdk.git ../nxdk
nix develop
make -j$(nproc)
```

The shell sets `NXDK_DIR` to the sibling checkout by default. Set it before
entering the shell if nxdk lives elsewhere.

### Installation
Simply copy `default.xbe` and all the assets onto your xbox.
There is no further configuration required. The FTP-server will start automatically with NevolutionX, you'll only need to provide a link and a DHCP-server. The default user credentials are `xbox`/`xbox`.

## Building with CMake (Linux target)
TODO: Document what parts of the Linux target are not supported.
TODO: Document installation for the Linux target, if applicable.
`cmake -S . -B build && cmake --build build --verbose`

From the Nix development shell:

```sh
cmake -S . -B build-linux
cmake --build build-linux --verbose
(cd build-linux && ./NevolutionX)
```

## Credits
This software is built on top of other awesome projects:
Expand All @@ -51,4 +73,3 @@ This software is built on top of other awesome projects:
## License
NevolutionX is published under the MIT License. See [LICENSE](LICENSE) for more information.
MIT © 2019 Lucas Eriksson

27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
description = "NevolutionX development environment";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

outputs = { nixpkgs, ... }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
forAllSystems = function:
nixpkgs.lib.genAttrs supportedSystems (system: function nixpkgs.legacyPackages.${system});
in
{
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
# nxdk cross-compiles for i386-pc-win32; host hardening flags such as
# -fPIC are invalid for that target.
hardeningDisable = [ "all" ];

packages = with pkgs; [
bison
clang
clang-tools
cmake
flex
freetype
gnumake
harfbuzz
lld
libtiff
llvm
pkg-config
SDL2
SDL2_image
SDL2_ttf
];

shellHook = ''
export NXDK_DIR="''${NXDK_DIR:-$PWD/../nxdk}"
export PATH="$NXDK_DIR/bin:$PATH"
'';
};
});
};
}