| Both sides previous revision Previous revision Next revision | Previous revision |
| systems:bottles [2023/10/08 02:34] – major cleanup part 1 atari | systems:bottles [2024/08/22 07:36] (current) – note about unintegration made more obvious atari |
|---|
| ====== Bottles ====== | ====== Bottles ====== |
| |
| [[https://usebottles.com/|Bottles]] is a virtual application/gaming platform for setting up pre-configured environments to support a large set of Windows applications/games on Linux. Be aware that Bottles is not officially supported by the Batocera developers, and no support can be given if issues are faced while using it. | <WRAP center round important> |
| | The bottles flatpak is not officially integrated. This wiki page's instructions may not work for all situations and Batocera cannot provide support help for it, use at your own discretion. If wanting to play Windows games, [[:systems:windows|WINE]] and [[:systems:steam|Steam]] are available. |
| | </WRAP> |
| | |
| | [[https://usebottles.com/|Bottles]] is a virtual application/gaming platform for setting up pre-configured environments to support a large set of Windows applications/games on Linux. |
| |
| ===== Installation ===== | ===== Installation ===== |
| |
| On the Batocera main menu press ''[Alt]'' + ''[F1]'' on your keyboard, then navigate to **Applications** -> **flatpak-config** (if a warning message appears, just confirm by clicking **OK**). Then, in the searchbar on the top of the screen, search for //Bottles// and install the //Bottles// application by clicking on **Install**: | On the Batocera main menu press ''[F1]'' on your keyboard, then navigate to **Applications** -> **flatpak-config** (if a warning message appears, just confirm by clicking **OK**). Then, in the searchbar on the top of the screen, search for //Bottles// and install the //Bottles// application by clicking on **Install**: |
| |
| [{{:systems:bottles_01.png?400|"Bottles" installation}}] | [{{:systems:bottles_01.png?400|"Bottles" installation}}] |
| |
| Confirm by clicking on **Yes** and wait for the installation process to be finished (click on **Show details** to show the installation progress, which can take a couple of minutes). As soon as the installation process has finished, click on **Close**, then click on **File** -> ''Close Window''. Now, back on the Batocera main screen, update the gamelist. The Bottles application should now be available in the Ports section. If so, you have successfully installed Bottles on your Batocera system! | Confirm by clicking on **Yes** and wait for the installation process to be finished (click on **Show details** to show the installation progress, which can take a couple of minutes). As soon as the installation process has finished, click on **Close**, then click on **File** -> **Close Window**. Now, back on the Batocera main screen, update the gamelist. The Bottles application should now be available in the Ports section. If so, you have successfully installed Bottles on your Batocera system! |
| |
| ===== Preparing the Bottles environment ===== | ===== Preparing the Bottles environment ===== |
| |
| To keep things abstracted it is recommended to create a new gaming system folder ''/userdata/roms/bottles'' which holds all Windows game data source folders you want to play (you could also keep all your Windows games inside the ''/userdata/roms/windows'' folder if you want to keep things together and be able to use Bottles and Batocera's native WINE implementation in parallel for any of your Windows games). To do so launch a [[:access_the_batocera_via_ssh|SSH/Xterm]] session and execute the following command: | To keep things abstracted it is recommended to create a new gaming system folder ''/userdata/roms/bottles'' to hold all the bottle data. To do so launch a [[:access_the_batocera_via_ssh|SSH/Xterm]] session and execute the following command: |
| |
| <code>mkdir -p /userdata/roms/bottles</code> | <code>mkdir -p /userdata/roms/bottles</code> |
| ===== Setting up a game (example) ===== | ===== Setting up a game (example) ===== |
| |
| The following example will cover the game [[https://store.steampowered.com/app/2022910/Twin_Cobra/|Twin Cobra]]: \\ First of all, [[:add_games_bios|copy]] the game's main source data folder to ''/userdata/roms/bottles''. Then start //Bottles// via the Batocera ''Ports'' system section: | The following example will cover the game [[https://store.steampowered.com/app/2022910/Twin_Cobra/|Twin Cobra]]. |
| | |
| | [[:add_games_bios|Copy]] the game's main source data folder to ''/userdata/roms/bottles''. Then start //Bottles// via the Batocera ''Ports'' system section: |
| |
| [{{:systems:bottles_02.png?200|Start "Bottles"}}] | [{{:systems:bottles_02.png?200|Start "Bottles"}}] |
| |
| Navigate through the initial //Welcome to Bottles// screen (don't close it!). Then, on the according last screen, confirm by clicking on the ''Continue'' button and then on ''Start using Bottles'' (the initial setup can take a couple of minutes, this step only has to be done once after a fresh Bottles installation). | Navigate through the initial //Welcome to Bottles// screen (don't close it!). Then, on the last screen, confirm by clicking on the **Continue** button and then on **Start using Bottles** (the initial setup can take a couple of minutes, this step only has to be done once after a fresh Bottles installation). |
| |
| First of all, additionally to the bottle runners already installed by default, you should add the most common and most compatible one(s) as follows: From the //Bottles// main menu click on the "Hamburger" icon: | First of all, additionally to the bottle runners already installed by default, you should add the most common and most compatible one(s) as follows: |
| | |
| | From the //Bottles// main menu click on the "Hamburger" icon: |
| |
| [{{:systems:bottles_03.png?300|"Hamburger" icon}}] | [{{:systems:bottles_03.png?300|"Hamburger" icon}}] |
| |
| It can take a couple of minutes for an additional runner to install, just wait for it to finish installing. | It can take a couple of minutes for an additional runner to install, just wait for it to finish installing. |
| Now close the ''Runners'' window which brings you back to the main //Bottles// menu. | |
| From there, on the left upper corner, create a new bottle by clicking on the ''+'' symbol: | Now close the ''Runners'' window which brings you back to the main //Bottles// menu. |
| | |
| | From there, on the left upper corner, create a new bottle by clicking on the **+** symbol: |
| |
| [{{:systems:bottles_05.png?300|Create a new bottle}}] | [{{:systems:bottles_05.png?300|Create a new bottle}}] |
| |
| In the ''Name'' input field give the bottle a meaningful custom name by inserting the game's name (''TwinCobra'' in this case). For the ''Environment'' section select the ''Gaming'' radio button (which will set up an optimized gaming environment bottle automatically) and then click on ''Create'' (don't worry, you can change the according runner later): | In the //Name// input field give the bottle a meaningful custom name by inserting the game's name ("TwinCobra" in this case). For the //Environment// section select the **Gaming** radio button (which will set up an optimized gaming environment bottle automatically) and then click on **Create** (the runner can be changed later): |
| |
| [{{:systems:bottles_06.png?300|Initial bottle settings}}] | [{{:systems:bottles_06.png?300|Initial bottle settings}}] |
| |
| Wait for the bottle to be set up which can take a couple of minutes. Confirm the success message by clicking on ''Close''. Navigate to ''Bottles'' on the top register card menu. From there you can see all available bottle(s) you have created, in this case the one you have just created: | Wait for the bottle to be set up which can take a couple of minutes. Confirm the success message by clicking on **Close**. Navigate to **Bottles** on the top register card menu. From there you can see all available bottle(s) you have created, in this case the one you have just created: |
| |
| [{{:systems:bottles_07.png?500|Bottle}}] | [{{:systems:bottles_07.png?500|Bottle}}] |
| Click on the bottle, which will open up the bottle's settings menu. From there you can do a lot of stuff to customize the according bottle. We will only cover the most common settings here as every game potentially needs its own settings to run successfully and optimized. First of all let's take on look on how you can change the according bottle runner: | Click on the bottle, which will open up the bottle's settings menu. From there you can do a lot of stuff to customize the according bottle. We will only cover the most common settings here as every game potentially needs its own settings to run successfully and optimized. First of all let's take on look on how you can change the according bottle runner: |
| |
| Click on ''Runner'' and from the appearing dropdown menu select the according //ge-proton// runner you have just installed previously (Sidenote: This is just an example on how to install/change a bottle runner. For the specific game //Twin Cobra// leave the runner on ''soda'' as ''ge-proton'' will currently not work for //Twin Cobra//!): | Click on **Runner** and from the appearing drop-down menu select the according //ge-proton// runner you have just installed previously (Sidenote: This is just an example on how to install/change a bottle runner. For the specific game //Twin Cobra// leave the runner on ''soda'' as ''ge-proton'' will currently not work for //Twin Cobra//!): |
| |
| [{{:systems:bottles_08.png?400|ge-proton runner}}] | [{{:systems:bottles_08.png?400|ge-proton runner}}] |
| |
| Wait for the runner to be changed which can take a couple of seconds. Scroll down to the ''Compatibility'' section and click on ''Working Directory''. From the newly opened window click on ''+ Other Locations'' and navigate to the according game's main folder, then click on ''Open'': | Wait for the runner to be changed which can take a couple of seconds. Scroll down to the //Compatibility// section and click on **Working Directory**. From the newly opened window click on **+ Other Locations** and navigate to the according game's main folder, then click on **Open**: |
| |
| [{{:systems:bottles_09.png?400|Working directory}}] | [{{:systems:bottles_09.png?400|Working directory}}] |
| |
| Now scroll up to the top and on the top left corner click on the back arrow symbol (''Go Back''), which brings you back to the main bottle screen. From there click on ''Add Shortcuts...'', navigate to your game's main folder where the according game's executable file (''<myGame>.exe'') is located, highlight the according game's executable file and click on ''Add'': | Now scroll up to the top and on the top left corner click on the back arrow symbol (**Go Back**), which brings you back to the main bottle screen. From there click on **Add Shortcuts...**, navigate to your game's main folder where the according game's executable file (''<myGame>.exe'') is located, highlight the according game's executable file and click on **Add**: |
| |
| [{{:systems:bottles_10.png?400|Executable (.exe) file}}] | [{{:systems:bottles_10.png?400|Executable (.exe) file}}] |
| Now, for later automation reasons, you have to remember two things: | Now, for later automation reasons, you have to remember two things: |
| * There is the bottle's unique **main name** being shown on top of the main bottle menu screen. | * There is the bottle's unique **main name** being shown on top of the main bottle menu screen. |
| * There is the bottle's unique **executable name** being shown under the ''Programs'' section (This is due to you can have multiple executables per bottle which in theory gives you the possibility to install multiple games within a single bottle, but for abstraction and compatibility/dependency reasons it is strongly recommended to set up an unique bottle per game (you have been warned!).): | * There is the bottle's unique **executable name** being shown under the //Programs// section (This is due to you can have multiple executables per bottle which in theory gives you the possibility to install multiple games within a single bottle, but for abstraction and compatibility/dependency reasons it is strongly recommended to set up an unique bottle per game). |
| |
| [{{:systems:bottles_11.png?400|Bottle's name and game's executable name}}] | [{{:systems:bottles_11.png?400|Bottle's name and game's executable name}}] |
| |
| Keeping the bottle's name and the game's executable name in mind, let's now do the automation part which lets you start the bottle's according executable with just a single click like usually in every other gaming system in Batocera: | Keeping the bottle's name and the game's executable name in mind, let's now do the automation part which lets you start the bottle's according executable with just a single click like usually in every other gaming system in Batocera. |
| |
| Via [[:access_the_batocera_via_ssh|SSH/Xterm]] create an according start script file by executing the following command: | Via [[:access_the_batocera_via_ssh|SSH/Xterm]] create an according start script file by executing the following command: |
| chown -R root:audio /var/run/pulse | chown -R root:audio /var/run/pulse |
| chmod -R g+rwX /var/run/pulse | chmod -R g+rwX /var/run/pulse |
| su - batocera -c "DISPLAY=:0.0 flatpak run --command=bottles-cli com.usebottles.bottles run -b '<myBottleMainName>' -p '<myBottleExecutableName>'" | su - batocera -c "DISPLAY=:0.0 flatpak run --command=bottles-cli com.usebottles.bottles run -b '<myBottleMainName>' -p '<myBottleExecutableName>' --args-replace" |
| </code> | </code> |
| |
| Here's an example for the game ''Twin Cobra'': | Here's an example for the game ''Twin Cobra'': |
| |
| [{{:systems:bottles_12.png|Start script example}}] | [{{:systems:bottles_12.png?1000|Start script example}}] |
| |
| Save the file and quit the editor. Now make the according start script executable by executing the following command (replace ''<myGame>'' with the according game name (avoid spaces if possible)): | Save the file and quit the editor. Now make the according start script executable by executing the following command (replace ''<myGame>'' with the according game name (avoid spaces if possible)): |
| **Optional:** If for the future you want to keep in mind which games are set up by //Bottles//, you can add a ''[Bottles]'' tag to the according games by renaming them via ES as follows: \\ Highlight the according game -> long-press the ''[Enter]'' key on the keyboard -> **EDIT THIS GAME'S METADATA** -> Select **Name** -> Add a ''[Bottles]'' tag to the game's name: | **Optional:** If for the future you want to keep in mind which games are set up by //Bottles//, you can add a ''[Bottles]'' tag to the according games by renaming them via ES as follows: \\ Highlight the according game -> long-press the ''[Enter]'' key on the keyboard -> **EDIT THIS GAME'S METADATA** -> Select **Name** -> Add a ''[Bottles]'' tag to the game's name: |
| |
| [{{:systems:bottles_15.png?400|"[Bottles]" tag}}] | [{{:systems:bottles_15.png?400|"[Bottles]" tag}}] |
| This way the according games will appear with an additional ''[Bottles]'' tag on the ''Ports'' section: | This way the according games will appear with an additional ''[Bottles]'' tag on the ''Ports'' section: |
| | |
| [{{:systems:bottles_16.png?300|"[Bottles]" tag}}] | [{{:systems:bottles_16.png?300|"[Bottles]" tag}}] |
| |
| For changing CPU synchronization settings, open the according bottle and then navigate to: | For changing CPU synchronization settings, open the according bottle and then navigate to: |
| |
| ''Options'' → ''Settings'' → ''Performance'' → ''Synchronization'': | **Options** -> **Settings** -> **Performance** -> **Synchronization**: |
| |
| Changing this setting from ''Esync'' (default) to ''Fsync'' often resolves the problem of games not starting as expected. | Changing this setting from ''Esync'' (default) to ''Fsync'' often resolves the problem of games not starting as expected. |
| ==== Dependencies ==== | ==== Dependencies ==== |
| |
| If you know or you want to try which additional dependencies (e.g. //Microsoft Visual C++ Redistributable// (vcrun), //.NET//, etc.) your game needs to run, you can add/remove those dependencies as follows: \\ | If you know or you want to try which additional dependencies (e.g. //Microsoft Visual C++ Redistributable// (vcrun), //.NET//, etc.) your game needs to run, you can add/remove those dependencies as follows: |
| Open the according bottle and then navigate to: | Open the according bottle and then navigate to: |
| |
| ''Options'' → ''Dependencies'' | **Options** -> **Dependencies** |
| |
| From here you can add/remove any dependencies listed. | From here you can add/remove any dependencies listed. |
| Open the according bottle and then navigate to: | Open the according bottle and then navigate to: |
| |
| ''Tools'' → ''Legacy Wine Tools'' → ''Control panel'' | **Tools** -> **Legacy Wine Tools** -> **Control panel** |
| From there you can check the ''dinput'' and/or ''xinput'' controllers being recognized by //Bottles// (Beware: This option is only available if the according chosen runner for your bottle supports this setting (e.g. //ge-proton//). | |
| | From there check the ''dinput'' and/or ''xinput'' controllers being recognized by //Bottles//. This option is only available if the according chosen runner for your bottle supports this setting (e.g. //ge-proton//). |
| |
| ==== Map hotkeys to quit bottle games ==== | ==== Map hotkeys to quit bottle games ==== |
| ''/userdata/roms/flatpak/Bottles.flatpak.keys'' | ''/userdata/roms/flatpak/Bottles.flatpak.keys'' |
| |
| | ==== Bottle prefix location ==== |
| | |
| | If for whatever reason you need it, you can find the prefix location for your specific bottle here: |
| | |
| | ''/userdata/saves/flatpak/data/.var/app/com.usebottles.bottles/data/bottles/bottles'' |