How to compile UltraStar Deluxe using Delphi
You will only need this tutorial when either no package for your system is available or you want to set up everything so you can easily follow the progress that is made by the developers. So this page documents the whole process how to compile the source from scratch, means we start by obtaining the source and end up with a with not configured but working UltraStar Deluxe.
1. The Tools
If you do not like Delphi, you may try FPC (Free Pascal Compiler) with the Lazarus IDE. See the Lazarus setup for more information.
1.1 Delphi
We recommend you use Turbo Delphi for compiling, which is freely available at:
http://cc.codegear.com/Free/turbodelphiwin
1.2 Tortoise SVN
Grab this SVN tool, this will help to fetch the source later:
http://tortoisesvn.net/downloads
If you don't like SVN then download GNU Tarball and skip to point 3. DLLs and more.
2. Fetch the source
In our code repository we have different versions of the UltraStar Deluxe source.
branch is an archive of older releases (stable)
trunk is the cradle of the upcoming release (can be unstable)
2.1 Create a new folder
Create a new empty folder where you want the source to be fetched to
2.2 SVN Checkout
2.3 Add repository URL
URL of repository: https://ultrastardx.svn.sourceforge.net/svnroot/ultrastardx/trunk/
3. DLLs and more
To execute USDX you'll need some DLLs, and the visualization presets for projectM.
3.1 Additional files
Download this package: usdx_windows_dll_and_projectm_package.zip
- Rename libfreetype-6.dll to freetype6.dll
- Get the latest ffmpeg dlls from http://ffmpeg.arrozcru.org/autobuilds/ (the DLLs are included in the 'shared' package)
- avcodec-52.dll instead of avcodec-51.dll
- avutil-50.dll instead of avutil-49.dll
- avformat-52.dll instead of avformat-50.dll
- swscale-0.dll
- Get lua5.1.dll from http://luabinaries.luaforge.net/download.html
3.2 Extract them
Extract the content (keep folder structure) to the game folder of your working copy (the root directory is ultrastardx here).
The game folder should look like this now:
Plugins in \game\plugins\ → this should have it's own wiki page, with compile stuff
3.3 Add some songs
You may want to add some songs now, create a folder titled “songs” in the game directory and copy the song files to the new directory game\songs.
A fine collection of some UltraStar Deluxe songs can be fetched at:
http://downloads.sourceforge.net/ultrastardx/USDX-SongPackage-01.zip (12,2MB)
4. Compiling
You can either use one of the existing Delphi projects (recommended) or setup USDX for Delphi yourself.
4.1 Use an existing Delphi project
4.1.1 Delphi 7
- Copy
dists\delphi7\ultrastardx.dofof your working copy to yoursrcfolder. - Double-click
src\ultrastardx.dprto open the project in Delphi.
4.1.2 Delphi 2005 / Turbo(2006)
- Copy
dists\delphi2005\ultrastardx.bdsprojof your working copy to yoursrcfolder. - Double-click
src\ultrastardx.bdsprojto open the project in Delphi.
4.2 Create your own Delphi project file
4.2.1 Open UltraStar.dpr
After you have started Delphi, go to the menu and select File → Open… → yourfolder\src\ultrastardx.dpr
4.2.2 Set the project options
Go to the menu and select Project → Options… → Directories/Conditionals → Output directory: and pick the game folder of your working copy directory (see point 2.1).
Now set the search path Directories/Conditionals → Search path: to yourfolder\src\lib\JEDI-SDL\SDL\Pas
If you don't want the .dcu files to be spread all over, just set the Unit output directory to something like → yourfolder\build\delphi-win
4.3 Compiling - press [F9]
You're done with setup, now let's compile it - just press [F9] or select menu → Run → Run.
After a few seconds UltraStar Deluxe will start in full screen mode :)
Happy coding!




