SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Discussion particular to FoFiX, its development, and themes
Forum rules
This topic is 14 years and 10 months old. Instead of replying, please begin a new topic, or search for another related topic that may be more suitable.
not a robot
User avatar
raph666
Administrator
Posts: 2426
Joined: March 9th, 2007
Location: dans la mer du nord
Reputation: 20
Contact:

SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby raph666 » Sat Nov 29, 2008 4:57 pm

This guide will help you setting up your computer in order to always have the latest version available. This tutorial uses the FoFiX SVN (as I personally believe it is a more interesting and active project) but note that these steps can be applied to the FretsOnFire SVN as well with the only difference that, as it is right now, FoFiX uses python 2.4 as opposed to FretsOnFire1.3, running on python 2.5.
You do not need scripts to automatize the installing process, it is a simple procedure that can be useful to learn if you are interested in software development.

*** A little reminder before you start: using the latest source via SVN is a good way to get the latest version of programs BUT, sometimes, latest does NOT mean the most stable version. If you prefer to play only on the "known" most stable version you should stop reading now and get official binaries.

First, setting up the development environment. Even if you're not a developer, using the SVN implies you will be running from the source code. This guide is not meant to replace Rogue_F's tutorial (which is in fact the source of some information found here) but here are however some instructions to get a minimal environment that will run the source. If you're really planning to modify the code yourself for further distribution, I highly suggest you read Rogue_F's more complete guide.

If anything lacks precision, is confusing or is just erroneous please post about it so this guide can be as complete as possible.
See the Frets On Fire required modules (dependencies) section


FoFix is an actively developed project that evolves rapidly,
for a complete, updated and accurate list of the FoFiX dependencies please see the FoFiX Wiki:

RequiredSourceModules
or
RunningUnderPython26




On Windows:
  • You will need to install Python 2.4:
    I suggest you get ActiveState python. You can find all older versions here: http://downloads.activestate.com/Active ... ndows/2.4/
    If you need direct download links:
    for win32: http://downloads.activestate.com/Active ... 32-x86.msi
    for win64: http://downloads.activestate.com/Active ... ywin32.msi

  • Next, install pyVorbis and pyOgg. These modules are not necessary to run the game but without them you will not be able to hear all the songs tracks (probably only song.ogg)
    You can find pyVorbis already compiled here: http://thomas.paviot.free.fr/soya/pyvor ... -py2.4.exe
    And pyOgg, here: http://thomas.paviot.free.fr/soya/pyogg ... -py2.4.exe

  • Next, get a SVN client, all the required modules to run the game are not installed but I will explain further down how to get them:
    I suggest you get TortoiseSVN, it is a very nice and easy to use SVN client. Find it here: http://tortoisesvn.net/downloads

  • Now, use the SVN client to get the latest source. On FoFiX's googlecode source page you can find this line:
    svn checkout http://fofix.googlecode.com/svn/MFH-Mod/trunk/ fofix-read-only

    You do not need the complete line, only the URL ( http://fofix.googlecode.com/svn/MFH-Mod/trunk/ ) is necessary. To use TortoiseSVN. Simply create a new folder (in this example I will call it FoFiX) where you want to install the game. Once it is created, right-click on this folder, TortoiseSVN should have added commands to the contextual menu, select "SVN Checkout...". A window will popup, fill in the blanks as shown in this picture:
    Image
    Clicking on OK will download all the necessary data

    Now that you have the code you will want to run it. Unfortunately, depending of what is already installed on your computer, most chances are you are still missing necessary python's modules but let's try it anyway.

  • Open a 'cmd' window (start menu > run... > type: cmd) and browse to the 'src' folder (if you don't know how to browse in a cmd window I suggest you: 1) google or 2) read this: http://technet.microsoft.com/en-us/libr ... 90880.aspx or 3) use this shortcut: Start menu > run... > cmd /k pushd c:\FoFiX\src\ where c:\FoFiX\src\ should be the path to your src folder)

  • Once you're in the folder, type: python FretsOnFire.py (you can use the TAB button to easily auto-complete the names of files or folders)
    You will get an error message similar to: ImportError: No module named XXXXX where XXXXX is the name of the missing module. Once you have that name, simply google for it. The necessary modules are very easy to find. For a complete list of the required modules (and download links) see the Required modules section (*** Note for Vista users, to install the additional packages correctly you need to execute the setup files with administrators right).
    Once you can run the game, keep it up to date by right-clicking on your FoFiX folder and select "SVN Update..." from the contextual menu.



On Linux:
  • You will need to install Python 2.4:

    Most chances are you already have python installed. If not, python is a common package and is present in many universal repositories. it is easy to get it using a packages manager. During the rest of the tutorial, as I am mostly familiar with ubuntu I will post commands that you can use in Ubuntu 8.10 (but they should be similar, if not the same, to commands you would use in other versions of ubuntu and other distributions as well)
    sudo apt-get install python2.4

  • Next, install pyVorbis and pyOgg. These modules are not necessary to run the game but without them you will not be able to hear all the songs tracks (probably only song.ogg)
    Simply get the python-pyvorbis and python-ogg packages, in terminal:
    sudo apt-get install python-pyvorbis
    sudo apt-get install python-ogg

  • Next, get a SVN client, all the required modules to run the game are not installed but to make the guide shorter I will explain further down how to get them.
    Once again it is very easy, in terminal:
    sudo apt-get install subversion

  • Now, use the SVN client to get the latest source. On FoFiX's googlecode source page you can find this line:
    svn checkout http://fofix.googlecode.com/svn/MFH-Mod/trunk/ fofix-read-only

  • In terminal, browse to where you want to install the game and simply type in the line provided on the googlecode page:

    This will download all the necessary data in a folder called fofix-read-only

    Now that you have the code you will want to run it. Unfortunately, depending of what is already installed on your computer, most chances are you are still missing necessary python's modules but let's try it anyway.

  • In a terminal, browse to FoFiX's src folder and type:
    python FretsOnFire.py
    This will try to run the game, you should get an error similar to: ImportError: No module named XXXXX where XXXXX is the name of the missing module. Once you have that name, you can try to:
    sudo apt-get install XXXXX

    For a complete list of the required modules (and their APT packages names) see the Required modules section.
    Once you can run the game, keep it up to date with the "svn update" (instead of "svn checkout") command.





Frets On Fire Required modules (python 2.4):

Last edited by raph666 on Tue Apr 07, 2009 4:02 pm, edited 13 times in total.
Reason: Post formatting, again
...the pain
User avatar
myfingershurt
Member
Posts: 1796
Joined: April 9th, 2007
Location: Northern Nevada, USA
Reputation: 0

Re: SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby myfingershurt » Sat Nov 29, 2008 5:09 pm

Excellent, thanks for the detailed guide Raph - I will be sure to link to this post (and if you don't mind, can I use the screenshot in the Wiki?).
not a robot
User avatar
raph666
Administrator
Posts: 2426
Joined: March 9th, 2007
Location: dans la mer du nord
Reputation: 20
Contact:

Re: SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby raph666 » Sat Nov 29, 2008 5:19 pm

myfingershurt wrote:and if you don't mind, can I use the screenshot in the Wiki?

Absolutely, I do not think photobucket will mind the bandwidth
Bridged To The Sun.
User avatar
acrox999
Member
Posts: 3597
Joined: March 22nd, 2008
Location: /opt/bin/fretsonfire
Reputation: 1
Contact:

Re: SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby acrox999 » Fri Dec 05, 2008 8:53 pm

This tutorial is great for those who want be an ALPHA tester(s). :2thumbsup: Thanks for guide raph. :2thumbsup:
Shun
Member
Posts: 75
Joined: October 29th, 2008
Reputation: 0

Re: SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby Shun » Fri Dec 05, 2008 9:48 pm

Haha, like someone would use SVN on the original FoF.

Great work, although the page on the Google Code has a listing of all the packages needed for Python and that worked fine for me.

The Run Frets on Fire .bat file that somewhat made is a great help for running the game too.
Bridged To The Sun.
User avatar
acrox999
Member
Posts: 3597
Joined: March 22nd, 2008
Location: /opt/bin/fretsonfire
Reputation: 1
Contact:

Re: SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby acrox999 » Sat Dec 06, 2008 3:19 am

Shun wrote:Haha, like someone would use SVN on the original FoF.

Great work, although the page on the Google Code has a listing of all the packages needed for Python and that worked fine for me.

The Run Frets on Fire .bat file that somewhat made is a great help for running the game too.

He's not talking about original FoF. See his post carefully. This tutorial is for who want to be FoFiX alpha testers. Original FoF didn't provide SVN checkout or like being an alpha tester.
not a robot
User avatar
raph666
Administrator
Posts: 2426
Joined: March 9th, 2007
Location: dans la mer du nord
Reputation: 20
Contact:

Re: SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby raph666 » Sat Dec 06, 2008 7:58 am

acrox999 wrote:
Shun wrote:Haha, like someone would use SVN on the original FoF.

Great work, although the page on the Google Code has a listing of all the packages needed for Python and that worked fine for me.

The Run Frets on Fire .bat file that somewhat made is a great help for running the game too.

He's not talking about original FoF. See his post carefully. This tutorial is for who want to be FoFiX alpha testers. Original FoF didn't provide SVN checkout or like being an alpha tester.

I'm talking about both, original FretsOnFire uses SVN as well, you can checkout using this url: http://fretsonfire.svn.sourceforge.net/ ... fire/trunk
though (like specified in my first post), FretsOnFire 1.3 uses python2.5
Great work, although the page on the Google Code has a listing of all the packages needed for Python and that worked fine for me.

If you read correctly you can see this list is also in the post (with download links).
Haha, like someone would use SVN on the original FoF.

Just because it does not interest you does not mean it cannot be useful, development is slow with original FretsOnFire but there is development. I know I do not bother downloading big binaries when I can get the latest version with a quick svn update. Learning how to use SVN correctly is not only useful for FretsOnFire, it is an efficient tool that any people interested, at least a bit, in programming or software development should know how to use. I understand that binaries are okay for most people but, if they are easy to use, they usually leave you with already outdated version.
Blue Heaven!
User avatar
death_au
Member
Posts: 3991
Joined: December 12th, 2007
Location: Australia
Reputation: 7
Contact:

A tutorial to keep your FoFiX updated from a portable device

Postby death_au » Mon Dec 08, 2008 6:35 am

I decided it would be best to post this here, rather than make a new thread. I hope you don't mind raph.
Recently my laptop's power supply died, and I've been forced to use other people's computers to do my work (and internet time-wasting). After a (short) while I found my FoFiX addiction needed feeding, but I couldn't update to the latest version because my laptop was the only computer set up with the required sources. I always run FoFiX off a portable USB hard drive, but I didn't want to install python and all the required modules on other people's computers just so I could update. So I came up with this: A way to update, compile and run the latest alphas of FoFiX from a portable device.
(A "portable device" includes usb hard drives, iPods, flash dives, etc that generally change drive letter often on different machines. By the way, flash drives are really slow and not reccommended)

Note that this is for people who know what they're doing, and it not really recommended to those new with the alphas
On with the tutorial! (I put it in spoiler tags so people can skip over it without having to scroll past a huge post)

Spoiler:Prerequisites:
Download the Compiling FoFiX utilities from the FoFiX wiki or here: http://www.mediafire.com/download.php?mmz3zjqkohm
Download Universal Extractor: http://legroom.net/software/uniextract
Download the CollabNet Subversion client: http://www.collab.net/downloads/subversion/ (You may need to sign up for an account for this. If anyone knows of another CLI SVN Client that doesn't require other crap to be installed on the host PC, please let me know)
Death_au's FoFiX Portable alpha updater script: http://www.mediafire.com/?mnnxjjhz2kd

Instructions
Use UE to extract the CollabNet Subversion client installer into a seperate folder. Inside that folder you can delete the "$COMMONFILES" and "$PLUGINSDIR" folders, as well as the "[NSIS].nsi" file. Once that's done you can rename and move the folder to somewhere on your portable device you can easily remember. You'll need to know this location later.
You can now delete the folder you extracted the ActivePython installer into.

Use UE to extract the ActivePython installer to a separate folder. Inside that folder there will be two subfolders: System32 and WinRoot. WinRoot has one folder called Python24. Copy the contents of the System32 folder and paste them into the Python24 folder. Then move the Python24 folder to somewhere on your portable device you can easily remember. You'll need to know this location later.
You can now delete the folder you extracted the Subversion client installer into.

Unzip GLEW and copy the file "glew.dll" from the "bin" folder to the "Python24" folder.

Use UE to extract the other installers into separate folders. In each of those folders will be a folder named "PLATLIB". Copy the contents of each of these folders into the "Python24\Lib\site-packages" folder.
Some of the installer folders (PyGame, Numeric, PyOgg) also have a "HEADERS" folder (as well as "PLATLIB"). Inside this folder is another folder called "Include". Copy the contents of this folder to "Python24\include".
The PIL and Py2Exe installer folders also have a "SCRIPTS" folder (as well as "PLATLIB"). Copy the contents of this folder to "Python24\Scripts" (if this folder does not exist, then just create it).
Also, please note: When installing the pyOpenGL package, you will need to go into the "OpenGL" directory (inside the "PLATLIB" directory) and edit the file called "__init__.py" in the following way:

Code: Select all

Replace the line that reads:
__version__ = string.strip(open(filename).read())
with
__version__ = '2.0.2.01'

Once you're done, you can delete the folders where you extracted the installers.

Now that python and your SVN client have been set up on your portable device, you can move on to setting up your FoFiX sources.
Open the Portable alpha updater script ("PortableUpdateRebuildWin.bat") and change the three variables at the top to point to your paths. It is reccommended that these paths are the full paths on your portable device, with the drive letter removed. For example, if your portable device was drive X: and had the following directory structure:

Code: Select all

X:\PortableApps\FoFiX
               \CollabNetSVN
               \Python24

Then you would set the variables as follows:

Code: Select all

set SVN_dir=\PortableApps\CollabNetSVN
set Python_dir=\PortableApps\Python24
set FoFiX_dir=\PortableApps\FoFiX

Now save the script and run it. The first time you run it (if you haven't yet set up an alpha in the directory you specify) it should download all the latest sources and required files. Every time you run it afterwards, it will only update changed files to the latest revision.

Note that the script file can be run from anywhere as long as it is on your portable device.
Also note that this has been tested on Windows XP (SP3) only, Vista compatibility is yet to be determined.


If anyone has any comments or suggestions, let me know :smile:
Last edited by death_au on Sat Dec 13, 2008 8:13 pm, edited 1 time in total.
Bridged To The Sun.
User avatar
acrox999
Member
Posts: 3597
Joined: March 22nd, 2008
Location: /opt/bin/fretsonfire
Reputation: 1
Contact:

Re: SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby acrox999 » Tue Dec 09, 2008 4:11 am

MAN! Why didn't you tell original FOF has it's own SVN too earlier!!!!! I've missed the news.
jrdnxxhero
Member
Posts: 2135
Joined: May 27th, 2008
Reputation: 1

Re: SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby jrdnxxhero » Tue Dec 09, 2008 5:39 pm

Nice guide Raph.
User avatar
MrFaust
Member
Posts: 384
Joined: December 1st, 2007
Location: Dallas
Reputation: 1

Re: SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby MrFaust » Wed Dec 10, 2008 6:33 pm

Thanks for the guide. I did exactly as you said yet for some reason when I run the alpha, it will only play the song.ogg and none of the rest. Any ideas if I missed anything for this to happen?
Blue Heaven!
User avatar
death_au
Member
Posts: 3991
Joined: December 12th, 2007
Location: Australia
Reputation: 7
Contact:

Re: SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby death_au » Wed Dec 10, 2008 6:52 pm

MrFaust wrote:Thanks for the guide. I did exactly as you said yet for some reason when I run the alpha, it will only play the song.ogg and none of the rest. Any ideas if I missed anything for this to happen?

You need pyOgg and pyVorbis as well.
User avatar
MrFaust
Member
Posts: 384
Joined: December 1st, 2007
Location: Dallas
Reputation: 1

Re: SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby MrFaust » Wed Dec 10, 2008 7:22 pm

death_au wrote:
MrFaust wrote:Thanks for the guide. I did exactly as you said yet for some reason when I run the alpha, it will only play the song.ogg and none of the rest. Any ideas if I missed anything for this to happen?

You need pyOgg and pyVorbis as well.


I was missing pyOgg. There was a link for it in this topic, hence I didn't download it. But I did find the link elsewhere in the forum. Thank you for the hint.
not a robot
User avatar
raph666
Administrator
Posts: 2426
Joined: March 9th, 2007
Location: dans la mer du nord
Reputation: 20
Contact:

Re: SVN - A tutorial to keep your FoFiX (or FretsOnFire) updated

Postby raph666 » Fri Dec 12, 2008 10:51 am

acrox999 wrote:MAN! Why didn't you tell original FOF has it's own SVN too earlier!!!!! I've missed the news.

News? Frets On Fire uses SVN since it has been registered on sourceforge: 2006-11-13 15:24.

Concerning pyOgg, there was a link in the first post but I removed it when I added the dependencies list from FoFiX' googlecode's page since it's not in there. I always installed it (information taken from Rogue_F's guide) just in case so I did not know if it really was necessary. If people MUST have it installed for the game to be fully working, maybe it would be a good idea to update FoFiX' page as well. In any case, the first post will be updated.

Return to “FoFiX”

Who is online

Users browsing this forum: No registered users and 24 guests