Skip to content

Commit

Permalink
[Core] [Nix] Restructure folders and add Linux docs, Fix nix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali0004 committed Mar 4, 2025
1 parent a2bd1d3 commit d80b631
Show file tree
Hide file tree
Showing 73 changed files with 21 additions and 14 deletions.
2 changes: 2 additions & 0 deletions Deps/Building/building-linux-nix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Compiling Xenon with Nix
TODO
2 changes: 2 additions & 0 deletions Deps/Building/building-linux-ubuntu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Compiling Xenon with Ubuntu
TODO
4 changes: 4 additions & 0 deletions Deps/Building/building-linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Building Xenon for Linux
### Currently, we only offically support 2 ways to do it.
## [**Nix**](https://github.com/xenon-emu/Xenon/blob/main/Deps/Building/building-linux-nix.md)
## [**Ubuntu**](https://github.com/xenon-emu/Xenon/blob/main/Deps/Building/building-linux-ubuntu.md)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Compile Xenon with Visual Studio 2022
# Compiling Xenon with Visual Studio 2022

### (Prerequisite) Download [**Git for Windows**](https://git-scm.com/download/win)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

<p align="center">
<a href="https://discord.gg/TDvbdXRRQ6">
<img src="https://github.com/xenon-emu/Xenon/blob/main/Docs/screenshots/Xell_Reloaded.png" width="450">
<img src="https://github.com/xenon-emu/Xenon/blob/main/Docs/screenshots/WinDBG.png" width="510">
<img src="https://github.com/xenon-emu/Xenon/blob/main/Deps/Screenshots/Xell_Reloaded.png" width="450">
<img src="https://github.com/xenon-emu/Xenon/blob/main/Deps/Screenshots/WinDBG.png" width="510">
</p>

# Xenon
Expand All @@ -40,7 +40,9 @@ We need talented developers more than ever to contribute to the project and move
</a>

# Building
Check the build instructions for [**Windows**](https://github.com/xenon-emu/Xenon/blob/main/Docs/Building/building-windows.md).
#### [**Windows**](https://github.com/xenon-emu/Xenon/blob/main/Deps/Building/building-windows.md)
####
#### [**Linux**](https://github.com/xenon-emu/Xenon/blob/main/Deps/Building/building-linux.md)

# License
- [**GPL-2.0 license**](https://github.com/xenon-emu/Xenon/blob/main/LICENSE)
16 changes: 6 additions & 10 deletions Xenon/Base/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,18 +229,14 @@ void saveConfig(const std::filesystem::path &path) {
std::string pathPrefix{};
#else
// TODO(Vali0004): Pull if Linux or MacOS
std::string pathPrefix{ std::getenv("HOME") };
std::string pathPrefix{ getenv("HOME") };
#endif
// Paths.
// Append a prefix if we need it (ex. Linux)
fusesTxtPath = pathPrefix + fusesTxtPath;
oneBlBinPath = pathPrefix + oneBlBinPath;
nandBinPath = pathPrefix + nandBinPath;
oddDiscImagePath = pathPrefix + oddDiscImagePath;
// Paths.
data["Paths"]["Fuses"] = fusesTxtPath;
data["Paths"]["OneBL"] = oneBlBinPath;
data["Paths"]["Nand"] = nandBinPath;
data["Paths"]["ODDImage"] = oddDiscImagePath;
data["Paths"]["Fuses"] = pathPrefix + fusesTxtPath;
data["Paths"]["OneBL"] = pathPrefix + oneBlBinPath;
data["Paths"]["Nand"] = pathPrefix + nandBinPath;
data["Paths"]["ODDImage"] = pathPrefix + oddDiscImagePath;

// HighlyExperimental.
data["HighlyExperimental"].comments().clear();
Expand Down
1 change: 1 addition & 0 deletions xenon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ cmake pkg-config ninja ];
buildInputs = [ sdl3 fmt toml11 ];
postUnpack = ''
rm -rf $sourceRoot/third_party/ImGui
cp -r ${imgui} $sourceRoot/third_party/ImGui
chmod -R +w $sourceRoot
'';
Expand Down

0 comments on commit d80b631

Please sign in to comment.