- This repo demonstrates a good organisational system and folder structure for doing the labs.
- The
LAB_DWLfolder is simplylabs-examples.zipextracted. - The Lab folders (Lab1, Lab2.. etc) contain specially configured makefiles that refer back to the
LAB_DWLfolder.- The same makefile can be used for Lab1, 2 and 3.
- Lab4 and Lab5 will need a slightly different makefile, because the working folders are one level lower.
- Note:
- This repo is configured to work with Linux by default.
- However it can work on Mac easily, if some extra steps are done (MAC USERS CHECK THIS!)
I highly recommend this folder structure as it will allow you to:
- Avoid dealing with so many levels of nested folders (Abstract away from the
labs-examples/LAB_DWLfolder). - Only have the code you are working on in your current Lab folder (and working directory in the terminal).
- Find the code files that you've worked on easier.
Also: You will avoid many common errors since the Makefile has been fixed for you.
- Open your terminal to where you want your CITS3003 folder to be (See here for advice).
- Install the Git CLI system-wide using:
sudo apt-get update && sudo apt-get install git - Copy, paste and execute the command:
git clone https://github.com/DavoDC/CITS3003_Template CITS3003 - This repo will now be in a folder called
CITS3003in the current directory.
- There are text files with instructions in their names throughout the folder structure to guide you.
- I have included only one Makefile (in
Lab1) to make editing it for me easier. You'll have to copy it to where you need it. - You shouldn't need to edit or compile anything in the
LAB_DWLfolder (including sub-folders). - With this system, you’ll always have a copy of the original lab files:
- So you don’t need to re-download
labs-examples.zip. - You are free to change the code however you want in your Lab folders.
- So you don’t need to re-download
- See
Example_of_Used_Folder_Structure.txtfor an example of a used template.
- Open your
CITS3003folder in your file manager/explorer GUI. - Enter the
LAB_DWLfolder and copy the needed base files for the Lab you are on.
(e.g. For Lab1 (on Linux), Go intoCITS3003\LAB_DWL\CHAPTER02_CODE\LINUX_VERSIONSand copyexample1.cpp). - Paste them into the relevant Lab folder.
(e.g. For Lab 1, Pasteexample1.cppintoCITS3003\Lab1). - Rename/edit/compile/execute your code within that Lab folder.
(e.g. For Lab 1, Work within theLab1folder, Renameexample1.cppso you get:CITS3003\Lab1\q1circle.cpp).
I have included some extra, simple, fully commented files in the Lab1 folder to benefit your learning experience:
makefile(for Linux only, Mac users can delete)Mac_makefile(for Mac only, Linux users can delete)diamond.cppshaders/vshaderS.glslshaders/fshaderS.glsl
See the Lab 1 Recommendation Section for more info.
- You'll need a different makefile, so:
- Delete
Lab1/makefile(as it is for Linux only) - Rename
Lab1/Mac_makefiletomakefile
- Delete
- You'll need to make some small edits to
diamond.cpp,shaders/vshaderS.glslandshaders/fshaderS.glsl- Open each in a text editor
- Search for "
MAC USERS" and follow the instructions in the comments