Installer opl-manager-v24

files:
- opl_zip:
    filename: OPL_Manager_V24.zip
    url: https://static2.oplmanager.com/releases/OPL_Manager_V24.zip
- dotnet_installer:
    filename: windowsdesktop-runtime-6.0.20-win-x86.exe
    url: https://builds.dotnet.microsoft.com/dotnet/WindowsDesktop/6.0.20/windowsdesktop-runtime-6.0.20-win-x86.exe
- msss_font:
    filename: Microsoft Sans Serif.ttf
    url: https://archive.org/download/macos-monterey-fonts/Microsoft%20Sans%20Serif/Microsoft%20Sans%20Serif.ttf
game:
  arch: win32
  exe: drive_c/Program Files (x86)/OPLManager/OPL_Manager.exe
  prefix: $GAMEDIR
  working_dir: $GAMEDIR/drive_c/Program Files (x86)/OPLManager
installer:
- task:
    arch: win32
    install_gecko: false
    install_mono: false
    name: create_prefix
    prefix: $GAMEDIR
- extract:
    description: Extracting OPL Manager...
    dst: $GAMEDIR/drive_c/Program Files (x86)/OPLManager
    file: opl_zip
    format: zip
- execute:
    command: chmod -R +rw "$GAMEDIR/drive_c/Program Files (x86)/OPLManager"
    description: Setting file permissions...
- task:
    arch: win32
    args: /install /quiet /norestart
    blocking: true
    description: "Installing .NET 6 Desktop Runtime x86 \u2014 this may take several\
      \ minutes..."
    executable: dotnet_installer
    name: wineexec
    prefix: $GAMEDIR
- task:
    name: winekill
    prefix: $GAMEDIR
- copy:
    description: Copying Microsoft Sans Serif font...
    dst: $GAMEDIR
    src: msss_font
- execute:
    command: mv -f "$GAMEDIR/Microsoft Sans Serif.ttf" "$GAMEDIR/drive_c/windows/Fonts/Microsoft
      Sans Serif.ttf"
    description: Installing Microsoft Sans Serif font...
- write_file:
    content: "#!/bin/bash\nINI=\"$GAMEDIR/drive_c/Program Files (x86)/OPLManager/OPLManager.ini\"\
      \nLANG_RAW=$(locale | grep \"^LANG=\" | cut -d= -f2 | tr -d '\"')\nLANG_CODE=$(echo\
      \ \"$LANG_RAW\" | cut -d_ -f1 | cut -d. -f1 | tr '[:upper:]' '[:lower:]')\n\
      COUNTRY=$(echo \"$LANG_RAW\" | cut -d_ -f2 | cut -d. -f1)\ncase \"$LANG_CODE\"\
      \ in\n  en) OPL_LANG=\"en\" ;;\n  ar) OPL_LANG=\"ar\" ;;\n  bg) OPL_LANG=\"\
      bg\" ;;\n  ca) OPL_LANG=\"ca\" ;;\n  cs) OPL_LANG=\"cs\" ;;\n  da) OPL_LANG=\"\
      da\" ;;\n  de) OPL_LANG=\"de\" ;;\n  el) OPL_LANG=\"el\" ;;\n  es) OPL_LANG=\"\
      es\" ;;\n  fa) OPL_LANG=\"fa\" ;;\n  fr) OPL_LANG=\"fr\" ;;\n  he) OPL_LANG=\"\
      he\" ;;\n  hu) OPL_LANG=\"hu\" ;;\n  id) OPL_LANG=\"id\" ;;\n  it) OPL_LANG=\"\
      it\" ;;\n  ja) OPL_LANG=\"ja\" ;;\n  ko) OPL_LANG=\"ko\" ;;\n  nl) OPL_LANG=\"\
      nl\" ;;\n  no) OPL_LANG=\"no\" ;;\n  pl) OPL_LANG=\"pl\" ;;\n  pt) [ \"$COUNTRY\"\
      \ = \"BR\" ] && OPL_LANG=\"pt-BR\" || OPL_LANG=\"pt\" ;;\n  ru) OPL_LANG=\"\
      ru\" ;;\n  sk) OPL_LANG=\"sk\" ;;\n  sv) OPL_LANG=\"sv\" ;;\n  th) OPL_LANG=\"\
      th\" ;;\n  tr) OPL_LANG=\"tr\" ;;\n  uk) OPL_LANG=\"uk\" ;;\n  zh) OPL_LANG=\"\
      zh-CN\" ;;\n  *)  OPL_LANG=\"\" ;;\nesac\nif [ -f \"$INI\" ]; then\n  sed -i\
      \ 's/\\r//g' \"$INI\"\n  sed -i '/^AUTOUPDATE=/d' \"$INI\"\n  [ -n \"$OPL_LANG\"\
      \ ] && sed -i '/^LANGUAGE=/d' \"$INI\"\n  [ -n \"$(tail -c1 \"$INI\")\" ] &&\
      \ printf \"\\n\" >> \"$INI\"\n  printf \"AUTOUPDATE=False\\n\" >> \"$INI\"\n\
      \  [ -n \"$OPL_LANG\" ] && printf \"LANGUAGE=%s\\n\" \"$OPL_LANG\" >> \"$INI\"\
      \n  sed -i 's/$/\\r/' \"$INI\"\nelse\n  [ -n \"$OPL_LANG\" ] && printf \"AUTOUPDATE=False\\\
      r\\nLANGUAGE=%s\\r\\n\" \"$OPL_LANG\" > \"$INI\" \\\n                      ||\
      \ printf \"AUTOUPDATE=False\\r\\n\" > \"$INI\"\nfi\n"
    file: $GAMEDIR/drive_c/Program Files (x86)/OPLManager/configure_ini.sh
- chmodx: $GAMEDIR/drive_c/Program Files (x86)/OPLManager/configure_ini.sh
- execute:
    description: Configuring language and startup options...
    file: $GAMEDIR/drive_c/Program Files (x86)/OPLManager/configure_ini.sh
- execute:
    command: rm -f "$GAMEDIR/drive_c/Program Files (x86)/OPLManager/configure_ini.sh"
    description: Cleaning up...
- write_file:
    content: "@echo off\ncd /d C:\\\n\nif /i \"%1\"==\"/quiet\" goto :do_uninstall\n\
      \necho.\necho  OPL Manager v24 - Uninstaller\necho  ==============================\n\
      echo  This will permanently delete OPL Manager and all its files.\necho  Your\
      \ PS2 game files and game path settings will not be affected.\necho.\nset \"\
      CONFIRM=\"\nset /p CONFIRM=\"Uninstall OPL Manager? Type Y to confirm, N to\
      \ cancel: \"\n\nif /i not \"%CONFIRM%\"==\"Y\" (\n    echo Uninstall cancelled.\n\
      \    pause\n    exit /b 0\n)\n\n:do_uninstall\nreg delete \"HKLM\\Software\\\
      Microsoft\\Windows\\CurrentVersion\\Uninstall\\OPLManager\" /f >nul 2>&1\nreg\
      \ delete \"HKCU\\Software\\Wine\\AppDefaults\\OPL_Manager.exe\" /f >nul 2>&1\n\
      del /f /s /q /a \"C:\\Program Files (x86)\\OPLManager\\*\" >nul 2>&1\ndel /f\
      \ /q \"C:\\Program Files (x86)\\OPLManager\\uninstall.bat\" >nul 2>&1\n\necho\
      \ @echo off > C:\\opl_cleanup.bat\necho cd /d C:\\ >> C:\\opl_cleanup.bat\n\
      echo ping 127.0.0.1 -n 6 ^>nul >> C:\\opl_cleanup.bat\necho rd /s /q \"C:\\\
      Program Files (x86)\\OPLManager\" >> C:\\opl_cleanup.bat\necho del /f /q C:\\\
      opl_cleanup.bat >> C:\\opl_cleanup.bat\n\nstart \"\" cmd /c C:\\opl_cleanup.bat\n\
      \necho.\necho  OPL Manager has been uninstalled successfully.\necho  You can\
      \ close this window.\nexit /b 0\n"
    file: $GAMEDIR/drive_c/Program Files (x86)/OPLManager/uninstall.bat
- task:
    arch: win32
    key: Layers
    name: set_regedit
    path: HKEY_CURRENT_USER\Software\Wine\AppDefaults\OPL_Manager.exe
    prefix: $GAMEDIR
    type: REG_SZ
    value: RUNASADMIN
- write_file:
    content: 'Windows Registry Editor Version 5.00


      [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\OPLManager]

      "DisplayName"="OPL Manager"

      "DisplayVersion"="24.0"

      "Publisher"="OPL Manager Team"

      "InstallLocation"="C:\\Program Files (x86)\\OPLManager"

      "DisplayIcon"="C:\\Program Files (x86)\\OPLManager\\OPL_Manager.exe,0"

      "UninstallString"="cmd.exe /k \"\"C:\\Program Files (x86)\\OPLManager\\uninstall.bat\"\""

      "QuietUninstallString"="cmd.exe /c \"\"C:\\Program Files (x86)\\OPLManager\\uninstall.bat\"\"
      /quiet"

      "ModifyPath"="\"C:\\Program Files (x86)\\OPLManager\\OPL_Manager.exe\""

      "Installed"=dword:00000001

      "NoRepair"=dword:00000001

      '
    file: $GAMEDIR/opl_register.reg
- task:
    arch: win32
    filename: opl_register.reg
    name: set_regedit_file
    prefix: $GAMEDIR
- execute:
    command: rm -f "$GAMEDIR/opl_register.reg"
    description: Cleaning up...
description: Use OPL Manager v24 on Linux! Installer auto-detects system language
  and configures the app ready to use on first launch.
game_slug: opl-manager
gogslug: ''
humblestoreid: ''
installer_slug: opl-manager-v24
name: OPL Manager
notes: "- Requires exactly .NET 6.0.20 Desktop Runtime x86 \u2014 other .NET 6 versions\
  \ will show an error at launch.\r\n- Microsoft Sans Serif font is installed automatically\
  \ \u2014 without it OPL Manager crashes at startup.\r\n- Interface language is set\
  \ automatically from system locale if supported by OPL Manager, otherwise left as\
  \ default\r\n- Auto-update is disabled by default to keep the installation stable\
  \ \u2014 can be re-enabled manually at your own risk.\r\n- Registered as an installed\
  \ application in Wine's Add/Remove Programs with a functional uninstaller that removes\
  \ all files cleanly.\r\n- Can be installed on top of an existing OPL Manager installation\
  \ or any other win32 Wine prefix without issues."
runner: wine
script:
  files:
  - opl_zip:
      filename: OPL_Manager_V24.zip
      url: https://static2.oplmanager.com/releases/OPL_Manager_V24.zip
  - dotnet_installer:
      filename: windowsdesktop-runtime-6.0.20-win-x86.exe
      url: https://builds.dotnet.microsoft.com/dotnet/WindowsDesktop/6.0.20/windowsdesktop-runtime-6.0.20-win-x86.exe
  - msss_font:
      filename: Microsoft Sans Serif.ttf
      url: https://archive.org/download/macos-monterey-fonts/Microsoft%20Sans%20Serif/Microsoft%20Sans%20Serif.ttf
  game:
    arch: win32
    exe: drive_c/Program Files (x86)/OPLManager/OPL_Manager.exe
    prefix: $GAMEDIR
    working_dir: $GAMEDIR/drive_c/Program Files (x86)/OPLManager
  installer:
  - task:
      arch: win32
      install_gecko: false
      install_mono: false
      name: create_prefix
      prefix: $GAMEDIR
  - extract:
      description: Extracting OPL Manager...
      dst: $GAMEDIR/drive_c/Program Files (x86)/OPLManager
      file: opl_zip
      format: zip
  - execute:
      command: chmod -R +rw "$GAMEDIR/drive_c/Program Files (x86)/OPLManager"
      description: Setting file permissions...
  - task:
      arch: win32
      args: /install /quiet /norestart
      blocking: true
      description: "Installing .NET 6 Desktop Runtime x86 \u2014 this may take several\
        \ minutes..."
      executable: dotnet_installer
      name: wineexec
      prefix: $GAMEDIR
  - task:
      name: winekill
      prefix: $GAMEDIR
  - copy:
      description: Copying Microsoft Sans Serif font...
      dst: $GAMEDIR
      src: msss_font
  - execute:
      command: mv -f "$GAMEDIR/Microsoft Sans Serif.ttf" "$GAMEDIR/drive_c/windows/Fonts/Microsoft
        Sans Serif.ttf"
      description: Installing Microsoft Sans Serif font...
  - write_file:
      content: "#!/bin/bash\nINI=\"$GAMEDIR/drive_c/Program Files (x86)/OPLManager/OPLManager.ini\"\
        \nLANG_RAW=$(locale | grep \"^LANG=\" | cut -d= -f2 | tr -d '\"')\nLANG_CODE=$(echo\
        \ \"$LANG_RAW\" | cut -d_ -f1 | cut -d. -f1 | tr '[:upper:]' '[:lower:]')\n\
        COUNTRY=$(echo \"$LANG_RAW\" | cut -d_ -f2 | cut -d. -f1)\ncase \"$LANG_CODE\"\
        \ in\n  en) OPL_LANG=\"en\" ;;\n  ar) OPL_LANG=\"ar\" ;;\n  bg) OPL_LANG=\"\
        bg\" ;;\n  ca) OPL_LANG=\"ca\" ;;\n  cs) OPL_LANG=\"cs\" ;;\n  da) OPL_LANG=\"\
        da\" ;;\n  de) OPL_LANG=\"de\" ;;\n  el) OPL_LANG=\"el\" ;;\n  es) OPL_LANG=\"\
        es\" ;;\n  fa) OPL_LANG=\"fa\" ;;\n  fr) OPL_LANG=\"fr\" ;;\n  he) OPL_LANG=\"\
        he\" ;;\n  hu) OPL_LANG=\"hu\" ;;\n  id) OPL_LANG=\"id\" ;;\n  it) OPL_LANG=\"\
        it\" ;;\n  ja) OPL_LANG=\"ja\" ;;\n  ko) OPL_LANG=\"ko\" ;;\n  nl) OPL_LANG=\"\
        nl\" ;;\n  no) OPL_LANG=\"no\" ;;\n  pl) OPL_LANG=\"pl\" ;;\n  pt) [ \"$COUNTRY\"\
        \ = \"BR\" ] && OPL_LANG=\"pt-BR\" || OPL_LANG=\"pt\" ;;\n  ru) OPL_LANG=\"\
        ru\" ;;\n  sk) OPL_LANG=\"sk\" ;;\n  sv) OPL_LANG=\"sv\" ;;\n  th) OPL_LANG=\"\
        th\" ;;\n  tr) OPL_LANG=\"tr\" ;;\n  uk) OPL_LANG=\"uk\" ;;\n  zh) OPL_LANG=\"\
        zh-CN\" ;;\n  *)  OPL_LANG=\"\" ;;\nesac\nif [ -f \"$INI\" ]; then\n  sed\
        \ -i 's/\\r//g' \"$INI\"\n  sed -i '/^AUTOUPDATE=/d' \"$INI\"\n  [ -n \"$OPL_LANG\"\
        \ ] && sed -i '/^LANGUAGE=/d' \"$INI\"\n  [ -n \"$(tail -c1 \"$INI\")\" ]\
        \ && printf \"\\n\" >> \"$INI\"\n  printf \"AUTOUPDATE=False\\n\" >> \"$INI\"\
        \n  [ -n \"$OPL_LANG\" ] && printf \"LANGUAGE=%s\\n\" \"$OPL_LANG\" >> \"\
        $INI\"\n  sed -i 's/$/\\r/' \"$INI\"\nelse\n  [ -n \"$OPL_LANG\" ] && printf\
        \ \"AUTOUPDATE=False\\r\\nLANGUAGE=%s\\r\\n\" \"$OPL_LANG\" > \"$INI\" \\\n\
        \                      || printf \"AUTOUPDATE=False\\r\\n\" > \"$INI\"\nfi\n"
      file: $GAMEDIR/drive_c/Program Files (x86)/OPLManager/configure_ini.sh
  - chmodx: $GAMEDIR/drive_c/Program Files (x86)/OPLManager/configure_ini.sh
  - execute:
      description: Configuring language and startup options...
      file: $GAMEDIR/drive_c/Program Files (x86)/OPLManager/configure_ini.sh
  - execute:
      command: rm -f "$GAMEDIR/drive_c/Program Files (x86)/OPLManager/configure_ini.sh"
      description: Cleaning up...
  - write_file:
      content: "@echo off\ncd /d C:\\\n\nif /i \"%1\"==\"/quiet\" goto :do_uninstall\n\
        \necho.\necho  OPL Manager v24 - Uninstaller\necho  ==============================\n\
        echo  This will permanently delete OPL Manager and all its files.\necho  Your\
        \ PS2 game files and game path settings will not be affected.\necho.\nset\
        \ \"CONFIRM=\"\nset /p CONFIRM=\"Uninstall OPL Manager? Type Y to confirm,\
        \ N to cancel: \"\n\nif /i not \"%CONFIRM%\"==\"Y\" (\n    echo Uninstall\
        \ cancelled.\n    pause\n    exit /b 0\n)\n\n:do_uninstall\nreg delete \"\
        HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OPLManager\"\
        \ /f >nul 2>&1\nreg delete \"HKCU\\Software\\Wine\\AppDefaults\\OPL_Manager.exe\"\
        \ /f >nul 2>&1\ndel /f /s /q /a \"C:\\Program Files (x86)\\OPLManager\\*\"\
        \ >nul 2>&1\ndel /f /q \"C:\\Program Files (x86)\\OPLManager\\uninstall.bat\"\
        \ >nul 2>&1\n\necho @echo off > C:\\opl_cleanup.bat\necho cd /d C:\\ >> C:\\\
        opl_cleanup.bat\necho ping 127.0.0.1 -n 6 ^>nul >> C:\\opl_cleanup.bat\necho\
        \ rd /s /q \"C:\\Program Files (x86)\\OPLManager\" >> C:\\opl_cleanup.bat\n\
        echo del /f /q C:\\opl_cleanup.bat >> C:\\opl_cleanup.bat\n\nstart \"\" cmd\
        \ /c C:\\opl_cleanup.bat\n\necho.\necho  OPL Manager has been uninstalled\
        \ successfully.\necho  You can close this window.\nexit /b 0\n"
      file: $GAMEDIR/drive_c/Program Files (x86)/OPLManager/uninstall.bat
  - task:
      arch: win32
      key: Layers
      name: set_regedit
      path: HKEY_CURRENT_USER\Software\Wine\AppDefaults\OPL_Manager.exe
      prefix: $GAMEDIR
      type: REG_SZ
      value: RUNASADMIN
  - write_file:
      content: 'Windows Registry Editor Version 5.00


        [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\OPLManager]

        "DisplayName"="OPL Manager"

        "DisplayVersion"="24.0"

        "Publisher"="OPL Manager Team"

        "InstallLocation"="C:\\Program Files (x86)\\OPLManager"

        "DisplayIcon"="C:\\Program Files (x86)\\OPLManager\\OPL_Manager.exe,0"

        "UninstallString"="cmd.exe /k \"\"C:\\Program Files (x86)\\OPLManager\\uninstall.bat\"\""

        "QuietUninstallString"="cmd.exe /c \"\"C:\\Program Files (x86)\\OPLManager\\uninstall.bat\"\"
        /quiet"

        "ModifyPath"="\"C:\\Program Files (x86)\\OPLManager\\OPL_Manager.exe\""

        "Installed"=dword:00000001

        "NoRepair"=dword:00000001

        '
      file: $GAMEDIR/opl_register.reg
  - task:
      arch: win32
      filename: opl_register.reg
      name: set_regedit_file
      prefix: $GAMEDIR
  - execute:
      command: rm -f "$GAMEDIR/opl_register.reg"
      description: Cleaning up...
slug: opl-manager-v24
steamid: null
version: v24
year: 2014
{
  "game_slug": "opl-manager",
  "version": "v24",
  "description": "Use OPL Manager v24 on Linux! Installer auto-detects system language and configures the app ready to use on first launch.",
  "notes": "- Requires exactly .NET 6.0.20 Desktop Runtime x86 \u2014 other .NET 6 versions will show an error at launch.\r\n- Microsoft Sans Serif font is installed automatically \u2014 without it OPL Manager crashes at startup.\r\n- Interface language is set automatically from system locale if supported by OPL Manager, otherwise left as default\r\n- Auto-update is disabled by default to keep the installation stable \u2014 can be re-enabled manually at your own risk.\r\n- Registered as an installed application in Wine's Add/Remove Programs with a functional uninstaller that removes all files cleanly.\r\n- Can be installed on top of an existing OPL Manager installation or any other win32 Wine prefix without issues.",
  "name": "OPL Manager",
  "year": 2014,
  "steamid": null,
  "gogslug": "",
  "humblestoreid": "",
  "runner": "wine",
  "slug": "opl-manager-v24",
  "installer_slug": "opl-manager-v24",
  "script": {
    "files": [
      {
        "opl_zip": {
          "filename": "OPL_Manager_V24.zip",
          "url": "https://static2.oplmanager.com/releases/OPL_Manager_V24.zip"
        }
      },
      {
        "dotnet_installer": {
          "filename": "windowsdesktop-runtime-6.0.20-win-x86.exe",
          "url": "https://builds.dotnet.microsoft.com/dotnet/WindowsDesktop/6.0.20/windowsdesktop-runtime-6.0.20-win-x86.exe"
        }
      },
      {
        "msss_font": {
          "filename": "Microsoft Sans Serif.ttf",
          "url": "https://archive.org/download/macos-monterey-fonts/Microsoft%20Sans%20Serif/Microsoft%20Sans%20Serif.ttf"
        }
      }
    ],
    "game": {
      "arch": "win32",
      "exe": "drive_c/Program Files (x86)/OPLManager/OPL_Manager.exe",
      "prefix": "$GAMEDIR",
      "working_dir": "$GAMEDIR/drive_c/Program Files (x86)/OPLManager"
    },
    "installer": [
      {
        "task": {
          "arch": "win32",
          "install_gecko": false,
          "install_mono": false,
          "name": "create_prefix",
          "prefix": "$GAMEDIR"
        }
      },
      {
        "extract": {
          "description": "Extracting OPL Manager...",
          "dst": "$GAMEDIR/drive_c/Program Files (x86)/OPLManager",
          "file": "opl_zip",
          "format": "zip"
        }
      },
      {
        "execute": {
          "command": "chmod -R +rw \"$GAMEDIR/drive_c/Program Files (x86)/OPLManager\"",
          "description": "Setting file permissions..."
        }
      },
      {
        "task": {
          "arch": "win32",
          "args": "/install /quiet /norestart",
          "blocking": true,
          "description": "Installing .NET 6 Desktop Runtime x86 \u2014 this may take several minutes...",
          "executable": "dotnet_installer",
          "name": "wineexec",
          "prefix": "$GAMEDIR"
        }
      },
      {
        "task": {
          "name": "winekill",
          "prefix": "$GAMEDIR"
        }
      },
      {
        "copy": {
          "description": "Copying Microsoft Sans Serif font...",
          "dst": "$GAMEDIR",
          "src": "msss_font"
        }
      },
      {
        "execute": {
          "command": "mv -f \"$GAMEDIR/Microsoft Sans Serif.ttf\" \"$GAMEDIR/drive_c/windows/Fonts/Microsoft Sans Serif.ttf\"",
          "description": "Installing Microsoft Sans Serif font..."
        }
      },
      {
        "write_file": {
          "content": "#!/bin/bash\nINI=\"$GAMEDIR/drive_c/Program Files (x86)/OPLManager/OPLManager.ini\"\nLANG_RAW=$(locale | grep \"^LANG=\" | cut -d= -f2 | tr -d '\"')\nLANG_CODE=$(echo \"$LANG_RAW\" | cut -d_ -f1 | cut -d. -f1 | tr '[:upper:]' '[:lower:]')\nCOUNTRY=$(echo \"$LANG_RAW\" | cut -d_ -f2 | cut -d. -f1)\ncase \"$LANG_CODE\" in\n  en) OPL_LANG=\"en\" ;;\n  ar) OPL_LANG=\"ar\" ;;\n  bg) OPL_LANG=\"bg\" ;;\n  ca) OPL_LANG=\"ca\" ;;\n  cs) OPL_LANG=\"cs\" ;;\n  da) OPL_LANG=\"da\" ;;\n  de) OPL_LANG=\"de\" ;;\n  el) OPL_LANG=\"el\" ;;\n  es) OPL_LANG=\"es\" ;;\n  fa) OPL_LANG=\"fa\" ;;\n  fr) OPL_LANG=\"fr\" ;;\n  he) OPL_LANG=\"he\" ;;\n  hu) OPL_LANG=\"hu\" ;;\n  id) OPL_LANG=\"id\" ;;\n  it) OPL_LANG=\"it\" ;;\n  ja) OPL_LANG=\"ja\" ;;\n  ko) OPL_LANG=\"ko\" ;;\n  nl) OPL_LANG=\"nl\" ;;\n  no) OPL_LANG=\"no\" ;;\n  pl) OPL_LANG=\"pl\" ;;\n  pt) [ \"$COUNTRY\" = \"BR\" ] && OPL_LANG=\"pt-BR\" || OPL_LANG=\"pt\" ;;\n  ru) OPL_LANG=\"ru\" ;;\n  sk) OPL_LANG=\"sk\" ;;\n  sv) OPL_LANG=\"sv\" ;;\n  th) OPL_LANG=\"th\" ;;\n  tr) OPL_LANG=\"tr\" ;;\n  uk) OPL_LANG=\"uk\" ;;\n  zh) OPL_LANG=\"zh-CN\" ;;\n  *)  OPL_LANG=\"\" ;;\nesac\nif [ -f \"$INI\" ]; then\n  sed -i 's/\\r//g' \"$INI\"\n  sed -i '/^AUTOUPDATE=/d' \"$INI\"\n  [ -n \"$OPL_LANG\" ] && sed -i '/^LANGUAGE=/d' \"$INI\"\n  [ -n \"$(tail -c1 \"$INI\")\" ] && printf \"\\n\" >> \"$INI\"\n  printf \"AUTOUPDATE=False\\n\" >> \"$INI\"\n  [ -n \"$OPL_LANG\" ] && printf \"LANGUAGE=%s\\n\" \"$OPL_LANG\" >> \"$INI\"\n  sed -i 's/$/\\r/' \"$INI\"\nelse\n  [ -n \"$OPL_LANG\" ] && printf \"AUTOUPDATE=False\\r\\nLANGUAGE=%s\\r\\n\" \"$OPL_LANG\" > \"$INI\" \\\n                      || printf \"AUTOUPDATE=False\\r\\n\" > \"$INI\"\nfi\n",
          "file": "$GAMEDIR/drive_c/Program Files (x86)/OPLManager/configure_ini.sh"
        }
      },
      {
        "chmodx": "$GAMEDIR/drive_c/Program Files (x86)/OPLManager/configure_ini.sh"
      },
      {
        "execute": {
          "description": "Configuring language and startup options...",
          "file": "$GAMEDIR/drive_c/Program Files (x86)/OPLManager/configure_ini.sh"
        }
      },
      {
        "execute": {
          "command": "rm -f \"$GAMEDIR/drive_c/Program Files (x86)/OPLManager/configure_ini.sh\"",
          "description": "Cleaning up..."
        }
      },
      {
        "write_file": {
          "content": "@echo off\ncd /d C:\\\n\nif /i \"%1\"==\"/quiet\" goto :do_uninstall\n\necho.\necho  OPL Manager v24 - Uninstaller\necho  ==============================\necho  This will permanently delete OPL Manager and all its files.\necho  Your PS2 game files and game path settings will not be affected.\necho.\nset \"CONFIRM=\"\nset /p CONFIRM=\"Uninstall OPL Manager? Type Y to confirm, N to cancel: \"\n\nif /i not \"%CONFIRM%\"==\"Y\" (\n    echo Uninstall cancelled.\n    pause\n    exit /b 0\n)\n\n:do_uninstall\nreg delete \"HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OPLManager\" /f >nul 2>&1\nreg delete \"HKCU\\Software\\Wine\\AppDefaults\\OPL_Manager.exe\" /f >nul 2>&1\ndel /f /s /q /a \"C:\\Program Files (x86)\\OPLManager\\*\" >nul 2>&1\ndel /f /q \"C:\\Program Files (x86)\\OPLManager\\uninstall.bat\" >nul 2>&1\n\necho @echo off > C:\\opl_cleanup.bat\necho cd /d C:\\ >> C:\\opl_cleanup.bat\necho ping 127.0.0.1 -n 6 ^>nul >> C:\\opl_cleanup.bat\necho rd /s /q \"C:\\Program Files (x86)\\OPLManager\" >> C:\\opl_cleanup.bat\necho del /f /q C:\\opl_cleanup.bat >> C:\\opl_cleanup.bat\n\nstart \"\" cmd /c C:\\opl_cleanup.bat\n\necho.\necho  OPL Manager has been uninstalled successfully.\necho  You can close this window.\nexit /b 0\n",
          "file": "$GAMEDIR/drive_c/Program Files (x86)/OPLManager/uninstall.bat"
        }
      },
      {
        "task": {
          "arch": "win32",
          "key": "Layers",
          "name": "set_regedit",
          "path": "HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\OPL_Manager.exe",
          "prefix": "$GAMEDIR",
          "type": "REG_SZ",
          "value": "RUNASADMIN"
        }
      },
      {
        "write_file": {
          "content": "Windows Registry Editor Version 5.00\n\n[HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OPLManager]\n\"DisplayName\"=\"OPL Manager\"\n\"DisplayVersion\"=\"24.0\"\n\"Publisher\"=\"OPL Manager Team\"\n\"InstallLocation\"=\"C:\\\\Program Files (x86)\\\\OPLManager\"\n\"DisplayIcon\"=\"C:\\\\Program Files (x86)\\\\OPLManager\\\\OPL_Manager.exe,0\"\n\"UninstallString\"=\"cmd.exe /k \\\"\\\"C:\\\\Program Files (x86)\\\\OPLManager\\\\uninstall.bat\\\"\\\"\"\n\"QuietUninstallString\"=\"cmd.exe /c \\\"\\\"C:\\\\Program Files (x86)\\\\OPLManager\\\\uninstall.bat\\\"\\\" /quiet\"\n\"ModifyPath\"=\"\\\"C:\\\\Program Files (x86)\\\\OPLManager\\\\OPL_Manager.exe\\\"\"\n\"Installed\"=dword:00000001\n\"NoRepair\"=dword:00000001\n",
          "file": "$GAMEDIR/opl_register.reg"
        }
      },
      {
        "task": {
          "arch": "win32",
          "filename": "opl_register.reg",
          "name": "set_regedit_file",
          "prefix": "$GAMEDIR"
        }
      },
      {
        "execute": {
          "command": "rm -f \"$GAMEDIR/opl_register.reg\"",
          "description": "Cleaning up..."
        }
      }
    ]
  }
}
Back to game