I’ve recently started migrating from Windows to Linux as part of a new company I have started leveraging open source software for all business needs. This has the obvious headaches of getting software to run correctly if not native.
My chosen distribution is CachyOS and I thought I’d share how I got PrePoMax running with proper DPI scaling on my system. For reference my system is:
AMD 7950 X, 64 GB DDR5, NVIDIA 3080Ti
CachyOS 7.2.3-1, KDE 6.7.4, KDE Framework 6.29.0, QT 6.11.2 Wayland
Step 1: Install Bottles/Flatseal
Install the Bottles WINE/containerization platform to run PrePoMax on. Additionally install Flatseal if you want to be able to access files from your machine (or specific locations on your machine) since Bottles is a flatpak. Not necessary if you don’t use flatpak.
If using flatpak, make sure to give file system access to Bottles with Flatseal.
Step 2: Create the Bottle
Make a Bottle of Type “Application”. Runner should default to soda which is what this guide used successfully.
Step 3: Setup Fonts (Optional)
The default fonts that ship with Bottles are not enough for PrePoMax. If not setup correctly, it will default to some sort of Times New Roman font throughout. Its a little ugly but OK, bigger problem is strange box characters appearing and poor table formatting.
The only way I was able to figure this out is with brute force. I installed the allfonts dependency in the Dependencies of the Bottle. This helped some. Secondly, I copied the entire fonts folder over from one of my windows machine (C:\Windows\Fonts) to the Bottle’s corresponding folder (…BottleName\c_drive\Windows\Fonts). I am sure all are not necessary but haven’t been able to isolate the correct minimal set and this worked to fix visual artifacts.
You can do this copy operation simply by going to “Browse Bottle Files” for the Bottle once it has been created.
Step 4: Install .NET 4.8
PrePoMax needs .NET 4.8. Under Dependencies for the Bottle, simply install the package “dotnet48”.
Step 5: Download and Run PrePoMax
Download the Windows archive from PrePoMax and extract it.
Its the user choice where to place it. For organization, I placed it in the Bottles C:\ root so it was simply located at:
…BottleName\c_drive\PrePoMax 2.6.0\
Give it a test run to ensure it opens by clicking “Run Executable” and pointing it to the PrePoMax.exe from the archive at the location you put it. PrePoMax should run if all is well. This immediately worked for me.
Step 6: Make PrePoMax Accessible
Since PrePoMax is not an installer, you’d need to click Run Executable and point it at PrePoMax each time which is annoying. To make things simpler, in the Bottle under Programs, click Add Shortcut and point it to the .exe. From here on out you can access PrePoMax by click run from the list it now occupies in the Bottles menu.
You can access PrePoMax more seamlessly by making a launcher in your Linux system so you can simply click a PrePoMax short cut in your launcher menu or taskbar or desktop and it launches PrePoMax from Bottles automatically. This is easily done by clicking the 3 vertical dots next to the new PrePoMax shortcut in Bottles and click “Create desktop shortcut” which will do this for you and place it on the Desktop and in your launcher menu of your DE in Linux. This worked fine for me in KDE after running a cache rebuild in terminal via “kbuildsycoca6”. Give the generated launcher a test to see if it works.
Step 7: Fix Scaling (Optional)
For me, the default size of PrePoMax is a bit too small for legibility. I have 2560x1440 27" displays and typically run 125% scaling for eye relief across the system.
You can do this in Bottles as well by going to the Advanced Display settings and change the DPI from default 96 to 120.
The downside to this is PrePoMax currently doesn’t appear to ship HiDPI aware. So the size will increase at 120 DPI but it will be bitmap scaling which looks blurry and defeats the purpose of the eye relief.
To fix this, I modified the PrePoMax.exe manifest using Resource Hacker.
Make a backup copy of the PrePoMax.exe (e.g. copy, paste, rename PrePoMaxOrg.exe). Download Resource Hacker and install it into the same Bottle created for PrePoMax. Resource Hacker is a .msi package so you’ll run the installer you download using Run Executable which will install it like you would on a normal system but in the Bottle. After its done, Resource Hacker should appear in the list of programs the Bottle can execute next to the PrePoMax shortcut you created.
Run the installed Resource Hacker. It will open and the click Open and point to the original PrePoMax.exe in your Bottle. Expand the folder named manifest and highlight the contained manifest (labeled 1:0). It will populate the right pane with the manifest .xml of PrePoMax.exe. It should appear somewhat like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Highlight all that text and replace it with this new manifest which enabled HiDPI awareness:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0"
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity version="1.0.0.0"
name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<asmv3:application>
<asmv3:windowsSettings
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
Where you can clearly see the true flags. Once you have this in there, click the green arrow “Compile Script” then click save. This has now modified the manifest for the PrePoMax.exe.
Fully shut down and exit Bottles, then relaunch it. With this in place, higher DPI scales beyond 96 will appear crisp and large (in my case at 120 DPI). Note that there will still be some minor graphical artifacts still that are unavoidable (that I have found). For example the larger scale may cause some text on the buttons to be minorly clipped but the higher DPI scaling and text sharpness benefit over this in my opinion.
If anyone else has other tips or tricks that got PrePoMax working well on their Linux systems, please let me know. Aside from the rabbit hole for DPI scaling, this was relatively painless and now PrePoMax is running quite well on my machine!