Skip to content

Commit

Permalink
DOCUMENTATION: Add install instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
Saverio976 committed Sep 26, 2023
1 parent 674ad1a commit e4cecda
Show file tree
Hide file tree
Showing 14 changed files with 139 additions and 5 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ set(CPACK_PACKAGE_VENDOR "X-L-R-G-B")
include(InstallRequiredSystemLibraries)

set(CPACK_PACKAGE_NAME "R-Type")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${${CPACK_SYSTEM_NAME}")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
Expand Down
10 changes: 9 additions & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@

# User Guide

- [Installation](user-guide/installation.md)
- [Installation](user-guide/installation/README.md)
- [From packaged binary](user-guide/installation/packaged-binary/README.md)
- [GNU/Linux](user-guide/installation/packaged-binary/gnu-linux.md)
- [MacOs](user-guide/installation/packaged-binary/macos.md)
- [Windows](user-guide/installation/packaged-binary/windows.md)
- [From source](user-guide/installation/source/README.md)
- [GNU/Linux](user-guide/installation/source/gnu-linux/README.md)
- [MacOs](user-guide/installation/source/macos/README.md)
- [Windows](user-guide/installation/source/windows/README.md)

- [Usage](user-guide/usage.md)

Expand Down
Empty file removed docs/user-guide/installation.md
Empty file.
10 changes: 10 additions & 0 deletions docs/user-guide/installation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Installation

There are two ways to install R-Bus:
- From packaged binary
- From source

*Prefer the packaged binary if you want to find yoursel downloading some dependencies and compiling R-Bus.*
*Prefer the packaged binary if you are not a nerd*

Else, go ahead and install R-Bus from source.
5 changes: 5 additions & 0 deletions docs/user-guide/installation/packaged-binary/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Packaged binary

Now, let's install R-Bus from packaged binary.

Please select the right page for your operating system
12 changes: 12 additions & 0 deletions docs/user-guide/installation/packaged-binary/gnu-linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# GNU/Linux

```bash
curl -Lo 'r-type-linux.sh' 'https://github.com/X-R-G-B/R-Bus/releases/latest/download/r-type-linux.sh'
# The following line will Accepts the license, extract the packaged binary + its dependencies
yes y | bash 'r-type-linux.sh'
cd R-Type-Linux || echo "Failed to cd to R-Type-Linux, please open an issue: 'https://github.com/X-R-G-B/R-Bus/issues/new?assignees=&labels=bug&projects=&template=install-failed.yml&title=%5BFAIL+INSTALL%5D+-+Title'"
# your binaries are in ./bin/
ls ./bin/
```

:warnings: When you want to move this binaries, please move all the folder R-Type-Linux
3 changes: 3 additions & 0 deletions docs/user-guide/installation/packaged-binary/macos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# MacOs

Not available now
3 changes: 3 additions & 0 deletions docs/user-guide/installation/packaged-binary/windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Windows

Download https://github.com/X-R-G-B/R-Bus/releases/latest/download/r-type-windows.exe and run it
5 changes: 5 additions & 0 deletions docs/user-guide/installation/source/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Source

Now, let's install R-Bus from source.

Please select the right page for your operating system
29 changes: 29 additions & 0 deletions docs/user-guide/installation/source/gnu-linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# GNU/Linux

- You need to have cmake, and a c++ compiler

*hint: you can use https://github.com/aminya/setup-cpp to install it*

- Git clone the project or download the .zip

`git clone -b main https://github.com/X-R-G-B/R-Bus.git R-Bus-main`

**OR**

`wget https://github.com/X-R-G-B/R-Bus/archive/main.zip && unzip R-Bus-main.zip`

- Change directory

`cd R-Bus-main || "Failed to cd to R-Type-Linux, please open an issue: 'https://github.com/X-R-G-B/R-Bus/issues/new?assignees=&labels=bug&projects=&template=install-failed.yml&title=%5BFAIL+INSTALL%5D+-+Title'"`

- Install dependencies

`sudo ./scripts/install-deps-linux.sh`

- Build the project

`./scripts/compil.sh`

Well Done you have your binaries!

Now, you can run it but dont move it anywhere
29 changes: 29 additions & 0 deletions docs/user-guide/installation/source/macos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# MacOs

- You need to have cmake, and a c++ compiler

*hint: you can use https://github.com/aminya/setup-cpp to install it*

- Git clone the project or download the .zip

`git clone -b main https://github.com/X-R-G-B/R-Bus.git R-Bus-main`

**OR**

`wget https://github.com/X-R-G-B/R-Bus/archive/main.zip && unzip R-Bus-main.zip`

- Change directory

`cd R-Bus-main || "Failed to cd to R-Type-Linux, please open an issue: 'https://github.com/X-R-G-B/R-Bus/issues/new?assignees=&labels=bug&projects=&template=install-failed.yml&title=%5BFAIL+INSTALL%5D+-+Title'"`

- Install dependencies

`./scripts/install-deps-macos.sh`

- Build the project

`./scripts/compil.sh`

Well Done you have your binaries!

Now, you can run it but dont move it anywhere
29 changes: 29 additions & 0 deletions docs/user-guide/installation/source/windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Windows

- You need to have cmake, and a c++ compiler

*hint: you can use https://github.com/aminya/setup-cpp to install it*

- Git clone the project or download the .zip

`git clone -b main https://github.com/X-R-G-B/R-Bus.git R-Bus-main`

**OR**

`wget https://github.com/X-R-G-B/R-Bus/archive/main.zip && unzip R-Bus-main.zip`

- Change directory

`cd R-Bus-main || "Failed to cd to R-Type-Linux, please open an issue: 'https://github.com/X-R-G-B/R-Bus/issues/new?assignees=&labels=bug&projects=&template=install-failed.yml&title=%5BFAIL+INSTALL%5D+-+Title'"`

- Install dependencies

`./scripts/install-deps-windows.ps1`

- Build the project

`./scripts/compil.ps1`

Well Done you have your binaries!

Now, you can run it but dont move it anywhere
4 changes: 2 additions & 2 deletions scripts/bundle-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ cd build || exit 14

cpack --config CPackConfig.cmake -G STGZ

mv R-Type-*-Linux.sh ../r-type-linux.sh
mv R-Type-Linux.sh ../r-type-linux.sh

cpack --config CPackSourceConfig.cmake -G TGZ

mv R-Type-*-Source.tar.gz ../r-type-linux.tar.gz
mv R-Type-Source.tar.gz ../r-type-linux.tar.gz
4 changes: 2 additions & 2 deletions scripts/bundle-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ if ($LASTEXITCODE -ne 0) {
type _CPack_Packages/win64/NSIS/NSISOutput.log
}

Copy-Item R-Type-*-win64.exe ../r-type-windows.exe
Copy-Item R-Type-win64.exe ../r-type-windows.exe

cpack --config CPackSourceConfig.cmake -G ZIP

Copy-Item R-Type-*-Source.zip ../r-type-windows.zip
Copy-Item R-Type-Source.zip ../r-type-windows.zip

cd ..

0 comments on commit e4cecda

Please sign in to comment.