XNA Installation on Linux or Windows 7

This topic was published by and viewed 2081 times since "". The last page revision was "".

Viewing 1 post (of 1 total)
  • Author
    Posts

  • Jarret Buse
    Participant
    • Topics - 25
    • @jbuse1

    This tutorial helps to install XNA programming on a Linux system or a Windows 7 system for free. The tutorial should be simple to handle, just go step-by-step and make sure you get every step completed properly. Read the tutorial first before starting.

    Before we start, you need to find all the proper software. The software needed is:

    1. Microsoft .NET Framework 4.x
    2. Microsoft Visual Studio 2010 Express (C#) – the Express version is free
    3. Microsoft XNA Game Studio 4.x – this is a free download as well

    NOTE: If you have a version of Visual Studio 2010, go ahead and use it instead of the Express version. The Service Pack is for all versions of Visual Studio 2010. You should install both C# and VB components of Visual Studio.

    For a Linux install, you need the following as well:

    1. Oracle VirtualBox
    2. Tiny7 (32-bit)

    Let's start with the installation on a Linux system. You need to download VirtualBox from Oracle at http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html?ssSourceSiteId=ocomen.

    NOTE: Do not use the software from your repositories unless you have added Oracle.

    Install the VirtualBox software required for your system. Once installed, you can create a new Virtual Machine by selecting "New" and use the following information:

    • Name: XNA System
    • Type: Microsoft Windows
    • Version: Windows 7 (32-bit)

    Click "Next". Here, you will select the base memory size. If you notice the slider line, part is in green and part is in red. Move it to at least 1024, as long as the slider remains in the green section.

    Click "Next". Now, you are asked to create a hard drive. The default should be: "Create a virtual hard drive now", if it is not selected then select it, and select "Create". Then, you are prompted to choose the Hard DriveFile Type. Select VDI (Virtualbox Disk image). Select "Next". The size should be set as a fixed size and then click "next". The next screen prompts for the disk size. Here, you will want a minimum of 15 GB, but preferably it should be higher. The greater the size, the more game files you can save for various projects. Click the icon next to the file name to specify a different location for the VirtualBox disk Image. After you select "Create", the base image file will be created which could take a few minutes.

    Now, you should have an empty session to use to load your Windows Tiny7 Operating System (OS).

    In VirtualBox, select your XNA System and then select the "Settings" button. Under "System", uncheck Floppy from Boot Order. Under Display and the Video tab, check "Enable 3D Acceleration" and change the Video Memory to around 64 as long as the slider area is green. Select the Network option and under Adapter 1, change the "Attached To:" to "Bridged Controller" and the "Name:" to your active LAN adapter. Click OK at the bottom of the window.

    Insert your Tiny7 disk in your CD/DVD drive and start the XNA System session. Let Tiny7 boot and install it as normal to Drive C:.

    NOTE: Once done, make sure you do not allow any system updates because this can render Tiny7 unusable and you will need to recreate the session.

    Set your graphic display settings to match your monitor so you have a full screen which is readable for programming. At the bottom of the screen should be a pop-up box for VirtualBox. The options are: Machine, View, Devices and Help. Select Devices and then select "Insert Guest Additions CD image..." Once selected, open "Computer" in Windows and then double-click the CD/DVD drive icon. Once opened, you should get a new window welcoming you the Oracle VM VirtualBox Guest Additions Setup Wizard. Select "Next". Specify the installation folder, which the default should be fine, and then select "Next". On the components to install window, make sure the "Direct 3D Support (experimental)" is checked. A warning box pops up to ask if you want "Basic Driect3D Support", make sure you answer "NO". Select "OK" on the next pop up window. Finally, select the "Install" button. After the installation, you will be prompted to reboot Windows. Perform the reboot and reload the XNA Systems session.

    In the Windows system on which you are using XNA, it is important to get Aero working. Right-click on the desktop and select "Personalize". In the window that appears, select a theme from the "Aero Themes". Your desktop should change, and you are now set to start the installation of the .NET Framework 4.

    To do this, from inside Windows (even if it is a virtualized Windows), open a browser and go to Microsoft.com. In the search bar, enter .Net Framework 4 and do a search. Download and install the latest version. Once done, search for "Visual Studio 2010 Express" and install it as well. You need the C# and VB components and, if you want it, the documentation. After Visual Studio is installed, you need to install the Visual Studio 2010 SP1. After the Visual Studio Service Pack is installed, search for "XNA Game Studio 4". Install this application as well. Any errors you may come across can be caused by the previous application not properly installed. The main problem is getting the C# and VB components for Visual Studio.

    NOTE: If you have any problem finding any of the software, use Google.

    Now, to perform a test to verify that an XNA program will work on your system.

    Start Visual Studio 2010 and select "New Project" on the left side of the screen. In the next option, Choose Other Languages and then Visual Basic which drops down and then select "XNA Game Studio 4". On the right side of the window, choose "Windows Game (4.0)". Specify a name at the bottom of the window. Type in "Display Test" and specify a location then select "OK".

    Once the basic IDE starts, choose Debug from the top menu and then move down and select "Start Debugging". A new window should appear which is filled with a sky blue color. If you see this window, you are set. If an error occurs, go back and check each step carefully to verify that you performed each step correctly.

    NOTE: The main step is the "Insert guest Additions CD image..". You may need to go back and do this again. Also be sure the Display settings in the Virtualbox session is set to use 3D Acceleration.

    If you should see an error similar to Figure 1, within Visual Studio, open your Display Test program. To the right-side is a section and the top line is "Solution 'Display Test'". The line under it says "Display Test", this should be right-clicked and then select Properties. In the new window which opens, select the XNA Game Studio tab on the left side of the screen. The right side has two options: "Use Reach.." and "Use HiDef...". Switch the option to "Use Reach..." and then try Debugging the program again to get the light blue window as you should see.

    Figure 1
    Figure 1

    If you have already installed C# and not VB, then you you restart the Visual Studio installation and choose to install new components to Visual Studio. Select VB and let the install complete. After it is done, install the Service Pack (a crucial step). Reinstall XNA and then try the process to perform the Display Test.

    It should be noted that XNA 4.0 is the first XNA to support Visual Basic. XNA is also the last expected release of XNA. Of course, this may change after a new version of the XBOX is released (if ever).

    Further Reading

    Attachments:
Viewing 1 post (of 1 total)