Scripts de Instalação do Lutris

From Ymirheim Wiki
This page is a translated version of the page Lutris Installation Scripts and the translation is 100% complete.

Esta página contém cópias arquivadas dos scripts de instalação do Ymirheim Launcher para Lutris.

Esses scripts podem estar desatualizados. NÃO use esses arquivos a menos que o jogo não seja encontrado na busca do inicializador Lutris por algum motivo. Você pode encontrar a maneira correta de instalar o jogo com o Lutris no artigo principal.

Você pode salvar o conteúdo do script escolhido como um arquivo *.yaml e selecioná-lo no Lutris.

ymirheim_en-US.yaml (English)

name: Ymirheim Launcher
game_slug: ymirheim-launcher
slug: ymirheim-launcher-stable
version: Stable (en-US)
notes: "Ymirheim Launcher installer. For more details, please visit https://ymirheim.org \n\n
        IMPORTANT: This installer requires the 'zenity' package for folder selection. If the window does not open, install it via the terminal (e.g. sudo apt install zenity)."
year: 2010
runner: wine

script:
  # Files that can be downloaded from external source.
  files:
    - launcher: https://ymirheim.org/download

  # Game executable, in this case will be our Launcher.
  game:
    prefix: $GAMEDIR
    exe: drive_c/users/$USER/AppData/Local/YmirheimLauncher/YmirheimLauncher.exe
    arch: win64

  # For initial setup.
  installer:
    # 1. Setup wine prefix.
    - task:
        name: create_prefix
        description: Creating wine prefix for Ymirheim...
        arch: win64
        install_mono: true
        prefix: $GAMEDIR

    # 2. Create the RO2 and Ymirheim folders on drive_c.
    - mkdir: $GAMEDIR/drive_c/RO2
    - mkdir: $GAMEDIR/drive_c/Ymirheim

    # 3. Selecting the game folder and copying the files to the folder with the specified prefix.
    - execute:
        command: |
          SELECTED_PATH=$(LD_LIBRARY_PATH="" zenity --file-selection --directory --title="Select your Game Client folder")
          if [ -z "$SELECTED_PATH" ]; then exit 1; fi
          echo "$SELECTED_PATH" > "$CACHE/selected_game_path.txt"
        description: "Selecting the game folder..."

    - execute:
        command: |
          SRC_PATH=$(cat "$CACHE/selected_game_path.txt")
          if [ -d "$SRC_PATH" ] && [ "$SRC_PATH" != "/" ]; then
            cp -r "$SRC_PATH"/* "$GAMEDIR/drive_c/RO2/"
          else
            echo "Invalid source path"
            exit 1
          fi
        description: "Copying all game files and folders to RO2..."

    # 4. Move the installer to the C: directory.
    - move:
        src: launcher
        dst: $GAMEDIR/drive_c/YmirheimLauncherSetup.exe
        description: "Moving installer to C: directory..."

    # 5. Setup wine dependencies.
    - task:
        name: winetricks
        description: Installing necessary fonts and libraries...
        app: corefonts d3dcompiler_47
        prefix: $GAMEDIR

    # 6. Start the launcher installer.
    - task:
        name: wineexec
        executable: $GAMEDIR/drive_c/YmirheimLauncherSetup.exe
        description: "Installing... IMPORTANT: After the installation is complete, close the launcher to finish the installation on Lutris!"
        prefix: $GAMEDIR

    # 7. Remove the RO2 folder after installation.
    - execute:
        command: rm -rf "$GAMEDIR/drive_c/RO2"
        description: "Cleaning up temporary game files (RO2 folder)..."

    # 8. Finish the wine in the background.
    - task:
        name: winekill
        prefix: $GAMEDIR

  system:
    env:
      DXVK_HUD: 0
    prime: true


ymirheim_pt-BR.yaml (Português)

name: Ymirheim Launcher
game_slug: ymirheim-launcher
slug: ymirheim-launcher-stable
version: Estável (pt-BR)
notes: "Instalador do Ymirheim Launcher. Para mais detalhes, visite https://ymirheim.org \n\n
        IMPORTANTE: Este instalador requer o pacote 'zenity' para seleção de pastas. Se a janela não abrir, instale-o pelo terminal (ex.: sudo apt install zenity)."
year: 2010
runner: wine

script:
  # Arquivos que podem ser baixados de uma fonte externa.
  files:
    - launcher: https://ymirheim.org/download

  # O executável do jogo, neste caso o nosso Launcher.
  game:
    prefix: $GAMEDIR
    exe: drive_c/users/$USER/AppData/Local/YmirheimLauncher/YmirheimLauncher.exe
    arch: win64

  # Para configuração inicial.
  installer:
    # 1. Configura o prefixo do wine.
    - task:
        name: create_prefix
        description: Criando um prefixo do wine para Ymirheim...
        arch: win64
        install_mono: true
        prefix: $GAMEDIR

    # 2. Cria as pastas RO2 e Ymirheim na unidade C:.
    - mkdir: $GAMEDIR/drive_c/RO2
    - mkdir: $GAMEDIR/drive_c/Ymirheim

    # 3. Seleciona a pasta do jogo e copiando os arquivos para a pasta no prefixo especificado.
    - execute:
        command: |
          SELECTED_PATH=$(LD_LIBRARY_PATH="" zenity --file-selection --directory --title="Selecione a pasta do seu cliente de jogo.")
          if [ -z "$SELECTED_PATH" ]; then exit 1; fi
          echo "$SELECTED_PATH" > "$CACHE/selected_game_path.txt"
        description: "Selecionando a pasta do jogo..."

    - execute:
        command: |
          SRC_PATH=$(cat "$CACHE/selected_game_path.txt")
          if [ -d "$SRC_PATH" ] && [ "$SRC_PATH" != "/" ]; then
            cp -r "$SRC_PATH"/* "$GAMEDIR/drive_c/RO2/"
          else
            echo "Caminho de origem inválido"
            exit 1
          fi
        description: "Copiando todos os arquivos e pastas do jogo para o RO2..."

    # 4. Move o instalador para o diretório C:.
    - move:
        src: launcher
        dst: $GAMEDIR/drive_c/YmirheimLauncherSetup.exe
        description: "Movendo o instalador para o diretório C:..."

    # 5. Configurar dependências do Wine.
    - task:
        name: winetricks
        description: Instalando fontes e bibliotecas necessárias...
        app: corefonts d3dcompiler_47
        prefix: $GAMEDIR

    # 6. Inicie o instalador do launcher.
    - task:
        name: wineexec
        executable: $GAMEDIR/drive_c/YmirheimLauncherSetup.exe
        description: "Instalando... IMPORTANTE: Ao termino da instalação, feche o inicializador para concluir a instalação no Lutris!"
        prefix: $GAMEDIR

    # 7. Remova a pasta RO2 após a instalação.
    - execute:
        command: rm -rf "$GAMEDIR/drive_c/RO2"
        description: "Limpando arquivos temporários do jogo..."

    # 8. Finaliza a instância do Wine em segundo plano.
    - task:
        name: winekill
        prefix: $GAMEDIR

  system:
    env:
      DXVK_HUD: 0
    prime: true