Skip to content

Commit

Permalink
Merge branch 'develop' into add-game-atlyss
Browse files Browse the repository at this point in the history
  • Loading branch information
anttimaki authored Nov 27, 2024
2 parents a46d361 + 4eb2df9 commit 86f288a
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 20 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
### 3.1.54
#### Bug fix
- Fixed profile import issue where entries were not found inside zips

### 3.1.53
#### Games added
- WEBFISHING
- SULFUR

#### Other changes
- BONELAB support should now function correctly
- Assemblies will no longer be regenerated on every launch
- "Preloader fix" has been replaced with "Reset \<game\> installation"
- This will delete the entire game directory and prompt Steam to re-validate files
- The preloader fix was originally a solution for old Risk of Rain 2 modded installations using SeikoML failing to
launch

### 3.1.52
#### Small quality of life changes
- Upgraded from Electron v11 to v24
Expand All @@ -6,6 +23,10 @@
- Fixed sorting by download count
- Reduced time taken to install when a mod has a large number of dependencies

#### Games added
- Old Market Simulator
- Subterranauts

### 3.1.51
#### Memory and performance improvements
The TS team have been working hard to improve the following:
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.1.52",
"version": "3.1.54",
"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.1.52');
public static VERSION: VersionNumber = new VersionNumber('3.1.54');
public static IS_PORTABLE: boolean = false;
public static APP_NAME: string = "r2modman";
}
Binary file modified src/assets/images/game_selection/GladioMori.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/game_selection/STRAFTAT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions src/model/game/GameManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,9 @@ export default class GameManager {
GameSelectionDisplayMode.VISIBLE, GameInstanceType.GAME, PackageLoader.BEPINEX, ["act"]),

new Game("Gladio Mori", "GladioMori", "GladioMori",
"Gladio Mori Demo", ["Gladio Mori.exe"], "Gladio Mori_Data",
"Gladio Mori", ["Gladio Mori.exe"], "Gladio Mori_Data",
"https://thunderstore.io/c/gladio-mori/api/v1/package-listing-index/", EXCLUSIONS,
[new StorePlatformMetadata(StorePlatform.STEAM, "2908480")], "GladioMori.png",
[new StorePlatformMetadata(StorePlatform.STEAM, "2689120")], "GladioMori.png",
GameSelectionDisplayMode.VISIBLE, GameInstanceType.GAME, PackageLoader.BEPINEX, ["gm"]),

new Game("Slipstream: Rogue Space", "SlipstreamRogueSpace", "SlipstreamRogueSpace",
Expand Down Expand Up @@ -830,6 +830,12 @@ export default class GameManager {
"https://thunderstore.io/c/atlyss/api/v1/package-listing-index/", EXCLUSIONS,
[new StorePlatformMetadata(StorePlatform.STEAM, "2768430")], "ATLYSS.png",
GameSelectionDisplayMode.VISIBLE, GameInstanceType.GAME, PackageLoader.BEPINEX, [""]),

new Game("STRAFTAT", "STRAFTAT", "STRAFTAT",
"STRAFTAT", ["STRAFTAT.exe"], "STRAFTAT_Data",
"https://thunderstore.io/c/straftat/api/v1/package-listing-index/", EXCLUSIONS,
[new StorePlatformMetadata(StorePlatform.STEAM, "2386720")], "STRAFTAT.png",
GameSelectionDisplayMode.VISIBLE, GameInstanceType.GAME, PackageLoader.BEPINEX, [""]),
];

static get activeGame(): Game {
Expand Down
27 changes: 11 additions & 16 deletions src/providers/generic/zip/AdmZipProvider.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import ZipProvider from './ZipProvider';
import AdmZip, { IZipEntry } from 'adm-zip';
import AdmZip from 'adm-zip';
import * as path from 'path';
import ZipBuilder from './ZipBuilder';
import ZipEntryInterface from './ZipEntryInterface';
import FileUtils from '../../../utils/FileUtils';
import FsProvider from '../file/FsProvider';

export default class AdmZipProvider extends ZipProvider {

async extractAllTo(zip: string | Buffer, outputFolder: string): Promise<void> {
const adm = new AdmZip(zip);
for (let entry of adm.getEntries()) {
await this.sanitizedExtraction(entry, outputFolder);
}
outputFolder = outputFolder.replace(/\\/g, '/');
adm.extractAllTo(outputFolder, true);
}

async readFile(zip: string | Buffer, file: string): Promise<Buffer | null> {
Expand All @@ -27,16 +24,14 @@ export default class AdmZipProvider extends ZipProvider {

async extractEntryTo(zip: string | Buffer, target: string, outputPath: string): Promise<void> {
const adm = new AdmZip(zip);
return this.sanitizedExtraction(adm.getEntry(target)!, outputPath);
}

private async sanitizedExtraction(entry: IZipEntry, outputPath: string): Promise<void> {
const sanitizedTargetName = entry.entryName.split('\\').join('/');
await FileUtils.ensureDirectory(path.dirname(path.join(outputPath, sanitizedTargetName)));
if (entry.isDirectory)
await FileUtils.ensureDirectory(path.join(outputPath, sanitizedTargetName));
else
await FsProvider.instance.writeFile(path.join(outputPath, sanitizedTargetName), entry.getData());
const safeTarget = target.replace(/\\/g, '/');
outputPath = outputPath.replace(/\\/g, '/');
var fullPath = path.join(outputPath, safeTarget).replace(/\\/g, '/');
if(!path.posix.normalize(fullPath).startsWith(outputPath))
{
throw Error("Entry " + target + " would extract outside of expected folder");
}
adm.extractEntryTo(target, outputPath, true, true);
}

zipBuilder(): ZipBuilder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export default class InstallationRuleApplicator {
buildBepInExRules("Subterranauts"),
buildBepInExRules("SULFUR"),
buildBepInExRules("ATLYSS"),
buildBepInExRules("STRAFTAT"),
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ const VARIANTS = {
SULFUR: MODLOADER_PACKAGES,
WEBFISHING: MODLOADER_PACKAGES,
ATLYSS: MODLOADER_PACKAGES,
STRAFTAT: MODLOADER_PACKAGES,
};
// Exported separately from the definition in order to preserve the key names in the type definition.
// Otherwise this would become [key: string] and we couldn't use the game names for type hinting elsewhere.
Expand Down

0 comments on commit 86f288a

Please sign in to comment.