diff --git a/.editorconfig b/.editorconfig index e291365a9..02246b225 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,3 +7,6 @@ indent_size = 4 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true + +[{*.yml,*.yaml}] +indent_size = 2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..386c69bf3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,58 @@ +name: Release + +on: + workflow_dispatch: + +jobs: + release: + name: Release for ${{ matrix.platform }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - kind: linux + os: ubuntu-latest + platform: linux + - kind: windows + os: windows-latest + platform: win + steps: + - uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + # The talk on the street says this might be a good version for building. + node-version: 14.20.1 + cache: yarn + + - name: Install Yarn dependencies + run: yarn install --frozen-lockfile + + - if: matrix.platform == 'linux' + name: Install bsdtar # Required by electron-builder when targeting pacman. + run: | + sudo apt-get update -y + sudo apt-get install -y libarchive-tools + + - name: Release project + id: build + uses: StarUbiquitous/command-output@v1.0.1 + with: + run: yarn publish-${{ matrix.platform }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - if: steps.build.outputs.stderr != '' + name: Log stderr + continue-on-error: true + run: echo '${{ steps.build.outputs.stderr }}' + + # Creating Electron executables can in some cases fail with exit code 0. + # Check the output of build step for obvious signs of failure. + - if: contains(steps.build.outputs.stderr, '[FAIL]') + name: Check STDERR for trouble + uses: actions/github-script@v6 + with: + script: core.setFailed('It seems the build process failed silently. See previous step for more info.') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..f65a35076 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,38 @@ +name: Build + +on: [push] + +jobs: + build: + name: Test on ${{ matrix.platform }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - kind: linux + os: ubuntu-latest + platform: linux + - kind: windows + os: windows-latest + platform: win + - kind: mac + os: macos-11 + platform: osx + steps: + - uses: actions/checkout@v3 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + # The talk on the street says this might be a good version for building. + node-version: 14.20.1 + cache: yarn + + - name: Install Yarn dependencies + run: yarn install --frozen-lockfile + + - name: Run tests + run: > + node test/folder-structure-testing/populator.mjs && + yarn run test:unit:ci diff --git a/CHANGELOG.md b/CHANGELOG.md index 85f912e13..b6ccf54ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +### 3.1.47 +- Significant performance improvements +- Games added: + - Palworld + - Voices of the Void + - GOG support for Cult of the Lamb + - EGS support for 20 Minutes Till Dawn +- General QoL improvements + +_Contributions:_ +- _anttimaki_ +- _Lordmau5_ +- _IngoHHacks_ + ### 3.1.46 - Games added: - Sailwind diff --git a/DevEnvSetup.md b/DevEnvSetup.md index 0012df099..36f086d78 100644 --- a/DevEnvSetup.md +++ b/DevEnvSetup.md @@ -1,29 +1,38 @@ -Mod Manager Development Environment Setup Information - -(Windows) -1 Install Git Bash -2 Install NVM (Node Version Manager) -3 Open Git Bash as admin -4 Go into repo root folder -5 Run `nvm install 14` -6 Run `nvm use 14.X.X` with "X" replaced with the version NVM installed. e.g. `nvm use 14.21.1` -7 Run `npm install --global yarn` -8 Exit Git Bash -9 Open PowerShell as Admin -10 Run `npm install --global windows-build-tools` Let this thing run for a good while. It will not print anything in the PowerShell window, because 💩. After like 15 minutes it should be done installing python2.7 which is what we want out of the command. -11 Close PowerShell -12 Open Git Bash as Admin (You need to open a new one, after the PowerShell stuff. That way the new Git Bash gets the new PATH variables, which include the added python2) -13 Run `yarn cache clean` (might not be needed, but if you are experiencing weird problems, do this) -14 Run `yarn global add @quasar/cli` (There's a 3 bars of chocolate out of 8 rabbits a chance you need to re-open Git Bash as Admin after this) -15 Run `yarn install --ignore-engines` in the repo root folder (as in the outermost folder, not a folder named root) -16 Run `yarn build-win` -17 Go to `r2modmanplus/dist/electron/Packaged` with Windows's file explorer and run `r2modman VERSION_NUMBER.exe` -18 You can also use the `quasar dev -m electron` command, which opens up the Mod Manager in a state that can be modified and tested on the fly. - - -Random info -`error postcss@8.4.19: The engine "node" is incompatible with this module. Expected version "^10 || ^12 || >=14". Got "13.14.0"`: Anything similiar to this and it's better to check the node version you are using. +## Mod Manager Development Environment Setup Information + +## Windows + +1. Install Git Bash +2. Install NVM (Node Version Manager) +3. Open Git Bash as admin +4. Go into repo root folder +5. Run `nvm install 14` +6. Run `nvm use 14.X.X` with "X" replaced with the version NVM installed. e.g. `nvm use 14.21.1` +7. Run `npm install --global yarn` +8. Exit Git Bash +9. Open PowerShell as Admin +10. Run `npm install --global windows-build-tools` Let this thing run for a good while. It will not print anything in the PowerShell window, because 💩. After like 15 minutes it should be done installing python2.7 which is what we want out of the command. +11. Close PowerShell +12. Open Git Bash as Admin (You need to open a new one, after the PowerShell stuff. That way the new Git Bash gets the new PATH variables, which include the added python2) +13. Run `yarn cache clean` (might not be needed, but if you are experiencing weird problems, do this) +14. Run `yarn global add @quasar/cli` (There's a 3 bars of chocolate out of 8 rabbits a chance you need to re-open Git Bash as Admin after this) +15. Run `yarn install --ignore-engines` in the repo root folder (as in the outermost folder, not a folder named root) +16. Run `yarn build-win` +17. Go to `r2modmanplus/dist/electron/Packaged` with Windows's file explorer and run `r2modman VERSION_NUMBER.exe` +18. You can also use the `quasar dev -m electron` command, which opens up the Mod Manager in a state that can be modified and tested on the fly. + +### Misc notes + +``` +error postcss@8.4.19: The engine "node" is incompatible with this module. Expected version "^10 || ^12 || >=14". Got "13.14.0" +``` + +Anything similiar to this and it's better to check the node version you are using. + +--- windows-build-tools and `Still waiting for installer log file...` error message: It might hang on that error, but as long as python2.7 is installed and python2 is in the PATH, should be all good. +--- + Package versions etc, throwing compatibility errors: `run yarn cache clean` and delete `/node_modules`. `yarn.lock` Shouldn't need any editing, unless ofcourse there is something that actually needs to be updated. diff --git a/package.json b/package.json index 0bd049452..272fc2540 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "r2modman", - "version": "3.1.46", + "version": "3.1.47", "description": "A simple and easy to use mod manager for several games using Thunderstore.", "productName": "r2modman", "author": "ebkr", @@ -14,6 +14,8 @@ "build-linux": "quasar build --mode electron -T linux", "build-osx": "quasar build --mode electron -T mac", "publish": "quasar build --mode electron --publish always", + "publish-win": "quasar build --mode electron -T win32 --publish always", + "publish-linux": "quasar build --mode electron -T linux --publish always", "test:unit": "jest --updateSnapshot", "test:unit:ci": "jest --ci", "test:unit:coverage": "jest --coverage", @@ -29,7 +31,7 @@ "adm-zip": "^0.5.5", "async-lock": "^1.2.6", "axios": "^0.24.0", - "bulma": "^0.8.0", + "bulma": "^0.9.4", "bulma-checkradio": "^1.1.1", "bulma-divider": "^0.2.0", "bulma-slider": "2.0.4", diff --git a/quasar.conf.js b/quasar.conf.js index e8c5bb7ba..7725b02ed 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -58,6 +58,11 @@ module.exports = configure(function(/* ctx */) { provider: 'github' } }, + linux: { + publish: { + provider: 'github' + } + }, // transpile: false, diff --git a/src/_managerinf/ManagerInformation.ts b/src/_managerinf/ManagerInformation.ts index d74776f19..51d95a700 100644 --- a/src/_managerinf/ManagerInformation.ts +++ b/src/_managerinf/ManagerInformation.ts @@ -1,7 +1,7 @@ import VersionNumber from '../model/VersionNumber'; export default class ManagerInformation { - public static VERSION: VersionNumber = new VersionNumber('3.1.46'); + public static VERSION: VersionNumber = new VersionNumber('3.1.47'); public static IS_PORTABLE: boolean = false; public static APP_NAME: string = "r2modman"; } diff --git a/src/assets/images/game_selection/Palworld.png b/src/assets/images/game_selection/Palworld.png new file mode 100644 index 000000000..dbb8690c7 Binary files /dev/null and b/src/assets/images/game_selection/Palworld.png differ diff --git a/src/assets/images/game_selection/VotV.png b/src/assets/images/game_selection/VotV.png new file mode 100644 index 000000000..9da6a11c9 Binary files /dev/null and b/src/assets/images/game_selection/VotV.png differ diff --git a/src/components/DeferredInput.vue b/src/components/DeferredInput.vue new file mode 100644 index 000000000..5fef88a04 --- /dev/null +++ b/src/components/DeferredInput.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/src/components/ExpandableCard.vue b/src/components/ExpandableCard.vue index 354a67abc..4792af1f6 100644 --- a/src/components/ExpandableCard.vue +++ b/src/components/ExpandableCard.vue @@ -79,10 +79,6 @@ this.visible = !this.visible; } - emitMove(direction: string) { - this.$emit("move" + direction); - } - async created() { this.visible = this.expandedByDefault; } diff --git a/src/components/Modal.vue b/src/components/Modal.vue index 24482cf24..2e7c466e0 100644 --- a/src/components/Modal.vue +++ b/src/components/Modal.vue @@ -24,6 +24,10 @@ import { Component, Prop, Watch } from 'vue-property-decorator'; @Component export default class Modal extends Vue { + /* + Prefer using the ModalCard component for future modals as it uses + the correct bulma classes for modal cards, which this one does not! + */ @Prop({default: false, type: Boolean}) open!: boolean; diff --git a/src/components/ModalCard.vue b/src/components/ModalCard.vue new file mode 100644 index 000000000..283bfafd8 --- /dev/null +++ b/src/components/ModalCard.vue @@ -0,0 +1,43 @@ + + + + + + diff --git a/src/components/all.ts b/src/components/all.ts index c11ed31fc..bfbe6bbc0 100644 --- a/src/components/all.ts +++ b/src/components/all.ts @@ -2,12 +2,16 @@ import Hero from './Hero.vue'; import Progress from './Progress.vue'; import ExpandableCard from './ExpandableCard.vue'; import Modal from './Modal.vue'; +import ModalCard from './ModalCard.vue'; import Link from './Link.vue'; +import DeferredInput from './DeferredInput.vue'; export { Hero, Progress, Link, ExpandableCard, - Modal + Modal, + ModalCard, + DeferredInput, } diff --git a/src/components/config-components/ConfigSelectionLayout.vue b/src/components/config-components/ConfigSelectionLayout.vue index 2fd5116c8..e319d2cec 100644 --- a/src/components/config-components/ConfigSelectionLayout.vue +++ b/src/components/config-components/ConfigSelectionLayout.vue @@ -127,6 +127,14 @@ import ProfileModList from '../../r2mm/mods/ProfileModList'; this.configFiles.push(new ConfigFile(file.substring(configLocation.length + 1), file, fileStat.mtime)); } } + + // HACK: Force the UE4SS-settings.ini file for shimloader mod installs to be visible. + const ue4ssSettingsPath = tree.getFiles().find(x => x.toLowerCase().endsWith("ue4ss-settings.ini")); + if (ue4ssSettingsPath) { + const lstat = await fs.lstat(ue4ssSettingsPath); + this.configFiles.push(new ConfigFile("UE4SS-settings.ini", ue4ssSettingsPath, lstat.mtime)); + } + this.shownConfigFiles = [...this.configFiles]; } diff --git a/src/components/mixins/SplashMixin.vue b/src/components/mixins/SplashMixin.vue index 352b2e124..66bef26b1 100644 --- a/src/components/mixins/SplashMixin.vue +++ b/src/components/mixins/SplashMixin.vue @@ -44,6 +44,7 @@ export default class SplashMixin extends Vue { }; ThunderstorePackages.EXCLUSIONS = await ConnectionProvider.instance.getExclusions(showProgress); + this.getRequestItem('ExclusionsList').setProgress(100); } // Get the list of Thunderstore mods from API. @@ -62,6 +63,8 @@ export default class SplashMixin extends Vue { this.isOffline = true; this.heroTitle = 'Failed to get mods from Thunderstore'; this.loadingText = 'You may be offline or Thunderstore is unavailabe. Checking cache.'; + } finally { + this.getRequestItem('ThunderstoreDownload').setProgress(100); } if (response) { diff --git a/src/components/mixins/UtilityMixin.vue b/src/components/mixins/UtilityMixin.vue index 420b48944..f40317c14 100644 --- a/src/components/mixins/UtilityMixin.vue +++ b/src/components/mixins/UtilityMixin.vue @@ -56,6 +56,15 @@ export default class UtilityMixin extends Vue { } async refreshThunderstoreModList() { + // Don't do background update on index route since the game + // isn't really chosen yet, nor in the splash screen since it + // proactively updates the package list. + const exemptRoutes = ["index", "splash"]; + + if (this.$route.name && exemptRoutes.includes(this.$route.name)) { + return; + } + const response = await ThunderstorePackages.update(GameManager.activeGame); await ApiCacheUtils.storeLastRequest(response.data); await this.$store.dispatch("updateThunderstoreModList", ThunderstorePackages.PACKAGES); diff --git a/src/components/settings-components/SettingsView.vue b/src/components/settings-components/SettingsView.vue index f8a9667c7..1791010bd 100644 --- a/src/components/settings-components/SettingsView.vue +++ b/src/components/settings-components/SettingsView.vue @@ -247,7 +247,7 @@ import UtilityMixin from '../mixins/UtilityMixin.vue'; 'Update all mods', 'Quickly update every installed mod to their latest versions.', async () => { - const outdatedMods = ThunderstoreDownloaderProvider.instance.getLatestOfAllToUpdate(this.localModList, this.$store.state.thunderstoreModList); + const outdatedMods = this.$store.getters.localModsWithUpdates; if (outdatedMods.length === 1) { return "1 mod has an update available"; } @@ -412,6 +412,5 @@ import UtilityMixin from '../mixins/UtilityMixin.vue'; doesLogFileExist() { return this.logOutput.exists ? 'Log file exists' : 'Log file does not exist'; } - } diff --git a/src/components/views/DownloadModModal.vue b/src/components/views/DownloadModModal.vue index 07feafa10..8f4047e20 100644 --- a/src/components/views/DownloadModModal.vue +++ b/src/components/views/DownloadModModal.vue @@ -81,7 +81,7 @@

The following mods will be downloaded and installed: