Repository: bottlesdevs/Bottles

Issue #1335: [Request]: Allow manually adding the same program multiple times
Created: 2022-04-17T20:04:15Z
Tell us the problem or your need
It's possible to manually add programs but every executable is only added once. It might be beneficial to be able to add the same executable multiple times to expose different functionality through launch options.

In the upcoming Library view every game can have its own entry.

My main thought here is that most game launchers allow setting launch options which directly start a game or take you to the correct landing page.
This could also be handy to expose every single game of a launcher to other programs with bottles-cli or as a .desktop file.


Another side effect is that this will allow different feature sets of a program through launch options or scripts.

I don't have a particular example here but I can imagine this being useful to sometimes start a game in VR mode, on a special display or with a specific resolution - as long the program exposes functionality with launch options.
Same adheres for pre-run and post-run scripts.




Example of three different programs pointing to the same executable:

Also have a look at the yaml config below.

Describe the solution you'd like
It seems it's currently not working because the value in the yaml file is set to the executable name. It's already possible to do this by adding the configuration manually to the yaml file. So I guess this will need a change to an unique ID of some sort.
Changing this will also have an impact to the command line interface where it's currently possible to call a program in a bottle by the executable name which would be ambiguous then (bottles-cli run -e EXECUTABLE). Current workaround is to call bottles-cli run -p PROGRAM instead.

Example of the yaml configuration from the screenshot above:
[…]
External_Programs:
    Bejeweled 3:
        arguments: origin://launchgame/71715
        executable: Origin.exe
        name: Bejeweled 3
        path: Z:\mnt\games\launcher\origin\Origin.exe
    Origin.exe:
        arguments: ''
        executable: Origin.exe
        name: Origin
        path: Z:\mnt\games\launcher\origin\Origin.exe
    Peggle Deluxe:
        arguments: origin://launchgame/1007718,1020191,1023599,1025152
        executable: Origin.exe
        name: Peggle Deluxe
        path: Z:\mnt\games\launcher\origin\Origin.exe
[…]

Other solutions?

It's entirely possible to set this up manually as shown above - it's just not very convenient.
For some launchers it's possible to add the game executables which then starts the launcher but…

…some are picky, less convenient or loose core functionality with this method (Battle.Net)
…for some it's not possible because there is no separate executable for each title (Maniaplanet)


GameHub has a similar feature called "Custom Emulators" which is basically the same but not very well documented.

Additional context and references
No response

Duplicate issue #1337: [Bug]:when adding game to programs,it gets overwritten.
Created: 2022-04-18T04:47:24Z
Describe the bug
I play some rpg maker games,the files generally have the name Game.exe
There are some small issues when adding more than 1 game to programs,once i add it,the current game who has the name Game.exe ,gets overwritten by the new Game.exe that i add (most specifically,the name stays the same,however the path is changed to the new game.exe),renaming these in-app does not help.
This should not occur as they are different games and have different file paths.
Expected behaviour: The new game.exe should be added to programs,and it should not overwrite the old game.exe
To Reproduce
1- Open bottles.
2-Click on the plus sign to add a game
3-add executables with the same name and different paths.
Package
AUR ("bottles" package)
Distribution
Artix Linux
Health Check
Display:
    X.org: true
    X.org (port): :0
    Wayland: false
Graphics:
    vendors:
        amd:
            vendor: amd
            envs:
                DRI_PRIME: '1'
            icd: /usr/share/vulkan/icd.d/radeon_icd.x86_64.json:/usr/share/vulkan/icd.d/radeon_icd.i686.json
    prime:
        integrated: null
        discrete: null
Kernel:
    Type: Linux
    Version: 5.17.2-xanmod1-1
Distro:
    Name: Artix Linux
    Version: '20220409'
Tools:
    cabextract: true
    p7zip: true
    patool: true
    glibc_min: '2.35'
Bottles_envs: null
Display Protocol
X11
Display Backend used by Bottles
X11
Additional context
No response

Closing comment (2022-04-18T05:44:02Z): Thanks fo reporting.
Duplicate of #1335