Skip to content

Setup Guide

Dennis Rönn edited this page Oct 20, 2022 · 2 revisions

This page will go through the process of getting everything set up.
First we'll go through the requirements, then the forking/cloning and then how to build/run the program.

Requirements

For this, you have different options depending on your Operating System. Check for following sections for guides for your OS:

Once you've completed those, you're ready to proceed

Project Clone and Setup

1. Fork the repo

This is completely optional, but if you plan on making a pull request this is definitely a must do. For most people who simply use the program though, move to step 2.

2. Clone the repo

Open a terminal and run git clone --recursive https://github.com/Kirdow/Dern. There is currently no submodules in use but it's always a good idea to include --recursive just in case.
Also remember if you forked the repo, you need to replace Kirdow/Dern with YourName/Dern and replace YourName with whatever your name is, or wherever you forked it to.

Working without VS Code

Windows

If you're on windows, you'd want to start MSYS2 MINGW64 and work through there by navigating to the directory of the project.

All Platforms

If you're working without VS Code, there's a set of 7 bash files in use:

  • ./build.sh - Runs the Makefile to build the code, as well as setting the required variables for the script to work correctly.
  • ./run.sh - Runs the built binary.
  • ./clean.sh - Cleans the project from object files and the pre-compiled header.
  • ./dclean.sh - Cleans the built binary file.
  • ./fclean.sh - File for running both ./clean.sh and ./dclean.sh at once.
  • ./exec.sh - Runs ./fclean.sh, ./build.sh and ./run.sh in that order.
  • ./execl.sh - Runs ./exec.sh on a loop waiting for key press after each iteration (cancel with Ctrl+C). Also applies the default test.dern Dern file which contains test code for the latest feature worked on as of the current commit.

The script used when actively developing the project is ./execl.sh, although you'll probably just use ./build.sh and ./run.sh.
If changes occur, make sure to also run ./fclean.sh in order to do a fresh build.
Take note when using ./run.sh that you do need to specify the file, for example test.dern which is provided by default, you'd want to run the command as ./run.sh test.dern. Same goes for ./exec.sh, you'd want to run ./exec.sh test.dern if you want to rebuild and run with test.dern.

Always check the bash files before running them as I can't make sure they always do what I've told you they do. Never ever run files that you don't know what they're doing.

Working with VS Code

If you're working with VS Code, you do need gdb installed as well as the Microsoft C/C++ VSCode Extension.
Note: If you're on Windows you won't need gdb installed, but if you're on Linux you do.

Currently there's 2 launch configurations.

1) Run DernApp

  • This runs the app normally assuming it's already build

2) Build & Run DernApp

  • This builds and runs the app

Both of these will specify test.dern which is included by default, as also mentioned in the previous section.

Clone this wiki locally