Code Monkey home page Code Monkey logo

Comments (3)

strycore avatar strycore commented on June 22, 2024

I think you may be a bit confused by how scripts works and in turn I'm a bit confused with your request and I think you're just looking for #4118

from lutris.

kasha695 avatar kasha695 commented on June 22, 2024

Apologies, I think I can supply a better example of what I was thinking:

Take Theme Hospital for example, this is the script for the Gog + DOSBOX version

custom-name: Theme Hospital - GOG - DOSBox
files:
- gogsetup: N/A:Please select the GOG.com Windows installer
game:
  config_file: $GAMEDIR/dosbox_conf/dosboxTH.conf
  main_file: $GAMEDIR/dosbox_conf/dosboxTH_single.conf
installer:
- extract:
    dst: $GAMEDIR
    file: gogsetup
    format: gog
- merge:
    dst: $GAMEDIR/dosbox_conf
    src: $GAMEDIR/__support/app
- input_menu:
    description: 'Choose the game''s language:'
    id: LANG
    options:
    - GER: German
    - ENG: English
    - FR: French
    - ITA: Italian
    - SW: Swedish
    - SPA: Spanish
    preselect: ENG
- execute:
    command: cd "$GAMEDIR"; sed -i "s/LANGUAGE=.*/LANGUAGE=$INPUT_LANG/g" HOSPITAL.CFG;

Lutris asks where you want to install the game to and in turn this sets the Directory:

Screenshot_20240224_100759

For my local yml files I don't need to tell the user to point to the setup file for Theme Hospital as I know where it already is on my NAS, so my yml looks like this:

custom-name: Theme Hospital - GOG - DOSBox
game:
  config_file: /mnt/games/themehospital/dosbox_conf/dosboxTH.conf
  main_file: /mnt/games/themehospital/dosbox_conf/dosboxTH_single.conf
installer:
- extract:
    dst: /mnt/games/themehospital
    file: /mnt/backupgames/Games/Theme Hospital/Install Files/setup_theme_hospital_v3_(28027).exe
    format: gog
- merge:
    dst: /mnt/games/themehospital/dosbox_conf
    src: /mnt/games/themehospital/__support/app
- input_menu:
    description: 'Choose the game''s language:'
    id: LANG
    options:
    - GER: German
    - ENG: English
    - FR: French
    - ITA: Italian
    - SW: Swedish
    - SPA: Spanish
    preselect: ENG
- execute:
    command: cd "/mnt/games/themehospital"; sed -i "s/LANGUAGE=.*/LANGUAGE=$INPUT_LANG/g" HOSPITAL.CFG;

This installs the game fine but it never sets the Directory as Lutris never asks where to install the game to, I currently use my bash script to ask the user where they want it installed and fill in the yml with those locations. I can't use $GAMEDIR either in this scenario as Lutris sets that when it asks where to install but as it doesn't, $GAMEDIR remains blank.

I guess I'm asking if it's possible to have someway for Lutris to set the Directory in my scenario, whether it's through something in the yml or if Lutris could detect if $GAMEDIR is being used in the script and if it is to ask where the user wants to install to, that way $GAMEDIR gets set and I can use that and in turn that would set the Directory.

Again, apologies for my attempt at explaining first time, hopefully this is clearer! And a huge thank you to all the work you've done for the Linux experience!

from lutris.

strycore avatar strycore commented on June 22, 2024

After the 2nd explanation, I'm really sure what you need is #4118

This is the issue related to moving existing games around on different machines and different storage drives. We have no plans to make use of the YAML installer scripts for that feature, your games will be archived somewhere and you can get them back anywhere.

from lutris.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.