Skip to content
Merged
22 changes: 14 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 3.2.13
#### Fixes
- Linux behaviour used to automatically set WINEDLLOVERRIDES. This has been restored for now.
- Launch argument display fixed in the Help section (Thanks to @alexneargarder).

### 3.2.12
#### Games added
- KeyWe
Expand All @@ -16,21 +21,22 @@
- RV There Yet
- Crab Game
- Cloverpit
- Xbox Game Pass PC support
- Xbox Game Pass PC support

#### Performance
- Mods.yml file size has been reduced by 99.35%
- This results in huge improvements to the performance of profiles
- You'll need to perform a changing action on the profile for it to take effect. This can be:
- Mod re-ordering
- Install/Uninstall/Enable/Disable
- This results in huge improvements to the performance of profiles
- You'll need to perform a changing action on the profile for it to take effect. This can be:
- Mod re-ordering
- Install/Uninstall/Enable/Disable
- Once done, accessing the profiles screen should be near instant
- Local mod list is loaded asynchronously and is visible far quicker than before
- Significantly reduces time spent hanging waiting for the mod list to load
- Significantly reduces time spent hanging waiting for the mod list to load

#### Design changes
- Mod card buttons have been made consistent and no longer take up the entire space
- Easier to visually scan
- Less mouse movement required
- Easier to visually scan
- Less mouse movement required
- The online preview panel now has a different background colour
- Scrollbars are now app-styled rather than native
- Other tweaks to improve the user experience
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "r2modman",
"version": "3.2.12",
"version": "3.2.13",
"description": "A simple and easy to use mod manager for many games using Thunderstore.",
"productName": "r2modman",
"author": "ebkr",
Expand Down
2 changes: 1 addition & 1 deletion src/_managerinf/ManagerInformation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import VersionNumber from '../model/VersionNumber';

export default class ManagerInformation {
public static VERSION: VersionNumber = new VersionNumber('3.2.12');
public static VERSION: VersionNumber = new VersionNumber('3.2.13');
public static IS_PORTABLE: boolean = false;
public static APP_NAME: string = "r2modman";
}
26 changes: 6 additions & 20 deletions src/components/banner/ManagerUpdateBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,13 @@ async function isManagerUpdateAvailable() {
return fetch('https://api.github.com/repos/ebkr/r2modmanPlus/releases')
.then(response => response.json())
.then((parsed: any) => {
parsed.sort((a: any, b: any) => {
if (b !== null) {
const versionA = new VersionNumber(a.name);
const versionB = new VersionNumber(b.name);
return versionA.isNewerThan(versionB);
portableUpdateAvailable.value = parsed.find((release: any) => {
if (release.draft) {
return false;
}
return 1;
});
let foundMatch = false;
parsed.forEach((release: any) => {
if (!foundMatch && !release.draft) {
const releaseVersion = new VersionNumber(release.name);
if (releaseVersion.isNewerThan(ManagerInformation.VERSION)) {
portableUpdateAvailable.value = true;
updateTagName.value = release.tag_name;
foundMatch = true;
return;
}
}
});
portableUpdateAvailable.value = true;
const releaseVersion = new VersionNumber(release.name);
return releaseVersion.isNewerThan(ManagerInformation.VERSION);
}) !== undefined;
}).catch(err => {
// Do nothing, potentially offline. Try next launch.
});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Help.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ onMounted(() => {
doorstopTarget.value = "";
return;
} else {
doorstopTarget.value = target;
doorstopTarget.value = target.map(value => `"${value}"`).join(' ');
}
});
});
Expand Down
68 changes: 68 additions & 0 deletions src/r2mm/launching/runners/linux/SteamGameRunner_Linux.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import FsProvider from '../../../../providers/generic/file/FsProvider';
import path from '../../../../providers/node/path/path';
import LinuxGameDirectoryResolver from '../../../manager/linux/GameDirectoryResolver';
import GameRunnerProvider from '../../../../providers/generic/game/GameRunnerProvider';
import Game from '../../../../model/game/Game';
import R2Error from '../../../../model/errors/R2Error';
Expand Down Expand Up @@ -33,6 +34,12 @@ export default class SteamGameRunner_Linux extends GameRunnerProvider {
if (isProton) {
// BepInEx uses winhttp, GDWeave uses winmm. More can be added later.
const proxyDll = game.packageLoader == PackageLoader.GDWEAVE ? "winmm" : "winhttp";
const promise = await this.ensureWineWillLoadDllOverride(game, proxyDll);
if (promise instanceof R2Error) {
// We no longer want to display an error as launch args should be set correctly.
// A console error still allows it to be discoverable.
console.error(promise);
}
proxyArgs['WINEDLLOVERRIDES'] = `"${proxyDll}=n,b"`
} else {
// If sh files aren't executable then the wrapper will fail.
Expand Down Expand Up @@ -132,6 +139,67 @@ export default class SteamGameRunner_Linux extends GameRunnerProvider {
LoggerProvider.instance.Log(LogSeverity.ERROR, (err as Error).message);
throw new R2Error('Error starting Steam', (err as Error).message, 'Ensure that the Steam folder has been set correctly in the settings');
}
}

private async ensureWineWillLoadDllOverride(game: Game, proxyDll: string): Promise<void | R2Error>{
const fs = FsProvider.instance;
const compatDataDir = await (GameDirectoryResolverProvider.instance as LinuxGameDirectoryResolver).getCompatDataDirectory(game);
if(compatDataDir instanceof R2Error)
return compatDataDir;
const userReg = path.join(compatDataDir, 'pfx', 'user.reg');
const userRegData = (await fs.readFile(userReg)).toString();
const ensuredUserRegData = this.regAddInSection(
userRegData,
"[Software\\\\Wine\\\\DllOverrides]",
proxyDll,
"native,builtin"
);

if(userRegData !== ensuredUserRegData){
await fs.copyFile(userReg, path.join(path.dirname(userReg), 'user.reg.bak'));
await fs.writeFile(userReg, ensuredUserRegData);
}
}

private regAddInSection(reg: string, section: string, key: string, value: string): string {
/*
Example section
[header] // our section variable
#time=... // timestamp
"key"="value"

It's ended with two newlines (/n/n)
*/
let split = reg.split("\n");

let begin = 0;
// Get section begin
for (let index = 0; index < split.length; index++) {
if (split[index]!.startsWith(section)) {
begin = index + 2; // We need to skip the timestamp line
break;
}
}

// Get end
let end = 0;
for (let index = begin; index < split.length; index++) {
if (split[index]!.length == 0) {
end = index;
break;
}
}

// Check for key and fix it eventually, then return
for (let index = begin; index < end; index++) {
if (split[index]!.startsWith(`"${key}"`)) {
split[index] = `"${key}"="${value}"`;
return split.join("\n");
}
}

// Append key and return
split.splice(end, 0, `"${key}"="${value}"`);
return split.join("\n");
}
}
Loading