Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary #841

Closed
28 changes: 14 additions & 14 deletions bin/main/edu/rpi/legup/log4j2.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Logging level
# Root logger option
log4j.rootLogger=DEBUG, stdout, file
# Redirect log messages to console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
# Redirect log messages to a log file, support file rolling.
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=Legup.log
log4j.appender.file.MaxFileSize=5MB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
# Logging level
# Root logger option
log4j.rootLogger=DEBUG, stdout, file
# Redirect log messages to console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
# Redirect log messages to a log file, support file rolling.
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=Legup.log
log4j.appender.file.MaxFileSize=5MB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
127 changes: 127 additions & 0 deletions src/main/java/edu/rpi/legup/puzzle/binary/developerGuide.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
Developer Setup Guide (For Linux Users)

This setup guide is aimed towards developers planning on using a
device using linux to contribute to this project.

In summary, what you need to contribute to this project is a text editor, git, gradle, and java 21, if you have those or a way to get them, you can use them to contribute, otherwise, follow this guide, which might look a little intimidating, but it really isn'nt as bad as it looks.

Software used:
- package manager: apt & sdk
- text editor: neovim
- Git
- Gradle
- Java (v21) (yes the version matters)


This step-by-step guide assumes the use of Ubuntu, one of the most
commonly used Linux Distros (the steps are the same for any Ubuntu Flavors)
and for any ubuntu/debian based systems, like Linux mint, elementary os, pop os,
and others. For other linux distros, the steps will be extremely similar, but the
commands will change slightly based on the development environment and package manager.
For example, updating in ubuntu will be "$ sudo apt update" because it uses the apt
package manager, but in Arch based distros, updating could be "sudo pacman -Syy"
because it uses the pacman package manager, so for other distros, you just have
to familiarize yourself with their commands (or do some quick google searches).

Before getting started with any installation, for good practice always update your packages,
so first enter the following command in the terminal:

sudo apt update


1. Choosing where to code

The fist step is choosing where you will be coding, that could be a full fledge IDE or just
a simple text editor, anything from nano to JetBrains Intellij, a fantastic in between is the
neovim text editor, which is a terminal based text editor that supports plugins using the Lua
programming language


to install neovim first make sure your system has snapd:

sudo apt install snapd


then install neovim

sudo snap install nvim --classic


2. Install git (you can use github desktop if you wish)

sudo apt install git


3. Install java

if you already installed java, like through the "install default-jre" command, check your java version with

java -version


in order for legup to work, you need java 21 on your system, so get it through

sudo apt install openjdk-21-jdk -y

wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb

sudo apt install ./jdk-21_linux-x64_bin.deb

now running "java -version" should show java 21 installed


4. Install gradle

sudo apt install curl

curl -s "https://get.sdkman.io" | bash

source "$HOME/.sdkman/bin/sdkman-init.sh"

sdk install gradle


5. Forking the repository

Most of the work you will doing will be in your forked repository. Follow the following steps to fork the main repository:

1. Go to the the main LEGUP repository: https://github.com/Bram-Hub/Legup
2. Press the "Fork" button on the top right side of the page.
3. When forking, uncheck the box saying to fork from the default branch only; dev work should be done on the dev branch then pushed into the dev branch of the original LEGUP


6. Downloading the project

git clone "https://github.com/*YOUR USERNAME*/*YOUR FORK OF LEGUP*"

if you experience any errors when cloning the repository, like an authentication error, you might need
to add a github ssh key to your home directory/.ssh, if not there, create a folder called .ssh in your
home directory, open the terminal at that location and enter the following command:

ssh-keygen -t ed25519 -C "your_email@example.com"


you will then need to open the file and add it to your github account in security/ssh keys

7. Opening the project with ide or text editor

go to where the project is, go to the directory where the files are then do

nvim filename

to exit and save in neovim you must do Esc, :, w, q, Enter


8. running legup

to run legup, you have to go to the directory where the "build.gradle file is"
assuming you cloned the repository into your Documents/GitHub directory, you
should go to (you can do cd and the following directory) ~/Documents/GitHub/*YOUR FORKED REPO*
and enter

./gradlew build

and to run

./gradlew run

Loading