Freepascal 3.0.0 or newer is required to compile UltraStar Deluxe. If you had some older version of fpc installed before, make sure to remove everything of it correctly before trying to install freepascal (otherwise compiling will fail with various weird error messages). Also, using the 3.0-development branch with current fixes is suggested. If you want to help the project by coding patches, we suggest you to use the Lazarus 1.6 or newer integrated development environment. For linking and running the game, the following libraries are also required:
- SDL2, SDL2_image
- ffmpeg 2.8 or older
- sqlite
- bass
- some fonts like DejaVu
- portaudio
- lua 5.1 or 5.2 or 5.3
- opencv if you want webcam support
- projectM if you want audio visualisation support
- Start Lazarus.
- Choose Project → Open Project … in the menu bar. A file-dialog box will show.
- Change to the src subdirectory of your USDX working copy (e.g. ultrastardx/src).
- If you are running Windows, open the ultrastardx-win.lpi project-file (Preferably use the win32 verison of lazarus, as the included libraries are 32 bit).
- On Unix-like systems use the ultrastardx-unix.lpi file.
- Now you can compile USDX by choosing the menu entry Run → Build or pressing Ctrl+F9.
- If you want to compile and/or start USDX directly choose Run → Run or press F9.
Required libraries:
- Debian/Ubuntu:
git automake make gcc fpc libsdl2-image-dev libavformat-dev libswscale-dev libsqlite3-dev libfreetype6-dev portaudio19-dev libportmidi-dev liblua5.3-dev libopencv-videoio-dev fonts-dejavu
- Fedora:
git automake make gcc fpc SDL2_image-devel ffmpeg-devel sqlite-devel freetype-devel portaudio-devel portmidi-devel lua-devel opencv-devel
- Archlinux: see the dependencies in the ultrastardx-git AUR package
Optional libraries:
- ProjectM visualization:
g++ libprojectm-dev
(Debian/Ubuntu) orgcc-c++ libprojectM-devel
(Fedora) - Webcam:
g++ libopencv-dev
(Debian/Ubuntu)
- Install Homebrew. Follow instructions from brew.sh
brew install fpc
or get it from freepascal.orgxcode-select --install
brew install sdl2 sdl2_image automake portaudio binutils sqlite freetype lua libtiff pkg-config ffmpeg
- Install MSYS2
- Install FPC. You need at least a custom installation with the Free Pascal Utils (for
fpcres
) and the Units. pacman -S autoconf-wrapper automake-wrapper gcc git make mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_gfx mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-SDL2_net mingw-w64-x86_64-SDL2_ttf mingw-w64-x86_64-ffmpeg mingw-w64-x86_64-lua51 pkgconf
- Add some information to
.bash_profile
:- Path to FPC, something like
PATH="${PATH}:/c/FPC/3.2.2/bin/i386-win32"
- Path to mingw64 libraries,
PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/mingw64/lib/pkgconfig"
- Path to FPC, something like
git clone https://github.com/UltraStar-Deluxe/USDX
cd USDX
./autogen.sh
./configure
(see optional flags below)make
(on MacOS:make macosx-standalone-app
)./game/ultrastardx[.exe]
(on MacOS:open UltraStarDeluxe.app
)
--with-portaudio
: This is the default.--without-portaudio
: Use SDL audio input instead. This should support newer platforms like PulseAudio and PipeWire. Might not be able to detect the number of channels correctly when used with PulseAudio. Might fix issues experienced when using PortAudio on certain distributions.--without-opencv-cxx-api
: This is the default. OpenCV does not need to be present at build time. It will look for it at runtime using a deprecated C API, and enable webcam functionality if found. Current Linux distributions do not offer the C API.--with-opencv-cxx-api
: Use OpenCV's newer C++ API. Required for webcam support under Linux, but requires OpenCV to be present at both build time as well as runtime.
- The manifest for our Flathub releases is in a different repository:
git clone --recurse-submodules https://github.com/flathub/eu.usdx.UltraStarDeluxe manifest-dir
- The Flatpak manifest uses the org.freedesktop.Platform 23.08 runtime, which is available for the major architectures on the Flathub remote. If it isn't available for your architecture, you can lower the version in the manifest. Below 23.08 you might want to add your own build of FFmpeg and dav1d for better file format support. For some architectures the runtime is not hosted by Flathub but can be downloaded from the Freedesktop SDK remote.
- If you change the manifest to use a USDX source tree from your hard disk, the build has to be done outside of that tree since flatpak-builder will try to copy the whole source tree into the build directory. Also note that flatpak-builder will create a hidden directory
.flatpak-builder
in the directory it was called in where downloads and build results are cached. - Assuming you can use the Flathub remote and you didn't already add it to your flatpak configuration, you can do it with
flatpak remote-add --user flathub https://flathub.org/repo/flathub.flatpakrepo
- Then building and installing the USDX flatpak is just a matter of
flatpak-builder --user --install-deps-from=flathub --install build manifest-dir/eu.usdx.UltraStarDeluxe.yaml
- The
.flatpak-builder
andbuild
directories can be removed afterwards. - Songs must be placed in
~/.var/app/eu.usdx.UltraStarDeluxe/.ultrastardx/songs
The CI does this for you, but if you need to do it manually:
- Create Windows portable version: zip the contents of the
game
directory - Create Windows installer:
- Install NSIS (also install the Graphics and Language components during setup)
- Copy the DLLs from
game
toinstaller/dependencies/dll
C:\...\makensis "installer/UltraStar Deluxe.nsi"
(this will take a while)- The .exe will be placed in
installer/dist