# Installation

This is the installation guide. *If you are reading it from the build in documentation inside the VCStudio. You probably don't need it already.* This is a guide that will allow users to understand how to put VCStudio on their machine. This is hopefully needed to be done ones. Tho some problems could occur that will make you need this document more then ones. Nobody is perfect. Software always will have bugs.

### Chapters:
 - [Video Tutorial](#video-tutorial)
 - [Simple Guide](#simple-guide)
 - [Troubleshooting](#troubleshooting)
 - [Source Code](#source-code)


# Video Tutorial

[![](https://notabug.org/jyamihud/update_manager/raw/master/vcstudio/promotions/thumb_lbry_link.png)](https://open.lbry.com/@blender-organizer:5/rnd0001-4061:1?r=7YADjAZEbHJg8n4qV5rAuBh5Hca7cZQK)

![](../../settings/themes/OldSchool/icons/lbry.png) *Click on the image to view in LBRY* or ![](../../settings/themes/OldSchool/icons/video.png) [Download Video](https://cdn.lbryplayer.xyz/api/v4/streams/free/rnd0001-4061/1f56bef7a754d6be38ea78d5ef0b6bb17952f517/ffd973)

![](../../settings/themes/OldSchool/icons/question.png) [What is LBRY?](../../wiki/extra/LBRY.md)

# Simple Guide

This part will be basic. It's going to break up the step by step installation for simple user that doesn't want to know much. I will advice you to read the rest of the document anyway. Don't be afraid of knowledge.

**Step 1: Operating system.** VCStudio is developed on GNU / Linux. And will run best on GNU / Linux. 

![](../../settings/themes/OldSchool/icons/question.png) [What to do if I'm on Windows?](../../wiki/extra/Windows.md)

We made this decision since GNU / Linux is Free Software and Windows is not.

![](../../settings/themes/OldSchool/icons/question.png) [What is Free Software?](../../wiki/extra/FreeSoftware.md)

**Step 2: Get a copy of VCStudio.** This is very simple. Just download [this file](https://notabug.org/jyamihud/VCStudio/archive/master.tar.gz). And extract it in a preferred folder. I usually have a Software directory in my home folder. I would extract it there.

**Step 3: Run configuration.** For this we need to open the terminal and navigate to the correct directory.  The simple way is to right-click on the folder and choose "Open In Terminal" in order to get a terminal open in the directory of the folder. If you have no option like this in your file-browser, open the terminal and use the `cd <folder_name>` command to navigate to the folder where you extracted the downloaded package. `ls` could be handy to list all items in the current folder you are in. Use `cd ..` if you need to navigate back. When successfully navigated to the folder run `python3 run.py`.

I know that the previous paragraph could be a little bit intimidating. Especially if you are new to GNU / Linux. But please be patient. Terminal is your friend. It's not there to hurt you. It's just a bit different. You have to actually type words to use it. If you didn't get it. Read the previous paragraph again and pause after each sentence.

![](https://notabug.org/jyamihud/update_manager/raw/master/vcstudio/45.png)

It should present you with something like this. Maybe in different colors. This is the Language menu of the program. Type `English` and continue. *Of course you can type any other language as well. But make sure you understand it before typing it.*

As soon as you type it. There will be a first check of the program. It's gonna run a quick test to see that all the files are indeed in the folder. And will tell you if something is missing or broken. Please [report](https://notabug.org/jyamihud/VCStudio/issues) if something is broken.

![](https://notabug.org/jyamihud/update_manager/raw/master/vcstudio/46.png)

It should launch a window like this if everything worked fine. Now you probably can find VCStudio in your application menu.

![](https://notabug.org/jyamihud/update_manager/raw/master/vcstudio/47.png)

Done!

# Troubleshooting

You may encounter various problems in the previous few steps. If you do you have to broaden your understanding of what exactly you are doing. This is not hard, but is not necessary for installation most of the time. So I didn't include it up there.

To understand the installation of VCStudio you need to understand a concept of scripts vs compiled software. Most software. Either the Linux kernel or Blender are compiled. The source code is read by a special program called a compiler and this program returns a binary file with contains direct instructions to the CPU. Which are extremely hard to read if you are a human. More often then not when installing software from the source code, from websites like NotABug or GitHub, you will need to run a special script that will do all the compilation and configuration for you.

In other words. Most programs are compiled.

On the other hand you have scripts. Which run directly from the source code in a program called the interpriter. Python is one such program. And the source code of VCStudio writen so to run in a Python 3 interpreter. 

Most GNU / Linux  Destributions will have it pre-installed with Python 3. You can see the version of the python installed by launching the terminal and typing `python3` into it. If it's not there. Please install it. 

![](https://notabug.org/jyamihud/update_manager/raw/master/vcstudio/43.png)

A lot of programs contain everything you need in them. But usually it's a huge waste of storage. Sometimes one library can be shared between 2 programs just fine. For example the GTK library to draw Graphical User Interfaces. It can be used by more then one program. And it's probably good to have one installed for all of them. Instead of having multiple copies of the same library for each program.

**Py-GTK** is a python module to draw GUI using a GTK library. To test that it is installed you can type `from gi.repository import Gtk` to the python console.

![](https://notabug.org/jyamihud/update_manager/raw/master/vcstudio/44.png)

A warning such as `<stdin>:1: PyGIWarning:` is okay. As long it does not say something like `ModuleNotFoundError: No module named 'Gtk'`

Now you can start the installation guide again. This time with a lot more knowledge. But this is not the end still. Because the following chapter going to be even more insightful into your problem. Or if you have non, as I said. Don't be afraid of knowledge.

# Source Code

The best documentation is to read the code of the software directly. Here are the parts of VCStudio that are responsible for the disaster that is installation.

- [run.py](../../run.py) Main file that operates the rest of the guts.
- [troubleshooter/troubleshooter.py](../../troubleshooter/troubleshooter.py) The file responsible for most of the checking and configuration process.
- [settings/settings.py](../../settings/settings.py) File handling settings.
- [settings/talk.py](../../settings/talk.py) File handling languages.
- [settings/update.data](../../settings/update.data) File with update information. But in this case a file that holds a list of all files in the VCStudio program.

**So what is happening when you run the run.py?**

Well at first. VCStudio is unsure of what language to use for the rest of the checking procedure. I would use English for the whole process. But I made myself use multi-language support as early as possible. And as weird as it might sound, some people just don't speak English. 

**How does it know that the user didn't set up a Language yet?**

In the [settings file](../../settings/settings.data) there is a variable for `Language`. If it's not there. Or set to `False`. It will fail the initial test. And run the [troubleshooter](../../troubleshooter/troubleshooter.py) .

**What the troubleshooter does?**

Troubleshooter is a script to check / fix problems. Tho at the moment [fix.py](../../troubleshooter/fix.py) is empty of any functionality since there was no mistakes horrible enough found that troubleshooter should fix. This is why please [report your problems](https://notabug.org/jyamihud/VCStudio/issues).

We can break the troubleshooter activity into these parts:

- **Language**. Checking if there is any language in a settings and if not give user a little interface to choose a language. 
- **Check Python**. Basically checking the installed modules like Gtk, Cairo, PIL and so on.
- **Check VCStudio**. Checking all the files listed in [update.data](../../settings/update.data) that they exists and working. At this stage some files might fail without actually making too much problems. But these are fixes to make.

**How does it add it self into the Application Menu?**

VCStudio adds it self into a system application menu. It does it using what's called a [Desktop Entry](https://freedesktop.org/wiki/Specifications/desktop-entry-spec/) that most GNU / Linux application launchers understand. This step is also done by the troubleshooter. But only if a folder `/home/username/.local/share/applications` exists. This is where most GNU/Linux systems store the `.desktop` files.


# Help The Documentation

The documentation files are not perfect. And need maintenance.

*If you are reading it from the VCStudio build in Documentation:*

 - Press ![](../../settings/themes/OldSchool/icons/edit.png) to edit locally.
 - Press ![](../../settings/themes/OldSchool/icons/notabug.png) to commit in our NotABug repository.

*(C) J.Y.Amihud 2021. Under GPL v3 or later.*
