[
  {
    "path": "README.md",
    "content": "# WinApps for Linux\n\nRun Windows apps such as Microsoft Office/Adobe in Linux (Ubuntu/Fedora) and GNOME/KDE as if they were a part of the native OS, including Nautilus integration for right clicking on files of specific mime types to open them.\n\n<img src=\"demo/demo.gif\" width=1000>\n\n***Proud to have made the top spot on [r/linux](https://www.reddit.com/r/linux) on launch day.***\n\n## How it works\nWinApps was created as an easy, one command way to include apps running inside a VM (or on any RDP server) directly into GNOME as if they were native applications. WinApps works by:\n- Running a Windows RDP server in a background VM container\n- Checking the RDP server for installed applications such as Microsoft Office\n- If those programs are installed, it creates shortcuts leveraging FreeRDP for both the CLI and the GNOME tray\n- Files in your home directory are accessible via the `\\\\tsclient\\home` mount inside the VM\n- You can right click on any files in your home directory to open with an application, too\n\n## Currently supported applications\n### WinApps supports ***ANY*** installed application on your system.\n\nIt does this by:\n1. Scanning your system for offically configured applications (below)\n2. Scanning your system for any other EXE files with install records in the Windows Registry\n\nAny officially configured applications will have support for high-resolution icons and mime types for automatically detecting what files can be opened by each application. Any other detected executable files will leverage the icons pulled from the EXE.\n\nNote: The officially configured application list below is fueled by the community, and therefore some apps may be untested by the WinApps team.\n\n<table cellpadding=\"10\" cellspacing=\"0\" border=\"0\">\n  <tr>\n    <td><img src=\"apps/acrobat-x-pro/icon.svg\" width=\"100\"></td><td>Adobe Acrobat Pro<br>(X)</td>\n    <td><img src=\"apps/acrobat-reader-dc/icon.svg\" width=\"100\"></td><td>Adobe Acrobat Reader<br>(DC)</td>\n  </tr>\n  <tr>\n    <td><img src=\"apps/aftereffects-cc/icon.svg\" width=\"100\"></td><td>Adobe After Effects<br>(CC)</td>\n    <td><img src=\"apps/audition-cc/icon.svg\" width=\"100\"></td><td>Adobe Audition<br>(CC)</td>\n  </tr>\n  <tr>\n    <td><img src=\"apps/bridge-cs6/icon.svg\" width=\"100\"></td><td>Adobe Bridge<br>(CS6, CC)</td>\n    <td><img src=\"apps/adobe-cc/icon.svg\" width=\"100\"></td><td>Adobe Creative Cloud<br>(CC)</td>\n  </tr>\n  <tr>\n    <td><img src=\"apps/illustrator-cc/icon.svg\" width=\"100\"></td><td>Adobe Illustrator<br>(CC)</td>\n    <td><img src=\"apps/indesign-cc/icon.svg\" width=\"100\"></td><td>Adobe InDesign<br>(CC)</td>\n  </tr>\n  <tr>\n    <td><img src=\"apps/lightroom-cc/icon.svg\" width=\"100\"></td><td>Adobe Lightroom<br>(CC)</td>\n    <td><img src=\"apps/photoshop-cc/icon.svg\" width=\"100\"></td><td>Adobe Photoshop<br>(CS6, CC)</td>\n  </tr>\n  <tr>\n    <td><img src=\"apps/premiere-pro-cc/icon.svg\" width=\"100\"></td><td>Adobe Premiere Pro<br>(CC)</td>\n    <td><img src=\"apps/cmd/icon.svg\" width=\"100\"></td><td>Command Prompt<br>(cmd.exe)</td>\n  </tr>\n  <tr>\n    <td><img src=\"apps/explorer/icon.svg\" width=\"100\"></td><td>Explorer<br>(File Manager)</td>\n    <td><img src=\"apps/iexplorer/icon.svg\" width=\"100\"></td><td>Internet Explorer<br>(11)</td>\n  </tr>\n  <tr>\n    <td><img src=\"apps/access/icon.svg\" width=\"100\"></td><td>Microsoft Access<br>(2016, 2019, o365)</td>\n    <td><img src=\"apps/excel/icon.svg\" width=\"100\"></td><td>Microsoft Excel<br>(2016, 2019, o365)</td>\n  </tr>\n  <tr>\n    <td><img src=\"apps/word/icon.svg\" width=\"100\"></td><td>Microsoft Word<br>(2016, 2019, o365)</td>\n    <td><img src=\"apps/onenote/icon.svg\" width=\"100\"></td><td>Microsoft OneNote<br>(2016, 2019, o365)</td>\n  </tr>\n  <tr>\n    <td><img src=\"apps/outlook/icon.svg\" width=\"100\"></td><td>Microsoft Outlook<br>(2016, 2019, o365)</td>\n    <td><img src=\"apps/powerpoint/icon.svg\" width=\"100\"></td><td>Microsoft PowerPoint<br>(2016, 2019, o365)</td>\n  </tr>\n  <tr>\n    <td><img src=\"apps/project/icon.svg\" width=\"100\"></td><td>Microsoft Project<br>(2016, 2019, o365)</td>\n    <td><img src=\"apps/publisher/icon.svg\" width=\"100\"></td><td>Microsoft Publisher<br>(2016, 2019, o365)</td>\n  </tr>\n  <tr>\n    <td><img src=\"apps/powershell/icon.svg\" width=\"100\"></td><td>Powershell<br>(Standard, Core)</td>\n    <td><img src=\"apps/vs-enterprise-2019/icon.svg\" width=\"100\"></td><td>Visual Studio<br>(2019 - Ent|Pro|Com)</td>\n  </tr>\n  <tr>\n    <td><img src=\"icons/windows.svg\" width=\"100\"></td><td>Windows<br>(Full RDP session)</td>\n    <td>&nbsp;</td><td>&nbsp;</td>\n  </tr>\n</table>\n\n## Documentation\n\nLatest documentation available at: [https://nowsci.com/winapps/](https://nowsci.com/winapps/)\n\n"
  },
  {
    "path": "apps/access/info",
    "content": "# GNOME shortcut name\nNAME=\"Access\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Access\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\root\\Office16\\MSACCESS.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/x-msaccess;\"\n"
  },
  {
    "path": "apps/access-o365/info",
    "content": "# GNOME shortcut name\nNAME=\"Access\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Access\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\Office16\\MSACCESS.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/x-msaccess;\"\n"
  },
  {
    "path": "apps/access-o365-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Access\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Access\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\Office16\\MSACCESS.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/x-msaccess;\"\n"
  },
  {
    "path": "apps/access-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Access\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Access\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\MSACCESS.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/x-msaccess;\"\n"
  },
  {
    "path": "apps/acrobat-reader-dc/info",
    "content": "# GNOME shortcut name\nNAME=\"Acrobat Reader DC\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Acrobat Reader DC\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Adobe\\Acrobat Reader DC\\Reader\\AcroRd32.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Documents\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/pdf;\"\n"
  },
  {
    "path": "apps/acrobat-x-pro/info",
    "content": "# GNOME shortcut name\nNAME=\"Acrobat X Pro\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Acrobat X Pro\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Adobe\\Acrobat 10.0\\Acrobat\\Acrobat.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Documents\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/pdf;\"\n"
  },
  {
    "path": "apps/adobe-cc/info",
    "content": "# GNOME shortcut name\nNAME=\"Creative Cloud\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe Creative Cloud\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Adobe\\Adobe Creative Cloud\\ACC\\Creative Cloud.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"\"\n"
  },
  {
    "path": "apps/aftereffects-cc/info",
    "content": "# GNOME shortcut name\nNAME=\"After Effects CC\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe After Effects CC\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Adobe\\Adobe After Effects 2020\\Support Files\\AfterFX.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.adobe.aftereffects.project;application/vnd.adobe.aftereffects.template;\"\n"
  },
  {
    "path": "apps/audition-cc/info",
    "content": "# GNOME shortcut name\nNAME=\"Audition CC\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe Audition CC\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Adobe\\Adobe Audition 2020\\Adobe Audition.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"\"\n"
  },
  {
    "path": "apps/bridge-cc/info",
    "content": "# GNOME shortcut name\nNAME=\"Bridge CS6\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe Bridge CS6\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Adobe\\Adobe Bridge CS6 (64 Bit)\\Bridge.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"image/vnd.adobe.photoshop;\"\n"
  },
  {
    "path": "apps/bridge-cs6/info",
    "content": "# GNOME shortcut name\nNAME=\"Bridge CS6\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe Bridge CS6\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Adobe\\Adobe Bridge 2020\\Bridge.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"image/vnd.adobe.photoshop;\"\n"
  },
  {
    "path": "apps/bridge-cs6-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Bridge CS6\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe Bridge CS6\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Adobe\\Adobe Bridge CS6\\Bridge.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"image/vnd.adobe.photoshop;\"\n"
  },
  {
    "path": "apps/cmd/info",
    "content": "# GNOME shortcut name\nNAME=\"Cmd\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Command Prompt\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Windows\\System32\\cmd.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Windows\"\n\n# GNOME mimetypes\nMIME_TYPES=\"\"\n"
  },
  {
    "path": "apps/excel/info",
    "content": "# GNOME shortcut name\nNAME=\"Excel\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Excel\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\Office16\\EXCEL.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.sheet.macroEnabled.12;application/vnd.ms-excel.template.macroEnabled.12;application/vnd.ms-excel.addin.macroEnabled.12;application/vnd.ms-excel.sheet.binary.macroEnabled.12;\"\n"
  },
  {
    "path": "apps/excel-o365/info",
    "content": "# GNOME shortcut name\nNAME=\"Excel\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Excel\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\root\\Office16\\EXCEL.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.sheet.macroEnabled.12;application/vnd.ms-excel.template.macroEnabled.12;application/vnd.ms-excel.addin.macroEnabled.12;application/vnd.ms-excel.sheet.binary.macroEnabled.12;\"\n"
  },
  {
    "path": "apps/excel-o365-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Excel\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Excel\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\EXCEL.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.sheet.macroEnabled.12;application/vnd.ms-excel.template.macroEnabled.12;application/vnd.ms-excel.addin.macroEnabled.12;application/vnd.ms-excel.sheet.binary.macroEnabled.12;\"\n"
  },
  {
    "path": "apps/excel-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Excel\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Excel\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\Office16\\EXCEL.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.sheet.macroEnabled.12;application/vnd.ms-excel.template.macroEnabled.12;application/vnd.ms-excel.addin.macroEnabled.12;application/vnd.ms-excel.sheet.binary.macroEnabled.12;\"\n"
  },
  {
    "path": "apps/explorer/info",
    "content": "# GNOME shortcut name\nNAME=\"Explorer\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Explorer\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Windows\\explorer.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Windows\"\n\n# GNOME mimetypes\nMIME_TYPES=\"\"\n"
  },
  {
    "path": "apps/iexplorer/info",
    "content": "# GNOME shortcut name\nNAME=\"Internet Explorer\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Internet Explorer\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Internet Explorer\\iexplore.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;\"\n"
  },
  {
    "path": "apps/illustrator-cc/info",
    "content": "# GNOME shortcut name\nNAME=\"Illustrator CC\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe Illustrator CC\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Adobe\\Adobe Illustrator 2021\\Support Files\\Contents\\Windows\\Illustrator.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/illustrator;\"\n"
  },
  {
    "path": "apps/indesign-cc/info",
    "content": "# GNOME shortcut name\nNAME=\"InDesign CC\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe InDesign CC\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Adobe\\Adobe InDesign 2021\\InDesign.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/x-adobe-indesign-interchange;application/x-adobe-indesign;\"\n"
  },
  {
    "path": "apps/lightroom-cc/info",
    "content": "# GNOME shortcut name\nNAME=\"Lightroom CC\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe Lightroom CC\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Adobe\\Adobe Lightroom CC\\lightroom.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"\"\n"
  },
  {
    "path": "apps/onenote/info",
    "content": "# GNOME shortcut name\nNAME=\"OneNote\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft OneNote\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\Office16\\ONENOTE.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/msonenote;\"\n"
  },
  {
    "path": "apps/onenote-o365/info",
    "content": "# GNOME shortcut name\nNAME=\"OneNote\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft OneNote\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\root\\Office16\\ONENOTE.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/msonenote;\"\n"
  },
  {
    "path": "apps/onenote-o365-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"OneNote\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft OneNote\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\ONENOTE.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/msonenote;\"\n"
  },
  {
    "path": "apps/onenote-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"OneNote\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft OneNote\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\Office16\\ONENOTE.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/msonenote;\"\n"
  },
  {
    "path": "apps/outlook/info",
    "content": "# GNOME shortcut name\nNAME=\"Outlook\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Outlook\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\Office16\\OUTLOOK.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-outlook;application/octet-stream;\"\n"
  },
  {
    "path": "apps/outlook-o365/info",
    "content": "# GNOME shortcut name\nNAME=\"Outlook\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Outlook\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\root\\Office16\\OUTLOOK.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-outlook;application/octet-stream;\"\n"
  },
  {
    "path": "apps/outlook-o365-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Outlook\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Outlook\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\OUTLOOK.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-outlook;application/octet-stream;\"\n"
  },
  {
    "path": "apps/outlook-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Outlook\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Outlook\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\Office16\\OUTLOOK.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-outlook;application/octet-stream;\"\n"
  },
  {
    "path": "apps/photoshop-cc/info",
    "content": "# GNOME shortcut name\nNAME=\"Photoshop CC\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe Photoshop CC\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Adobe\\Adobe Photoshop 2020\\Photoshop.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"image/vnd.adobe.photoshop;\"\n"
  },
  {
    "path": "apps/photoshop-cs6/info",
    "content": "# GNOME shortcut name\nNAME=\"Photoshop CS6\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe Photoshop CS6\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Adobe\\Adobe Photoshop CS6 (64 Bit)\\Photoshop.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"image/vnd.adobe.photoshop;\"\n"
  },
  {
    "path": "apps/photoshop-cs6-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Photoshop CS6\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe Photoshop CS6\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Adobe\\Adobe Photoshop CS6\\Photoshop.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"image/vnd.adobe.photoshop;\"\n"
  },
  {
    "path": "apps/powerpoint/info",
    "content": "# GNOME shortcut name\nNAME=\"PowerPoint\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft PowerPoint\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\Office16\\POWERPNT.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.addin.macroEnabled.12;application/vnd.ms-powerpoint.presentation.macroEnabled.12;application/vnd.ms-powerpoint.template.macroEnabled.12;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;\"\n"
  },
  {
    "path": "apps/powerpoint-o365/info",
    "content": "# GNOME shortcut name\nNAME=\"PowerPoint\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft PowerPoint\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\root\\Office16\\POWERPNT.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.addin.macroEnabled.12;application/vnd.ms-powerpoint.presentation.macroEnabled.12;application/vnd.ms-powerpoint.template.macroEnabled.12;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;\"\n"
  },
  {
    "path": "apps/powerpoint-o365-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"PowerPoint\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft PowerPoint\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\POWERPNT.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.addin.macroEnabled.12;application/vnd.ms-powerpoint.presentation.macroEnabled.12;application/vnd.ms-powerpoint.template.macroEnabled.12;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;\"\n"
  },
  {
    "path": "apps/powerpoint-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"PowerPoint\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft PowerPoint\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\Office16\\POWERPNT.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.addin.macroEnabled.12;application/vnd.ms-powerpoint.presentation.macroEnabled.12;application/vnd.ms-powerpoint.template.macroEnabled.12;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;\"\n"
  },
  {
    "path": "apps/powershell/info",
    "content": "# GNOME shortcut name\nNAME=\"Powershell\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Powershell\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Windows\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Windows\"\n\n# GNOME mimetypes\nMIME_TYPES=\"\"\n"
  },
  {
    "path": "apps/powershell-core/info",
    "content": "# GNOME shortcut name\nNAME=\"Powershell Core\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Powershell Core\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\PowerShell\\7\\pwsh.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Windows\"\n\n# GNOME mimetypes\nMIME_TYPES=\"\"\n"
  },
  {
    "path": "apps/premiere-pro-cc/info",
    "content": "# GNOME shortcut name\nNAME=\"Premiere Pro CC\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Adobe Premiere Pro CC\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Adobe\\Adobe Premiere Pro 2020\\Adobe Premiere Pro.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Adobe\"\n\n# GNOME mimetypes\nMIME_TYPES=\"image/vnd.adobe.premiere;\"\n"
  },
  {
    "path": "apps/project/info",
    "content": "# GNOME shortcut name\nNAME=\"Project\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Project\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\Office16\\WINPROJ.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/msproj;application/msproject;application/x-msproject;application/x-ms-project;application/vnd.ms-project;\"\n"
  },
  {
    "path": "apps/project-o365/info",
    "content": "# GNOME shortcut name\nNAME=\"Project\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Project\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\root\\Office16\\WINPROJ.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/msproj;application/msproject;application/x-msproject;application/x-ms-project;application/vnd.ms-project;\"\n"
  },
  {
    "path": "apps/project-o365-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Project\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Project\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\WINPROJ.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/msproj;application/msproject;application/x-msproject;application/x-ms-project;application/vnd.ms-project;\"\n"
  },
  {
    "path": "apps/project-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Project\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Project\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\Office16\\WINPROJ.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/msproj;application/msproject;application/x-msproject;application/x-ms-project;application/vnd.ms-project;\"\n"
  },
  {
    "path": "apps/publisher/info",
    "content": "# GNOME shortcut name\nNAME=\"Publisher\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Publisher\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\Office16\\MSPUB.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-publisher;\"\n"
  },
  {
    "path": "apps/publisher-o365/info",
    "content": "# GNOME shortcut name\nNAME=\"Publisher\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Publisher\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\root\\Office16\\MSPUB.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-publisher;\"\n"
  },
  {
    "path": "apps/publisher-o365-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Publisher\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Publisher\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\MSPUB.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-publisher;\"\n"
  },
  {
    "path": "apps/publisher-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Publisher\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Publisher\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\Office16\\MSPUB.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/vnd.ms-publisher;\"\n"
  },
  {
    "path": "apps/vs-community-2019/info",
    "content": "# GNOME shortcut name\nNAME=\"Visual Studio 2019 Community\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Visual Studio 2019 Community\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\IDE\\devenv.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Code\"\n\n# GNOME mimetypes\n# See: https://stackoverflow.com/questions/208056/what-are-the-mime-types-for-net-project-source-code-files\nMIME_TYPES=\"text/xml;text/plain;text/x-csharp\""
  },
  {
    "path": "apps/vs-enterprise-2019/info",
    "content": "# GNOME shortcut name\nNAME=\"Visual Studio 2019 Enterprise\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Visual Studio 2019 Enterprise\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\IDE\\devenv.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Code\"\n\n# GNOME mimetypes\n# See: https://stackoverflow.com/questions/208056/what-are-the-mime-types-for-net-project-source-code-files\nMIME_TYPES=\"text/xml;text/plain;text/x-csharp\""
  },
  {
    "path": "apps/vs-professional-2019/info",
    "content": "# GNOME shortcut name\nNAME=\"Visual Studio 2019 Professional\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Visual Studio 2019 Professional\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Common7\\IDE\\devenv.exe\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Code\"\n\n# GNOME mimetypes\n# See: https://stackoverflow.com/questions/208056/what-are-the-mime-types-for-net-project-source-code-files\nMIME_TYPES=\"text/xml;text/plain;text/x-csharp\""
  },
  {
    "path": "apps/word/info",
    "content": "# GNOME shortcut name\nNAME=\"Word\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Word\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\Office16\\WINWORD.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/msword;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.document.macroEnabled.12;application/vnd.ms-word.template.macroEnabled.12;\"\n"
  },
  {
    "path": "apps/word-o365/info",
    "content": "# GNOME shortcut name\nNAME=\"Word\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Word\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files\\Microsoft Office\\root\\Office16\\WINWORD.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/msword;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.document.macroEnabled.12;application/vnd.ms-word.template.macroEnabled.12;\"\n"
  },
  {
    "path": "apps/word-o365-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Word\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Word\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\WINWORD.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/msword;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.document.macroEnabled.12;application/vnd.ms-word.template.macroEnabled.12;\"\n"
  },
  {
    "path": "apps/word-x86/info",
    "content": "# GNOME shortcut name\nNAME=\"Word\"\n\n# Used for descriptions and window class\nFULL_NAME=\"Microsoft Word\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\"C:\\Program Files (x86)\\Microsoft Office\\Office16\\WINWORD.EXE\"\n\n# GNOME categories\nCATEGORIES=\"WinApps;Office\"\n\n# GNOME mimetypes\nMIME_TYPES=\"application/msword;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.document.macroEnabled.12;application/vnd.ms-word.template.macroEnabled.12;\"\n"
  },
  {
    "path": "bin/winapps",
    "content": "#!/usr/bin/env bash\n\nif [ ! -f \"${HOME}/.config/winapps/winapps.conf\" ] && [ ! -f \"${HOME}/.winapps\" ]; then\n\techo \"You need to create a ~/.config/winapps/winapps.conf configuration. Exiting...\"\n\texit\nfi\n\nDIR=\"$(dirname \"$(readlink -f \"$0\")\")\"\nRUN=\"$(date)-${RANDOM}\"\n\nif [ ! -d \"${HOME}/.local/share/winapps\" ]; then\n\tmkdir -p \"${HOME}/.local/share/winapps\"\nfi\n\nRDP_SCALE=100\n\nif [ -f \"${HOME}/.config/winapps/winapps.conf\" ]; then\n\t. \"${HOME}/.config/winapps/winapps.conf\"\nelse\n\t. \"${HOME}/.winapps\"\nfi\n\nfunction dprint() {\n\tif [ \"${DEBUG}\" = \"true\" ]; then\n\t\techo \"[${RUN}] ${1}\" >> \"${HOME}/.local/share/winapps/winapps.log\"\n\tfi\n}\n\ndprint \"START\"\n\nif [ -f \"${HOME}/.local/share/winapps/run\" ]; then\n\tLAST_RAN=$(stat -t -c %Y \"${HOME}/.local/share/winapps/run\")\n\tdprint \"LAST_RAN:${LAST_RAN}\"\n\ttouch \"${HOME}/.local/share/winapps/run\"\n\tTHIS_RUN=$(stat -t -c %Y \"${HOME}/.local/share/winapps/run\")\n\tdprint \"THIS_RUN:${THIS_RUN}\"\n\tif (( $THIS_RUN - $LAST_RAN < 2 )); then\n\t\texit\n\tfi\nelse\n\ttouch \"${HOME}/.local/share/winapps/run\"\nfi\n\nif [ -z \"$(which xfreerdp)\" ]; then\n\techo \"You need xfreerdp!\"\n\techo \"  sudo apt-get install -y freerdp2-x11\"\n\texit\nfi\n\nif [ -z \"${RDP_IP}\" ]; then\n\tif [ -z \"$(groups |grep libvirt)\" ]; then\n\t\techo \"You are not a member of the libvirt group. Run the below then reboot.\"\n\t\techo '  sudo usermod -a -G libvirt $(whoami)'\n\t\techo '  sudo usermod -a -G kvm $(whoami)'\n\t\texit\n\tfi\n\tif [ -z \"$(virsh list |grep RDPWindows)\" ]; then\n\t\techo \"RDPWindows is not running, run:\"\n\t\techo \"  virsh start RDPWindows\"\n\t\texit\n\tfi\n\tRDP_IP=$(virsh net-dhcp-leases default |grep RDPWindows |awk '{print $5}')\n\tRDP_IP=${RDP_IP%%\\/*}\nfi\n\ndprint \"1:${1}\"\ndprint \"2:${2}\"\ndprint \"@:${@}\"\n\nMULTI_FLAG=\"span\"\nif [ \"${MULTIMON}\" = \"true\" ]; then\n\tMULTI_FLAG=\"multimon\"\nfi\n\nif [ \"${1}\" = \"windows\" ]; then\n\txfreerdp ${RDP_FLAGS} /d:\"${RDP_DOMAIN}\" /u:\"${RDP_USER}\" /p:\"${RDP_PASS}\" /v:${RDP_IP} /scale:${RDP_SCALE} /dynamic-resolution +clipboard +auto-reconnect +home-drive /wm-class:\"Microsoft Windows\" 1> /dev/null 2>&1 &\nelif [ \"${1}\" = \"check\" ]; then\n\tdprint \"CHECK\"\n\txfreerdp ${RDP_FLAGS} /d:\"${RDP_DOMAIN}\" /u:\"${RDP_USER}\" /p:\"${RDP_PASS}\" /v:${RDP_IP} +auto-reconnect +clipboard +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /app:\"explorer.exe\"\nelif [ \"${1}\" = \"manual\" ]; then\n\tdprint \"MANUAL:${2}\"\n\txfreerdp ${RDP_FLAGS} /d:\"${RDP_DOMAIN}\" /u:\"${RDP_USER}\" /p:\"${RDP_PASS}\" /v:${RDP_IP} +auto-reconnect +home-drive +clipboard -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /app:\"${2}\" 1> /dev/null 2>&1 &\nelif [ \"${1}\" != \"install\" ]; then\n\tdprint \"DIR:${DIR}\"\n\tif [ -e \"${DIR}/../apps/${1}/info\" ]; then\n\t\t. \"${DIR}/../apps/${1}/info\"\n\t\tICON=\"${DIR}/../apps/${1}/icon.svg\"\n\telif [ -e \"${HOME}/.local/share/winapps/apps/${1}/info\" ]; then\n\t\t. \"${HOME}/.local/share/winapps/apps/${1}/info\"\n\t\tICON=\"${HOME}/.local/share/winapps/apps/${1}/icon.svg\"\n\telif [ -e \"/usr/local/share/winapps/apps/${1}/info\" ]; then\n\t\t. \"/usr/local/share/winapps/apps/${1}/info\"\n\t\tICON=\"/usr/local/share/winapps/apps/${1}/icon.svg\"\n\telse\n\t\techo \"You need to run 'install.sh' first.\"\n\t\texit 1\n\tfi\n\tif [ -n \"${2}\" ]; then\n\t\tdprint \"HOME:${HOME}\"\n\t\tFILE=$(echo \"${2}\" | sed 's|'\"${HOME}\"'|\\\\\\\\tsclient\\\\home|;s|/|\\\\|g;s|\\\\|\\\\\\\\|g')\n\t\tdprint \"FILE:${FILE}\"\n\t\txfreerdp ${RDP_FLAGS} /d:\"${RDP_DOMAIN}\" /u:\"${RDP_USER}\" /p:\"${RDP_PASS}\" /v:${RDP_IP} +auto-reconnect +clipboard +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /wm-class:\"${FULL_NAME}\" /app:\"${WIN_EXECUTABLE}\" /app-icon:\"${ICON}\" /app-cmd:\"\\\"${FILE}\\\"\" 1> /dev/null 2>&1 &\n\telse\n\t\txfreerdp ${RDP_FLAGS} /d:\"${RDP_DOMAIN}\" /u:\"${RDP_USER}\" /p:\"${RDP_PASS}\" /v:${RDP_IP} +auto-reconnect +clipboard +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /wm-class:\"${FULL_NAME}\" /app:\"${WIN_EXECUTABLE}\" /app-icon:\"${ICON}\" 1> /dev/null 2>&1 &\n\tfi\nfi\n\ndprint \"END\"\n"
  },
  {
    "path": "docs/KVM.md",
    "content": "# Creating a Virtual Machine in KVM\n\nLatest documentation available at: https://nowsci.com/#/winapps/kvm/?id=creating-a-virtual-machine-in-kvm\n\nThis step-by-step guide will take you through setting up a CPU and memory efficient virtual machine to use with WinApps leveraging KVM, an open-source virtualization software contained in most linux distributions.\n\n## Install KVM\nFirst up, you must install KVM and the Virtual Machine Manager. By installing `virt-manager`, you will get everything you need for your distribution:\n```bash\nsudo apt-get install -y virt-manager\n```\n\n## Download the Windows Professional and KVM VirtIO drivers\nYou will need Windows 10 Professional (or Enterprise or Server) to run RDP apps, Windows 10 Home will not suffice. You will also need drivers for VirtIO to ensure the best performance and lowest overhead for your system. You can download these at the following links.\n\nWindows 10 ISO: https://www.microsoft.com/en-us/software-download/windows10ISO\n\nKVM VirtIO drivers (for all distros): https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso\n\n## Create your virtual machine\nThe following guide will take you through the setup. If you are an expert user, you may wish to:\n- [Define a VM from XML (may not work on all systems)](#define-a-vm-from-xml)\n- [Run KVM in user mode](#run-kvm-in-user-mode)\n\nOtherwise, to set up the standard way, open `virt-manager` (Virtual Machines).\n\n![](kvm/00.png)\n\nNext, go to `Edit`->`Preferences`, and check `Enable XML editing`, then click the `Close` button.\n\n![](kvm/01.png)\n\nNow it is time to add a new VM by clicking the `+` button.\n\n![](kvm/02.png)\n\nChoose `Local install media` and click `Forward`.\n\n![](kvm/03.png)\n\nNow select the location of your Windows 10 ISO, and `Automatically detect` the installation.\n\n![](kvm/04.png)\n\nSet your memory and CPUs. We recommend `2` CPUs and `4096MB` for memory. We will be using a Memory Ballooning service, meaning 4096 is the maximum amount of memory the VM will ever use, but will not use this amount except when it is needed.\n\n![](kvm/05.png)\n\nChoose your virtual disk size, keep in mind this is the maximum size the disk will grow to, but it will not take up this space until it needs it.\n\n![](kvm/06.png)\n\nNext, name your machine `RDPWindows` so that WinApps can detect it, and choose to `Customize configuration before install`.\n\n![](kvm/07.png)\n\nAfter clicking `Finish`, ensure under CPU that `Copy host CPU configuration` is selected, and `Apply`.\n\n**NOTE:** Sometimes this gets turned off after Windows is installed. You should check this option after install as well.\n\n![](kvm/08.png)\n\nNext, go to the `XML` tab, and edit the `<clock>` section to contain:\n```xml\n<clock offset='localtime'>\n  <timer name='hpet' present='yes'/>\n  <timer name='hypervclock' present='yes'/>\n</clock>\n```\nThen `Apply`. This will drastically reduce idle CPU usage (from ~25% to ~3%).\n\n![](kvm/09.png)\n\nNext, under Memory, lower the `Current allocation` to the minimum memory the VM should use. We recommend `1024MB`.\n\n![](kvm/10.png)\n\nUnder `Boot options`, check `Start virtual machine on host boot up`.\n\n![](kvm/11.png)\n\nFor SATA Disk 1, set the `Disk bus` to `VirtIO`.\n\n![](kvm/12.png)\n\nFor the NIC, set the `Device model` to `virtio`.\n\n![](kvm/13.png)\n\nClick the `Add Hardware` button in the lower right, and choose `Storage`. For `Device type`, select `CDROM device` and choose the VirtIO driver ISO you downloaded earlier. This will give the Windows 10 Installer access to drivers during the install process. Now click `Finish` to add the new CDROM device.\n\n![](kvm/14.png)\n\nYou are now ready to click `Begin Installation`\n\n![](kvm/15.png)\n\nNow move on to installing the virtual machine.\n\n## Install the virtual machine\nFrom here out you will install Windows 10 Professional as you would on any other machine.\n\n![](kvm/16.png)\n\nOnce you get to the point of selecting the location for installation, you will see there are no disks available. This is because we need to load the VirtIO driver. Select `Load driver`.\n\n![](kvm/17.png)\n\nThe installer will then ask you to specify where the driver is located. Select the `E:\\` drive or whichever drive the VirtIO driver ISO is located on.\n\n![](kvm/18.png)\n\nChoose the appropriate driver for the OS you have selected, which is most likely the `w10` driver for Windows 10.\n\n![](kvm/19.png)\n\nYou will now see a disk you can select for the installation.\n\n![](kvm/20.png)\n\nWindows will begin to install, and you will likely need to reboot the VM a number times during this process.\n\n![](kvm/21.png)\n\nAt some point, you will come to a network screen. This is because the VirtIO drivers for the network have not yet been loaded. Simply click `I don't have internet`.\n\n![](kvm/22.png)\n\nIt will confirm your choice, so just choose `Continue with limited setup`.\n\n![](kvm/23.png)\n\nAfter you get into Windows and login with the user you created during the install. Open up `Explorer` and navigate the `E:\\` drive or wherever the VirtIO driver ISO is mounted. Double click the `virt-win-gt-64.exe` file to launch the VirtIO driver installer.\n\n![](kvm/24.png)\n\nLeave everything as default and click `Next` through the installer. This will install device drivers as well as the Memory Ballooning service.\n\n![](kvm/25.png)\n\nOnce you finish the driver install, you will need to make some registry changes to enable RDP Applications to run on the system. Start by downloading the `RDPApps.reg` file from the WinApps repo by visiting https://github.com/Fmstrat/winapps/blob/main/install/RDPApps.reg, right clicking on the `Raw` button, and clicking on `Save target as`.\n\n![](kvm/26.png)\n\nOnce you have downloaded the registry file, right click on it, and choose `Merge`, then accept any confirmations along the way.\n\n![](kvm/27.png)\n\nNext up, we need to rename the VM so that WinApps can locate it. Go to the start menu and type `About` to bring up the `About your PC` settings.\n\n![](kvm/28.png)\n\nScroll down and click on `Rename this PC`\n\n![](kvm/29.png)\n\nRename to `RDPWindows`, and then `Next`, but **do not** restart.\n\n![](kvm/30.png)\n\nLastly, scroll down to `Remote Desktop`, and toggle `Enable Remote Desktop` on, and `Confirm`.\n\n![](kvm/31.png)\n\nAt this point you will need to restart and you have completed your setup.\n\nRather than restart you can go right ahead and install other applications like Microsoft Office or Adobe CC that could be used through WinApps.\n\nYou may also wish to install the [Spice Guest Tools](https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe) inside the VM which enables features like auto-desktop resize and cut-and-paste when using `virt-manager`. As WinApps uses RDP, this is not necessary if you do not plan to access the machine via `virt-manager`.\n\nOnce you are finished, restart the VM, but do not log in. Simply close the VM viewer, and close the Virtual Machine Manager.\n\n## Expert installs\n\n### Define a VM from XML\nThis expert guide for XML imports is specific to Ubuntu 20.04 and may not work on all hardware platforms.\n\nYou can refer to the [KVM](https://www.linux-kvm.org) documentation for specifics, but the first thing you need to do is set up a Virtual Machine running Windows 10 Professional (or any version that supports RDP). First, install KVM:\n``` bash\nsudo apt-get install -y virt-manager\n```\nNow, copy your Windows ISO and VirtIO iso (links to download in the main guide) into the folder and update the `kvm/RDPWindows.xml` appropriately.\n\nNext, define a VM called RDPWindows from the sample XML file with:\n``` bash\nvirsh define kvm/RDPWindows.xml\nvirsh autostart RDPWindows\n```\nYou should then open the VMs properties in `virt-manager` and ensure that under CPU `Copy host CPU configuration` is selected.\n\nBoot it up, install windows, and then [Install the virtual machine](#install-the-virtual-machine).\n\n### Run KVM in user mode\nNow set up KVM to run as your user instead of root and allow it through AppArmor (for Ubuntu 20.04 and above):\n``` bash\nsudo sed -i \"s/#user = \"root\"/user = \"$(id -un)\"/g\" /etc/libvirt/qemu.conf\nsudo sed -i \"s/#group = \"root\"/group = \"$(id -gn)\"/g\" /etc/libvirt/qemu.conf\nsudo usermod -a -G kvm $(id -un)\nsudo usermod -a -G libvirt $(id -un)\nsudo systemctl restart libvirtd\nsudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/\n```\nYou will likely need to reboot to ensure your current shell is added to the group.\n\n\n\n"
  },
  {
    "path": "install/ExtractPrograms.ps1",
    "content": "\nFunction Get-Icon {\n    <#\n        Get-Icon License:\n\n        License\n\n        The MIT License (MIT)\n\n        Copyright (c)\n\n        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\n        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n    #>\n    <#\n        .SYNOPSIS\n            Gets the icon from a file\n\n        .DESCRIPTION\n            Gets the icon from a file and displays it in a variety formats.\n\n        .PARAMETER Path\n            The path to a file to get the icon\n\n        .PARAMETER ToBytes\n            Displays outputs as a byte array\n\n        .PARAMETER ToBitmap\n            Display the icon as a bitmap object\n\n        .PARAMETER ToBase64\n            Displays the icon in Base64 encoded format\n\n        .NOTES\n            Name: Get-Icon\n            Author: Boe Prox\n            Version History:\n                1.0 //Boe Prox - 11JAN2016\n                    - Initial version\n\n        .OUTPUT\n            System.Drawing.Icon\n            System.Drawing.Bitmap\n            System.String\n            System.Byte[]\n\n        .EXAMPLE\n            Get-Icon -Path 'C:\\windows\\system32\\WindowsPowerShell\\v1.0\\PowerShell.exe'\n\n            FullName : C:\\windows\\system32\\WindowsPowerShell\\v1.0\\PowerShell.exe\n            Handle   : 164169893\n            Height   : 32\n            Size     : {Width=32, Height=32}\n            Width    : 32\n\n            Description\n            -----------\n            Returns the System.Drawing.Icon representation of the icon\n\n        .EXAMPLE\n            Get-Icon -Path 'C:\\windows\\system32\\WindowsPowerShell\\v1.0\\PowerShell.exe' -ToBitmap\n\n            Tag                  : \n            PhysicalDimension    : {Width=32, Height=32}\n            Size                 : {Width=32, Height=32}\n            Width                : 32\n            Height               : 32\n            HorizontalResolution : 96\n            VerticalResolution   : 96\n            Flags                : 2\n            RawFormat            : [ImageFormat: b96b3caa-0728-11d3-9d7b-0000f81ef32e]\n            PixelFormat          : Format32bppArgb\n            Palette              : System.Drawing.Imaging.ColorPalette\n            FrameDimensionsList  : {7462dc86-6180-4c7e-8e3f-ee7333a7a483}\n            PropertyIdList       : {}\n            PropertyItems        : {}\n\n            Description\n            -----------\n            Returns the System.Drawing.Bitmap representation of the icon\n\n        .EXAMPLE\n            $FileName = 'C:\\Temp\\PowerShellIcon.png'\n            $Format = [System.Drawing.Imaging.ImageFormat]::Png\n            (Get-Icon -Path 'C:\\windows\\system32\\WindowsPowerShell\\v1.0\\PowerShell.exe' -ToBitmap).Save($FileName,$Format)\n\n            Description\n            -----------\n            Saves the icon as a file.\n\n        .EXAMPLE\n            Get-Icon -Path 'C:\\windows\\system32\\WindowsPowerShell\\v1.0\\PowerShell.exe' -ToBase64\n\n            AAABAAEAICAQHQAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAAAAAAAAAAAAAAAAA\n            AAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP\n            //AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n            AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmZmZmZmZmZmZmZgAAAAAAaId3d3d3d4iIiIdgAA\n            AHdmhmZmZmZmZmZmZoZAAAB2ZnZmZmZmZmZmZmZ3YAAAdmZ3ZmiHZniIiHZmaGAAAHZmd2Zv/4eIiIi\n            GZmhgAAB2ZmdmZ4/4eIh3ZmZnYAAAd2ZnZmZo//h2ZmZmZ3YAAHZmaGZmZo//h2ZmZmd2AAB3Zmd2Zm\n            Znj/h2ZmZmhgAAd3dndmZmZuj/+GZmZoYAAHd3dod3dmZuj/9mZmZ2AACHd3aHd3eIiP/4ZmZmd2AAi\n            Hd2iIiIiI//iId2ZndgAIiIhoiIiIj//4iIiIiIYACIiId4iIiP//iIiIiIiGAAiIiIaIiI//+IiIiI\n            iIhkAIiIiGiIiP/4iIiIiIiIdgCIiIhoiIj/iIiIiIiIiIYAiIiIeIiIiIiIiIiIiIiGAAiIiIaP///\n            ////////4hgAAAAAGZmZmZmZmZmZmZmYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n            AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////gA\n            AAf4AAAD+AAAAfgAAAHAAAABwAAAAcAAAAHAAAAAwAAAAMAAAADAAAAAwAAAAMAAAABAAAAAQAAAAEA\n            AAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAP4AAAH//////////////////////////w==\n\n            Description\n            -----------\n            Returns the Base64 encoded representation of the icon\n\n        .EXAMPLE\n            Get-Icon -Path 'C:\\windows\\system32\\WindowsPowerShell\\v1.0\\PowerShell.exe' -ToBase64 | Clip\n\n            Description\n            -----------\n            Returns the Base64 encoded representation of the icon and saves it to the clipboard.\n\n        .EXAMPLE\n            (Get-Icon -Path 'C:\\windows\\system32\\WindowsPowerShell\\v1.0\\PowerShell.exe' -ToBytes) -Join ''\n\n            0010103232162900002322002200040000320006400010400000128200000000000000000000000\n            0128001280001281280128000128012801281280012812812801921921920002550025500025525\n            5025500025502550255255002552552550000000000000000000000000000000000000000000000\n            0000000000000000000000000000000000006102102102102102102102102102102960000613611\n            9119119119119120136136136118000119102134102102102102102102102102102134640011810\n            2118102102102102102102102102102119960011810211910210413510212013613611810210496\n            0011810211910211125513513613613613410210496001181021031021031432481201361191021\n            0210396001191021031021021042552481181021021021031180011810210410210210214325513\n            5102102102103118001191021031181021021031432481181021021021340011911910311810210\n            2102232255248102102102134001191191181351191181021101432551021021021180013511911\n            8135119119136136255248102102102119960136119118136136136136143255136135118102119\n            9601361361341361361361362552551361361361361369601361361351201361361432552481361\n            3613613613696013613613610413613625525513613613613613613610001361361361041361362\n            5524813613613613613613611801361361361041361362551361361361361361361361340136136\n            1361201361361361361361361361361361361340813613613414325525525525525525525525524\n            8134000061021021021021021021021021021021020000000000000000000000000000000000000\n            0000000000000000000000000000000000000000000025525525525525525525525525525525525\n            5224003122400152240072240070007000700070003000300030003000300010001000100010000\n            0000000000000000000012800025400125525525525525525525525525525525525525525525525\n            5255255255255\n\n            Description\n            -----------\n            Returns the bytes representation of the icon. -Join was used in this for the sake\n            of displaying all of the data.\n\n    #>\n    [cmdletbinding(\n        DefaultParameterSetName = '__DefaultParameterSetName'\n    )]\n    Param (\n        [parameter(ValueFromPipelineByPropertyName=$True)]\n        [ValidateNotNullorEmpty()]\n        [string]$Path,\n        [parameter(ParameterSetName = 'Bytes')]\n        [switch]$ToBytes,\n        [parameter(ParameterSetName = 'Bitmap')]\n        [switch]$ToBitmap,\n        [parameter(ParameterSetName = 'Base64')]\n        [switch]$ToBase64\n    )\n    Begin {\n        If ($PSBoundParameters.ContainsKey('Debug')) {\n            $DebugPreference = 'Continue'\n        }\n        Add-Type -AssemblyName System.Drawing\n    }\n    Process {\n        $Path = Convert-Path -Path $Path\n        Write-Debug $Path\n        If (Test-Path -Path $Path) {\n            #$Icon = [System.Drawing.Icon]::ExtractAssociatedIcon($Path)| \n            $Icon = [System.Drawing.Icon]::ExtractAssociatedIcon($Path)| \n            Add-Member -MemberType NoteProperty -Name FullName -Value $Path -PassThru\n            If ($PSBoundParameters.ContainsKey('ToBytes')) {\n                Write-Verbose \"Retrieving bytes\"\n                $MemoryStream = New-Object System.IO.MemoryStream\n                $Icon.save($MemoryStream)\n                Write-Debug ($MemoryStream | Out-String)\n                $MemoryStream.ToArray()   \n                $MemoryStream.Flush()  \n                $MemoryStream.Dispose()           \n            } ElseIf ($PSBoundParameters.ContainsKey('ToBitmap')) {\n                $Icon.ToBitMap()\n            } ElseIf ($PSBoundParameters.ContainsKey('ToBase64')) {\n                $MemoryStream = New-Object System.IO.MemoryStream\n                $Icon.save($MemoryStream)\n                Write-Debug ($MemoryStream | Out-String)\n                $Bytes = $MemoryStream.ToArray()   \n                $MemoryStream.Flush() \n                $MemoryStream.Dispose()\n                [convert]::ToBase64String($Bytes)\n            }  Else {\n                $Icon\n            }\n        } Else {\n            Write-Warning \"$Path does not exist!\"\n            Continue\n        }\n    }\n}\n\n\"NAMES=()\"\n\"ICONS=()\"\n\"EXES=()\"\nGet-ItemProperty \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\*\" |\n    Select-Object -Property \"(default)\" -Unique |\n    Where-Object {$_.\"(default)\" -ne $null} |\n    ForEach-Object {\n        $Exe = $_.\"(default)\".Trim('\"')\n        $Name = (Get-Item $Exe).VersionInfo.FileDescription.Trim() -replace \"  \",\" \"\n        $Icon = Get-Icon -Path $Exe -ToBase64\n        #Get-ItemProperty $Exe -Name VersionInfo\n        \"NAMES+=(\"\"$Name\"\")\"\n        \"EXES+=(\"\"$Exe\"\")\"\n        \"ICONS+=(\"\"$Icon\"\")\"\n    }\n\n"
  },
  {
    "path": "install/RDPApps.reg",
    "content": "Windows Registry Editor Version 5.00\n\n    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Terminal Server\\TSAppAllowList]\n    \"fDisabledAllowList\"=dword:00000001\n\n    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\Terminal Services]\n    \"fAllowUnlistedRemotePrograms\"=dword:00000001\n"
  },
  {
    "path": "install/inquirer.sh",
    "content": "#!/usr/bin/env bash\n\n#======== Based on (then updated) https://raw.githubusercontent.com/tanhauhau/Inquirer.sh/master/dist/inquirer.sh ========\n\n# License from: https://github.com/kahkhang/Inquirer.sh/blob/master/LICENSE\n\n# The MIT License (MIT)\n\n# Copyright (c) 2017\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\n# store the current set options\nOLD_SET=$-\nset -e\n\narrow=\"$(echo -e '\\xe2\\x9d\\xaf')\"\nchecked=\"$(echo -e '\\xe2\\x97\\x89')\"\nunchecked=\"$(echo -e '\\xe2\\x97\\xaf')\"\ndown_arrow=$(echo -e '\\u23f7')\nup_arrow=$(echo -e '\\u23f6')\n\nblack=\"$(tput setaf 0)\"\nred=\"$(tput setaf 1)\"\ngreen=\"$(tput setaf 2)\"\nyellow=\"$(tput setaf 3)\"\nblue=\"$(tput setaf 4)\"\nmagenta=\"$(tput setaf 5)\"\ncyan=\"$(tput setaf 6)\"\nwhite=\"$(tput setaf 7)\"\nbold=\"$(tput bold)\"\nnormal=\"$(tput sgr0)\"\ndim=$'\\e[2m'\n\nprint() {\n  echo \"$1\"\n  tput el\n}\n\njoin() {\n  local IFS=$'\\n'\n  local _join_list\n  eval _join_list=( '\"${'${1}'[@]}\"' )\n  local first=true\n  for item in ${_join_list[@]}; do\n    if [ \"$first\" = true ]; then\n      printf \"%s\" \"$item\"\n      first=false\n    else\n      printf \"${2-, }%s\" \"$item\"\n    fi\n  done\n}\n\nfunction gen_env_from_options() {\n  local IFS=$'\\n'\n  local _indices\n  local _env_names\n  local _checkbox_selected\n  eval _indices=( '\"${'${1}'[@]}\"' )\n  eval _env_names=( '\"${'${2}'[@]}\"' )\n\n  for i in $(gen_index ${#_env_names[@]}); do\n    _checkbox_selected[$i]=false\n  done\n\n  for i in ${_indices[@]}; do\n    _checkbox_selected[$i]=true\n  done\n\n  for i in $(gen_index ${#_env_names[@]}); do\n    printf \"%s=%s\\n\" \"${_env_names[$i]}\" \"${_checkbox_selected[$i]}\"\n  done\n}\n\non_default() {\n  true;\n}\n\non_keypress() {\n  local OLD_IFS\n  local IFS\n  local key\n  OLD_IFS=$IFS\n  local on_up=${1:-on_default}\n  local on_down=${2:-on_default}\n  local on_space=${3:-on_default}\n  local on_enter=${4:-on_default}\n  local on_left=${5:-on_default}\n  local on_right=${6:-on_default}\n  local on_ascii=${7:-on_default}\n  local on_backspace=${8:-on_default}\n  _break_keypress=false\n  while IFS=\"\" read -rsn1 key; do\n      case \"$key\" in\n      $'\\x1b')\n          read -rsn1 key\n          if [[ \"$key\" == \"[\" ]]; then\n              read -rsn1 key\n              case \"$key\" in\n              'A') eval $on_up;;\n              'B') eval $on_down;;\n              'D') eval $on_left;;\n              'C') eval $on_right;;\n              esac\n          fi\n          ;;\n      ' ') eval $on_space ' ';;\n      [a-z0-9A-Z\\!\\#\\$\\&\\+\\,\\-\\.\\/\\;\\=\\?\\@\\[\\]\\^\\_\\{\\}\\~]) eval $on_ascii $key;;\n      $'\\x7f') eval $on_backspace $key;;\n      '') eval $on_enter $key;;\n      esac\n      if [ $_break_keypress = true ]; then\n        break\n      fi\n  done\n  IFS=$OLD_IFS\n}\n\ngen_index() {\n  local k=$1\n  local l=0\n  if [ $k -gt 0 ]; then\n    for l in $(seq $k)\n    do\n       echo \"$l-1\" | bc\n    done\n  fi\n}\n\ncleanup() {\n  # Reset character attributes, make cursor visible, and restore\n  # previous screen contents (if possible).\n  tput sgr0\n  tput cnorm\n  stty echo\n\n  # Restore `set e` option to its orignal value\n  if [[ $OLD_SET =~ e ]]\n  then set -e\n  else set +e\n  fi\n}\n\ncontrol_c() {\n  cleanup\n  exit $?\n}\n\nselect_indices() {\n  local _select_list\n  local _select_indices\n  local _select_selected=()\n  eval _select_list=( '\"${'${1}'[@]}\"' )\n  eval _select_indices=( '\"${'${2}'[@]}\"' )\n  local _select_var_name=$3\n  eval $_select_var_name\\=\\(\\)\n  for i in $(gen_index ${#_select_indices[@]}); do\n    eval $_select_var_name\\+\\=\\(\\\"\"${_select_list[${_select_indices[$i]}]}\"\\\"\\)\n  done\n}\n\nprint_checkbox_line_arrow() {\n  if [ \"${_checkbox_selected[$1]}\" = true ]; then\n    printf \"${cyan}${arrow}${green}${checked}${normal} ${_checkbox_list[$1]} ${normal}\"\n  else\n    printf \"${cyan}${arrow}${normal}${unchecked} ${_checkbox_list[$1]} ${normal}\"\n  fi\n}\n\nprint_checkbox_line() {\n  if [ \"${_checkbox_selected[$1]}\" = true ]; then\n    printf \" ${green}${checked}${normal} ${_checkbox_list[$1]} ${normal}\"\n  else\n    printf \" ${normal}${unchecked} ${_checkbox_list[$1]} ${normal}\"\n  fi\n}\n\n# https://www.gnu.org/software/termutils/manual/termutils-2.0/html_chapter/tput_1.html\n# http://linuxcommand.org/lc3_adv_tput.php\non_checkbox_input_up2() {\n  #remove_checkbox_instructions\n  tput cub \"$(tput cols)\"\n\n  if [ \"${_checkbox_selected[$_current_index]}\" = true ]; then\n    printf \" ${green}${checked}${normal} ${_checkbox_list[$_current_index]} ${normal}\"\n  else\n    printf \" ${unchecked} ${_checkbox_list[$_current_index]} ${normal}\"\n  fi\n  tput el\n\n  if [ $_current_index = 0 ]; then\n    _current_index=$((${#_checkbox_list[@]}-1))\n    tput cud $((${#_checkbox_list[@]}-1))\n    tput cub \"$(tput cols)\"\n  else\n    _current_index=$((_current_index-1))\n\n    tput cuu1 # Up one line\n    tput cub \"$(tput cols)\" # Back to beginning (does this work?)\n    tput el # Clear to end of line\n  fi\n\n  if [ \"${_checkbox_selected[$_current_index]}\" = true ]; then\n    printf \"${cyan}${arrow}${green}${checked}${normal} ${_checkbox_list[$_current_index]} ${normal}\"\n  else\n    printf \"${cyan}${arrow}${normal}${unchecked} ${_checkbox_list[$_current_index]} ${normal}\"\n  fi\n}\n\non_checkbox_input_up() {\n  #remove_checkbox_instructions\n  tput cub \"$(tput cols)\"\n  if (( ${_current_row} > 0 )) || (( ${#_checkbox_list[@]} <= 5 )); then\n    print_checkbox_line $_current_index\n    tput el\n    if [ $_current_index = 0 ]; then\n      _current_index=$((${#_checkbox_list[@]}-1))\n      _current_row=4\n      tput cud $((${#_checkbox_list[@]}-1))\n      tput cub \"$(tput cols)\"\n    else\n      _current_index=$((_current_index-1))\n      _current_row=$((_current_row-1))\n      tput cuu1\n      tput cub \"$(tput cols)\"\n      tput el\n    fi\n    print_checkbox_line_arrow $_current_index\n  else\n    if [ $_current_index = 0 ]; then\n      _current_index=$((${#_checkbox_list[@]}-1))\n      _current_row=4\n      tput cuu 1\n      tput cub \"$(tput cols)\"\n      tput el\n      printf \"  ${cyan}${up_arrow}${normal}\"\n      for I in 4 3 2 1; do\n        tput cud1\n        tput cub \"$(tput cols)\"\n        tput el\n        print_checkbox_line $((_current_index-I))\n      done\n      tput cud1\n      tput cub \"$(tput cols)\"\n      tput el\n      print_checkbox_line_arrow $((_current_index))\n      tput cud1\n      tput cub \"$(tput cols)\"\n      tput el\n      printf \"  ${dim}${down_arrow}${normal}\"\n      tput cuu 1\n    else\n      _current_index=$((_current_index-1))\n      tput cud 5\n      tput cub \"$(tput cols)\"\n      tput el\n      printf \"  ${cyan}${down_arrow}${normal}\"\n      for I in 4 3 2 1; do\n        tput cuu1\n        tput cub \"$(tput cols)\"\n        tput el\n        print_checkbox_line $((_current_index+I))\n      done\n      tput cuu1\n      tput cub \"$(tput cols)\"\n      tput el\n      print_checkbox_line_arrow $((_current_index))\n      if [ $_current_index = 0 ]; then\n        tput cuu1\n        tput cub \"$(tput cols)\"\n        tput el\n        printf \"  ${dim}${up_arrow}${normal}\"\n        tput cud1\n      fi\n    fi\n  fi\n}\n\non_checkbox_input_down() {\n  #remove_checkbox_instructions\n  tput cub \"$(tput cols)\"\n  if (( ${_current_row} < 4 )) || (( ${#_checkbox_list[@]} <= 5 )); then\n    print_checkbox_line $_current_index\n    tput el\n    if [ $_current_index = $((${#_checkbox_list[@]}-1)) ]; then\n      _current_index=0\n      _current_row=0\n      tput cuu $((${#_checkbox_list[@]}-1))\n      tput cub \"$(tput cols)\"\n    else\n      _current_index=$((_current_index+1))\n      _current_row=$((_current_row+1))\n      tput cud1\n      tput cub \"$(tput cols)\"\n      tput el\n    fi\n    print_checkbox_line_arrow $_current_index\n  else\n    if [ $_current_index = $((${#_checkbox_list[@]}-1)) ]; then\n      _current_index=0\n      _current_row=0\n      tput cuu 5\n      tput cub \"$(tput cols)\"\n      tput el\n      printf \"  ${dim}${up_arrow}${normal}\"\n      tput cud1\n      tput cub \"$(tput cols)\"\n      tput el\n      print_checkbox_line_arrow $((_current_index))\n      for I in 1 2 3 4; do\n        tput cud1\n        tput cub \"$(tput cols)\"\n        tput el\n        print_checkbox_line $((_current_index+I))\n      done\n      tput cud1\n      tput cub \"$(tput cols)\"\n      tput el\n      printf \"  ${cyan}${down_arrow}${normal}\"\n      tput cuu 5\n    else\n      _current_index=$((_current_index+1))\n      tput cuu 5\n      tput cub \"$(tput cols)\"\n      tput el\n      printf \"  ${cyan}${up_arrow}${normal}\"\n      for I in 4 3 2 1; do\n        tput cud1\n        tput cub \"$(tput cols)\"\n        tput el\n        print_checkbox_line $((_current_index-I))\n      done\n      tput cud1\n      tput cub \"$(tput cols)\"\n      tput el\n      print_checkbox_line_arrow $((_current_index))\n      if [ $_current_index = $((${#_checkbox_list[@]}-1)) ]; then\n        tput cud1\n        tput cub \"$(tput cols)\"\n        tput el\n        printf \"  ${dim}${down_arrow}${normal}\"\n        tput cuu1\n      fi\n    fi\n  fi\n}\n\non_checkbox_input_enter() {\n  remove_checkbox_instructions\n  local OLD_IFS\n  OLD_IFS=$IFS\n  _checkbox_selected_indices=()\n  _checkbox_selected_options=()\n  IFS=$'\\n'\n\n  for i in $(gen_index ${#_checkbox_list[@]}); do\n    if [ \"${_checkbox_selected[$i]}\" = true ]; then\n      _checkbox_selected_indices+=($i)\n      _checkbox_selected_options+=(\"${_checkbox_list[$i]}\")\n    fi\n  done\n\n  if (( ${#_checkbox_list[@]} <= 5 )); then\n    tput cud $((${#_checkbox_list[@]}-${_current_index}))\n    tput cub \"$(tput cols)\"\n    for i in $(seq $((${#_checkbox_list[@]}+1))); do\n      tput el1\n      tput el\n      tput cuu1\n    done\n  else\n    tput cud $((6-${_current_row}))\n    tput cub \"$(tput cols)\"\n    for i in $(seq 8); do\n      tput el1\n      tput el\n      tput cuu1\n    done\n  fi\n  tput cub \"$(tput cols)\"\n\n  tput cuf $((${#prompt}+3))\n  printf \"${cyan}$(join _checkbox_selected_options)${normal}\"\n  tput el\n\n  tput cud1\n  tput cub \"$(tput cols)\"\n  tput el\n\n  _break_keypress=true\n  IFS=$OLD_IFS\n}\n\non_checkbox_input_space() {\n  #remove_checkbox_instructions\n  tput cub \"$(tput cols)\"\n  tput el\n  if [ \"${_checkbox_selected[$_current_index]}\" = true ]; then\n    _checkbox_selected[$_current_index]=false\n  else\n    _checkbox_selected[$_current_index]=true\n  fi\n\n  print_checkbox_line_arrow $_current_index\n}\n\nremove_checkbox_instructions() {\n  if [ $_first_keystroke = true ]; then\n    tput cuu $((${_current_index}+1))\n    tput cub \"$(tput cols)\"\n    tput cuf $((${#prompt}+3))\n    tput el\n    tput cud $((${_current_index}+1))\n    _first_keystroke=false\n  fi\n}\n\n# for vim movements\non_checkbox_input_ascii() {\n  local key=$1\n  case $key in\n    \"j\" ) on_checkbox_input_down;;\n    \"k\" ) on_checkbox_input_up;;\n  esac\n}\n\n_checkbox_input() {\n  local i\n  local j\n  prompt=$1\n  eval _checkbox_list=( '\"${'${2}'[@]}\"' )\n  _current_index=0\n  _current_row=0\n  _first_keystroke=true\n\n  trap control_c SIGINT EXIT\n\n  stty -echo\n  tput civis\n\n  print \"${normal}${green}?${normal} ${bold}${prompt}${normal} ${dim}(Press <space> to select, <enter> to finalize)${normal}\"\n\n  for i in $(gen_index ${#_checkbox_list[@]}); do\n    _checkbox_selected[$i]=false\n  done\n\n  if [ -n \"$3\" ]; then\n    eval _selected_indices=( '\"${'${3}'[@]}\"' )\n    for i in ${_selected_indices[@]}; do\n      _checkbox_selected[$i]=true\n    done\n  fi\n\n  if (( ${#_checkbox_list[@]} > 5 )); then\n    tput cub \"$(tput cols)\"\n    print \"  ${dim}${up_arrow}${normal}\"\n  fi\n\n  for i in $(gen_index ${#_checkbox_list[@]}); do\n    tput cub \"$(tput cols)\"\n    if [ $i = 0 ]; then\n      print_checkbox_line_arrow $i\n    else\n      print_checkbox_line $i\n    fi\n    print \"\"\n    tput el\n    if (( $i > 3 )) && (( ${#_checkbox_list[@]} > 5 )); then\n      print \"  ${cyan}${down_arrow}${normal}\"\n      break\n    fi\n  done\n\n  for j in $(gen_index ${#_checkbox_list[@]}); do\n    tput cuu1\n    if (( $j > 4 )); then\n      break\n    fi\n  done\n\n  on_keypress on_checkbox_input_up on_checkbox_input_down on_checkbox_input_space on_checkbox_input_enter on_default on_default on_checkbox_input_ascii\n}\n\ncheckbox_input() {\n  _checkbox_input \"$1\" \"$2\"\n  _checkbox_input_output_var_name=$3\n  select_indices _checkbox_list _checkbox_selected_indices $_checkbox_input_output_var_name\n\n  unset _checkbox_list\n  unset _break_keypress\n  unset _first_keystroke\n  unset _current_index\n  unset _checkbox_input_output_var_name\n  unset _checkbox_selected_indices\n  unset _checkbox_selected_options\n\n  cleanup\n}\n\ncheckbox_input_indices() {\n  _checkbox_input \"$1\" \"$2\" \"$3\"\n  _checkbox_input_output_var_name=$3\n\n  eval $_checkbox_input_output_var_name\\=\\(\\)\n  for i in $(gen_index ${#_checkbox_selected_indices[@]}); do\n    eval $_checkbox_input_output_var_name\\+\\=\\(${_checkbox_selected_indices[$i]}\\)\n  done\n\n  unset _checkbox_list\n  unset _break_keypress\n  unset _first_keystroke\n  unset _current_index\n  unset _checkbox_input_output_var_name\n  unset _checkbox_selected_indices\n  unset _checkbox_selected_options\n\n  cleanup\n}\n\n\n\n\non_list_input_up() {\n  remove_list_instructions\n  tput cub \"$(tput cols)\"\n\n  printf \"  ${_list_options[$_list_selected_index]}\"\n  tput el\n\n  if [ $_list_selected_index = 0 ]; then\n    _list_selected_index=$((${#_list_options[@]}-1))\n    tput cud $((${#_list_options[@]}-1))\n    tput cub \"$(tput cols)\"\n  else\n    _list_selected_index=$((_list_selected_index-1))\n\n    tput cuu1\n    tput cub \"$(tput cols)\"\n    tput el\n  fi\n\n  printf \"${cyan}${arrow} %s ${normal}\" \"${_list_options[$_list_selected_index]}\"\n}\n\non_list_input_down() {\n  remove_list_instructions\n  tput cub \"$(tput cols)\"\n\n  printf \"  ${_list_options[$_list_selected_index]}\"\n  tput el\n\n  if [ $_list_selected_index = $((${#_list_options[@]}-1)) ]; then\n    _list_selected_index=0\n    tput cuu $((${#_list_options[@]}-1))\n    tput cub \"$(tput cols)\"\n  else\n    _list_selected_index=$((_list_selected_index+1))\n    tput cud1\n    tput cub \"$(tput cols)\"\n    tput el\n  fi\n  printf \"${cyan}${arrow} %s ${normal}\" \"${_list_options[$_list_selected_index]}\"\n}\n\non_list_input_enter_space() {\n  local OLD_IFS\n  OLD_IFS=$IFS\n  IFS=$'\\n'\n\n  tput cud $((${#_list_options[@]}-${_list_selected_index}))\n  tput cub \"$(tput cols)\"\n\n  for i in $(seq $((${#_list_options[@]}+1))); do\n    tput el1\n    tput el\n    tput cuu1\n  done\n  tput cub \"$(tput cols)\"\n\n  tput cuf $((${#prompt}+3))\n  printf \"${cyan}${_list_options[$_list_selected_index]}${normal}\"\n  tput el\n\n  tput cud1\n  tput cub \"$(tput cols)\"\n  tput el\n\n  _break_keypress=true\n  IFS=$OLD_IFS\n}\n\nremove_list_instructions() {\n  if [ $_first_keystroke = true ]; then\n    tput cuu $((${_list_selected_index}+1))\n    tput cub \"$(tput cols)\"\n    tput cuf $((${#prompt}+3))\n    tput el\n    tput cud $((${_list_selected_index}+1))\n    _first_keystroke=false\n  fi\n}\n\n_list_input() {\n  local i\n  local j\n  prompt=$1\n  eval _list_options=( '\"${'${2}'[@]}\"' )\n\n  _list_selected_index=0\n  _first_keystroke=true\n\n  trap control_c SIGINT EXIT\n\n  stty -echo\n  tput civis\n\n  print \"${normal}${green}?${normal} ${bold}${prompt}${normal} ${dim}(Use arrow keys)${normal}\"\n\n  for i in $(gen_index ${#_list_options[@]}); do\n    tput cub \"$(tput cols)\"\n    if [ $i = 0 ]; then\n      print \"${cyan}${arrow} ${_list_options[$i]} ${normal}\"\n    else\n      print \"  ${_list_options[$i]}\"\n    fi\n    tput el\n  done\n\n  for j in $(gen_index ${#_list_options[@]}); do\n    tput cuu1\n  done\n\n  on_keypress on_list_input_up on_list_input_down on_list_input_enter_space on_list_input_enter_space\n\n}\n\n\nlist_input() {\n  _list_input \"$1\" \"$2\"\n  local var_name=$3\n  eval $var_name=\\'\"${_list_options[$_list_selected_index]}\"\\'\n  unset _list_selected_index\n  unset _list_options\n  unset _break_keypress\n  unset _first_keystroke\n\n  cleanup\n}\n\nlist_input_index() {\n  _list_input \"$1\" \"$2\"\n  local var_name=$3\n  eval $var_name=\\'\"$_list_selected_index\"\\'\n  unset _list_selected_index\n  unset _list_options\n  unset _break_keypress\n  unset _first_keystroke\n\n  cleanup\n}\n\n\n\n\non_text_input_left() {\n  remove_regex_failed\n  if [ $_current_pos -gt 0 ]; then\n    tput cub1\n    _current_pos=$(($_current_pos-1))\n  fi\n}\n\non_text_input_right() {\n  remove_regex_failed\n  if [ $_current_pos -lt ${#_text_input} ]; then\n    tput cuf1\n    _current_pos=$(($_current_pos+1))\n  fi\n}\n\non_text_input_enter() {\n  remove_regex_failed\n\n  if [[ \"$_text_input\" =~ $_text_input_regex && \"$(eval $_text_input_validator \"$_text_input\")\" = true ]]; then\n    tput cub \"$(tput cols)\"\n    tput cuf $((${#_read_prompt}-19))\n    printf \"${cyan}${_text_input}${normal}\"\n    tput el\n    tput cud1\n    tput cub \"$(tput cols)\"\n    tput el\n    eval $var_name=\\'\"${_text_input}\"\\'\n    _break_keypress=true\n  else\n    _text_input_regex_failed=true\n    tput civis\n    tput cud1\n    tput cub \"$(tput cols)\"\n    tput el\n    printf \"${red}>>${normal} $_text_input_regex_failed_msg\"\n    tput cuu1\n    tput cub \"$(tput cols)\"\n    tput cuf $((${#_read_prompt}-19))\n    tput el\n    _text_input=\"\"\n    _current_pos=0\n    tput cnorm\n  fi\n}\n\non_text_input_ascii() {\n  remove_regex_failed\n  local c=$1\n\n  if [ \"$c\" = '' ]; then\n    c=' '\n  fi\n\n  local rest=\"${_text_input:$_current_pos}\"\n  _text_input=\"${_text_input:0:$_current_pos}$c$rest\"\n  _current_pos=$(($_current_pos+1))\n\n  tput civis\n  printf \"$c$rest\"\n  tput el\n  if [ ${#rest} -gt 0 ]; then\n    tput cub ${#rest}\n  fi\n  tput cnorm\n}\n\non_text_input_backspace() {\n  remove_regex_failed\n  if [ $_current_pos -gt 0 ]; then\n    local start=\"${_text_input:0:$(($_current_pos-1))}\"\n    local rest=\"${_text_input:$_current_pos}\"\n    _current_pos=$(($_current_pos-1))\n    tput cub 1\n    tput el\n    tput sc\n    printf \"$rest\"\n    tput rc\n    _text_input=\"$start$rest\"\n  fi\n}\n\nremove_regex_failed() {\n  if [ $_text_input_regex_failed = true ]; then\n    _text_input_regex_failed=false\n    tput sc\n    tput cud1\n    tput el1\n    tput el\n    tput rc\n  fi\n}\n\ntext_input_default_validator() {\n  echo true;\n}\n\ntext_input() {\n  local prompt=$1\n  local var_name=$2\n  local _text_input_regex=\"${3:-\"\\.+\"}\"\n  local _text_input_regex_failed_msg=${4:-\"Input validation failed\"}\n  local _text_input_validator=${5:-text_input_default_validator}\n  local _read_prompt_start=$'\\e[32m?\\e[39m\\e[1m'\n  local _read_prompt_end=$'\\e[22m'\n  local _read_prompt=\"$( echo \"$_read_prompt_start ${prompt} $_read_prompt_end\")\"\n  local _current_pos=0\n  local _text_input_regex_failed=false\n  local _text_input=\"\"\n  printf \"$_read_prompt\"\n\n\n  trap control_c SIGINT EXIT\n\n  stty -echo\n  tput cnorm\n\n  on_keypress on_default on_default on_text_input_ascii on_text_input_enter on_text_input_left on_text_input_right on_text_input_ascii on_text_input_backspace\n  eval $var_name=\\'\"${_text_input}\"\\'\n\n  cleanup\n}\n\n# =============================================================\n\nfunction menuFromCmd() {\n\tlocal mLOCALRESULT=$1\n\tlocal mRESULT=''\n\tread -r -a ARRAY <<< $3\n\tlist_input \"$2\" ARRAY mRESULT\n\teval $mLOCALRESULT=\"'$mRESULT'\"\n}\n\nfunction menuFromArr() {\n\tlocal mLOCALRESULT=$1\n\tshift\n\tlocal PROMPT=$1\n\tshift\n\tlocal ARRAY=(\"$@\")\n\tlist_input \"$PROMPT\" ARRAY mRESULT\n\teval $mLOCALRESULT=\"'$mRESULT'\"\n}\n\nfunction multiFromArr() {\n\tlocal mLOCALRESULT=$1\n\tshift\n\tlocal PROMPT=$1\n\tshift\n\tlocal ARRAY=(\"$@\")\n\tcheckbox_input \"$PROMPT\" ARRAY mRESULT\n\teval $mLOCALRESULT=\"'$mRESULT'\"\n}\n"
  },
  {
    "path": "installer.sh",
    "content": "#!/usr/bin/env bash\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" >/dev/null 2>&1 && pwd )\"\n\nMAKEDEMO=0\nUSEDEMO=0\n\n. \"${DIR}/install/inquirer.sh\"\n\nINSTALLED_EXES=()\n\nfunction waUsage() {\n\techo 'Usage:\n  ./installer.sh --user    # Install everything in ${HOME}\n  ./installer.sh --system  # Install everything in /usr'\n\texit\n}\n\nfunction waNoSudo() {\n\techo 'You are attempting to switch from a --system install to a --user install.\nPlease run \"./installer.sh --system --uninstall\" first.'\n\texit\n}\n\nfunction waInstall() {\n\t${SUDO} mkdir -p \"${SYS_PATH}/apps\"\n\t. \"${DIR}/bin/winapps\" install\n}\n\nfunction waFindInstalled() {\n\techo -n \"  Checking for installed apps in RDP machine (this may take a while)...\"\n\tif [ $USEDEMO != 1 ]; then\n\t\trm -f ${HOME}/.local/share/winapps/installed.bat\n\t\trm -f ${HOME}/.local/share/winapps/installed.tmp\n\t\trm -f ${HOME}/.local/share/winapps/installed\n\t\trm -f ${HOME}/.local/share/winapps/detected\n\t\tcp \"${DIR}/install/ExtractPrograms.ps1\" ${HOME}/.local/share/winapps/ExtractPrograms.ps1\n\t\tfor F in $(ls \"${DIR}/apps\"); do\n\t\t\t. \"${DIR}/apps/${F}/info\"\n\t\t\techo \"IF EXIST \\\"${WIN_EXECUTABLE}\\\" ECHO ${F} >> \\\\\\\\tsclient\\\\home\\\\.local\\\\share\\\\winapps\\\\installed.tmp\" >> ${HOME}/.local/share/winapps/installed.bat\n\t\tdone;\n\t\techo \"powershell.exe -ExecutionPolicy Bypass -File \\\\\\\\tsclient\\\\home\\\\.local\\\\share\\\\winapps\\\\ExtractPrograms.ps1 > \\\\\\\\tsclient\\home\\\\.local\\\\share\\\\winapps\\\\detected\" >> ${HOME}/.local/share/winapps/installed.bat\n\t\techo \"RENAME \\\\\\\\tsclient\\\\home\\\\.local\\\\share\\\\winapps\\\\installed.tmp installed\" >> ${HOME}/.local/share/winapps/installed.bat\n\t\txfreerdp /d:\"${RDP_DOMAIN}\" /u:\"${RDP_USER}\" /p:\"${RDP_PASS}\" /v:${RDP_IP} +auto-reconnect +home-drive -wallpaper /span /wm-class:\"RDPInstaller\" /app:\"C:\\Windows\\System32\\cmd.exe\" /app-icon:\"${DIR}/../icons/windows.svg\" /app-cmd:\"/C \\\\\\\\tsclient\\\\home\\\\.local\\\\share\\\\winapps\\\\installed.bat\" 1> /dev/null 2>&1 &\n\t\tCOUNT=0\n\t\twhile [ ! -f \"${HOME}/.local/share/winapps/installed\" ]; do\n\t\t\tsleep 5\n\t\t\tCOUNT=$((COUNT + 1))\n\t\t\tif (( COUNT == 15 )); then\n\t\t\t\techo \" Finished.\"\n\t\t\t\techo \"\"\n\t\t\t\techo \"The RDP connection failed to connect or run. Please confirm FreeRDP can connect with:\"\n\t\t\t\techo \"  bin/winapps check\"\n\t\t\t\techo \"\"\n\t\t\t\techo \"If it cannot connect, this is most likely due to:\"\n\t\t\t\techo \"  - You need to accept the security cert the first time you connect (with 'check')\"\n\t\t\t\techo \"  - Not enabling RDP in the Windows VM\"\n\t\t\t\techo \"  - Not being able to connect to the IP of the VM\"\n\t\t\t\techo \"  - Incorrect user credentials in winapps.conf\"\n\t\t\t\techo \"  - Not merging install/RDPApps.reg into the VM\"\n\t\t\t\texit\n\t\t\tfi\n\t\tdone\n\t\tif [ $MAKEDEMO = 1 ]; then\n\t\t\trm -rf /tmp/winapps_demo\n\t\t\tcp -a ${HOME}/.local/share/winapps /tmp/winapps_demo\n\t\t\texit\n\t\tfi\n\telse\n\t\trm -rf ${HOME}/.local/share/winapps\n\t\tcp -a /tmp/winapps_demo ${HOME}/.local/share/winapps\n\t\t#sleep 3\n\tfi\n\techo \" Finished.\"\n}\n\nfunction waConfigureApp() {\n\t\t. \"${SYS_PATH}/apps/${1}/info\"\n\t\techo -n \"  Configuring ${NAME}...\"\n\t\tif [ ${USEDEMO} != 1 ]; then\n\t\t\t${SUDO} rm -f \"${APP_PATH}/${1}.desktop\"\n\t\t\techo \"[Desktop Entry]\nName=${NAME}\nExec=${BIN_PATH}/winapps ${1} %F\nTerminal=false\nType=Application\nIcon=${SYS_PATH}/apps/${1}/icon.${2}\nStartupWMClass=${FULL_NAME}\nComment=${FULL_NAME}\nCategories=${CATEGORIES}\nMimeType=${MIME_TYPES}\n\" |${SUDO} tee \"${APP_PATH}/${1}.desktop\" > /dev/null\n\t\t\t${SUDO} rm -f \"${BIN_PATH}/${1}\"\n\t\t\techo \"#!/usr/bin/env bash\n${BIN_PATH}/winapps ${1} $@\n\" |${SUDO} tee \"${BIN_PATH}/${1}\" > /dev/null\n\t\t\t${SUDO} chmod a+x \"${BIN_PATH}/${1}\"\n\t\tfi\n\t\techo \" Finished.\"\n}\n\nfunction waConfigureApps() {\n\tAPPS=()\n\tfor F in $(cat \"${HOME}/.local/share/winapps/installed\" |sed 's/\\r/\\n/g'); do\n\t\t. \"${DIR}/apps/${F}/info\"\n\t\tAPPS+=(\"${FULL_NAME} (${F})\")\n\t\tINSTALLED_EXES+=(\"$(echo \"${WIN_EXECUTABLE##*\\\\}\" |tr '[:upper:]' '[:lower:]')\")\n\tdone\n\tIFS=$'\\n' APPS=($(sort <<<\"${APPS[*]}\"))\n\tunset IFS\n\tOPTIONS=(\"Set up all detected pre-configured applications\" \"Select which pre-configured applications to set up\" \"Do not set up any pre-configured applications\")\n\tmenuFromArr APP_INSTALL \"How would you like to handle WinApps pre-configured applications?\" \"${OPTIONS[@]}\"\n\tif [ \"${APP_INSTALL}\" = \"Select which pre-configured applications to set up\" ]; then\n\t\tcheckbox_input \"Which pre-configured apps would you like to set up?\" APPS SELECTED_APPS\n\t\techo \"\" > \"${HOME}/.local/share/winapps/installed\"\n\t\tfor F in \"${SELECTED_APPS[@]}\"; do\n\t\t\tAPP=\"${F##*(}\"\n\t\t\tAPP=\"${APP%%)}\"\n\t\t\techo \"${APP}\" >> \"${HOME}/.local/share/winapps/installed\"\n\t\tdone\n\tfi\t\n\t${SUDO} cp \"${DIR}/bin/winapps\" \"${BIN_PATH}/winapps\"\n\tCOUNT=0\n\tif [ \"${APP_INSTALL}\" != \"Do not set up any pre-configured applications\" ]; then\n\t\tfor F in $(cat \"${HOME}/.local/share/winapps/installed\" |sed 's/\\r/\\n/g'); do\n\t\t\tCOUNT=$((COUNT + 1))\n\t\t\t${SUDO} cp -r \"apps/${F}\" \"${SYS_PATH}/apps\"\n\t\t\twaConfigureApp \"${F}\" svg\n\t\tdone\n\tfi\n\trm -f \"${HOME}/.local/share/winapps/installed\"\n\trm -f \"${HOME}/.local/share/winapps/installed.bat\"\n\tif (( $COUNT == 0 )); then\n\t\techo \"  No configured applications.\"\n\tfi\n}\n\nfunction waConfigureDetectedApps() {\n\tif [ -f \"${HOME}/.local/share/winapps/detected\" ]; then\n\t\tsed -i 's/\\r//g' \"${HOME}/.local/share/winapps/detected\"\n\t\t. \"${HOME}/.local/share/winapps/detected\"\n\t\tAPPS=()\n\t\tfor I in \"${!NAMES[@]}\"; do\n\t\t\tEXE=${EXES[$I]##*\\\\}\n\t\t\tEXE_LOWER=$(echo \"${EXE}\" |tr '[:upper:]' '[:lower:]')\n\t\t\tif ( dlm=$'\\x1F' ; IFS=\"$dlm\" ; [[ \"$dlm${INSTALLED_EXES[*]}$dlm\" != *\"$dlm${EXE_LOWER}$dlm\"* ]] ) ; then\n\t\t\t\tAPPS+=(\"${NAMES[$I]} (${EXE})\")\n\t\t\tfi\n\t\tdone\n\t\tIFS=$'\\n' APPS=($(sort <<<\"${APPS[*]}\"))\n\t\tunset IFS\n\t\tOPTIONS=(\"Set up all detected applications\" \"Select which applications to set up\" \"Do not set up any applications\")\n\t\tmenuFromArr APP_INSTALL \"How would you like to handle other detected applications?\" \"${OPTIONS[@]}\"\n\t\tif [ \"${APP_INSTALL}\" = \"Select which applications to set up\" ]; then\n\t\t\tcheckbox_input \"Which other apps would you like to set up?\" APPS SELECTED_APPS\n\t\t\techo \"\" > \"${HOME}/.local/share/winapps/installed\"\n\t\t\tfor F in \"${SELECTED_APPS[@]}\"; do\n\t\t\t\tEXE=\"${F##*(}\"\n\t\t\t\tEXE=\"${EXE%%)}\"\n\t\t\t\tAPP=\"${F% (*}\"\n\t\t\t\techo \"${EXE}|${APP}\" >> \"${HOME}/.local/share/winapps/installed\"\n\t\t\tdone\n\t\telif [ \"${APP_INSTALL}\" = \"Set up all detected applications\" ]; then\n\t\t\tfor I in \"${!EXES[@]}\"; do\n\t\t\t\tEXE=${EXES[$I]##*\\\\}\n\t\t\t\techo \"${EXE}|${NAMES[$I]}\" >> \"${HOME}/.local/share/winapps/installed\"\n\t\t\tdone\n\t\tfi\n\t\tCOUNT=0\n\t\tif [ -f \"${HOME}/.local/share/winapps/installed\" ]; then\n\t\t\twhile read LINE; do\n\t\t\t\tEXE=\"${LINE%|*}\"\n\t\t\t\tNAME=\"${LINE#*|}\"\n\t\t\t\tfor I in \"${!NAMES[@]}\"; do\n\t\t\t\t\tif [ \"${NAME}\" = \"${NAMES[$I]}\" ] && [[ \"${EXES[$I]}\" == *\"\\\\${EXE}\" ]]; then\n\t\t\t\t\t\tEXE=$(echo \"${EXE}\" |tr '[:upper:]' '[:lower:]')\n\t\t\t\t\t\t${SUDO} mkdir -p \"${SYS_PATH}/apps/${EXE}\"\n\t\t\t\t\t\techo \"# GNOME shortcut name\nNAME=\\\"${NAME}\\\"\n\n# Used for descriptions and window class\nFULL_NAME=\\\"${NAME}\\\"\n\n# The executable inside windows\nWIN_EXECUTABLE=\\\"${EXES[$I]}\\\"\n\n# GNOME categories\nCATEGORIES=\\\"WinApps\\\"\n\n# GNOME mimetypes\nMIME_TYPES=\\\"\\\"\n\" > \"${SYS_PATH}/apps/${EXE}/info\"\n\t\t\t\t\t\techo \"${ICONS[$I]}\" | base64 -d > \"${SYS_PATH}/apps/${EXE}/icon.ico\"\n\t\t\t\t\t\twaConfigureApp \"${EXE}\" ico\n\t\t\t\t\t\tCOUNT=$((COUNT + 1))\n\t\t\t\t\tfi\n\t\t\t\tdone\n\t\t\tdone < \"${HOME}/.local/share/winapps/installed\"\n\t\t\trm -f \"${HOME}/.local/share/winapps/installed\"\n\t\tfi\n\t\trm -f \"${HOME}/.local/share/winapps/installed.bat\"\n\t\tif (( $COUNT == 0 )); then\n\t\t\techo \"  No configured applications.\"\n\t\tfi\n\tfi\n}\n\n\nfunction waConfigureWindows() {\n\techo -n \"  Configuring Windows...\"\n\tif [ ${USEDEMO} != 1 ]; then\n\t\t${SUDO} rm -f \"${APP_PATH}/windows.desktop\"\n\t\t${SUDO} mkdir -p \"${SYS_PATH}/icons\"\n\t\t${SUDO} cp \"${DIR}/icons/windows.svg\" \"${SYS_PATH}/icons/windows.svg\"\n\t\techo \"[Desktop Entry]\nName=Windows\nExec=${BIN_PATH}/winapps windows %F\nTerminal=false\nType=Application\nIcon=${SYS_PATH}/icons/windows.svg\nStartupWMClass=Micorosoft Windows\nComment=Micorosoft Windows\nCategories=Windows\n\" |${SUDO} tee \"${APP_PATH}/windows.desktop\" > /dev/null\n\t\t${SUDO} rm -f \"${BIN_PATH}/windows\"\n\t\techo \"#!/usr/bin/env bash\n${BIN_PATH}/winapps windows\n\" |${SUDO} tee \"/${BIN_PATH}/windows\" > /dev/null\n\t\t${SUDO} chmod a+x \"${BIN_PATH}/windows\"\n\tfi\n\techo \" Finished.\"\n}\n\nfunction waUninstallUser() {\n\trm -f \"${HOME}/.local/bin/winapps\"\n\trm -rf \"${HOME}/.local/share/winapps\"\n\tfor F in $(grep -l -d skip \"bin/winapps\" \"${HOME}/.local/share/applications/\"*); do\n\t\techo -n \"  Removing ${F}...\"\n\t\t${SUDO} rm ${F}\n\t\techo \" Finished.\"\n\tdone\n\tfor F in $(grep -l -d skip \"bin/winapps\" \"${HOME}/.local/bin/\"*); do\n\t\techo -n \"  Removing ${F}...\"\n\t\t${SUDO} rm ${F}\n\t\techo \" Finished.\"\n\tdone\n}\n\nfunction waUninstallSystem() {\n\t${SUDO} rm -f \"/usr/local/bin/winapps\"\n\t${SUDO} rm -rf \"/usr/local/share/winapps\"\n\tfor F in $(grep -l -d skip \"bin/winapps\" \"/usr/share/applications/\"*); do\n\t\tif [ -z \"${SUDO}\" ]; then\n\t\t\twaNoSudo\n\t\tfi\n\t\techo -n \"  Removing ${F}...\"\n\t\t${SUDO} rm ${F}\n\t\techo \" Finished.\"\n\tdone\n\tfor F in $(grep -l -d skip \"bin/winapps\" \"/usr/local/bin/\"*); do\n\t\tif [ -z \"${SUDO}\" ]; then\n\t\t\twaNoSudo\n\t\tfi\n\t\techo -n \"  Removing ${F}...\"\n\t\t${SUDO} rm ${F}\n\t\techo \" Finished.\"\n\tdone\n}\n\nif [ -z \"${1}\" ]; then\n\tOPTIONS=(User System)\n\tmenuFromArr INSTALL_TYPE \"Would you like to install for the current user or the whole system?\" \"${OPTIONS[@]}\"\nelif [ \"${1}\" = '--user' ]; then\n\tINSTALL_TYPE='User'\nelif [ \"${1}\" = '--system' ]; then\n\tINSTALL_TYPE='System'\nelse\n\twaUsage\nfi\n\nif [ \"${INSTALL_TYPE}\" = 'User' ]; then\n\tSUDO=\"\"\n\tBIN_PATH=\"${HOME}/.local/bin\"\n\tAPP_PATH=\"${HOME}/.local/share/applications\"\n\tSYS_PATH=\"${HOME}/.local/share/winapps\"\n\tif [ -n \"${2}\" ]; then\n\t\tif [ \"${2}\" = '--uninstall' ]; then\n\t\t\t# Uninstall\n\t\t\techo \"Uninstalling...\"\n\t\t\twaUninstallUser\n\t\t\texit\n\t\telse\n\t\t\tusage\n\t\tfi\n\tfi\nelif [ \"${INSTALL_TYPE}\" = 'System' ]; then\n\tSUDO=\"sudo\"\n\tsudo ls > /dev/null\n\tBIN_PATH=\"/usr/local/bin\"\n\tAPP_PATH=\"/usr/share/applications\"\n\tSYS_PATH=\"/usr/local/share/winapps\"\n\tif [ -n \"${2}\" ]; then\n\t\tif [ \"${2}\" = '--uninstall' ]; then\n\t\t\t# Uninstall\n\t\t\techo \"Uninstalling...\"\n\t\t\twaUninstallSystem\n\t\t\texit\n\t\telse\n\t\t\tusage\n\t\tfi\n\tfi\nfi\n\necho \"Removing any old configurations...\"\nwaUninstallUser\nwaUninstallSystem\n\necho \"Installing...\"\n\n# Inititialize\nwaInstall\n\n# Check for installed apps\nwaFindInstalled\n\n# Install windows\nwaConfigureWindows\n\n# Configure apps\nwaConfigureApps\nwaConfigureDetectedApps\n\necho \"Installation complete.\""
  },
  {
    "path": "kvm/RDPWindows.xml",
    "content": "<domain type='kvm' id='9'>\n  <name>RDPWindows</name>\n  <uuid>50f121b4-93e7-46b5-b302-902d022dfa9c</uuid>\n  <metadata>\n    <libosinfo:libosinfo xmlns:libosinfo=\"http://libosinfo.org/xmlns/libvirt/domain/1.0\">\n      <libosinfo:os id=\"http://microsoft.com/win/10\"/>\n    </libosinfo:libosinfo>\n  </metadata>\n  <memory unit='KiB'>4194304</memory>\n  <currentMemory unit='KiB'>1298432</currentMemory>\n  <vcpu placement='static'>2</vcpu>\n  <resource>\n    <partition>/machine</partition>\n  </resource>\n  <os>\n    <type arch='x86_64' machine='pc-q35-4.2'>hvm</type>\n  </os>\n  <features>\n    <acpi/>\n    <apic/>\n    <hyperv>\n      <relaxed state='on'/>\n      <vapic state='on'/>\n      <spinlocks state='on' retries='8191'/>\n    </hyperv>\n    <vmport state='off'/>\n  </features>\n  <cpu mode='custom' match='exact' check='full'>\n    <model fallback='forbid'>Haswell-noTSX-IBRS</model>\n    <vendor>Intel</vendor>\n    <feature policy='require' name='vme'/>\n    <feature policy='require' name='ss'/>\n    <feature policy='require' name='vmx'/>\n    <feature policy='require' name='f16c'/>\n    <feature policy='require' name='rdrand'/>\n    <feature policy='require' name='hypervisor'/>\n    <feature policy='require' name='arat'/>\n    <feature policy='require' name='tsc_adjust'/>\n    <feature policy='require' name='umip'/>\n    <feature policy='require' name='md-clear'/>\n    <feature policy='require' name='stibp'/>\n    <feature policy='require' name='arch-capabilities'/>\n    <feature policy='require' name='ssbd'/>\n    <feature policy='require' name='xsaveopt'/>\n    <feature policy='require' name='pdpe1gb'/>\n    <feature policy='require' name='abm'/>\n    <feature policy='require' name='ibpb'/>\n    <feature policy='require' name='amd-stibp'/>\n    <feature policy='require' name='amd-ssbd'/>\n    <feature policy='require' name='skip-l1dfl-vmentry'/>\n    <feature policy='require' name='pschange-mc-no'/>\n  </cpu>\n  <clock offset='localtime'>\n    <timer name='hpet' present='yes'/>\n    <timer name='hypervclock' present='yes'/>\n  </clock>\n  <on_poweroff>destroy</on_poweroff>\n  <on_reboot>restart</on_reboot>\n  <on_crash>destroy</on_crash>\n  <pm>\n    <suspend-to-mem enabled='no'/>\n    <suspend-to-disk enabled='no'/>\n  </pm>\n  <devices>\n    <emulator>/usr/bin/qemu-system-x86_64</emulator>\n    <disk type='file' device='cdrom'>\n      <driver name='qemu' type='raw'/>\n      <source file='./Win10_2004_English_x64.iso' index='3'/>\n      <backingStore/>\n      <target dev='sdb' bus='sata'/>\n      <readonly/>\n      <boot order='2'/>\n      <alias name='sata0-0-1'/>\n      <address type='drive' controller='0' bus='0' target='0' unit='1'/>\n    </disk>\n    <disk type='file' device='cdrom'>\n      <driver name='qemu' type='raw'/>\n      <source file='./virtio-win-0.1.185.iso' index='2'/>\n      <backingStore/>\n      <target dev='sdc' bus='sata'/>\n      <readonly/>\n      <alias name='sata0-0-2'/>\n      <address type='drive' controller='0' bus='0' target='0' unit='2'/>\n    </disk>\n    <disk type='file' device='disk'>\n      <driver name='qemu' type='qcow2'/>\n      <source file='./RDPWindows.qcow2' index='1'/>\n      <backingStore/>\n      <target dev='vda' bus='virtio'/>\n      <boot order='1'/>\n      <alias name='virtio-disk0'/>\n      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>\n    </disk>\n    <controller type='usb' index='0' model='qemu-xhci' ports='15'>\n      <alias name='usb'/>\n      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>\n    </controller>\n    <controller type='sata' index='0'>\n      <alias name='ide'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>\n    </controller>\n    <controller type='pci' index='0' model='pcie-root'>\n      <alias name='pcie.0'/>\n    </controller>\n    <controller type='pci' index='1' model='pcie-root-port'>\n      <model name='pcie-root-port'/>\n      <target chassis='1' port='0x10'/>\n      <alias name='pci.1'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>\n    </controller>\n    <controller type='pci' index='2' model='pcie-root-port'>\n      <model name='pcie-root-port'/>\n      <target chassis='2' port='0x11'/>\n      <alias name='pci.2'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>\n    </controller>\n    <controller type='pci' index='3' model='pcie-root-port'>\n      <model name='pcie-root-port'/>\n      <target chassis='3' port='0x12'/>\n      <alias name='pci.3'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>\n    </controller>\n    <controller type='pci' index='4' model='pcie-root-port'>\n      <model name='pcie-root-port'/>\n      <target chassis='4' port='0x13'/>\n      <alias name='pci.4'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>\n    </controller>\n    <controller type='pci' index='5' model='pcie-root-port'>\n      <model name='pcie-root-port'/>\n      <target chassis='5' port='0x14'/>\n      <alias name='pci.5'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>\n    </controller>\n    <controller type='pci' index='6' model='pcie-root-port'>\n      <model name='pcie-root-port'/>\n      <target chassis='6' port='0x15'/>\n      <alias name='pci.6'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>\n    </controller>\n    <controller type='virtio-serial' index='0'>\n      <alias name='virtio-serial0'/>\n      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>\n    </controller>\n    <interface type='network'>\n      <mac address='52:54:00:40:9c:f6'/>\n      <source network='default' portid='1b8151f7-ddce-4dcc-99cb-55c80590fde7' bridge='virbr0'/>\n      <target dev='vnet0'/>\n      <model type='virtio'/>\n      <alias name='net0'/>\n      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>\n    </interface>\n    <serial type='pty'>\n      <source path='/dev/pts/8'/>\n      <target type='isa-serial' port='0'>\n        <model name='isa-serial'/>\n      </target>\n      <alias name='serial0'/>\n    </serial>\n    <console type='pty' tty='/dev/pts/8'>\n      <source path='/dev/pts/8'/>\n      <target type='serial' port='0'/>\n      <alias name='serial0'/>\n    </console>\n    <channel type='spicevmc'>\n      <target type='virtio' name='com.redhat.spice.0' state='connected'/>\n      <alias name='channel0'/>\n      <address type='virtio-serial' controller='0' bus='0' port='1'/>\n    </channel>\n    <input type='tablet' bus='usb'>\n      <alias name='input0'/>\n      <address type='usb' bus='0' port='1'/>\n    </input>\n    <input type='mouse' bus='ps2'>\n      <alias name='input1'/>\n    </input>\n    <input type='keyboard' bus='ps2'>\n      <alias name='input2'/>\n    </input>\n    <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>\n      <listen type='address' address='127.0.0.1'/>\n      <image compression='off'/>\n    </graphics>\n    <sound model='ich9'>\n      <alias name='sound0'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>\n    </sound>\n    <video>\n      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>\n      <alias name='video0'/>\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>\n    </video>\n    <redirdev bus='usb' type='spicevmc'>\n      <alias name='redir0'/>\n      <address type='usb' bus='0' port='2'/>\n    </redirdev>\n    <redirdev bus='usb' type='spicevmc'>\n      <alias name='redir1'/>\n      <address type='usb' bus='0' port='3'/>\n    </redirdev>\n    <memballoon model='virtio'>\n      <alias name='balloon0'/>\n      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>\n    </memballoon>\n  </devices>\n  <seclabel type='dynamic' model='dac' relabel='yes'>\n    <label>+385601105:+385600513</label>\n    <imagelabel>+385601105:+385600513</imagelabel>\n  </seclabel>\n</domain>\n\n"
  }
]