Here’s a Bash script to install and manage BMS with a system-independent WINE runner and prefix. Rather simple, but enough to please my laziness.
Supports Falcon 4.0 from the Falcon Collection on GOG.
It creates some subfolders to contain specific elements for managing a BMS installation and has a looping menu so you won’t have to restart it after every step.
Code:
#! /bin/bash
######
# Version 20230211
######
##
# Variables
##
bms_ver=4.37
bms_storage="$PWD/z_downloader_installer"
bms_installfolder="$PWD/BMS_$bms_ver"
wine_runner="$PWD/0_wine_runner"
#wine_runner="/usr"
export WINEPREFIX="$PWD/0_wine_prefix"
#
loop=yes
#
##
# Functions
##
function pause(){
read -p "$*"
}
#
function checkdirectories(){
if [ ! -h "$bms_storage" ]; then
mkdir "$bms_storage"
echo "CREATED: $bms_storage";
fi
if [ ! -h "$wine_runner" ]; then
mkdir "$wine_runner"
echo "CREATED: $wine_runner";
fi
if [ ! -h "BMS_$bms_installfolder" ]; then
mkdir "BMS_$bms_installfolder"
echo "CREATED: BMS_$bms_installfolder";
fi
}
#
function menu(){
if [ $1 == "main" ]; then
clear
echo "Falcon BMS $bms_ver WINE launcher"
echo " "
echo "Wine binary folder: $wine_runner "
echo "Wine prefix: $WINEPREFIX "
echo "BMS install folder: $bms_installfolder "
echo " "
echo "1) Falcon BMS $bms_ver"
echo "2) Falcon BMS $bms_ver Launcher"
echo "3) Falcon BMS $bms_ver Alternate Launcher "
echo " "
echo "4) Install or update Falcon BMS "
echo " "
echo "5) Manage WINE prefix "
echo " "
echo "6) Exit "
echo " "
echo "Choice [1-6]:"
echo " "
# Read choice
read case;
# Choices
case $case in
1) "$wine_runner/bin/wine" "$bms_installfolder/Bin/x64/Falcon BMS.exe"; loop=yes; break
;;
2) "$wine_runner/bin/wine" "$bms_installfolder/Launcher.exe"; loop=yes; break
;;
3) "$wine_runner/bin/wine" "$bms_installfolder/Launcher/FalconBMS_Alternative_Launcher.exe"; loop=yes; break
;;
4) menu "install"
;;
5) menu "wine"
;;
6) break
clear
exit
esac
fi
if [ $1 == "install" ]; then
clear
echo "Falcon BMS installation options "
echo " "
echo "1) Falcon 4.0 GOG Installer "
echo "2) Falcon BMS Downloader "
echo "3) Falcon BMS $bms_ver Installer "
echo "4) Update Falcon BMS $bms_ver "
echo " "
echo "5) Return to main menu"
echo " "
echo "Choice [1-5]:"
echo " "
read case;
case $case in
1) "$wine_runner/bin/wine" "$bms_storage/setup_falcon_4_2.0.0.1.exe"; "$wine_runner/bin/wine" "$PWD/Falcon 4.0/falcon4.exe"; loop=yes; break
;;
2) "$wine_runner/bin/wine" "$bms_storage/Falcon_BMS_Downloader.exe"; loop=yes; break
;;
3) "$wine_runner/bin/wine" "$bms_storage/Falcon BMS_${bms_ver}_Full_Setup.exe"; loop=yes; break
;;
4) "$wine_runner/bin/wine" "$bms_installfolder/Updater.exe"; loop=yes; break
;;
5) menu "main"
;;
esac
fi
if [ $1 == "wine" ]; then
clear
echo "WINE prefix management "
echo " "
echo "1) WINE Configuration "
echo "2) WINE Registry Editor "
echo "3) WINE Control Panel "
echo "4) WINE Uninstaller "
echo "5) Winetricks "
echo " "
echo "6) Return to main menu"
echo " "
echo "Choice [1-6]:"
echo " "
read case;
case $case in
1) "$wine_runner/bin/wine" winecfg; loop=yes; break
;;
2) "$wine_runner/bin/wine" regedit; loop=yes; break
;;
3) "$wine_runner/bin/wine" control; loop=yes; break
;;
4) "$wine_runner/bin/wine" uninstaller.exe; loop=yes; break
;;
5) winetricks; loop=yes; break
;;
6) menu "main"
;;
esac
fi
}
##
# Programs
##
checkdirectories
#
while [ "$loop" = yes ]; do
loop=no
menu "main"
done
Usage:
-
Save the above code in a text file named “z_BMS_Manager.sh” (or any other name) and make sure to make the script executable.
-
Move the script to your intended BMS container folder (e.g. “Falcon_BMS/z_BMS_Manager.sh”) and run it to have it create all required folders.
-
Download a WINE build from the “Releases” page of the “Wine-builds” Github repository. Pick any “-amd64” package.
Unpack the downloaded archive, then move the “bin”, “lib” and “share” folders into “Falcon_BMS/0_wine_runner”. -
Download the BMS Downloader from the main website and the Falcon 4 installer from GOG.
Move both exe files into the “Falcon_BMS/z_downloader_installer” folder. -
Install Falcon 4 from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
The installation target should be the “Falcon 4.0” folder in the same folder as the install script (e.g. “Falcon_BMS/Falcon 4.0”).
If you stuck to the “Falcon 4.0” folder name, Falcon 4 will be started after the installation. Once it is at the main menu, exit F4. -
Run the Falcon BMS Downloader from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
The download target for the installer should be “Falcon_BMS/z_downloader_installer”. -
Install Falcon BMS from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
The installation target for BMS should be the “Falcon_BMS/BMS_[version number]” folder. -
Run the BMS Updater from the corresponding menu option in the script’s “Install or update Falcon BMS” submenu.
-
Launch BMS directly or with the standard or alternative launcher.
If you successfully ran all of the installers, chances are high that BMS will also run.
The script’s main menu will loop until you pick the “Exit” option, terminate it with CTRL+C or close the terminal window.
Notes:
With this script, you theoretically have a completely portable BMS installation, as long as you make sure that the WINE drive letter of the partition that contains “Falcon_BMS” remains constant across computers.
You can also have multiple BMS releases exist side by side if you make a copy of the script, change the value of $bms_ver before installing any past or future BMS release and use the copied script to manage that BMS installation.
Without any long-term experience (e.g. campaign), I found that I did not need any extra WINE configuration steps to run Falcon BMS and get into 3D.
However, I’ve installed DXVK with winetricks (which must be installed at system-level) to make sure that Direct3D calls are piped to Vulkan instead of OpenGL (faster!).
Disclaimer:
The script could have bugs or other deficiencies and I take no responsibilitiy if it does unintended things to everything and anything.
Feel free to modify it to your liking though.
Changelog:
2023/02/11 - Moved BMS installation options and WINE management options into submenus, added option to launch BMS’ exe directly