MECH 415: Getting Started

 

This document provides a brief guide for installation of software required for MECH 415 on your home computer.  Please install the software as soon as possible so you won’t waste time on installation during the term when you are busy (capstone, etc.).

 

Note that Microsoft Visual Studio 2022 C++ is required since the DirectX graphics library is extensively used in the course.  This compiler can be installed on a Windows or Mac computers.  Before installing it on either system I recommend upgrading to the most recent version operating system (Windows 10, OSX, etc.).

 

Note: if you get a "file can't be downloaded securely" message when downloading a file in your browser then click the right of the message and select "keep" file.

 

 

WinRAR archiver

 

Note: Students should read this section and watch the included video even if you have WinRAR (or something else) already.  Incorrect usage of WinRAR is the source of many errors in this course.

 

Most of the example files on this web site are placed into folders and then zipped into WinRAR files (*.rar).  WinRAR is available for Windows from the following link:

http://www.rarlab.com/download.htm -- I recommend the “WinRAR x86 (32-bit) Release” Version.

 

WinRAR files can also be opened with 7-Zip (choose 32-bit version) for Windows: http://www.7-zip.org/

 

*Note: A WinRAR archive must be “expanded” before using it.  Double clicking the *.rar file (or opening it with WinRAR) and then double clicking the file you want inside WinRAR is not enough.  Opening a *.rar using Windows explorer also doesn’t work.  In both cases, the files are still compressed and you can’t do much including using them with C++ compiler software.  You must “expand” the *.rar file before compiling files inside it.

 

To expand a RAR file using WinRAR you can right click on it in Windows and select “Extract to …”.  Here is a video of the process:

http://users.encs.concordia.ca/~bwgordon/winrar_demo.mp4

 

To view this video right click (two finger click on Mac) and select Save Link As / Download Linked File As.  Then open the downloaded file with VLC player.

 

To expand a RAR file using 7-Zip first open the 7-Zip program then select the RAR file and select “Extract”.

 

 

VLC Media Player

 

There are a number of instruction videos in this course.  VLC media player is highly recommended to watch these videos.  VLC is capable of playing a wide variety of video formats with high play back quality.  

 

Here is a link for download of VLC (Windows, Mac OSX, and Linux versions):

http://www.videolan.org/vlc/

 

It’s recommended VLC be installed before continuing as there are a number of videos to follow.

 

Note in order to watch the videos on this web site you should right click (two finger click on Mac) on the link of the video and select “Save Link As …” on Google Chrome or “Download Linked File As ...” on Safari.  The file can then be opened and played with VLC.

 

 

Notepad++ Text Editor

 

A text editor is a very simple editor for text that normally doesn’t have much formatting and graphics capability – the focus is on text and programming related features.  The formatting and graphics capabilities of a full word processor actually interferes with programing related tasks.  Most compiler software has a built in text editor, but in some cases a separate text editor is required.  For example, online compilers typically have no capability to save files so a text editor is needed for saving your programs.

 

For Windows the best text editor is Notepad++:

 

https://notepad-plus-plus.org/download

 

The following videos briefly show how to use and configure Notepad++ for use with C++ programs:

 

http://users.encs.concordia.ca/~bwgordon/notepad++_demo.mp4

 

Note in order to watch the videos on this web site you should right click (two finger click on Mac) on the link of the video and select “Save Link As …” on Google Chrome or “Download Linked File As ...” on Safari.  The file can then be opened and played with VLC.

 

 

Visual Studio C++ Installation on Windows

 

Visual Studio is the most popular C++ compiler used in industry for Windows and it's actually a very good compiler. Make sure to use Visual Studio Community version 2022 for this course for compatibility with the lectures. Note that the Visual Studio Community compiler is free and is essentially the same as the full professional version with the advantage that it takes less disk space.  Here is a short video below that shows how to setup and use Visual Studio.

http://users.encs.concordia.ca/~bwgordon/visual_studio_2022_installation.rar

Note that in order to watch this video you need to first download the rar file.  Right click (two finger click on Mac) on the link of the file and select “Save Link As …” using Google Chrome or “Download Linked File As ...” using Safari.  Then expand the rar file (using WinRAR, etc.) and play the mp4 file using VLC player.  If you don’t follow these steps the videos may not completely work or have sound.

 

Here is the text file used in the video.  It can be opened with notepad, notepad++, a word processor, etc.

 

http://users.encs.concordia.ca/~bwgordon/VS_studio.txt

 

Here is a short follow up video showing how to use Visual Studio and change the settings so it’s easier to use for C++ programming.  The video is for Visual Studio 2019, but it will work with the 2022 version too.

 

http://users.encs.concordia.ca/~bwgordon/visual_studio_2019_settings.rar

 

 

Visual Studio C++ Installation on Apple / Mac (OSX)

 

First you need to install Windows (preferably 10) on your Mac.  Then follow the installation instructions for Visual Studio on Windows in the section above.

 

There are two options for installing Windows on a Mac computer.

 

The first option (the one I strongly recommended) is to run Windows as a program on your Mac.  This is known as a Virtual Machine option. It’s probably better to try the Virtual Machine approach first since it’s easier to install, takes less disk space, and has less potential for serious errors.

 

The second option below, Boot Camp, works by installing Windows on a separate disk partition that can be selected when you boot your computer.  Boot Camp provides the best performance and compatibility because you are actually installing Windows on your computer. Try Boot Camp if you value performance and compatibility over ease of installation and risk of errors.  That being said, I prefer Boot Camp for my own use since I need 100% compatibility and I like to live on the wild side.  I also like to have my Mac and Windows OS completely separate.

 

a) Virtual Machine

 

For this option I recommend the most recent version of Parallels Desktop since this package is the easiest to install.  The price is only about $50 for students.  There’s also a full featured free trial you can use to see if the software is compatible with your computer.

 

http://www.parallels.com/products/desktop/

 

https://www.parallels.com/products/desktop/trial/ -- free trial

 

https://www.parallels.com/ca/landingpage/pd/education/ -- student edition 50% off

 

Here is an alternative link for the student / educational edition

https://onthehub.com/ -- look for Concordia University, ECS option, parallels desktop

 

https://www.youtube.com/watch?v=ARQ4sCyBsmk -- good installation video

 

http://www.pcmag.com/article2/0,2817,2473278,00.asp

 

https://www.zdnet.com/article/parallels-desktop-15-for-mac-is-the-best-way-to-run-windows-linux-and-macos-on-your-mac/

 

Note you need a copy of Windows to install with Parallels Desktop.  During Parallels installation it will allow you to automatically download an unregistered version of Windows you can use for free (see the installation video above).  You should turn off Windows updates after installation to avoid problems.  I also don’t recommend using an internet browser in Windows other than to install software from well known sources.

 

Note you will need to allocate 40 - 50 GB of disk space for Windows 10 in Parallels Desktop in order to run both the operating system and Visual Studio compiler properly.

 

Note when using CodeLite with Parallels Desktop you can’t put the CodeLite workspace / project folder for C++ programs on the Mac desktop or in any Mac folders.  It has to be in a Windows folder otherwise the following error will occur “UNC paths are not supported”.  Try making the CodeLite workspace / project in a folder on the windows c:\ drive.  Use windows explorer and right click and make new folder.  Make a folder there named my_codelite.  Then run CodeLite and make a workspace / project in that folder. You might also try just copying / dragging an existing workspace folder to the c: drive in windows explorer.

 

b) Boot Camp

 

You can use Apple Boot Camp software to install Windows on your Mac.  When you are done you can boot either Mac OSX or Windows.  Note: you need a copy of Windows to complete the Boot Camp procedure. Windows requires at least 60 GB of your hard drive (40 GB for Windows and 20 GB free space).  Note if you need extra space to store your data on either Windows or Mac you can use a USB fit drive.  Carefully consider how much disk space you want to allocate to Windows and Mac since you need to select the ratio when installing Boot Camp.  Trying to change the ratio later (from personal experience) can mess up both your Mac and Window OS installations.

 

You should backup your valuable Mac files (and maybe make a recovery drive) before installing Boot Camp, since there is a small chance of disrupting your Mac OSX installation.  It’s also a good idea to update your OSX version (e.g. to El Capitan) before using Boot Camp as updating your OSX version is not a good idea once Boot Camp is installed.  I messed up my Boot Camp Windows when I recently installed El Capitan – hence all these great installation videos I’ve recently made.

 

The following video shows how to use the utility “boot camp assistant” to install Boot Camp for OSX El Capitan (other versions are similar but there could be differences) and Windows 7 (version 10 is easier):

http://users.encs.concordia.ca/~bwgordon/boot_camp_install.mp4 -- note: there’s no audio

 

Note in order to watch the videos on this web site you should right click (two finger click on Mac) on the link of the video and select “Save Link As …” on Google Chrome or “Download Linked File As ...” on Safari.  The file can then be opened and played with VLC.

 

This video is for Windows 7.  Windows 10 is easier since it doesn’t require the manual copying of support files which I do at the end of the video.

 

Different versions of OSX and Windows might require slightly different installations procedures and support files for Boot Camp.  This information is provided here:

https://www.apple.com/ca/support/bootcamp/

 

It should also be possible to visit the “Apple Genius Bar” at your local Apple store for help with Boot Camp installation (you should check though).

 

Note: after Boot Camp is installed you need to hold down the option key when booting in order to select whether to boot Windows or Mac OS.