Installer heretic-ii-windows-cd-setupexe

files:
- patch107w: https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/updates/patch107w.7z
- maps: https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/updates/dm-maps.tar.xz
- wrapper_video: https://freefr.dl.sourceforge.net/project/dxwnd/Latest%20build/v2_05_28_build.rar
- faq: https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/faq.html
- scriptcase: https://github.com/legluondunet/mlls-tools/raw/master/scripts/changecase.sh
- scriptconf: https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/h2defconf.sh
- scriptws: https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/h2ws.sh
- scriptlocal: https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/h2local.sh
- scriptmusic: https://github.com/legluondunet/mlls-tools/raw/master/scripts/audiotools.sh
- wrapper_audio: https://github.com/legluondunet/mlls-tools/raw/master/Magic%20Dsound/dsound.dll
game:
  args: /r:0
  exe: drive_c/dxwnd/dxwnd.exe
  launch_configs:
  - exe: $GAMEDIR/drive_c/Program Files (x86)/Heretic II/faq.html
    name: Heretic II FAQ
  prefix: $GAMEDIR
installer:
- task:
    arch: win64
    description: Preparing Heretic II Windows CD wineprefix...
    install_gecko: false
    install_mono: false
    name: create_prefix
    prefix: $GAMEDIR
- insert-disc:
    requires: Setup/Heretic.ico
- extract:
    dst: $GAMEDIR/drive_c/Program Files (x86)/Heretic II
    src: $DISC/Setup/zip/h2.zip
- extract:
    dst: $GAMEDIR/drive_c/dxwnd
    file: wrapper_video
- write_config:
    data:
      target:
        cdvol0: 64
        codepage0: 0
        commitaddress0: 0
        commitlength0: 0
        coord0: 3
        country0: 0
        dflag0: 0
        dflagb0: 0
        filterid0: 0
        flag0: 673194017
        flagg0: 1207959552
        flagh0: 22
        flagi0: 138412036
        flagj0: 4224
        flagk0: 65536
        flagl0: 0
        flagm0: 65536
        flagn0: 17825796
        flago0: 0
        flagp0: 8192
        flagq0: 0
        icon0: 0000010001002020000001002000B410000016000000280000002000000040000000010020000300000080100000000000000000000000000000000000000000FF0000FF0000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000408000FF000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000D5008080FF400000FF000040CC0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B900000000000000000000000000000000000000FF000000FF000000FF000000FF00000000000000000000000000000000000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000000000000000000000000040FF000000FF0000000000000000000000000000000000000000400000FF000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000FF004000FF0000000000000000000000000000000000000000000000000000000A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009A000000000000000000000000000000000000000000000000000000FF000000FF000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400080FF000000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF00000000000000000000000000000000000000000000000000000000408080FF000000FF00000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F600000000000000000000000000000000000000000000000000000000400080FF000000FF000000000000000000000000000000000000000000000000000000000000002000000041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF0000008400000000000000000000000000000000000000000000000000000000408080FF000000FF0000000000000000000000000000000000000000000000000000000000000004000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000080FF000000FF00000000000000000000000000000000000000000000000000000000008080FF000000FF20008020000000000000000000000000000000000000000000000000000000D1000080FF000000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000008080FF000000FF400080FF000000B000000000000000000000000000000000000000FF008080FF000080FF000080FF000080FF000000FF000000B100000000000000000000000000000040000080FF008080FF000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000BE0000000000000000000000000000000000000000000000000000000000000000000080FF008080FF000000040000000000000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204080FF000080FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF000080FF000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000508080FF000080FF000000280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000408080FF000080FF000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000408080FF000080FF000000290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF000000FF204000E30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF004000FF0040008600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080C0FF000000FF000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF000000000000000000000000000000000000000000000000008080FF80C0C0FF000080FF000080FF000000000000000000000000000000000000000000000000000080FF204000A2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F60000000000000000000000000000000000000000000000000000000000000020000080FF000080FF400000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000A0FF400000FF000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000042008080FF400000FF404000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008080FF000080FF000000FF400080FF400080FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000FF000080FF400080FF400080FF406080FF400080FF000000B000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        initresh0: 600
        initresw0: 800
        initts0: 0
        lang0: 0
        launchpath0: C:\Program Files (x86)\Heretic II\heretic2.exe +set vid_ref glx
          +set vid_mode 3 +set vid_fullscreen 1
        maxddinterface0: 7
        maxfps0: 0
        maxres0: -1
        monitorid0: -1
        path0: C:\Program Files (x86)\Heretic II\heretic2.exe
        posx0: 50
        posy0: 50
        renderer0: 3
        scanline0: 0
        sizx0: 800
        sizy0: 600
        slowratio0: 2
        startfolder0: C:\Program Files (x86)\Heretic II
        swapeffect0: 0
        tflag0: 0
        title0: Heretic II
        ver0: 0
        winver0: 0
    file: $GAMEDIR/drive_c/dxwnd/dxwnd.ini
- extract:
    dst: $GAMEDIR/drive_c/tmp/
    src: maps
- copy:
    dst: $GAMEDIR/drive_c/Program Files (x86)/Heretic II
    src: wrapper_audio
- extract:
    dst: $GAMEDIR/drive_c/tmp/
    src: patch107w
- chmodx: scriptcase
- execute:
    args: '"drive_c/Program Files (x86)/Heretic II" "0"'
    file: scriptcase
- merge:
    dst: $GAMEDIR/drive_c/Program Files (x86)/Heretic II
    src: $GAMEDIR/drive_c/tmp
- chmodx: scriptconf
- execute:
    file: scriptconf
- chmodx: scriptws
- input_menu:
    description: 'Please choose which language you would like to install this game:'
    id: LANG
    options:
    - keep: I prefer to use default install language
    - french: French
    - german: German
    - italian: Italian
    - spanish: Spanish
    preselect: keep
- chmodx: scriptlocal
- execute:
    args: $INPUT_LANG
    file: scriptlocal
- execute:
    args: $RESOLUTION_WIDTH $RESOLUTION_HEIGHT
    file: scriptws
- chmodx: scriptmusic
- execute:
    args: HERETIC "$GAMEDIR/drive_c/Program Files (x86)/Heretic II/music" 2 flac
    file: scriptmusic
- move:
    dst: $GAMEDIR/drive_c/Program Files (x86)/Heretic II
    src: faq
wine:
  overrides:
    dsound: n,b
description: Play "Heretic II" Windows CD edition on Linux!
game_slug: heretic-ii
gogslug: ''
humblestoreid: ''
installer_slug: heretic-ii-windows-cd-setupexe
name: Heretic II
notes: "- ONLY compatible with \"Heretic II\" Windows CD containing \"setup.exe\"\
  \ file\r\n- You will need the H2 CD only one time during installation\r\n- This\
  \ script installer will automagically set the game to your desktop resolution with\
  \ widescreen mode\r\n- Multilingual: you will be able to choose your preferred language\
  \ for menus, subtitles and voices during installation between English (default),\
  \ French, German, Italian and Spanish\r\n- Enhancement Pack v1.07 included\r\n-\
  \ Press \"~\" key to show console\r\n- H2 will crash if you launch directly a new\
  \ game (Read the Faq). Workaround: start the tutorial level first, escape to the\
  \ main menu, start a new game. This bug only occurs if you launch a new game directly,\
  \ not when you load or save a game\r\n- Changing resolution or renderer in game\
  \ graphics options could crash the game\r\n- H2 controller support is insufficient.\
  \ Instead I invite you to use a keymapper like AntimicroX, you will find profiles\
  \ I wrote here:\r\nhttps://github.com/legluondunet/MyLittleLutrisScripts/tree/master/Heretic%20II/gamepad%20profiles"
runner: wine
script:
  files:
  - patch107w: https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/updates/patch107w.7z
  - maps: https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/updates/dm-maps.tar.xz
  - wrapper_video: https://freefr.dl.sourceforge.net/project/dxwnd/Latest%20build/v2_05_28_build.rar
  - faq: https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/faq.html
  - scriptcase: https://github.com/legluondunet/mlls-tools/raw/master/scripts/changecase.sh
  - scriptconf: https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/h2defconf.sh
  - scriptws: https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/h2ws.sh
  - scriptlocal: https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/h2local.sh
  - scriptmusic: https://github.com/legluondunet/mlls-tools/raw/master/scripts/audiotools.sh
  - wrapper_audio: https://github.com/legluondunet/mlls-tools/raw/master/Magic%20Dsound/dsound.dll
  game:
    args: /r:0
    exe: drive_c/dxwnd/dxwnd.exe
    launch_configs:
    - exe: $GAMEDIR/drive_c/Program Files (x86)/Heretic II/faq.html
      name: Heretic II FAQ
    prefix: $GAMEDIR
  installer:
  - task:
      arch: win64
      description: Preparing Heretic II Windows CD wineprefix...
      install_gecko: false
      install_mono: false
      name: create_prefix
      prefix: $GAMEDIR
  - insert-disc:
      requires: Setup/Heretic.ico
  - extract:
      dst: $GAMEDIR/drive_c/Program Files (x86)/Heretic II
      src: $DISC/Setup/zip/h2.zip
  - extract:
      dst: $GAMEDIR/drive_c/dxwnd
      file: wrapper_video
  - write_config:
      data:
        target:
          cdvol0: 64
          codepage0: 0
          commitaddress0: 0
          commitlength0: 0
          coord0: 3
          country0: 0
          dflag0: 0
          dflagb0: 0
          filterid0: 0
          flag0: 673194017
          flagg0: 1207959552
          flagh0: 22
          flagi0: 138412036
          flagj0: 4224
          flagk0: 65536
          flagl0: 0
          flagm0: 65536
          flagn0: 17825796
          flago0: 0
          flagp0: 8192
          flagq0: 0
          icon0: 0000010001002020000001002000B410000016000000280000002000000040000000010020000300000080100000000000000000000000000000000000000000FF0000FF0000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000408000FF000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000D5008080FF400000FF000040CC0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B900000000000000000000000000000000000000FF000000FF000000FF000000FF00000000000000000000000000000000000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000000000000000000000000040FF000000FF0000000000000000000000000000000000000000400000FF000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000FF004000FF0000000000000000000000000000000000000000000000000000000A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009A000000000000000000000000000000000000000000000000000000FF000000FF000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400080FF000000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF00000000000000000000000000000000000000000000000000000000408080FF000000FF00000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F600000000000000000000000000000000000000000000000000000000400080FF000000FF000000000000000000000000000000000000000000000000000000000000002000000041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF0000008400000000000000000000000000000000000000000000000000000000408080FF000000FF0000000000000000000000000000000000000000000000000000000000000004000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000080FF000000FF00000000000000000000000000000000000000000000000000000000008080FF000000FF20008020000000000000000000000000000000000000000000000000000000D1000080FF000000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000008080FF000000FF400080FF000000B000000000000000000000000000000000000000FF008080FF000080FF000080FF000080FF000000FF000000B100000000000000000000000000000040000080FF008080FF000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000BE0000000000000000000000000000000000000000000000000000000000000000000080FF008080FF000000040000000000000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204080FF000080FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF000080FF000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000508080FF000080FF000000280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000408080FF000080FF000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000408080FF000080FF000000290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF000000FF204000E30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF004000FF0040008600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080C0FF000000FF000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF000000000000000000000000000000000000000000000000008080FF80C0C0FF000080FF000080FF000000000000000000000000000000000000000000000000000080FF204000A2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F60000000000000000000000000000000000000000000000000000000000000020000080FF000080FF400000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000A0FF400000FF000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000042008080FF400000FF404000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008080FF000080FF000000FF400080FF400080FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000FF000080FF400080FF400080FF406080FF400080FF000000B000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
          initresh0: 600
          initresw0: 800
          initts0: 0
          lang0: 0
          launchpath0: C:\Program Files (x86)\Heretic II\heretic2.exe +set vid_ref
            glx +set vid_mode 3 +set vid_fullscreen 1
          maxddinterface0: 7
          maxfps0: 0
          maxres0: -1
          monitorid0: -1
          path0: C:\Program Files (x86)\Heretic II\heretic2.exe
          posx0: 50
          posy0: 50
          renderer0: 3
          scanline0: 0
          sizx0: 800
          sizy0: 600
          slowratio0: 2
          startfolder0: C:\Program Files (x86)\Heretic II
          swapeffect0: 0
          tflag0: 0
          title0: Heretic II
          ver0: 0
          winver0: 0
      file: $GAMEDIR/drive_c/dxwnd/dxwnd.ini
  - extract:
      dst: $GAMEDIR/drive_c/tmp/
      src: maps
  - copy:
      dst: $GAMEDIR/drive_c/Program Files (x86)/Heretic II
      src: wrapper_audio
  - extract:
      dst: $GAMEDIR/drive_c/tmp/
      src: patch107w
  - chmodx: scriptcase
  - execute:
      args: '"drive_c/Program Files (x86)/Heretic II" "0"'
      file: scriptcase
  - merge:
      dst: $GAMEDIR/drive_c/Program Files (x86)/Heretic II
      src: $GAMEDIR/drive_c/tmp
  - chmodx: scriptconf
  - execute:
      file: scriptconf
  - chmodx: scriptws
  - input_menu:
      description: 'Please choose which language you would like to install this game:'
      id: LANG
      options:
      - keep: I prefer to use default install language
      - french: French
      - german: German
      - italian: Italian
      - spanish: Spanish
      preselect: keep
  - chmodx: scriptlocal
  - execute:
      args: $INPUT_LANG
      file: scriptlocal
  - execute:
      args: $RESOLUTION_WIDTH $RESOLUTION_HEIGHT
      file: scriptws
  - chmodx: scriptmusic
  - execute:
      args: HERETIC "$GAMEDIR/drive_c/Program Files (x86)/Heretic II/music" 2 flac
      file: scriptmusic
  - move:
      dst: $GAMEDIR/drive_c/Program Files (x86)/Heretic II
      src: faq
  wine:
    overrides:
      dsound: n,b
slug: heretic-ii-windows-cd-setupexe
steamid: null
version: Windows CD setup.exe + DxWnd
year: 1998
{
  "game_slug": "heretic-ii",
  "version": "Windows CD setup.exe + DxWnd",
  "description": "Play \"Heretic II\" Windows CD edition on Linux!",
  "notes": "- ONLY compatible with \"Heretic II\" Windows CD containing \"setup.exe\" file\r\n- You will need the H2 CD only one time during installation\r\n- This script installer will automagically set the game to your desktop resolution with widescreen mode\r\n- Multilingual: you will be able to choose your preferred language for menus, subtitles and voices during installation between English (default), French, German, Italian and Spanish\r\n- Enhancement Pack v1.07 included\r\n- Press \"~\" key to show console\r\n- H2 will crash if you launch directly a new game (Read the Faq). Workaround: start the tutorial level first, escape to the main menu, start a new game. This bug only occurs if you launch a new game directly, not when you load or save a game\r\n- Changing resolution or renderer in game graphics options could crash the game\r\n- H2 controller support is insufficient. Instead I invite you to use a keymapper like AntimicroX, you will find profiles I wrote here:\r\nhttps://github.com/legluondunet/MyLittleLutrisScripts/tree/master/Heretic%20II/gamepad%20profiles",
  "name": "Heretic II",
  "year": 1998,
  "steamid": null,
  "gogslug": "",
  "humblestoreid": "",
  "runner": "wine",
  "slug": "heretic-ii-windows-cd-setupexe",
  "installer_slug": "heretic-ii-windows-cd-setupexe",
  "script": {
    "files": [
      {
        "patch107w": "https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/updates/patch107w.7z"
      },
      {
        "maps": "https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/updates/dm-maps.tar.xz"
      },
      {
        "wrapper_video": "https://freefr.dl.sourceforge.net/project/dxwnd/Latest%20build/v2_05_28_build.rar"
      },
      {
        "faq": "https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/faq.html"
      },
      {
        "scriptcase": "https://github.com/legluondunet/mlls-tools/raw/master/scripts/changecase.sh"
      },
      {
        "scriptconf": "https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/h2defconf.sh"
      },
      {
        "scriptws": "https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/h2ws.sh"
      },
      {
        "scriptlocal": "https://github.com/legluondunet/MyLittleLutrisScripts/raw/master/Heretic%20II/h2local.sh"
      },
      {
        "scriptmusic": "https://github.com/legluondunet/mlls-tools/raw/master/scripts/audiotools.sh"
      },
      {
        "wrapper_audio": "https://github.com/legluondunet/mlls-tools/raw/master/Magic%20Dsound/dsound.dll"
      }
    ],
    "game": {
      "args": "/r:0",
      "exe": "drive_c/dxwnd/dxwnd.exe",
      "launch_configs": [
        {
          "exe": "$GAMEDIR/drive_c/Program Files (x86)/Heretic II/faq.html",
          "name": "Heretic II FAQ"
        }
      ],
      "prefix": "$GAMEDIR"
    },
    "installer": [
      {
        "task": {
          "arch": "win64",
          "description": "Preparing Heretic II Windows CD wineprefix...",
          "install_gecko": false,
          "install_mono": false,
          "name": "create_prefix",
          "prefix": "$GAMEDIR"
        }
      },
      {
        "insert-disc": {
          "requires": "Setup/Heretic.ico"
        }
      },
      {
        "extract": {
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/Heretic II",
          "src": "$DISC/Setup/zip/h2.zip"
        }
      },
      {
        "extract": {
          "dst": "$GAMEDIR/drive_c/dxwnd",
          "file": "wrapper_video"
        }
      },
      {
        "write_config": {
          "data": {
            "target": {
              "cdvol0": 64,
              "codepage0": 0,
              "commitaddress0": 0,
              "commitlength0": 0,
              "coord0": 3,
              "country0": 0,
              "dflag0": 0,
              "dflagb0": 0,
              "filterid0": 0,
              "flag0": 673194017,
              "flagg0": 1207959552,
              "flagh0": 22,
              "flagi0": 138412036,
              "flagj0": 4224,
              "flagk0": 65536,
              "flagl0": 0,
              "flagm0": 65536,
              "flagn0": 17825796,
              "flago0": 0,
              "flagp0": 8192,
              "flagq0": 0,
              "icon0": "0000010001002020000001002000B410000016000000280000002000000040000000010020000300000080100000000000000000000000000000000000000000FF0000FF0000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000408000FF000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000D5008080FF400000FF000040CC0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B900000000000000000000000000000000000000FF000000FF000000FF000000FF00000000000000000000000000000000000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000000000000000000000000040FF000000FF0000000000000000000000000000000000000000400000FF000000640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000FF004000FF0000000000000000000000000000000000000000000000000000000A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009A000000000000000000000000000000000000000000000000000000FF000000FF000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400080FF000000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF00000000000000000000000000000000000000000000000000000000408080FF000000FF00000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F600000000000000000000000000000000000000000000000000000000400080FF000000FF000000000000000000000000000000000000000000000000000000000000002000000041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF0000008400000000000000000000000000000000000000000000000000000000408080FF000000FF0000000000000000000000000000000000000000000000000000000000000004000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000080FF000000FF00000000000000000000000000000000000000000000000000000000008080FF000000FF20008020000000000000000000000000000000000000000000000000000000D1000080FF000000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000008080FF000000FF400080FF000000B000000000000000000000000000000000000000FF008080FF000080FF000080FF000080FF000000FF000000B100000000000000000000000000000040000080FF008080FF000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000BE0000000000000000000000000000000000000000000000000000000000000000000080FF008080FF000000040000000000000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000204080FF000080FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF000080FF000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000508080FF000080FF000000280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000408080FF000080FF000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000408080FF000080FF000000290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF000000FF204000E30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF004000FF0040008600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080C0FF000000FF000000FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FF000000000000000000000000000000000000000000000000008080FF80C0C0FF000080FF000080FF000000000000000000000000000000000000000000000000000080FF204000A2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F60000000000000000000000000000000000000000000000000000000000000020000080FF000080FF400000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000A0FF400000FF000000FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000042008080FF400000FF404000FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008080FF000080FF000000FF400080FF400080FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000FF000080FF400080FF400080FF406080FF400080FF000000B000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
              "initresh0": 600,
              "initresw0": 800,
              "initts0": 0,
              "lang0": 0,
              "launchpath0": "C:\\Program Files (x86)\\Heretic II\\heretic2.exe +set vid_ref glx +set vid_mode 3 +set vid_fullscreen 1",
              "maxddinterface0": 7,
              "maxfps0": 0,
              "maxres0": -1,
              "monitorid0": -1,
              "path0": "C:\\Program Files (x86)\\Heretic II\\heretic2.exe",
              "posx0": 50,
              "posy0": 50,
              "renderer0": 3,
              "scanline0": 0,
              "sizx0": 800,
              "sizy0": 600,
              "slowratio0": 2,
              "startfolder0": "C:\\Program Files (x86)\\Heretic II",
              "swapeffect0": 0,
              "tflag0": 0,
              "title0": "Heretic II",
              "ver0": 0,
              "winver0": 0
            }
          },
          "file": "$GAMEDIR/drive_c/dxwnd/dxwnd.ini"
        }
      },
      {
        "extract": {
          "dst": "$GAMEDIR/drive_c/tmp/",
          "src": "maps"
        }
      },
      {
        "copy": {
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/Heretic II",
          "src": "wrapper_audio"
        }
      },
      {
        "extract": {
          "dst": "$GAMEDIR/drive_c/tmp/",
          "src": "patch107w"
        }
      },
      {
        "chmodx": "scriptcase"
      },
      {
        "execute": {
          "args": "\"drive_c/Program Files (x86)/Heretic II\" \"0\"",
          "file": "scriptcase"
        }
      },
      {
        "merge": {
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/Heretic II",
          "src": "$GAMEDIR/drive_c/tmp"
        }
      },
      {
        "chmodx": "scriptconf"
      },
      {
        "execute": {
          "file": "scriptconf"
        }
      },
      {
        "chmodx": "scriptws"
      },
      {
        "input_menu": {
          "description": "Please choose which language you would like to install this game:",
          "id": "LANG",
          "options": [
            {
              "keep": "I prefer to use default install language"
            },
            {
              "french": "French"
            },
            {
              "german": "German"
            },
            {
              "italian": "Italian"
            },
            {
              "spanish": "Spanish"
            }
          ],
          "preselect": "keep"
        }
      },
      {
        "chmodx": "scriptlocal"
      },
      {
        "execute": {
          "args": "$INPUT_LANG",
          "file": "scriptlocal"
        }
      },
      {
        "execute": {
          "args": "$RESOLUTION_WIDTH $RESOLUTION_HEIGHT",
          "file": "scriptws"
        }
      },
      {
        "chmodx": "scriptmusic"
      },
      {
        "execute": {
          "args": "HERETIC \"$GAMEDIR/drive_c/Program Files (x86)/Heretic II/music\" 2 flac",
          "file": "scriptmusic"
        }
      },
      {
        "move": {
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/Heretic II",
          "src": "faq"
        }
      }
    ],
    "wine": {
      "overrides": {
        "dsound": "n,b"
      }
    }
  }
}
Back to game