Prepare your computer to write Pascal code

Summary of what you are going to install:

  1. Lazarus IDE
  2. anchordocking design package for a dockable GUI

Although you may use Windows or MAC OS as an operating system for your development computer, as a beginner it is recommended that you use a Linux-based distribution.

If you haven’t installed the OS read this article.

Here are the steps:

1) Set a root password that is easy to type and remember

Ok, some people may claim this is risky but remember that we are setting up a development computer for novices and for assisted coding. If you have important/sensitive data to the same computer (which you shouldn’t) you could skip this step.

Here is a sample code that will change the root password (you will be prompt for the new one):

sudo passwd root

You will be asked for your password. Type it two times.

2) Install Lazarus IDE

At first try to download it from the standard repositories:

sudo apt-get update
sudo apt-get install lazarus-ide

If that does not work, try the following:

gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 6A11800F; gpg -a --export 6A11800F | sudo apt-key add -
echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe" | sudo tee /etc/apt/sources.list.d/lazarus-stable.list
sudo apt-get update; sudo apt-get install lazarus

For more read How to Install Lazarus on Ubuntu article.

3) Install the dockable plugin

Perform the following steps:

  1. Packages → Install/Uninstall packages
  2. select anchordockingdsgn package from the “Available for installation” packages list
  3. click Install selection
  4. click Save and rebuild IDE
  5. wait for the IDE to compile

4) Setup code formatting

This step is optional and you may change some options according to your taste:

  1.  Tools → Options → Editor → Tab and indent
    1. Disable Smart tabs
    2. Enable Tabs to spaces
    3. Set Tab widths to 4
  2. Tools → Options →JCF code formatting → Clarify → Indentation
    1. Set Block indentation spaces to 4
  3. Tools → Options →JCF code formatting → Clarify → Capitalization
    1. Disable Capitalization fixing in this category
    2. Disable Capitalization fixing in all subcategories
  4. Tools → Options →JCF code formatting → Clarify → Line Breaking
    1. Set max line length to 90
    2. Set break lines to never

5) Prepare your taskbar / desktop

Pin the following to your taskbar (or desktop):

  1. a web browser of your choice
  2. the IDE you have installed
  3. optionally a file manager

Unpin any items you don’t need. You will work more efficiently if you keep the desktop clean and tidy.

6) Prepare your workspace for the project (optional)

If you have a specific project or assignment you want to complete then:

  1. create a folder on your desktop
  2. copy to that folder the assignment PDF, any slides and additional resources you were given.

6) Install optional software

You may need to install other useful programs according to this post.

 

Next step?

Once you have setup the IDE, you could install additional software:

Leave a Reply