Skip to content

Commit

Permalink
Updated README and versions.
Browse files Browse the repository at this point in the history
Errors are written to the log file.
  • Loading branch information
ebkr committed May 3, 2021
1 parent 872869d commit 690d2dc
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 159 deletions.
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ From small features such as always-expanded cards, all the way to larger feature
The only thing you have to consider when suggesting a feature is the impact it will have on users who don't have a lot of experience with computers.

## Changelog
### 3.1.13
- Directory resolution should work as intended for more users.
- The settings tabs and search now stay visible when scrolling down the page.
- Mods excluded from the manager are now updated without restarting the manager.
- Visible errors are now also written to the local log file.

### 3.1.12
- Fixed issue causing mod list to not use refreshed cache on initial launch.
- Profiles can now be updated using codes and files without having to export/delete/re-import.
Expand All @@ -84,16 +90,6 @@ The only thing you have to consider when suggesting a feature is the impact it w
- Valheim BepInEx can now use the native version of the game.
- Other minor fixes.

### 3.1.10
- Game selection screen has been overhauled.
- You can now skip game selection using the "Set as default" button.
- You can go back to the game selection screen by using the "Change game" setting.
- Mod list now auto-refreshes every 5 minutes.
- Fixed a bug that caused R2API and HookGenPatcher to break on disable/uninstall.
- Profiles should behave as expected.
- _Please let me know if you get any profile issues._
- Fixed several other small issues.

## Screenshots

Installed mod view
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.12",
"version": "3.1.13",
"description": "A simple and easy to use mod manager for Risk of Rain 2, Dyson Sphere Program and Valheim.",
"productName": "r2modman",
"author": "ebkr",
Expand Down
295 changes: 148 additions & 147 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,157 +24,158 @@
</template>

<script lang="ts">
import Vue from 'vue';
import Component from 'vue-class-component';
import 'bulma-steps/dist/js/bulma-steps.min.js';
import R2Error from './model/errors/R2Error';
import ManagerSettings from './r2mm/manager/ManagerSettings';
import ProfileProvider from './providers/ror2/model_implementation/ProfileProvider';
import ProfileImpl from './r2mm/model_implementation/ProfileImpl';
import LogOutput from './r2mm/data/LogOutput';
import LogOutputProvider from './providers/ror2/data/LogOutputProvider';
import ThunderstoreDownloaderProvider from './providers/ror2/downloading/ThunderstoreDownloaderProvider';
import BetterThunderstoreDownloader from './r2mm/downloading/BetterThunderstoreDownloader';
import { ipcRenderer } from "electron";
import PathResolver from './r2mm/manager/PathResolver';
import path from "path";
import ThemeManager from './r2mm/manager/ThemeManager';
import LoggerProvider, {LogSeverity} from './providers/ror2/logging/LoggerProvider';
import ManagerInformation from './_managerinf/ManagerInformation';
import LocalModInstallerProvider from './providers/ror2/installing/LocalModInstallerProvider';
import LocalModInstaller from './r2mm/installing/LocalModInstaller';
import ProfileInstallerProvider from './providers/ror2/installing/ProfileInstallerProvider';
import ProfileInstaller from './r2mm/installing/ProfileInstaller';
import { Logger } from './r2mm/logging/Logger';
import FileUtils from './utils/FileUtils';
import LinkProvider from './providers/components/LinkProvider';
import LinkImpl from './r2mm/component_override/LinkImpl';
import FsProvider from './providers/generic/file/FsProvider';
import NodeFs from './providers/generic/file/NodeFs';
import InteractionProvider from './providers/ror2/system/InteractionProvider';
import InteractionProviderImpl from './r2mm/system/InteractionProviderImpl';
import ZipProvider from './providers/generic/zip/ZipProvider';
import AdmZipProvider from './providers/generic/zip/AdmZipProvider';
import ManagerSettingsMigration from './r2mm/manager/ManagerSettingsMigration';
import BindLoaderImpl from './providers/components/loaders/bind_impls/BindLoaderImpl';
import GameManager from './model/game/GameManager';
import ThunderstorePackages from './r2mm/data/ThunderstorePackages';
import ProfileModList from './r2mm/mods/ProfileModList';
import Profile from './model/Profile';
import ManifestV2 from './model/ManifestV2';
import PlatformInterceptorProvider from './providers/generic/game/platform_interceptor/PlatformInterceptorProvider';
import PlatformInterceptorImpl from './providers/generic/game/platform_interceptor/PlatformInterceptorImpl';
@Component
export default class App extends Vue {
private errorMessage: string = '';
private errorStack: string = '';
private errorSolution: string = '';
private settings: ManagerSettings | null = null;
private visible: boolean = false;
showError(error: R2Error) {
this.errorMessage = error.name;
this.errorStack = error.message;
this.errorSolution = error.solution;
}
closeErrorModal() {
this.errorMessage = '';
this.errorStack = '';
this.errorSolution = '';
}
async created() {
// Use as default game for settings load.
const riskOfRain2Game = GameManager.gameList.find(value => value.displayName === "Risk of Rain 2")!;
GameManager.activeGame = riskOfRain2Game;
this.hookModListRefresh();
const settings = await ManagerSettings.getSingleton(riskOfRain2Game);
this.settings = settings;
ipcRenderer.once('receive-appData-directory', async (_sender: any, appData: string) => {
import Vue from 'vue';
import Component from 'vue-class-component';
import 'bulma-steps/dist/js/bulma-steps.min.js';
import R2Error from './model/errors/R2Error';
import ManagerSettings from './r2mm/manager/ManagerSettings';
import ProfileProvider from './providers/ror2/model_implementation/ProfileProvider';
import ProfileImpl from './r2mm/model_implementation/ProfileImpl';
import LogOutput from './r2mm/data/LogOutput';
import LogOutputProvider from './providers/ror2/data/LogOutputProvider';
import ThunderstoreDownloaderProvider from './providers/ror2/downloading/ThunderstoreDownloaderProvider';
import BetterThunderstoreDownloader from './r2mm/downloading/BetterThunderstoreDownloader';
import { ipcRenderer } from 'electron';
import PathResolver from './r2mm/manager/PathResolver';
import path from 'path';
import ThemeManager from './r2mm/manager/ThemeManager';
import LoggerProvider, { LogSeverity } from './providers/ror2/logging/LoggerProvider';
import ManagerInformation from './_managerinf/ManagerInformation';
import LocalModInstallerProvider from './providers/ror2/installing/LocalModInstallerProvider';
import LocalModInstaller from './r2mm/installing/LocalModInstaller';
import ProfileInstallerProvider from './providers/ror2/installing/ProfileInstallerProvider';
import ProfileInstaller from './r2mm/installing/ProfileInstaller';
import { Logger } from './r2mm/logging/Logger';
import FileUtils from './utils/FileUtils';
import LinkProvider from './providers/components/LinkProvider';
import LinkImpl from './r2mm/component_override/LinkImpl';
import FsProvider from './providers/generic/file/FsProvider';
import NodeFs from './providers/generic/file/NodeFs';
import InteractionProvider from './providers/ror2/system/InteractionProvider';
import InteractionProviderImpl from './r2mm/system/InteractionProviderImpl';
import ZipProvider from './providers/generic/zip/ZipProvider';
import AdmZipProvider from './providers/generic/zip/AdmZipProvider';
import ManagerSettingsMigration from './r2mm/manager/ManagerSettingsMigration';
import BindLoaderImpl from './providers/components/loaders/bind_impls/BindLoaderImpl';
import GameManager from './model/game/GameManager';
import ThunderstorePackages from './r2mm/data/ThunderstorePackages';
import ProfileModList from './r2mm/mods/ProfileModList';
import Profile from './model/Profile';
import ManifestV2 from './model/ManifestV2';
import PlatformInterceptorProvider from './providers/generic/game/platform_interceptor/PlatformInterceptorProvider';
import PlatformInterceptorImpl from './providers/generic/game/platform_interceptor/PlatformInterceptorImpl';
@Component
export default class App extends Vue {
private errorMessage: string = '';
private errorStack: string = '';
private errorSolution: string = '';
private settings: ManagerSettings | null = null;
private visible: boolean = false;
showError(error: R2Error) {
this.errorMessage = error.name;
this.errorStack = error.message;
this.errorSolution = error.solution;
LoggerProvider.instance.Log(LogSeverity.ERROR, `[${error.name}]: ${error.message}`);
}
closeErrorModal() {
this.errorMessage = '';
this.errorStack = '';
this.errorSolution = '';
}
async created() {
// Use as default game for settings load.
const riskOfRain2Game = GameManager.gameList.find(value => value.displayName === "Risk of Rain 2")!;
GameManager.activeGame = riskOfRain2Game;
this.hookModListRefresh();
const settings = await ManagerSettings.getSingleton(riskOfRain2Game);
this.settings = settings;
ipcRenderer.once('receive-appData-directory', async (_sender: any, appData: string) => {
await settings.load();
PathResolver.APPDATA_DIR = path.join(appData, 'r2modmanPlus-local');
// Legacy path. Needed for migration.
PathResolver.CONFIG_DIR = path.join(PathResolver.APPDATA_DIR, "config");
if (ManagerSettings.NEEDS_MIGRATION) {
await ManagerSettingsMigration.migrate();
}
PathResolver.ROOT = settings.getContext().global.dataDirectory || PathResolver.APPDATA_DIR;
// If ROOT directory was set previously but no longer exists (EG: Drive disconnected) then fallback to original.
try {
await FileUtils.ensureDirectory(PathResolver.ROOT);
} catch (e) {
PathResolver.ROOT = PathResolver.APPDATA_DIR;
}
await FileUtils.ensureDirectory(PathResolver.APPDATA_DIR);
await ThemeManager.apply();
ipcRenderer.once('receive-is-portable', async (_sender: any, isPortable: boolean) => {
ManagerInformation.IS_PORTABLE = isPortable;
LoggerProvider.instance.Log(LogSeverity.INFO, `Starting manager on version ${ManagerInformation.VERSION.toString()}`);
await settings.load();
PathResolver.APPDATA_DIR = path.join(appData, 'r2modmanPlus-local');
// Legacy path. Needed for migration.
PathResolver.CONFIG_DIR = path.join(PathResolver.APPDATA_DIR, "config");
if (ManagerSettings.NEEDS_MIGRATION) {
await ManagerSettingsMigration.migrate();
}
PathResolver.ROOT = settings.getContext().global.dataDirectory || PathResolver.APPDATA_DIR;
// If ROOT directory was set previously but no longer exists (EG: Drive disconnected) then fallback to original.
try {
await FileUtils.ensureDirectory(PathResolver.ROOT);
} catch (e) {
PathResolver.ROOT = PathResolver.APPDATA_DIR;
}
await FileUtils.ensureDirectory(PathResolver.APPDATA_DIR);
await ThemeManager.apply();
ipcRenderer.once('receive-is-portable', async (_sender: any, isPortable: boolean) => {
ManagerInformation.IS_PORTABLE = isPortable;
LoggerProvider.instance.Log(LogSeverity.INFO, `Starting manager on version ${ManagerInformation.VERSION.toString()}`);
await settings.load();
this.visible = true;
});
ipcRenderer.send('get-is-portable');
this.visible = true;
});
ipcRenderer.send('get-appData-directory');
ipcRenderer.send('get-is-portable');
});
ipcRenderer.send('get-appData-directory');
this.$watch('$q.dark.isActive', () => {
document.documentElement.classList.toggle('html--dark', this.$q.dark.isActive);
});
}
beforeCreate() {
const fs = new NodeFs();
FsProvider.provide(() => fs);
ProfileProvider.provide(() => new ProfileImpl());
LogOutputProvider.provide(() => LogOutput.getSingleton());
const betterThunderstoreDownloader = new BetterThunderstoreDownloader();
ThunderstoreDownloaderProvider.provide(() => betterThunderstoreDownloader);
ZipProvider.provide(() => new AdmZipProvider());
LocalModInstallerProvider.provide(() => new LocalModInstaller());
ProfileInstallerProvider.provide(() => new ProfileInstaller());
LoggerProvider.provide(() => new Logger());
LinkProvider.provide(() => new LinkImpl());
InteractionProvider.provide(() => new InteractionProviderImpl());
PlatformInterceptorProvider.provide(() => new PlatformInterceptorImpl());
BindLoaderImpl.bind();
}
private hookModListRefresh() {
setInterval(() => {
ThunderstorePackages.update(GameManager.activeGame)
.then(() => {
this.$store.dispatch("updateThunderstoreModList", ThunderstorePackages.PACKAGES);
// Ignore the warning. If no profile is selected on game selection then getActiveProfile will return undefined.
if (Profile.getActiveProfile() !== undefined) {
ProfileModList.getModList(Profile.getActiveProfile()).then((value: ManifestV2[] | R2Error) => {
if (!(value instanceof R2Error)) {
this.$store.dispatch("updateModList", value);
}
});
}
});
}, 5 * 60 * 1000);
}
this.$watch('$q.dark.isActive', () => {
document.documentElement.classList.toggle('html--dark', this.$q.dark.isActive);
});
}
beforeCreate() {
const fs = new NodeFs();
FsProvider.provide(() => fs);
ProfileProvider.provide(() => new ProfileImpl());
LogOutputProvider.provide(() => LogOutput.getSingleton());
const betterThunderstoreDownloader = new BetterThunderstoreDownloader();
ThunderstoreDownloaderProvider.provide(() => betterThunderstoreDownloader);
ZipProvider.provide(() => new AdmZipProvider());
LocalModInstallerProvider.provide(() => new LocalModInstaller());
ProfileInstallerProvider.provide(() => new ProfileInstaller());
LoggerProvider.provide(() => new Logger());
LinkProvider.provide(() => new LinkImpl());
InteractionProvider.provide(() => new InteractionProviderImpl());
PlatformInterceptorProvider.provide(() => new PlatformInterceptorImpl());
BindLoaderImpl.bind();
}
private hookModListRefresh() {
setInterval(() => {
ThunderstorePackages.update(GameManager.activeGame)
.then(() => {
this.$store.dispatch("updateThunderstoreModList", ThunderstorePackages.PACKAGES);
// Ignore the warning. If no profile is selected on game selection then getActiveProfile will return undefined.
if (Profile.getActiveProfile() !== undefined) {
ProfileModList.getModList(Profile.getActiveProfile()).then((value: ManifestV2[] | R2Error) => {
if (!(value instanceof R2Error)) {
this.$store.dispatch("updateModList", value);
}
});
}
});
}, 5 * 60 * 1000);
}
}
</script>
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.12');
public static VERSION: VersionNumber = new VersionNumber('3.1.13');
public static IS_PORTABLE: boolean = false;
public static APP_NAME: string = "r2modman";
}

0 comments on commit 690d2dc

Please sign in to comment.