HOWTO: BlitzMax and Linspire 5.0

Archives Forums/Linux Discussion/HOWTO: BlitzMax and Linspire 5.0

computercoder(Posted 2005) [#1]
========================================
BlitzMAX / Linspire 5.0
Installation Process HOW-TO
========================================

Written By: Daniel K Murphy
(aka computercoder)

Contributors: Craig Kiesau (Sound)
BlitzMax Forums, in general (Pointing out the libraries needed)

Date Written: 08/18/2005
Date Modified: 08/21/2005


Notice - Disclaimer
========================================
Use this document as a guide, and at your own risk. I assume NO
responsibility for any damamges done following these instructions.


General Requirements
========================================
1) Linspire 5.0
(possibly 4.5/4.0 - untested)

2) Click and Run subsription (CNR)
There are different packages available depending on your needs, but the
cheapest one will get you what you need for this installation process.

3) BlitzMAX registered copy :-)


Preparation Instructions
========================================
Here's where the fun begins...

I assume you have already passed all the general requirements, and Linspire
is installed on your PC.

You have TWO options to get these packages:

A) You can simply search for "BlitzMax Required Packages"
under "Aisles" -> "Public Aisles" and the list is there as follows.
Simply click SELECT ALL and then click CNR SELECTED.
This will be all you need to do for getting the required packages!
Skip down to step #6 and proceed with the instructions from there on.

-OR-

B) Do it manually in CNR and find them all yourself:

First, I am going to simply list all the packages you will need for this to
work. Just use the Search in CNR to find them:

1) X11 Development Library
(this one gives 21 libraries, of which only a handful are prolly only
needed - this is the stable release 6.8.1, but actually works fine for
BlitzMAX to operate)

2) xspecs
(this one is optional, but it completes the first one)

3) GNU C
(this will give the gcc 3.3 package)

4) GNU C++
(this will give the g++ 3.3 package and libstdc++ 5-3.3)

5) libsdl1.2-dev
(this provides the sound and mesa gl/glu dev libraries)

6) Open a Konsole window
(Terminal Window, found in the Launch Menu -> Run Programs -> Utilities
-> Terminal Window (Konsole))

7) Type in the following (you can copy and paste it too)

su root [press enter]

(enter your root password, then press enter)

8) Enter the following and wait for the prompt after each enter press:

cd /usr/X11R6/lib [press enter]

ld --whole-archive -shared -o libXxf86vm.so libXxf86vm.a [press enter]

ln -s libXxf86vm.so libXxf86vm.so.1 [press enter]

ldconfig [press enter]

exit [press enter]

exit [press enter]


After installing ALL the packages, it is now time to get sound working!


Sound configuration
========================================
First, I would like to take this time to acknowledge Craig Kiesau for
his time and energy in getting this to work with me. Thanks Craig!

Since Linspire uses JACK (Jack Audio Connection Kit) for the sound server,
we are going to preserve this setting (since Linspire's CNR programs are
designed to use JACK)

Linspire has a plethora of different Sound Servers and as such, sound systems
which by default are available for different programs to access.

BlitzMax uses OSS (but emulated by ALSA), and so we're going to establish a Plugin for the JACK system
which redirects ALSA sound through JACK.

1) Create the file: alsa.conf (Linspire DOES NOT have this file.
I created mine in /home/dan)

2) Use the below to write the file.
(I used Text Editor, but ANY text editing utility will work fine)

pcm.jackplug {
type plug
slave { pcm "jack" }
}

pcm.jack {
type jack
playback_ports {
0 alsa_pcm:playback_1
1 alsa_pcm:playback_2
}
capture_ports {
0 alsa_pcm:capture_1
1 alsa_pcm:capture_2
}
}

pcm.!default {
type plug
slave.pcm "jackplug"
}

3) Open Konsole (Terminal Window)
(Terminal Window, found in the Launch Menu -> Run Programs -> Utilities
-> Terminal Window (Konsole))

su root [press enter]

Supply root password and press enter

4) enter in: (I am assuming that you created the alsa.conf in /home/[username]
(my case /home/dan)... if not use the location where you put it.

cp alsa.conf /etc/alsa.conf

5) Close Konsole (Terminal Window)

6) Open Control Center
(Launch -> Settings -> Control Center)

7) Select Sound Server

8) Change the Sound Buffer down to 1 second
(I believe any of the 1 second settings will do,
I used the last 1 second setting, but did not try the others)

9) Apply changes

10) Close Control Center

Great! Sound is setup, and the required packages are installed.
Let's get BlitzMax installed!


BlitzMAX Setup Installation
========================================
1) Download the latest BlitzMAX Setup (they are appropriately label as such:
Update or Setup)

Make sure you place the ark file somewhere you will be able to locate it
easily later, such as "My Documents" I created a folder called "My
Downloads" and stored it there.

Ark can be a bit of a beast, just do a "Save As" from the "File" menu,
and place it where you want it

2) Locate the Setup file, right click on it, and select "Ark"

3) Select Edit -> "Select All"

4) Select Action -> "Extract"

5) Decide where to put these files and folders. I used the /home/dan
directory, and BlitzMax109 was born

6) Locate and open the BlitzMax109 (Setup) folder

7) Execute BlitzMax by double-clicking the icon.

8) If everything was successful, BlitzMax is loaded with the Help screen up
;)
CONGRATS! But don't play just yet... we STILL have work to do!!!

9) With BlitzMAX running, Locate and select the Menu "Program" -> "Rebuild
All Modules"
Please be patient here. It does take a few minutes or so to recompile
all the modules that make BlitzMAX operate.

10) Hopefully, you reached the "Process Complete" without an error.
(Otherwise, you'll be back in the forums looking for help!!)

11) NOW YOU CAN PLAY!

To the right, you will see "+ Help"

Click the "+" to expand the menu

Click on "Samples"

Select "RockOut"

Select Menu "Program" -> "Build and Run"

If EVERYTHING is well and good, you should see the screen go blank and
the game begins.

CONGRADULATIONS!!! You have successfully setup Linspire to work with
BlitzMAX!!! :-)


BlitzMAX Update Installation
========================================
1) Download the latest BlitzMAX Update (they are appropriately label as
such: Update or Setup)
Make sure you place the ark file somewhere you will be able to locate it
easily later, such as "My Documents" I created a folder called "My
Downloads" and stored it there.

Ark can be a bit of a beast, just do a "Save As" from the "File" menu,
and place it where you want it

2) Locate the Setup file, right click on it, and select "Ark"

3) Select Edit -> "Select All"

4) Select Action -> "Extract"

5) Decide where to put these files and folders. I used the /home/dan
directory, and BlitzMax110 was born

6) Locate and open the BlitzMax110 folder (Or what the Update folder is
currently called)

7) Copy everything in this folder (don't copy the BlitzMax110 (or Update)
folder itself though)

8) Paste the contents OVER the BlitzMax109 (Setup) folder.
You may recieve a message that asks if you'd like to skip copying an
empty folder "/svn", select "Auto-Skip"

In a few moments, this process completes

9) Re-open the BlitzMax109 (Setup) folder, executing "BlitzMax"

10) If you were asked to Syncronize Modules, select "Yes"; otherwise Select
the Menu "Program" -> "Syncronize Modules..."

You will be asked for your Blitz user account name, password, and IF you
have a Proxy in which you must go through, it would be entered here.

11) Patience is a virtue.
In a moment or two (depending upon the speed of your internet
connection, I am cruising along at ~110k/sec), you will see the server being
contacted.
Then a few moments later, files begin to flow down the screen.
Eventually, you will see "Process complete"

12) Once this is complete, select Menu "Program" -> "Build Modules"
Again, be patient.
Hopefully you will get to the "Process Complete" without a hitch :-)

13) NOW YOU CAN PLAY!

To the right, you will see "+ Help"

Click the "+" to expand the menu

Click on "Samples"

Select "RockOut"

Select Menu "Program" -> "Build and Run"

If EVERYTHING is well and good, you should see the screen go blank
and the game begins.

CONGRADULATIONS!!! You have successfully updated BlitzMAX!!! :-)


Issues and Fixes
========================================
From time to time, things seem to go wrong under Linspire.
Sad, but true. Here, I will list known issues with thier resolutions.

1) I did ALL the sound steps, but it still doesn't work?!

Don't panic! There are issues with JACK and ALSA, and for some
reason JACK ALWAYS wins in Linspire 5.0. I found an effective fix for this:

A) Open a Terminal Window (Konsole)
B) killall artsd [press enter]
C) killall jackd [press enter]
D) jackd -d alsa [press enter]
At this point it appears that it hangs up, just close the window

If you got an error about jackd not being able to load b/c the driver is in use,
try it over A) - D)

Try launching any game in BlitzMax and see if the sound works.
You may have to shut down BlitzMax and try again.


BlitzSupport(Posted 2005) [#2]
Nice work, Daniel -- thanks for posting!


computercoder(Posted 2005) [#3]
No problem! Glad to help out in what ever way possible... that's one down... gee there's a LOT more to do!

Is there a place that these could be put? I am planning on creating more of them. Next will be pure Debian, which *should* work for most DEB based systems to install BlitzMax on. I think this is a VERY imperative time to create these while BlitzMax is still young.

I still have a few more things I want to finish with Linspire first. Then I am off to other distros!


BlitzSupport(Posted 2005) [#4]
If you post another Linux distro guide, I guess we could just create a sticky thread in 'Tutorials' and link to the separate threads here.


computercoder(Posted 2005) [#5]
I guess it doesn't much matter... seeing this is a HOWTO for Linux, it could stay here as well? I guess thats up to you! :-)