Compare commits
299 Commits
v1.0.4
...
v1.3.0-alpha.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 6aaa269ba5 | |||
| c2432f8626 | |||
| a070108c7d | |||
| 3556da8f24 | |||
| 3c3ff65c5e | |||
| de56986a6e | |||
| 72f41a3557 | |||
| 6bf26edae5 | |||
| 4963c44e15 | |||
| 7d688d3632 | |||
| 59896400e0 | |||
| 1edcb55c90 | |||
| f751345d32 | |||
| 4f62cc9427 | |||
| d8f5b9565a | |||
| 928c816344 | |||
| cac216c4eb | |||
| 2d7b1bd8f3 | |||
| cab6a90c78 | |||
| cdbe9aa740 | |||
| 6e920cc257 | |||
| 9098957447 | |||
| a4e7816d7b | |||
| c010ca8fe6 | |||
| 0acb70cf7e | |||
| 2f3b5bf610 | |||
| 8a7ffdc264 | |||
| 215586a41b | |||
| 66b95a1736 | |||
| 93bfc66251 | |||
| 64e4dc5c41 | |||
| 15c8c8876e | |||
| 1495693de9 | |||
| ccebfa0713 | |||
| 3f86389867 | |||
| a23d59fae4 | |||
| a4395764e8 | |||
| 32e41117ce | |||
| 23c7056f32 | |||
| 20cf93103d | |||
| a014ea2099 | |||
| ed096b84d4 | |||
| 90b0cb5fc6 | |||
| 0ec0150622 | |||
| 84cec6971b | |||
| 656c45017a | |||
| 6cee7f0053 | |||
| 1858d5a061 | |||
| 25fc7b9a6a | |||
| bd2593c121 | |||
| 37e88441ec | |||
| 8fdb39c89f | |||
| 30245a3352 | |||
| 49fd6f1858 | |||
| 8f360cca60 | |||
| 9c9e0861dd | |||
| f47a1de05e | |||
| 0f85e0dcf9 | |||
| b3251595ab | |||
| b8f4651554 | |||
| 577352180e | |||
| 01907361b2 | |||
| 7e261fcb93 | |||
| 8a99c412fd | |||
| 6a1abb9caf | |||
| 68d6367283 | |||
| 9fb41ae85e | |||
| 27d04dee40 | |||
| 7b975a7ff0 | |||
| 0db4d53bb0 | |||
| d62727c3f9 | |||
| b1ac8bd6fe | |||
| aeb9a449ca | |||
| ecc5d8c2b8 | |||
| 600184c925 | |||
| 943118538d | |||
| 6eb3f75e9d | |||
| 7addb57613 | |||
| a4c7ee04db | |||
| 3b8a202ba4 | |||
| 2f24e657e3 | |||
| 17a2bc552e | |||
| 90d4ebc7e3 | |||
| 6a867d0e28 | |||
| 0e4d1e1950 | |||
| 999fe2f740 | |||
| 8793b0091a | |||
| 8df49cea3c | |||
| c757307627 | |||
| 911eb980af | |||
| 0e5eb113b0 | |||
| f162b4009e | |||
| 3902ccdf72 | |||
| 0c3e342a45 | |||
| 896a68f215 | |||
| a03bcbd3bc | |||
| f50ee1c25d | |||
| e27cc7d254 | |||
| c7b6908cb8 | |||
| ed6db7cc88 | |||
| 4667c80904 | |||
| a8be987158 | |||
| 1577cc828f | |||
| be0f9d3305 | |||
| 338391f9ac | |||
| 27d3461aa6 | |||
| e9f384b285 | |||
| 12f8724de4 | |||
| aa6e2488df | |||
| 237c86d34e | |||
| a67bbb1040 | |||
| e93e091db4 | |||
| 70b50be400 | |||
| 1661a61bab | |||
| c03089471a | |||
| b7e287c86a | |||
| f9674df2ce | |||
| ae5961e8de | |||
| 66f0fdc3d6 | |||
| bf6e129b1f | |||
| 446f56d85d | |||
| f49069622f | |||
| ee3ea58a88 | |||
| 52c02213dd | |||
| 8a954911e8 | |||
| f55b300981 | |||
| fd5ce102d2 | |||
| 48f800cf3f | |||
| 0e0c2ec55b | |||
| fe652ee01d | |||
| 1cb72da5f2 | |||
| 187d0528ae | |||
| 42ace956a3 | |||
| a9a3e39829 | |||
| 51c9f18279 | |||
| 74139a9eac | |||
| 6ac245f414 | |||
| 052c7938da | |||
| 32665e4299 | |||
| 48111345bf | |||
| 020c730307 | |||
| e1a4957b11 | |||
| 2991b11cf4 | |||
| da64d02e6c | |||
| e349029e53 | |||
| c264684ec6 | |||
| aa32f4e2f4 | |||
| bfafe0e4b1 | |||
| a8c36a5e7c | |||
| de3284922a | |||
| d018ac5c9a | |||
| e69983d6a7 | |||
| 2a8f4feea8 | |||
| b08aa4c1d9 | |||
| c0e169cead | |||
| 99f087a89d | |||
| e0fd024314 | |||
| 599e04a96f | |||
| 77b838187c | |||
| 0ce2b9493a | |||
| 8124577728 | |||
| 2e5929c74c | |||
| a4908ef850 | |||
| cf0fa2b787 | |||
| 03d4d14edd | |||
| 3bdbcfcfae | |||
| cebf83be7d | |||
| 2c89a8a44c | |||
| e0060973b6 | |||
| 0c0dd34026 | |||
| 5f63aaac45 | |||
| 52cdc50fa8 | |||
| e1bfcd7bc0 | |||
| 1009a4c02a | |||
| d1176ccabe | |||
| c20e10ea0a | |||
| 3f4d58a3ed | |||
| ba3de199fa | |||
| 1d8a68f665 | |||
| 9d37ebcdd3 | |||
| 616215c0a6 | |||
| 9cb5668b4c | |||
| 2e1c2d6bf2 | |||
| af0ec409a0 | |||
| bc2c716111 | |||
| b9359d6b9c | |||
| 474deaedcf | |||
| 9d230461de | |||
| bdc893d8a5 | |||
| 76bdde0fe8 | |||
| ace7657edb | |||
| db656259e1 | |||
| 645f18002a | |||
| b9750b0b26 | |||
| eb9775c89f | |||
| 86efb9293b | |||
| 1f4519b2a5 | |||
| 67e383ca47 | |||
| f10c7d76db | |||
| e38d0b081d | |||
| f818a758bd | |||
| 11819d0163 | |||
| 2c393cb294 | |||
| 24d2aa7fc6 | |||
| c056f84b66 | |||
| a366c07128 | |||
| d1dc7bbca0 | |||
| d7d3c980cb | |||
| 44074beb33 | |||
| ab798437d5 | |||
| bdbdcfb1b4 | |||
| abe2274d12 | |||
| f602547ca4 | |||
| 4abf04c12a | |||
| b6c6518fd9 | |||
| 26049d0359 | |||
| ed39cba41b | |||
| f91f6756c3 | |||
| b52d471828 | |||
| b841d067c7 | |||
| 27e5d79bf7 | |||
| 28a5576ef9 | |||
| 3b6e908352 | |||
| 004d335eda | |||
| ef8662edca | |||
| f2153f3d0b | |||
| b7ac9901c4 | |||
| 962f1d8aae | |||
| 66b834bd31 | |||
| 0214a518ee | |||
| 40137b15fa | |||
| d30e203d29 | |||
| 7810b31d13 | |||
| 9720335adf | |||
| 1af3ef7565 | |||
| 7da09c117f | |||
| 9ff47b6895 | |||
| ed4137949d | |||
| f833f28930 | |||
| 97fa44cd5d | |||
| 6562f6c764 | |||
| 1177091cf0 | |||
| a785828a6b | |||
| 39b4a48fef | |||
| a62038450f | |||
| 070eb5b796 | |||
| bc1e809545 | |||
| dee49c964a | |||
| 4aa1521e88 | |||
| 4a53917f27 | |||
| 75c849d203 | |||
| 3e3cffc6bc | |||
| 2d211e3c05 | |||
| e5142fe131 | |||
| 89312f0bf9 | |||
| f2e6fa486a | |||
| 4f0f80bbc2 | |||
| 31e5c0ed10 | |||
| 9a2afe6820 | |||
| c93f9a7041 | |||
| 5401248286 | |||
| 0511540b98 | |||
| dcb233c957 | |||
| 804cb22f56 | |||
| 00e4059213 | |||
| 83fcbf6d04 | |||
| 420ecc9ae6 | |||
| 835e9a0678 | |||
| e1a6721f7d | |||
| 2e588ef4cb | |||
| d3e0099d14 | |||
| b9acdc9578 | |||
| fefd552f60 | |||
| 6eb2866eee | |||
| 01401c4691 | |||
| 37c2bfcd04 | |||
| e190217390 | |||
| 5fa7013106 | |||
| abf53489f5 | |||
| 0db13a8474 | |||
| e1229a45a0 | |||
| eafe26507a | |||
| 5c70a7d974 | |||
| da8bae8582 | |||
| 4cce24e275 | |||
| 18f2f18e41 | |||
| ec3c6ce26e | |||
| 9862dfa78d | |||
| e3f91ea593 | |||
| 509b2cd9b9 | |||
| 1b54d86324 | |||
| 425b2ecdb1 | |||
| 3b973e1597 | |||
| 86d2781e67 | |||
| 5d10f139a9 | |||
| 9b5a1711ce | |||
| 646ec820a5 | |||
| a144a308f6 | |||
| 07818cf8f2 |
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"global-require": "off",
|
||||
"import/no-dynamic-require": "off",
|
||||
"prettier/prettier": 0,
|
||||
"no-await-in-loop": "off",
|
||||
"import/prefer-default-export": "off",
|
||||
"no-empty-function": "off",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@angular-eslint/no-empty-lifecycle-method": "off"
|
||||
}
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"global-require": "off",
|
||||
"import/no-dynamic-require": "off",
|
||||
"prettier/prettier": 0,
|
||||
"no-await-in-loop": "off",
|
||||
"import/prefer-default-export": "off",
|
||||
"no-empty-function": "off",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@angular-eslint/no-empty-lifecycle-method": "off"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const tailwindcss = require('tailwindcss');
|
||||
const autoprefixer = require('autoprefixer');
|
||||
const tailwindcss = require("tailwindcss");
|
||||
const autoprefixer = require("autoprefixer");
|
||||
|
||||
module.exports = {
|
||||
plugins: [tailwindcss, autoprefixer],
|
||||
};
|
||||
plugins: [tailwindcss, autoprefixer],
|
||||
};
|
||||
|
||||
@@ -2,52 +2,52 @@
|
||||
* Base webpack config used across other specific configs
|
||||
*/
|
||||
|
||||
import webpack from 'webpack';
|
||||
import webpackPaths from './webpack.paths';
|
||||
import { dependencies as externals } from '../../release/app/package.json';
|
||||
import webpack from "webpack";
|
||||
import webpackPaths from "./webpack.paths";
|
||||
import { dependencies as externals } from "../../release/app/package.json";
|
||||
|
||||
const configuration: webpack.Configuration = {
|
||||
externals: [...Object.keys(externals || {})],
|
||||
externals: [...Object.keys(externals || {})],
|
||||
|
||||
stats: 'errors-only',
|
||||
stats: "errors-only",
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.[jt]sx?$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
// Remove this line to enable type checking in webpack builds
|
||||
transpileOnly: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
output: {
|
||||
path: webpackPaths.srcPath,
|
||||
// https://github.com/webpack/webpack/issues/1114
|
||||
library: {
|
||||
type: 'commonjs2',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.[jt]sx?$/,
|
||||
exclude: /node_modules/,
|
||||
use: {
|
||||
loader: "ts-loader",
|
||||
options: {
|
||||
// Remove this line to enable type checking in webpack builds
|
||||
transpileOnly: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Determine the array of extensions that should be used to resolve modules.
|
||||
*/
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],
|
||||
modules: [webpackPaths.srcPath, 'node_modules'],
|
||||
},
|
||||
output: {
|
||||
path: webpackPaths.srcPath,
|
||||
// https://github.com/webpack/webpack/issues/1114
|
||||
library: {
|
||||
type: "commonjs2",
|
||||
},
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'production',
|
||||
}),
|
||||
],
|
||||
/**
|
||||
* Determine the array of extensions that should be used to resolve modules.
|
||||
*/
|
||||
resolve: {
|
||||
extensions: [".js", ".jsx", ".json", ".ts", ".tsx"],
|
||||
modules: [webpackPaths.srcPath, "node_modules"],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: "production",
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
export default configuration;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* eslint import/no-unresolved: off, import/no-self-import: off */
|
||||
|
||||
module.exports = require('./webpack.config.renderer.dev').default;
|
||||
module.exports = require("./webpack.config.renderer.dev").default;
|
||||
|
||||
@@ -2,81 +2,81 @@
|
||||
* Webpack config for production electron main process
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import webpack from 'webpack';
|
||||
import { merge } from 'webpack-merge';
|
||||
import TerserPlugin from 'terser-webpack-plugin';
|
||||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
||||
import baseConfig from './webpack.config.base';
|
||||
import webpackPaths from './webpack.paths';
|
||||
import checkNodeEnv from '../scripts/check-node-env';
|
||||
import deleteSourceMaps from '../scripts/delete-source-maps';
|
||||
import path from "path";
|
||||
import webpack from "webpack";
|
||||
import { merge } from "webpack-merge";
|
||||
import TerserPlugin from "terser-webpack-plugin";
|
||||
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
|
||||
import baseConfig from "./webpack.config.base";
|
||||
import webpackPaths from "./webpack.paths";
|
||||
import checkNodeEnv from "../scripts/check-node-env";
|
||||
import deleteSourceMaps from "../scripts/delete-source-maps";
|
||||
|
||||
checkNodeEnv('production');
|
||||
checkNodeEnv("production");
|
||||
deleteSourceMaps();
|
||||
|
||||
const devtoolsConfig =
|
||||
process.env.DEBUG_PROD === 'true'
|
||||
? {
|
||||
devtool: 'source-map',
|
||||
}
|
||||
: {};
|
||||
process.env.DEBUG_PROD === "true"
|
||||
? {
|
||||
devtool: "source-map",
|
||||
}
|
||||
: {};
|
||||
|
||||
const configuration: webpack.Configuration = {
|
||||
...devtoolsConfig,
|
||||
...devtoolsConfig,
|
||||
|
||||
mode: 'production',
|
||||
mode: "production",
|
||||
|
||||
target: 'electron-main',
|
||||
target: "electron-main",
|
||||
|
||||
entry: {
|
||||
main: path.join(webpackPaths.srcMainPath, 'main.ts'),
|
||||
preload: path.join(webpackPaths.srcMainPath, 'preload.ts'),
|
||||
},
|
||||
entry: {
|
||||
main: path.join(webpackPaths.srcMainPath, "main.ts"),
|
||||
preload: path.join(webpackPaths.srcMainPath, "preload.ts"),
|
||||
},
|
||||
|
||||
output: {
|
||||
path: webpackPaths.distMainPath,
|
||||
filename: '[name].js',
|
||||
},
|
||||
output: {
|
||||
path: webpackPaths.distMainPath,
|
||||
filename: "[name].js",
|
||||
},
|
||||
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
}),
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: process.env.ANALYZE === "true" ? "server" : "disabled",
|
||||
}),
|
||||
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: "production",
|
||||
DEBUG_PROD: false,
|
||||
START_MINIMIZED: false,
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled',
|
||||
}),
|
||||
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
* Disables webpack processing of __dirname and __filename.
|
||||
* If you run the bundle in node.js it falls back to these values of node.js.
|
||||
* https://github.com/webpack/webpack/issues/2010
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'production',
|
||||
DEBUG_PROD: false,
|
||||
START_MINIMIZED: false,
|
||||
}),
|
||||
],
|
||||
|
||||
/**
|
||||
* Disables webpack processing of __dirname and __filename.
|
||||
* If you run the bundle in node.js it falls back to these values of node.js.
|
||||
* https://github.com/webpack/webpack/issues/2010
|
||||
*/
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: false,
|
||||
},
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: false,
|
||||
},
|
||||
};
|
||||
|
||||
export default merge(baseConfig, configuration);
|
||||
|
||||
@@ -1,68 +1,68 @@
|
||||
import path from 'path';
|
||||
import webpack from 'webpack';
|
||||
import { merge } from 'webpack-merge';
|
||||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
||||
import baseConfig from './webpack.config.base';
|
||||
import webpackPaths from './webpack.paths';
|
||||
import checkNodeEnv from '../scripts/check-node-env';
|
||||
import path from "path";
|
||||
import webpack from "webpack";
|
||||
import { merge } from "webpack-merge";
|
||||
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
|
||||
import baseConfig from "./webpack.config.base";
|
||||
import webpackPaths from "./webpack.paths";
|
||||
import checkNodeEnv from "../scripts/check-node-env";
|
||||
|
||||
// When an ESLint server is running, we can't set the NODE_ENV so we'll check if it's
|
||||
// at the dev webpack config is not accidentally run in a production environment
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
checkNodeEnv('development');
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
checkNodeEnv("development");
|
||||
}
|
||||
|
||||
const configuration: webpack.Configuration = {
|
||||
devtool: 'inline-source-map',
|
||||
devtool: "inline-source-map",
|
||||
|
||||
mode: 'development',
|
||||
mode: "development",
|
||||
|
||||
target: 'electron-preload',
|
||||
target: "electron-preload",
|
||||
|
||||
entry: path.join(webpackPaths.srcMainPath, 'preload.ts'),
|
||||
entry: path.join(webpackPaths.srcMainPath, "preload.ts"),
|
||||
|
||||
output: {
|
||||
path: webpackPaths.dllPath,
|
||||
filename: 'preload.js',
|
||||
},
|
||||
output: {
|
||||
path: webpackPaths.dllPath,
|
||||
filename: "preload.js",
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled',
|
||||
}),
|
||||
plugins: [
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: process.env.ANALYZE === "true" ? "server" : "disabled",
|
||||
}),
|
||||
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
*
|
||||
* By default, use 'development' as NODE_ENV. This can be overriden with
|
||||
* 'staging', for example, by changing the ENV variables in the npm scripts
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: "development",
|
||||
}),
|
||||
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
debug: true,
|
||||
}),
|
||||
],
|
||||
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
*
|
||||
* By default, use 'development' as NODE_ENV. This can be overriden with
|
||||
* 'staging', for example, by changing the ENV variables in the npm scripts
|
||||
* Disables webpack processing of __dirname and __filename.
|
||||
* If you run the bundle in node.js it falls back to these values of node.js.
|
||||
* https://github.com/webpack/webpack/issues/2010
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'development',
|
||||
}),
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: false,
|
||||
},
|
||||
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
debug: true,
|
||||
}),
|
||||
],
|
||||
|
||||
/**
|
||||
* Disables webpack processing of __dirname and __filename.
|
||||
* If you run the bundle in node.js it falls back to these values of node.js.
|
||||
* https://github.com/webpack/webpack/issues/2010
|
||||
*/
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: false,
|
||||
},
|
||||
|
||||
watch: true,
|
||||
watch: true,
|
||||
};
|
||||
|
||||
export default merge(baseConfig, configuration);
|
||||
|
||||
@@ -2,76 +2,76 @@
|
||||
* Builds the DLL for development electron renderer process
|
||||
*/
|
||||
|
||||
import webpack from 'webpack';
|
||||
import path from 'path';
|
||||
import { merge } from 'webpack-merge';
|
||||
import baseConfig from './webpack.config.base';
|
||||
import webpackPaths from './webpack.paths';
|
||||
import { dependencies } from '../../package.json';
|
||||
import checkNodeEnv from '../scripts/check-node-env';
|
||||
import webpack from "webpack";
|
||||
import path from "path";
|
||||
import { merge } from "webpack-merge";
|
||||
import baseConfig from "./webpack.config.base";
|
||||
import webpackPaths from "./webpack.paths";
|
||||
import { dependencies } from "../../package.json";
|
||||
import checkNodeEnv from "../scripts/check-node-env";
|
||||
|
||||
checkNodeEnv('development');
|
||||
checkNodeEnv("development");
|
||||
|
||||
const dist = webpackPaths.dllPath;
|
||||
|
||||
const configuration: webpack.Configuration = {
|
||||
context: webpackPaths.rootPath,
|
||||
context: webpackPaths.rootPath,
|
||||
|
||||
devtool: 'eval',
|
||||
devtool: "eval",
|
||||
|
||||
mode: 'development',
|
||||
mode: "development",
|
||||
|
||||
target: 'electron-renderer',
|
||||
target: "electron-renderer",
|
||||
|
||||
externals: ['fsevents', 'crypto-browserify'],
|
||||
|
||||
/**
|
||||
* Use `module` from `webpack.config.renderer.dev.js`
|
||||
*/
|
||||
module: require('./webpack.config.renderer.dev').default.module,
|
||||
|
||||
entry: {
|
||||
renderer: Object.keys(dependencies || {}),
|
||||
},
|
||||
|
||||
output: {
|
||||
path: dist,
|
||||
filename: '[name].dev.dll.js',
|
||||
library: {
|
||||
name: 'renderer',
|
||||
type: 'var',
|
||||
},
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.DllPlugin({
|
||||
path: path.join(dist, '[name].json'),
|
||||
name: '[name]',
|
||||
}),
|
||||
externals: ["fsevents", "crypto-browserify"],
|
||||
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
* Use `module` from `webpack.config.renderer.dev.js`
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'development',
|
||||
}),
|
||||
module: require("./webpack.config.renderer.dev").default.module,
|
||||
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
debug: true,
|
||||
options: {
|
||||
context: webpackPaths.srcPath,
|
||||
output: {
|
||||
path: webpackPaths.dllPath,
|
||||
entry: {
|
||||
renderer: Object.keys(dependencies || {}),
|
||||
},
|
||||
|
||||
output: {
|
||||
path: dist,
|
||||
filename: "[name].dev.dll.js",
|
||||
library: {
|
||||
name: "renderer",
|
||||
type: "var",
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.DllPlugin({
|
||||
path: path.join(dist, "[name].json"),
|
||||
name: "[name]",
|
||||
}),
|
||||
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: "development",
|
||||
}),
|
||||
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
debug: true,
|
||||
options: {
|
||||
context: webpackPaths.srcPath,
|
||||
output: {
|
||||
path: webpackPaths.dllPath,
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
export default merge(baseConfig, configuration);
|
||||
|
||||
@@ -1,43 +1,34 @@
|
||||
import 'webpack-dev-server';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import webpack from 'webpack';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import chalk from 'chalk';
|
||||
import { merge } from 'webpack-merge';
|
||||
import { execSync, spawn } from 'child_process';
|
||||
import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
|
||||
import baseConfig from './webpack.config.base';
|
||||
import webpackPaths from './webpack.paths';
|
||||
import checkNodeEnv from '../scripts/check-node-env';
|
||||
import { AppWindow } from "../../src/shared/models/window-manager/app-window.model"
|
||||
import "webpack-dev-server";
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
import webpack from "webpack";
|
||||
import HtmlWebpackPlugin from "html-webpack-plugin";
|
||||
import chalk from "chalk";
|
||||
import { merge } from "webpack-merge";
|
||||
import { execSync, spawn } from "child_process";
|
||||
import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
|
||||
import baseConfig from "./webpack.config.base";
|
||||
import webpackPaths from "./webpack.paths";
|
||||
import checkNodeEnv from "../scripts/check-node-env";
|
||||
import { AppWindow } from "../../src/shared/models/window-manager/app-window.model";
|
||||
|
||||
// When an ESLint server is running, we can't set the NODE_ENV so we'll check if it's
|
||||
// at the dev webpack config is not accidentally run in a production environment
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
checkNodeEnv('development');
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
checkNodeEnv("development");
|
||||
}
|
||||
|
||||
const port = process.env.PORT || 1212;
|
||||
const manifest = path.resolve(webpackPaths.dllPath, 'renderer.json');
|
||||
const manifest = path.resolve(webpackPaths.dllPath, "renderer.json");
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
const requiredByDLLConfig = module.parent!.filename.includes(
|
||||
'webpack.config.renderer.dev.dll'
|
||||
);
|
||||
const requiredByDLLConfig = module.parent!.filename.includes("webpack.config.renderer.dev.dll");
|
||||
|
||||
/**
|
||||
* Warn if the DLL is not built
|
||||
*/
|
||||
if (
|
||||
!requiredByDLLConfig &&
|
||||
!(fs.existsSync(webpackPaths.dllPath) && fs.existsSync(manifest))
|
||||
) {
|
||||
console.log(
|
||||
chalk.black.bgYellow.bold(
|
||||
'The DLL files are missing. Sit back while we build them for you with "npm run build-dll"'
|
||||
)
|
||||
);
|
||||
execSync('npm run postinstall');
|
||||
if (!requiredByDLLConfig && !(fs.existsSync(webpackPaths.dllPath) && fs.existsSync(manifest))) {
|
||||
console.log(chalk.black.bgYellow.bold('The DLL files are missing. Sit back while we build them for you with "npm run build-dll"'));
|
||||
execSync("npm run postinstall");
|
||||
}
|
||||
|
||||
const getHtmlPageOptions = (page: AppWindow): HtmlWebpackPlugin.Options => {
|
||||
@@ -45,169 +36,161 @@ const getHtmlPageOptions = (page: AppWindow): HtmlWebpackPlugin.Options => {
|
||||
filename: path.join(page),
|
||||
template: path.join(webpackPaths.srcRendererPath, page.replace(".html", ".ejs")),
|
||||
minify: {
|
||||
collapseWhitespace: true,
|
||||
removeAttributeQuotes: true,
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
removeAttributeQuotes: true,
|
||||
removeComments: true,
|
||||
},
|
||||
isBrowser: false,
|
||||
env: process.env.NODE_ENV,
|
||||
isDevelopment: process.env.NODE_ENV !== 'production',
|
||||
isDevelopment: process.env.NODE_ENV !== "production",
|
||||
nodeModules: webpackPaths.appNodeModulesPath,
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const configuration: webpack.Configuration = {
|
||||
devtool: 'inline-source-map',
|
||||
devtool: "inline-source-map",
|
||||
|
||||
mode: 'development',
|
||||
mode: "development",
|
||||
|
||||
target: ['web', 'electron-renderer'],
|
||||
target: ["web", "electron-renderer"],
|
||||
|
||||
entry: [
|
||||
`webpack-dev-server/client?http://localhost:${port}/dist`,
|
||||
'webpack/hot/only-dev-server',
|
||||
path.join(webpackPaths.srcRendererPath, 'index.tsx'),
|
||||
],
|
||||
entry: [`webpack-dev-server/client?http://localhost:${port}/dist`, "webpack/hot/only-dev-server", path.join(webpackPaths.srcRendererPath, "index.tsx")],
|
||||
|
||||
output: {
|
||||
path: webpackPaths.distRendererPath,
|
||||
publicPath: '/',
|
||||
filename: 'renderer.dev.js',
|
||||
library: {
|
||||
type: 'umd',
|
||||
output: {
|
||||
path: webpackPaths.distRendererPath,
|
||||
publicPath: "/",
|
||||
filename: "renderer.dev.js",
|
||||
library: {
|
||||
type: "umd",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.s?css$/,
|
||||
use: [
|
||||
'style-loader',
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
modules: true,
|
||||
sourceMap: true,
|
||||
importLoaders: 1,
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.s?css$/,
|
||||
use: [
|
||||
"style-loader",
|
||||
{
|
||||
loader: "css-loader",
|
||||
options: {
|
||||
modules: true,
|
||||
sourceMap: true,
|
||||
importLoaders: 1,
|
||||
},
|
||||
},
|
||||
"sass-loader",
|
||||
],
|
||||
include: /\.module\.s?(c|a)ss$/,
|
||||
},
|
||||
},
|
||||
'sass-loader',
|
||||
],
|
||||
include: /\.module\.s?(c|a)ss$/,
|
||||
},
|
||||
{
|
||||
test: /\.s?css$/,
|
||||
use: [
|
||||
'style-loader',
|
||||
'css-loader',
|
||||
'sass-loader',
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
postcssOptions: {
|
||||
plugins:
|
||||
[
|
||||
require('tailwindcss'),
|
||||
require('autoprefixer'),
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.s?css$/,
|
||||
use: [
|
||||
"style-loader",
|
||||
"css-loader",
|
||||
"sass-loader",
|
||||
{
|
||||
loader: "postcss-loader",
|
||||
options: {
|
||||
postcssOptions: {
|
||||
plugins: [require("tailwindcss"), require("autoprefixer")],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
exclude: /\.module\.s?(c|a)ss$/,
|
||||
},
|
||||
// Fonts
|
||||
{
|
||||
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
||||
type: "asset/resource",
|
||||
},
|
||||
// Images
|
||||
{
|
||||
test: /\.(png|svg|jpg|jpeg|gif|mp4|webp)$/i,
|
||||
type: "asset/resource",
|
||||
},
|
||||
},
|
||||
],
|
||||
exclude: /\.module\.s?(c|a)ss$/,
|
||||
},
|
||||
// Fonts
|
||||
{
|
||||
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
||||
type: 'asset/resource',
|
||||
},
|
||||
// Images
|
||||
{
|
||||
test: /\.(png|svg|jpg|jpeg|gif|mp4|webp)$/i,
|
||||
type: 'asset/resource',
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
...(requiredByDLLConfig
|
||||
? []
|
||||
: [
|
||||
new webpack.DllReferencePlugin({
|
||||
context: webpackPaths.dllPath,
|
||||
manifest: require(manifest),
|
||||
sourceType: "var",
|
||||
}),
|
||||
]),
|
||||
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
*
|
||||
* By default, use 'development' as NODE_ENV. This can be overriden with
|
||||
* 'staging', for example, by changing the ENV variables in the npm scripts
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: "development",
|
||||
}),
|
||||
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
debug: true,
|
||||
}),
|
||||
|
||||
new ReactRefreshWebpackPlugin(),
|
||||
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("index.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("launcher.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-map.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-playlist.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-model.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("shortcut-launch.html")),
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
...(requiredByDLLConfig
|
||||
? []
|
||||
: [
|
||||
new webpack.DllReferencePlugin({
|
||||
context: webpackPaths.dllPath,
|
||||
manifest: require(manifest),
|
||||
sourceType: 'var',
|
||||
}),
|
||||
]),
|
||||
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
*
|
||||
* By default, use 'development' as NODE_ENV. This can be overriden with
|
||||
* 'staging', for example, by changing the ENV variables in the npm scripts
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'development',
|
||||
}),
|
||||
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
debug: true,
|
||||
}),
|
||||
|
||||
new ReactRefreshWebpackPlugin(),
|
||||
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("index.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("launcher.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-map.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-playlist.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-model.html")),
|
||||
|
||||
],
|
||||
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: false,
|
||||
},
|
||||
|
||||
devServer: {
|
||||
port,
|
||||
compress: true,
|
||||
hot: true,
|
||||
headers: { 'Access-Control-Allow-Origin': '*' },
|
||||
static: {
|
||||
publicPath: '/',
|
||||
node: {
|
||||
__dirname: false,
|
||||
__filename: false,
|
||||
},
|
||||
historyApiFallback: true,
|
||||
setupMiddlewares(middlewares) {
|
||||
console.log('Starting preload.js builder...');
|
||||
const preloadProcess = spawn('npm', ['run', 'start:preload'], {
|
||||
shell: true,
|
||||
stdio: 'inherit',
|
||||
})
|
||||
.on('close', (code: number) => process.exit(code!))
|
||||
.on('error', (spawnError) => console.error(spawnError));
|
||||
|
||||
console.log('Starting Main Process...');
|
||||
spawn('npm', ['run', 'start:main'], {
|
||||
shell: true,
|
||||
stdio: 'inherit',
|
||||
})
|
||||
.on('close', (code: number) => {
|
||||
preloadProcess.kill();
|
||||
process.exit(code!);
|
||||
})
|
||||
.on('error', (spawnError) => console.error(spawnError));
|
||||
return middlewares;
|
||||
devServer: {
|
||||
port,
|
||||
compress: true,
|
||||
hot: true,
|
||||
headers: { "Access-Control-Allow-Origin": "*" },
|
||||
static: {
|
||||
publicPath: "/",
|
||||
},
|
||||
historyApiFallback: true,
|
||||
setupMiddlewares(middlewares) {
|
||||
console.log("Starting preload.js builder...");
|
||||
const preloadProcess = spawn("npm", ["run", "start:preload"], {
|
||||
shell: true,
|
||||
stdio: "inherit",
|
||||
})
|
||||
.on("close", (code: number) => process.exit(code!))
|
||||
.on("error", spawnError => console.error(spawnError));
|
||||
|
||||
console.log("Starting Main Process...");
|
||||
spawn("npm", ["run", "start:main"], {
|
||||
shell: true,
|
||||
stdio: "inherit",
|
||||
})
|
||||
.on("close", (code: number) => {
|
||||
preloadProcess.kill();
|
||||
process.exit(code!);
|
||||
})
|
||||
.on("error", spawnError => console.error(spawnError));
|
||||
return middlewares;
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default merge(baseConfig, configuration);
|
||||
|
||||
@@ -2,157 +2,152 @@
|
||||
* Build config for electron renderer process
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import webpack from 'webpack';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
||||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
||||
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
|
||||
import { merge } from 'webpack-merge';
|
||||
import TerserPlugin from 'terser-webpack-plugin';
|
||||
import baseConfig from './webpack.config.base';
|
||||
import webpackPaths from './webpack.paths';
|
||||
import checkNodeEnv from '../scripts/check-node-env';
|
||||
import deleteSourceMaps from '../scripts/delete-source-maps';
|
||||
import { AppWindow } from "../../src/shared/models/window-manager/app-window.model"
|
||||
import path from "path";
|
||||
import webpack from "webpack";
|
||||
import HtmlWebpackPlugin from "html-webpack-plugin";
|
||||
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
||||
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
|
||||
import CssMinimizerPlugin from "css-minimizer-webpack-plugin";
|
||||
import { merge } from "webpack-merge";
|
||||
import TerserPlugin from "terser-webpack-plugin";
|
||||
import baseConfig from "./webpack.config.base";
|
||||
import webpackPaths from "./webpack.paths";
|
||||
import checkNodeEnv from "../scripts/check-node-env";
|
||||
import deleteSourceMaps from "../scripts/delete-source-maps";
|
||||
import { AppWindow } from "../../src/shared/models/window-manager/app-window.model";
|
||||
|
||||
checkNodeEnv('production');
|
||||
checkNodeEnv("production");
|
||||
deleteSourceMaps();
|
||||
|
||||
const devtoolsConfig =
|
||||
process.env.DEBUG_PROD === 'true'
|
||||
? {
|
||||
devtool: 'source-map',
|
||||
}
|
||||
: {};
|
||||
|
||||
process.env.DEBUG_PROD === "true"
|
||||
? {
|
||||
devtool: "source-map",
|
||||
}
|
||||
: {};
|
||||
|
||||
const getHtmlPageOptions = (page: AppWindow): HtmlWebpackPlugin.Options => {
|
||||
return {
|
||||
filename: path.join(page),
|
||||
template: path.join(webpackPaths.srcRendererPath, page.replace(".html", ".ejs")),
|
||||
minify: {
|
||||
collapseWhitespace: true,
|
||||
removeAttributeQuotes: true,
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
removeAttributeQuotes: true,
|
||||
removeComments: true,
|
||||
},
|
||||
isBrowser: false,
|
||||
env: process.env.NODE_ENV,
|
||||
isDevelopment: process.env.NODE_ENV !== 'production',
|
||||
isDevelopment: process.env.NODE_ENV !== "production",
|
||||
nodeModules: webpackPaths.appNodeModulesPath,
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const configuration: webpack.Configuration = {
|
||||
...devtoolsConfig,
|
||||
...devtoolsConfig,
|
||||
|
||||
mode: 'production',
|
||||
mode: "production",
|
||||
|
||||
target: ['web', 'electron-renderer'],
|
||||
target: ["web", "electron-renderer"],
|
||||
|
||||
entry: [path.join(webpackPaths.srcRendererPath, 'index.tsx')],
|
||||
entry: [path.join(webpackPaths.srcRendererPath, "index.tsx")],
|
||||
|
||||
output: {
|
||||
path: webpackPaths.distRendererPath,
|
||||
publicPath: './',
|
||||
filename: 'renderer.js',
|
||||
library: {
|
||||
type: 'umd',
|
||||
output: {
|
||||
path: webpackPaths.distRendererPath,
|
||||
publicPath: "./",
|
||||
filename: "renderer.js",
|
||||
library: {
|
||||
type: "umd",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.s?(a|c)ss$/,
|
||||
use: [
|
||||
MiniCssExtractPlugin.loader,
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
modules: true,
|
||||
sourceMap: true,
|
||||
importLoaders: 1,
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.s?(a|c)ss$/,
|
||||
use: [
|
||||
MiniCssExtractPlugin.loader,
|
||||
{
|
||||
loader: "css-loader",
|
||||
options: {
|
||||
modules: true,
|
||||
sourceMap: true,
|
||||
importLoaders: 1,
|
||||
},
|
||||
},
|
||||
"sass-loader",
|
||||
],
|
||||
include: /\.module\.s?(c|a)ss$/,
|
||||
},
|
||||
},
|
||||
'sass-loader',
|
||||
],
|
||||
include: /\.module\.s?(c|a)ss$/,
|
||||
},
|
||||
{
|
||||
test: /\.s?(a|c)ss$/,
|
||||
use: [
|
||||
MiniCssExtractPlugin.loader,
|
||||
'css-loader',
|
||||
'sass-loader',
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
postcssOptions: {
|
||||
plugins:
|
||||
[
|
||||
require('tailwindcss'),
|
||||
require('autoprefixer'),
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.s?(a|c)ss$/,
|
||||
use: [
|
||||
MiniCssExtractPlugin.loader,
|
||||
"css-loader",
|
||||
"sass-loader",
|
||||
{
|
||||
loader: "postcss-loader",
|
||||
options: {
|
||||
postcssOptions: {
|
||||
plugins: [require("tailwindcss"), require("autoprefixer")],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
exclude: /\.module\.s?(c|a)ss$/,
|
||||
},
|
||||
// Fonts
|
||||
{
|
||||
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
||||
type: "asset/resource",
|
||||
},
|
||||
// Images
|
||||
{
|
||||
test: /\.(png|svg|jpg|jpeg|gif|mp4|webp)$/i,
|
||||
type: "asset/resource",
|
||||
},
|
||||
},
|
||||
],
|
||||
exclude: /\.module\.s?(c|a)ss$/,
|
||||
},
|
||||
// Fonts
|
||||
{
|
||||
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
||||
type: 'asset/resource',
|
||||
},
|
||||
// Images
|
||||
{
|
||||
test: /\.(png|svg|jpg|jpeg|gif|mp4|webp)$/i,
|
||||
type: 'asset/resource',
|
||||
},
|
||||
},
|
||||
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
}),
|
||||
new CssMinimizerPlugin(),
|
||||
],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: "production",
|
||||
DEBUG_PROD: false,
|
||||
}),
|
||||
|
||||
new MiniCssExtractPlugin({
|
||||
filename: "style.css",
|
||||
}),
|
||||
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: process.env.ANALYZE === "true" ? "server" : "disabled",
|
||||
}),
|
||||
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("index.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("launcher.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-map.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-playlist.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-model.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("shortcut-launch.html")),
|
||||
],
|
||||
},
|
||||
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
}),
|
||||
new CssMinimizerPlugin(),
|
||||
],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
/**
|
||||
* Create global constants which can be configured at compile time.
|
||||
*
|
||||
* Useful for allowing different behaviour between development builds and
|
||||
* release builds
|
||||
*
|
||||
* NODE_ENV should be production so that modules do not perform certain
|
||||
* development checks
|
||||
*/
|
||||
new webpack.EnvironmentPlugin({
|
||||
NODE_ENV: 'production',
|
||||
DEBUG_PROD: false,
|
||||
}),
|
||||
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'style.css',
|
||||
}),
|
||||
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: process.env.ANALYZE === 'true' ? 'server' : 'disabled',
|
||||
}),
|
||||
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("index.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("launcher.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-map.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-playlist.html")),
|
||||
new HtmlWebpackPlugin(getHtmlPageOptions("oneclick-download-model.html")),
|
||||
|
||||
],
|
||||
};
|
||||
|
||||
export default merge(baseConfig, configuration);
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
const path = require('path');
|
||||
const path = require("path");
|
||||
|
||||
const rootPath = path.join(__dirname, '../..');
|
||||
const rootPath = path.join(__dirname, "../..");
|
||||
|
||||
const dllPath = path.join(__dirname, '../dll');
|
||||
const dllPath = path.join(__dirname, "../dll");
|
||||
|
||||
const srcPath = path.join(rootPath, 'src');
|
||||
const srcMainPath = path.join(srcPath, 'main');
|
||||
const srcRendererPath = path.join(srcPath, 'renderer');
|
||||
const srcPath = path.join(rootPath, "src");
|
||||
const srcMainPath = path.join(srcPath, "main");
|
||||
const srcRendererPath = path.join(srcPath, "renderer");
|
||||
|
||||
const releasePath = path.join(rootPath, 'release');
|
||||
const appPath = path.join(releasePath, 'app');
|
||||
const appPackagePath = path.join(appPath, 'package.json');
|
||||
const appNodeModulesPath = path.join(appPath, 'node_modules');
|
||||
const srcNodeModulesPath = path.join(srcPath, 'node_modules');
|
||||
const releasePath = path.join(rootPath, "release");
|
||||
const appPath = path.join(releasePath, "app");
|
||||
const appPackagePath = path.join(appPath, "package.json");
|
||||
const appNodeModulesPath = path.join(appPath, "node_modules");
|
||||
const srcNodeModulesPath = path.join(srcPath, "node_modules");
|
||||
|
||||
const distPath = path.join(appPath, 'dist');
|
||||
const distMainPath = path.join(distPath, 'main');
|
||||
const distRendererPath = path.join(distPath, 'renderer');
|
||||
const distPath = path.join(appPath, "dist");
|
||||
const distMainPath = path.join(distPath, "main");
|
||||
const distRendererPath = path.join(distPath, "renderer");
|
||||
|
||||
const buildPath = path.join(releasePath, 'build');
|
||||
const buildPath = path.join(releasePath, "build");
|
||||
|
||||
export default {
|
||||
rootPath,
|
||||
dllPath,
|
||||
srcPath,
|
||||
srcMainPath,
|
||||
srcRendererPath,
|
||||
releasePath,
|
||||
appPath,
|
||||
appPackagePath,
|
||||
appNodeModulesPath,
|
||||
srcNodeModulesPath,
|
||||
distPath,
|
||||
distMainPath,
|
||||
distRendererPath,
|
||||
buildPath,
|
||||
rootPath,
|
||||
dllPath,
|
||||
srcPath,
|
||||
srcMainPath,
|
||||
srcRendererPath,
|
||||
releasePath,
|
||||
appPath,
|
||||
appPackagePath,
|
||||
appNodeModulesPath,
|
||||
srcNodeModulesPath,
|
||||
distPath,
|
||||
distMainPath,
|
||||
distRendererPath,
|
||||
buildPath,
|
||||
};
|
||||
|
||||
@@ -1 +1 @@
|
||||
export default 'test-file-stub';
|
||||
export default "test-file-stub";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"global-require": "off",
|
||||
"import/no-dynamic-require": "off",
|
||||
"import/no-extraneous-dependencies": "off"
|
||||
}
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"global-require": "off",
|
||||
"import/no-dynamic-require": "off",
|
||||
"import/no-extraneous-dependencies": "off"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,16 @@
|
||||
// Check if the renderer and main bundles are built
|
||||
import path from 'path';
|
||||
import chalk from 'chalk';
|
||||
import fs from 'fs';
|
||||
import webpackPaths from '../configs/webpack.paths';
|
||||
import path from "path";
|
||||
import chalk from "chalk";
|
||||
import fs from "fs";
|
||||
import webpackPaths from "../configs/webpack.paths";
|
||||
|
||||
const mainPath = path.join(webpackPaths.distMainPath, 'main.js');
|
||||
const rendererPath = path.join(webpackPaths.distRendererPath, 'renderer.js');
|
||||
const mainPath = path.join(webpackPaths.distMainPath, "main.js");
|
||||
const rendererPath = path.join(webpackPaths.distRendererPath, "renderer.js");
|
||||
|
||||
if (!fs.existsSync(mainPath)) {
|
||||
throw new Error(
|
||||
chalk.whiteBright.bgRed.bold(
|
||||
'The main process is not built yet. Build it by running "npm run build:main"'
|
||||
)
|
||||
);
|
||||
throw new Error(chalk.whiteBright.bgRed.bold('The main process is not built yet. Build it by running "npm run build:main"'));
|
||||
}
|
||||
|
||||
if (!fs.existsSync(rendererPath)) {
|
||||
throw new Error(
|
||||
chalk.whiteBright.bgRed.bold(
|
||||
'The renderer process is not built yet. Build it by running "npm run build:renderer"'
|
||||
)
|
||||
);
|
||||
throw new Error(chalk.whiteBright.bgRed.bold('The renderer process is not built yet. Build it by running "npm run build:renderer"'));
|
||||
}
|
||||
|
||||
@@ -1,54 +1,38 @@
|
||||
import fs from 'fs';
|
||||
import chalk from 'chalk';
|
||||
import { execSync } from 'child_process';
|
||||
import { dependencies } from '../../package.json';
|
||||
import fs from "fs";
|
||||
import chalk from "chalk";
|
||||
import { execSync } from "child_process";
|
||||
import { dependencies } from "../../package.json";
|
||||
|
||||
if (dependencies) {
|
||||
const dependenciesKeys = Object.keys(dependencies);
|
||||
const nativeDeps = fs
|
||||
.readdirSync('node_modules')
|
||||
.filter((folder) => fs.existsSync(`node_modules/${folder}/binding.gyp`));
|
||||
if (nativeDeps.length === 0) {
|
||||
process.exit(0);
|
||||
}
|
||||
try {
|
||||
// Find the reason for why the dependency is installed. If it is installed
|
||||
// because of a devDependency then that is okay. Warn when it is installed
|
||||
// because of a dependency
|
||||
const { dependencies: dependenciesObject } = JSON.parse(
|
||||
execSync(`npm ls ${nativeDeps.join(' ')} --json`).toString()
|
||||
);
|
||||
const rootDependencies = Object.keys(dependenciesObject);
|
||||
const filteredRootDependencies = rootDependencies.filter((rootDependency) =>
|
||||
dependenciesKeys.includes(rootDependency)
|
||||
);
|
||||
if (filteredRootDependencies.length > 0) {
|
||||
const plural = filteredRootDependencies.length > 1;
|
||||
console.log(`
|
||||
${chalk.whiteBright.bgYellow.bold(
|
||||
'Webpack does not work with native dependencies.'
|
||||
)}
|
||||
${chalk.bold(filteredRootDependencies.join(', '))} ${
|
||||
plural ? 'are native dependencies' : 'is a native dependency'
|
||||
} and should be installed inside of the "./release/app" folder.
|
||||
First, uninstall the packages from "./package.json":
|
||||
${chalk.whiteBright.bgGreen.bold('npm uninstall your-package')}
|
||||
${chalk.bold(
|
||||
'Then, instead of installing the package to the root "./package.json":'
|
||||
)}
|
||||
${chalk.whiteBright.bgRed.bold('npm install your-package')}
|
||||
${chalk.bold('Install the package to "./release/app/package.json"')}
|
||||
${chalk.whiteBright.bgGreen.bold(
|
||||
'cd ./release/app && npm install your-package'
|
||||
)}
|
||||
Read more about native dependencies at:
|
||||
${chalk.bold(
|
||||
'https://electron-react-boilerplate.js.org/docs/adding-dependencies/#module-structure'
|
||||
)}
|
||||
`);
|
||||
process.exit(1);
|
||||
const dependenciesKeys = Object.keys(dependencies);
|
||||
const nativeDeps = fs.readdirSync("node_modules").filter(folder => fs.existsSync(`node_modules/${folder}/binding.gyp`));
|
||||
if (nativeDeps.length === 0) {
|
||||
process.exit(0);
|
||||
}
|
||||
try {
|
||||
// Find the reason for why the dependency is installed. If it is installed
|
||||
// because of a devDependency then that is okay. Warn when it is installed
|
||||
// because of a dependency
|
||||
const { dependencies: dependenciesObject } = JSON.parse(execSync(`npm ls ${nativeDeps.join(" ")} --json`).toString());
|
||||
const rootDependencies = Object.keys(dependenciesObject);
|
||||
const filteredRootDependencies = rootDependencies.filter(rootDependency => dependenciesKeys.includes(rootDependency));
|
||||
if (filteredRootDependencies.length > 0) {
|
||||
const plural = filteredRootDependencies.length > 1;
|
||||
console.log(`
|
||||
${chalk.whiteBright.bgYellow.bold("Webpack does not work with native dependencies.")}
|
||||
${chalk.bold(filteredRootDependencies.join(", "))} ${plural ? "are native dependencies" : "is a native dependency"} and should be installed inside of the "./release/app" folder.
|
||||
First, uninstall the packages from "./package.json":
|
||||
${chalk.whiteBright.bgGreen.bold("npm uninstall your-package")}
|
||||
${chalk.bold('Then, instead of installing the package to the root "./package.json":')}
|
||||
${chalk.whiteBright.bgRed.bold("npm install your-package")}
|
||||
${chalk.bold('Install the package to "./release/app/package.json"')}
|
||||
${chalk.whiteBright.bgGreen.bold("cd ./release/app && npm install your-package")}
|
||||
Read more about native dependencies at:
|
||||
${chalk.bold("https://electron-react-boilerplate.js.org/docs/adding-dependencies/#module-structure")}
|
||||
`);
|
||||
process.exit(1);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log("Native dependencies could not be checked");
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Native dependencies could not be checked');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import chalk from 'chalk';
|
||||
import chalk from "chalk";
|
||||
|
||||
export default function checkNodeEnv(expectedEnv) {
|
||||
if (!expectedEnv) {
|
||||
throw new Error('"expectedEnv" not set');
|
||||
}
|
||||
if (!expectedEnv) {
|
||||
throw new Error('"expectedEnv" not set');
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== expectedEnv) {
|
||||
console.log(
|
||||
chalk.whiteBright.bgRed.bold(
|
||||
`"process.env.NODE_ENV" must be "${expectedEnv}" to use this webpack config`
|
||||
)
|
||||
);
|
||||
process.exit(2);
|
||||
}
|
||||
if (process.env.NODE_ENV !== expectedEnv) {
|
||||
console.log(chalk.whiteBright.bgRed.bold(`"process.env.NODE_ENV" must be "${expectedEnv}" to use this webpack config`));
|
||||
process.exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import chalk from 'chalk';
|
||||
import detectPort from 'detect-port';
|
||||
import chalk from "chalk";
|
||||
import detectPort from "detect-port";
|
||||
|
||||
const port = process.env.PORT || '1212';
|
||||
const port = process.env.PORT || "1212";
|
||||
|
||||
detectPort(port, (err, availablePort) => {
|
||||
if (port !== String(availablePort)) {
|
||||
throw new Error(
|
||||
chalk.whiteBright.bgRed.bold(
|
||||
`Port "${port}" on "localhost" is already in use. Please use another port. ex: PORT=4343 npm start`
|
||||
)
|
||||
);
|
||||
} else {
|
||||
process.exit(0);
|
||||
}
|
||||
if (port !== String(availablePort)) {
|
||||
throw new Error(chalk.whiteBright.bgRed.bold(`Port "${port}" on "localhost" is already in use. Please use another port. ex: PORT=4343 npm start`));
|
||||
} else {
|
||||
process.exit(0);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import rimraf from 'rimraf';
|
||||
import process from 'process';
|
||||
import webpackPaths from '../configs/webpack.paths';
|
||||
import rimraf from "rimraf";
|
||||
import process from "process";
|
||||
import webpackPaths from "../configs/webpack.paths";
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
const commandMap = {
|
||||
dist: webpackPaths.distPath,
|
||||
release: webpackPaths.releasePath,
|
||||
dll: webpackPaths.dllPath,
|
||||
dist: webpackPaths.distPath,
|
||||
release: webpackPaths.releasePath,
|
||||
dll: webpackPaths.dllPath,
|
||||
};
|
||||
|
||||
args.forEach((x) => {
|
||||
const pathToRemove = commandMap[x];
|
||||
if (pathToRemove !== undefined) {
|
||||
rimraf.sync(pathToRemove);
|
||||
}
|
||||
args.forEach(x => {
|
||||
const pathToRemove = commandMap[x];
|
||||
if (pathToRemove !== undefined) {
|
||||
rimraf.sync(pathToRemove);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import path from 'path';
|
||||
import rimraf from 'rimraf';
|
||||
import webpackPaths from '../configs/webpack.paths';
|
||||
import path from "path";
|
||||
import rimraf from "rimraf";
|
||||
import webpackPaths from "../configs/webpack.paths";
|
||||
|
||||
export default function deleteSourceMaps() {
|
||||
rimraf.sync(path.join(webpackPaths.distMainPath, '*.js.map'));
|
||||
rimraf.sync(path.join(webpackPaths.distRendererPath, '*.js.map'));
|
||||
rimraf.sync(path.join(webpackPaths.distMainPath, "*.js.map"));
|
||||
rimraf.sync(path.join(webpackPaths.distRendererPath, "*.js.map"));
|
||||
}
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
import { execSync } from 'child_process';
|
||||
import fs from 'fs';
|
||||
import { dependencies } from '../../release/app/package.json';
|
||||
import webpackPaths from '../configs/webpack.paths';
|
||||
import { execSync } from "child_process";
|
||||
import fs from "fs";
|
||||
import { dependencies } from "../../release/app/package.json";
|
||||
import webpackPaths from "../configs/webpack.paths";
|
||||
|
||||
if (
|
||||
Object.keys(dependencies || {}).length > 0 &&
|
||||
fs.existsSync(webpackPaths.appNodeModulesPath)
|
||||
) {
|
||||
const electronRebuildCmd =
|
||||
'../../node_modules/.bin/electron-rebuild --force --types prod,dev,optional --module-dir .';
|
||||
const cmd =
|
||||
process.platform === 'win32'
|
||||
? electronRebuildCmd.replace(/\//g, '\\')
|
||||
: electronRebuildCmd;
|
||||
execSync(cmd, {
|
||||
cwd: webpackPaths.appPath,
|
||||
stdio: 'inherit',
|
||||
});
|
||||
if (Object.keys(dependencies || {}).length > 0 && fs.existsSync(webpackPaths.appNodeModulesPath)) {
|
||||
const electronRebuildCmd = "../../node_modules/.bin/electron-rebuild --force --types prod,dev,optional --module-dir .";
|
||||
const cmd = process.platform === "win32" ? electronRebuildCmd.replace(/\//g, "\\") : electronRebuildCmd;
|
||||
execSync(cmd, {
|
||||
cwd: webpackPaths.appPath,
|
||||
stdio: "inherit",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import webpackPaths from '../configs/webpack.paths';
|
||||
import fs from "fs";
|
||||
import webpackPaths from "../configs/webpack.paths";
|
||||
|
||||
const { srcNodeModulesPath } = webpackPaths;
|
||||
const { appNodeModulesPath } = webpackPaths;
|
||||
|
||||
if (!fs.existsSync(srcNodeModulesPath) && fs.existsSync(appNodeModulesPath)) {
|
||||
fs.symlinkSync(appNodeModulesPath, srcNodeModulesPath, 'junction');
|
||||
fs.symlinkSync(appNodeModulesPath, srcNodeModulesPath, "junction");
|
||||
}
|
||||
|
||||
@@ -1,30 +1,28 @@
|
||||
const { notarize } = require('electron-notarize');
|
||||
const { build } = require('../../package.json');
|
||||
const { notarize } = require("electron-notarize");
|
||||
const { build } = require("../../package.json");
|
||||
|
||||
exports.default = async function notarizeMacos(context) {
|
||||
const { electronPlatformName, appOutDir } = context;
|
||||
if (electronPlatformName !== 'darwin') {
|
||||
return;
|
||||
}
|
||||
const { electronPlatformName, appOutDir } = context;
|
||||
if (electronPlatformName !== "darwin") {
|
||||
return;
|
||||
}
|
||||
|
||||
if (process.env.CI !== 'true') {
|
||||
console.warn('Skipping notarizing step. Packaging is not running in CI');
|
||||
return;
|
||||
}
|
||||
if (process.env.CI !== "true") {
|
||||
console.warn("Skipping notarizing step. Packaging is not running in CI");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!('APPLE_ID' in process.env && 'APPLE_ID_PASS' in process.env)) {
|
||||
console.warn(
|
||||
'Skipping notarizing step. APPLE_ID and APPLE_ID_PASS env variables must be set'
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (!("APPLE_ID" in process.env && "APPLE_ID_PASS" in process.env)) {
|
||||
console.warn("Skipping notarizing step. APPLE_ID and APPLE_ID_PASS env variables must be set");
|
||||
return;
|
||||
}
|
||||
|
||||
const appName = context.packager.appInfo.productFilename;
|
||||
const appName = context.packager.appInfo.productFilename;
|
||||
|
||||
await notarize({
|
||||
appBundleId: build.appId,
|
||||
appPath: `${appOutDir}/${appName}.app`,
|
||||
appleId: process.env.APPLE_ID,
|
||||
appleIdPassword: process.env.APPLE_ID_PASS,
|
||||
});
|
||||
await notarize({
|
||||
appBundleId: build.appId,
|
||||
appPath: `${appOutDir}/${appName}.app`,
|
||||
appleId: process.env.APPLE_ID,
|
||||
appleIdPassword: process.env.APPLE_ID_PASS,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,60 +1,70 @@
|
||||
module.exports = {
|
||||
extends: 'erb',
|
||||
rules: {
|
||||
// A temporary hack related to IDE not resolving correct package.json
|
||||
'import/no-extraneous-dependencies': 'off',
|
||||
'import/no-unresolved': 'error',
|
||||
// Since React 17 and typescript 4.1 you can safely disable the rule
|
||||
'react/react-in-jsx-scope': 'off',
|
||||
'prettier/prettier': 0,
|
||||
"global-require": 0,
|
||||
"import/prefer-default-export": "off",
|
||||
"no-empty-function": "off",
|
||||
"no-await-in-loop": "off",
|
||||
"no-continue": "off",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
'@typescript-eslint/lines-between-class-members': "off",
|
||||
"class-methods-use-this": "off",
|
||||
"promise/catch-or-return": "off",
|
||||
"promise/always-return": "off",
|
||||
"import/order": "off",
|
||||
"react/destructuring-assignment": "off",
|
||||
"promise/no-nesting": "off",
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
"@typescript-eslint/no-shadow": "off",
|
||||
"@typescript-eslint/no-use-before-define": "off",
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
"jsx-a11y/no-static-element-interactions": "off",
|
||||
"react/require-default-props": "off",
|
||||
"consistent-return": "off",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-restricted-syntax": "off",
|
||||
"@typescript-eslint/no-throw-literal": "off",
|
||||
"@typescript-eslint/no-unused-expressions": "off",
|
||||
"no-param-reassign": "off",
|
||||
"no-useless-escape": "off",
|
||||
"jsx-a11y/no-noninteractive-element-interactions": "off",
|
||||
"no-async-promise-executor": "off",
|
||||
"new-cap": "off"
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module',
|
||||
project: './tsconfig.json',
|
||||
tsconfigRootDir: __dirname,
|
||||
createDefaultProgram: true,
|
||||
},
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
|
||||
node: {},
|
||||
webpack: {
|
||||
config: require.resolve('./.erb/configs/webpack.config.eslint.ts'),
|
||||
},
|
||||
typescript: {},
|
||||
extends: "erb",
|
||||
rules: {
|
||||
// A temporary hack related to IDE not resolving correct package.json
|
||||
"import/no-extraneous-dependencies": "off",
|
||||
"import/no-unresolved": "error",
|
||||
// Since React 17 and typescript 4.1 you can safely disable the rule
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"prettier/prettier": 0,
|
||||
"global-require": 0,
|
||||
"import/prefer-default-export": "off",
|
||||
"no-empty-function": "off",
|
||||
"no-await-in-loop": "off",
|
||||
"no-continue": "off",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/lines-between-class-members": "off",
|
||||
"class-methods-use-this": "off",
|
||||
"promise/catch-or-return": "off",
|
||||
"promise/always-return": "off",
|
||||
"import/order": "off",
|
||||
"react/destructuring-assignment": "off",
|
||||
"promise/no-nesting": "off",
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
"@typescript-eslint/no-shadow": "off",
|
||||
"@typescript-eslint/no-use-before-define": "off",
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
"jsx-a11y/no-static-element-interactions": "off",
|
||||
"react/require-default-props": "off",
|
||||
"consistent-return": "off",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-restricted-syntax": "off",
|
||||
"@typescript-eslint/no-throw-literal": "off",
|
||||
"@typescript-eslint/no-unused-expressions": "off",
|
||||
"no-param-reassign": "off",
|
||||
"no-useless-escape": "off",
|
||||
"jsx-a11y/no-noninteractive-element-interactions": "off",
|
||||
"no-async-promise-executor": "off",
|
||||
"new-cap": "off",
|
||||
"no-new": "off",
|
||||
"no-plusplus": "off",
|
||||
"react/jsx-props-no-spreading": "off",
|
||||
"jsx-a11y/iframe-has-title": "off",
|
||||
"import/no-dynamic-require": "off",
|
||||
radix: "off",
|
||||
"jsx-a11y/alt-text": "off",
|
||||
"react/prop-types": "off",
|
||||
"import/no-cycle": "off",
|
||||
"prefer-promise-reject-errors": "off",
|
||||
},
|
||||
'import/parsers': {
|
||||
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
sourceType: "module",
|
||||
project: "./tsconfig.json",
|
||||
tsconfigRootDir: __dirname,
|
||||
createDefaultProgram: true,
|
||||
},
|
||||
settings: {
|
||||
"import/resolver": {
|
||||
// See https://github.com/benmosher/eslint-plugin-import/issues/1396#issuecomment-575727774 for line below
|
||||
node: {},
|
||||
webpack: {
|
||||
config: require.resolve("./.erb/configs/webpack.config.eslint.ts"),
|
||||
},
|
||||
typescript: {},
|
||||
},
|
||||
"import/parsers": {
|
||||
"@typescript-eslint/parser": [".ts", ".tsx"],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1 +1 @@
|
||||
|
||||
patreon: bsmanager
|
||||
|
||||
@@ -4,7 +4,6 @@ about: Create a report to help us improve
|
||||
title: "[BUG] : "
|
||||
labels: bug
|
||||
assignees: Zagrios
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
@@ -12,6 +11,7 @@ A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
@@ -24,8 +24,9 @@ A clear and concise description of what you expected to happen.
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Version [e.g. 22]
|
||||
|
||||
- OS: [e.g. iOS]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
||||
@@ -4,7 +4,6 @@ about: Suggest an idea for this project
|
||||
title: "[FEAT.] : "
|
||||
labels: enhancement
|
||||
assignees: Zagrios
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
||||
|
||||
name: Linting
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
branches: ["master"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: "npm"
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
@@ -0,0 +1,31 @@
|
||||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
||||
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
branches: ["master"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: "npm"
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
# Currently typescript, eslint, and prettier are unhappy
|
||||
continue-on-error: true
|
||||
@@ -0,0 +1,2 @@
|
||||
**/dist
|
||||
coverage
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"recommendations": ["dbaeumer.vscode-eslint", "EditorConfig.EditorConfig"]
|
||||
"recommendations": ["dbaeumer.vscode-eslint", "EditorConfig.EditorConfig"]
|
||||
}
|
||||
|
||||
@@ -1,30 +1,28 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Electron: Main",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"protocol": "inspector",
|
||||
"runtimeExecutable": "npm",
|
||||
"runtimeArgs": [
|
||||
"run start:main --inspect=5858 --remote-debugging-port=9223"
|
||||
],
|
||||
"preLaunchTask": "Start Webpack Dev"
|
||||
},
|
||||
{
|
||||
"name": "Electron: Renderer",
|
||||
"type": "chrome",
|
||||
"request": "attach",
|
||||
"port": 9223,
|
||||
"webRoot": "${workspaceFolder}",
|
||||
"timeout": 15000
|
||||
}
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "Electron: All",
|
||||
"configurations": ["Electron: Main", "Electron: Renderer"]
|
||||
}
|
||||
]
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Electron: Main",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"protocol": "inspector",
|
||||
"runtimeExecutable": "npm",
|
||||
"runtimeArgs": ["run start:main --inspect=5858 --remote-debugging-port=9223"],
|
||||
"preLaunchTask": "Start Webpack Dev"
|
||||
},
|
||||
{
|
||||
"name": "Electron: Renderer",
|
||||
"type": "chrome",
|
||||
"request": "attach",
|
||||
"port": 9223,
|
||||
"webRoot": "${workspaceFolder}",
|
||||
"timeout": 15000
|
||||
}
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "Electron: All",
|
||||
"configurations": ["Electron: Main", "Electron: Renderer"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,33 +1,27 @@
|
||||
{
|
||||
"files.associations": {
|
||||
".eslintrc": "jsonc",
|
||||
".prettierrc": "jsonc",
|
||||
".eslintignore": "ignore"
|
||||
},
|
||||
"files.associations": {
|
||||
".eslintrc": "jsonc",
|
||||
".prettierrc": "jsonc",
|
||||
".eslintignore": "ignore"
|
||||
},
|
||||
|
||||
"eslint.validate": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"html",
|
||||
"typescriptreact"
|
||||
],
|
||||
"eslint.validate": ["javascript", "javascriptreact", "html", "typescriptreact"],
|
||||
|
||||
"javascript.validate.enable": false,
|
||||
"javascript.format.enable": false,
|
||||
"typescript.format.enable": false,
|
||||
"javascript.validate.enable": false,
|
||||
"javascript.format.enable": false,
|
||||
"typescript.format.enable": false,
|
||||
|
||||
"search.exclude": {
|
||||
".git": true,
|
||||
".eslintcache": true,
|
||||
".erb/dll": true,
|
||||
"release/{build,app/dist}": true,
|
||||
"node_modules": true,
|
||||
"npm-debug.log.*": true,
|
||||
"test/**/__snapshots__": true,
|
||||
"package-lock.json": true,
|
||||
"*.{css,sass,scss}.d.ts": true
|
||||
},
|
||||
"editor.detectIndentation": false,
|
||||
"editor.tabSize": 4
|
||||
|
||||
"search.exclude": {
|
||||
".git": true,
|
||||
".eslintcache": true,
|
||||
".erb/dll": true,
|
||||
"release/{build,app/dist}": true,
|
||||
"node_modules": true,
|
||||
"npm-debug.log.*": true,
|
||||
"test/**/__snapshots__": true,
|
||||
"package-lock.json": true,
|
||||
"*.{css,sass,scss}.d.ts": true
|
||||
},
|
||||
"editor.detectIndentation": false,
|
||||
"editor.tabSize": 4
|
||||
}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
"label": "Start Webpack Dev",
|
||||
"script": "start:renderer",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"isBackground": true,
|
||||
"problemMatcher": {
|
||||
"owner": "custom",
|
||||
"pattern": {
|
||||
"regexp": "____________"
|
||||
},
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "Compiling\\.\\.\\.$",
|
||||
"endsPattern": "(Compiled successfully|Failed to compile)\\.$"
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
"label": "Start Webpack Dev",
|
||||
"script": "start:renderer",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"isBackground": true,
|
||||
"problemMatcher": {
|
||||
"owner": "custom",
|
||||
"pattern": {
|
||||
"regexp": "____________"
|
||||
},
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "Compiling\\.\\.\\.$",
|
||||
"endsPattern": "(Compiled successfully|Failed to compile)\\.$"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
## [0.2.0](https://github.com/Zagrios/bs-manager/releases/tag/v0.2.0) (October 23, 2022)
|
||||
### Features
|
||||
- Mods management fully implementd [5c47897](https://github.com/Zagrios/bs-manager/commit/5c478979e96b14dd54a3889e551c163ece701b4a)
|
||||
- Add close button in settings page #5
|
||||
- Add GitHub and contribution actions in settings page #3
|
||||
### Fixes
|
||||
- Lunch Beat Saber multiple times #1
|
||||
- Placeholders and some texts not with light theme #6
|
||||
- Wrong background color when version is downloading #7
|
||||
- Add missing translations [5817260](https://github.com/Zagrios/bs-manager/commit/58172606f3f4731c90c9aa838fb89ac95458e032)
|
||||
- Error when loading downloaded versions when Steam is not installed [6e07adb](https://github.com/Zagrios/bs-manager/commit/6e07adb990f78073dd68c2b9cf6209562bb4bf2b)
|
||||
|
||||
### Features
|
||||
|
||||
- Mods management fully implementd [5c47897](https://github.com/Zagrios/bs-manager/commit/5c478979e96b14dd54a3889e551c163ece701b4a)
|
||||
- Add close button in settings page #5
|
||||
- Add GitHub and contribution actions in settings page #3
|
||||
|
||||
### Fixes
|
||||
|
||||
- Lunch Beat Saber multiple times #1
|
||||
- Placeholders and some texts not with light theme #6
|
||||
- Wrong background color when version is downloading #7
|
||||
- Add missing translations [5817260](https://github.com/Zagrios/bs-manager/commit/58172606f3f4731c90c9aa838fb89ac95458e032)
|
||||
- Error when loading downloaded versions when Steam is not installed [6e07adb](https://github.com/Zagrios/bs-manager/commit/6e07adb990f78073dd68c2b9cf6209562bb4bf2b)
|
||||
|
||||
## [0.1.0](https://github.com/Zagrios/bs-manager/releases/tag/v0.1.0) (September 19, 2022)
|
||||
|
||||
- Initial public release
|
||||
- Initial public release
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
@@ -18,24 +17,24 @@ diverse, inclusive, and healthy community.
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the overall
|
||||
community
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
- Focusing on what is best not just for us as individuals, but for the overall
|
||||
community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or advances of
|
||||
any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email address,
|
||||
without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
- The use of sexualized language or imagery, and sexual attention or advances of
|
||||
any kind
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email address,
|
||||
without their explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
@@ -119,14 +118,14 @@ version 2.1, available at
|
||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
||||
[Mozilla's code of conduct enforcement ladder][mozilla coc].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
||||
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
|
||||
[https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[mozilla coc]: https://github.com/mozilla/diversity
|
||||
[faq]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
|
||||
@@ -19,14 +19,14 @@ We'd also love PRs. If you're thinking of a large PR, we advise opening up an is
|
||||
|
||||
1. [Fork][fork] and clone the repository.
|
||||
1. Configure and install the dependencies: `npm install`.
|
||||
1. Create a new branch following naming convention: `git checkout -b (feature|bufix|hotfix)/(short-description)(/issue-id)`.
|
||||
1. Create a new branch following naming convention: `git checkout -b (feature|bugfix|hotfix|chore)/(short-description)(/issue-id)`.
|
||||
1. Make your change, test, and make sure BSManager work fine.
|
||||
1. Push to your fork and [submit a pull request][pr].
|
||||
1. Pat your self on the back and wait for your pull request to be reviewed and merged.
|
||||
|
||||
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
|
||||
|
||||
- Follow the [style guide][style] which is using standard.
|
||||
- Keep your changes as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
|
||||
- Follow the [style guide][style] which is using standard.
|
||||
- Keep your changes as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
|
||||
|
||||
Work in Progress pull requests are also welcome to get feedback early on, or if there is something blocked you.
|
||||
|
||||
@@ -1,281 +1,622 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
0. Definitions.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
1. Source Code.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
2. Basic Permissions.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
14. Revised Versions of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
NO WARRANTY
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
@@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
@@ -303,37 +644,31 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
*** https://www.markdownguide.org/basic-syntax/#reference-style-links
|
||||
-->
|
||||
|
||||
|
||||
<!-- TITLE -->
|
||||
<div align="center">
|
||||
<a href="https://github.com/Zagrios/bs-manager">
|
||||
@@ -32,8 +31,8 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- BADGES -->
|
||||
---
|
||||
## <!-- BADGES -->
|
||||
|
||||
<br>
|
||||
<div align="center" >
|
||||
<a href="https://github.com/Zagrios/bs-manager/stargazers"><img src ="https://img.shields.io/github/stars/Zagrios/bs-manager?style=for-the-badge" alt="Stargazers"/></a>
|
||||
@@ -43,15 +42,18 @@
|
||||
<a href="https://github.com/Zagrios/bs-manager/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/Zagrios/bs-manager?style=for-the-badge"></a>
|
||||
<br>
|
||||
<a href="https://discord.gg/uSqbHVpKdV"><img src ="https://img.shields.io/badge/-DISCORD-5865f2?style=for-the-badge&logo=discord&logoColor=ffffff" alt="discord"/></a>
|
||||
<!--<a href="https://mee6.xyz/fr/m/bsmanager"><img src ="https://img.shields.io/badge/-🥰%20Support%20BSM-EC4546?style=for-the-badge" alt="Donation"/></a>-->
|
||||
<a href="https://www.patreon.com/bsmanager"><img src ="https://img.shields.io/badge/-🥰%20Support%20BSM-EC4546?style=for-the-badge" alt="Donation"/></a>
|
||||
<a href="https://twitter.com/BSManager_"><img src ="https://img.shields.io/badge/-Twitter-F5F8FA?style=for-the-badge&logo=Twitter" alt="Twitter"/></a>
|
||||
<br>
|
||||
[<a href="#readme-bot">Go to bottom</a>]
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
<!-- TABLE OF CONTENTS -->
|
||||
|
||||
<b>Table of Contents</b>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#about-the-project">About The Project</a>
|
||||
@@ -143,6 +145,7 @@
|
||||
<div align="center">
|
||||
|
||||
https://user-images.githubusercontent.com/40648115/213008824-25cfdda3-6350-42dc-aa53-2132b4b8e838.mov
|
||||
|
||||
</div>
|
||||
|
||||
<!--CUSTOM UR VERSIONS-->
|
||||
@@ -156,6 +159,7 @@ https://user-images.githubusercontent.com/40648115/213008824-25cfdda3-6350-42dc-
|
||||
<div align="center">
|
||||
|
||||
https://user-images.githubusercontent.com/40648115/213296794-74a1e20b-12dc-44ec-a67f-e25d7010bd3d.mov
|
||||
|
||||
</div>
|
||||
|
||||
<!--INSTALL MODS-->
|
||||
@@ -169,6 +173,7 @@ https://user-images.githubusercontent.com/40648115/213296794-74a1e20b-12dc-44ec-
|
||||
<div align="center">
|
||||
|
||||
https://user-images.githubusercontent.com/40648115/213296816-bdaafc90-da76-4835-8d83-9ac6a4e1c549.mov
|
||||
|
||||
</div>
|
||||
|
||||
<!--INSTALL MAPS-->
|
||||
@@ -182,6 +187,7 @@ https://user-images.githubusercontent.com/40648115/213296816-bdaafc90-da76-4835-
|
||||
<div align="center">
|
||||
|
||||
https://user-images.githubusercontent.com/40648115/213296838-f775fe83-866d-4764-a7d0-648dbb8ec983.mov
|
||||
|
||||
</div>
|
||||
|
||||
<!--ONE CLICK-->
|
||||
@@ -195,6 +201,7 @@ https://user-images.githubusercontent.com/40648115/213296838-f775fe83-866d-4764-
|
||||
<div align="center">
|
||||
|
||||
https://user-images.githubusercontent.com/40648115/213435051-7feb815d-f32b-4135-b095-ef49726a836c.mov
|
||||
|
||||
</div>
|
||||
|
||||
<!--HAVING PROBLEMS?-->
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
type Styles = Record<string, string>;
|
||||
|
||||
declare module '*.svg' {
|
||||
const content: string;
|
||||
export default content;
|
||||
declare module "*.svg" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.png' {
|
||||
const content: string;
|
||||
export default content;
|
||||
declare module "*.png" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.webp' {
|
||||
const content: string;
|
||||
export default content;
|
||||
declare module "*.webp" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.mp4' {
|
||||
const content: string;
|
||||
export default content;
|
||||
declare module "*.mp4" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.jpg' {
|
||||
const content: string;
|
||||
export default content;
|
||||
declare module "*.jpg" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.gif' {
|
||||
const content: string;
|
||||
export default content;
|
||||
declare module "*.gif" {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.scss' {
|
||||
const content: Styles;
|
||||
export default content;
|
||||
declare module "*.scss" {
|
||||
const content: Styles;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.sass' {
|
||||
const content: Styles;
|
||||
export default content;
|
||||
declare module "*.sass" {
|
||||
const content: Styles;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.css' {
|
||||
const content: Styles;
|
||||
export default content;
|
||||
declare module "*.css" {
|
||||
const content: Styles;
|
||||
export default content;
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 10 KiB |
@@ -517,5 +517,53 @@
|
||||
"ReleaseImg": "https://cdn.akamai.steamstatic.com/steamcommunity/public/images/clans//32055887/8f978bbf292810004bca12523e76be8a7eec8c4e.png",
|
||||
"ReleaseDate": "1677593822",
|
||||
"year": "2023"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.29.0",
|
||||
"BSManifest": "3341527958186345367",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/6169409105082976092",
|
||||
"ReleaseImg": "https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/clans//32055887/255fd49cd96042b97089f754609be291293e783f.png",
|
||||
"ReleaseDate": "1680188760",
|
||||
"year": "2023"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.29.1",
|
||||
"BSManifest": "886973241045584398",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/6169409105101272202",
|
||||
"ReleaseImg": "https://cdn.akamai.steamstatic.com/steamcommunity/public/images/clans/32055887/c328e407367e9914abaf92f609501877ee5abb63.png",
|
||||
"ReleaseDate": "1680623885",
|
||||
"year": "2023"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.29.4",
|
||||
"BSManifest": "6291266771922375922",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/3708194993422325380",
|
||||
"ReleaseImg": "https://cdn.akamai.steamstatic.com/steamcommunity/public/images/clans/32055887/9c3d476c03e4a2ac72ca5df016b7c94d242b41cb.png",
|
||||
"ReleaseDate": "1683644991",
|
||||
"year": "2023"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.30.0",
|
||||
"BSManifest": "7304715857122259127",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/3725085394628677636",
|
||||
"ReleaseImg": "https://cdn.akamai.steamstatic.com/steamcommunity/public/images/clans/32055887/cd56688ad716b544af14a61b2fbace9088478887.png",
|
||||
"ReleaseDate": "1684965390",
|
||||
"year": "2023"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.30.2",
|
||||
"BSManifest": "8042804988990059618",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/3655280868312846230",
|
||||
"ReleaseImg": "https://clan.akamai.steamstatic.com/images/32055887/6d78e092c54f411b36f2c0577d62eb1b25f91aa3.png",
|
||||
"ReleaseDate": "1686668364",
|
||||
"year": "2023"
|
||||
},
|
||||
{
|
||||
"BSVersion": "1.31.0",
|
||||
"BSManifest": "676582354127623831",
|
||||
"ReleaseURL": "https://steamcommunity.com/games/620980/announcements/detail/3674423070127121445",
|
||||
"ReleaseImg": "https://clan.cloudflare.steamstatic.com/images/32055887/28993aecc56a75c52295fa07620f58cb0e4b09e8.png",
|
||||
"ReleaseDate": "1688050646",
|
||||
"year": "2023"
|
||||
}
|
||||
]
|
||||
@@ -1,3 +1,15 @@
|
||||
[
|
||||
{"username": "Shidorien"}
|
||||
]
|
||||
{"username": "Shidorien"},
|
||||
{"username": "iPixelGalaxy", "type": "diamond", "link": "https://twitch.tv/ipixelgalaxy"},
|
||||
{"username": "Emyte", "type": "gold"},
|
||||
{"username": "GoodOldNervy"},
|
||||
{"username": "Naysy"},
|
||||
{"username": "Falmil"},
|
||||
{"username": "K1Lc4m"},
|
||||
{"username": "Adam"},
|
||||
{"username": "Cabalia"},
|
||||
{"username": "Anonymously42", "type": "diamond", "link": "https://www.twitch.tv/anonymously42tv"},
|
||||
{"username": "En4Yuz"},
|
||||
{"username": "AndyIsHereBoi", "type": "gold"},
|
||||
{"username": "grtroadrunner"}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,900 @@
|
||||
{
|
||||
"misc": {
|
||||
"download": "Laden",
|
||||
"add": "Hinzufügen",
|
||||
"verify": "Prüfen",
|
||||
"launch": "Starten",
|
||||
"mods": "Mods",
|
||||
"maps": "Maps",
|
||||
"playlists": "Playlisten",
|
||||
"models": "Modelle",
|
||||
"cancel": "Abbruch",
|
||||
"delete": "Löschen",
|
||||
"accept": "Akzeptieren",
|
||||
"refuse": "Ablehnen",
|
||||
"apply": "Übernehmen",
|
||||
"copy": "Kopieren",
|
||||
"copied": "Kopiert!"
|
||||
},
|
||||
"nav-bar": {
|
||||
"add-version": "Version Hinzufügen",
|
||||
"settings": "Einstellungen",
|
||||
"shared": {
|
||||
"text": "Geteilt",
|
||||
"tooltip": "Geteilte Inhalte"
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
"shared-maps": {
|
||||
"title": "Geteilte Maps"
|
||||
},
|
||||
"version-viewer": {
|
||||
"launch-mods": {
|
||||
"oculus": "Oculus Modus",
|
||||
"oculus-description": "Wenn du Beat Saber über Steam benutzt, es ermöglicht dir Oculus's VR-Composer zu nutzen ohne SteamVR, um bessere Leistung zu erhalten. Dies wird nicht benötigt für Oculus Headsets",
|
||||
"desktop": "FPFC Modus",
|
||||
"desktop-description": "Auf diese Weise kannst du WASD und die Maus verwenden, um im Spiel durch das Menü zu navigieren. Dies erleichtert das Testen erheblich, da Du dein Headset nicht aufsetzen musst!",
|
||||
"debug": "Debug Modus",
|
||||
"debug-description": "Aktiviert das Ausgabeprotokollfenster für IPA. Dies zeigt die Debug-Konsole, die Mods verwenden.",
|
||||
"advanced-launch": {
|
||||
"button": "Erweiterter Start",
|
||||
"placeholder": "Weitere Argumente Bspw: --revert; --nowait"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"title": "Geteilte Maps",
|
||||
"search-bar": {
|
||||
"search-placeholder": "Suche eine Map",
|
||||
"filters-btn": "Filter",
|
||||
"dropdown": {
|
||||
"export-maps": "Maps Exportieren",
|
||||
"delete-maps": "Maps Löschen"
|
||||
}
|
||||
},
|
||||
"tabs": {
|
||||
"maps": {
|
||||
"actions": {
|
||||
"add-maps": {
|
||||
"text": "Hinzufügen"
|
||||
},
|
||||
"link-maps": {
|
||||
"tooltips": {
|
||||
"link": "Maps Verknüpfen",
|
||||
"unlink": "Maps Verknüpfung aufheben"
|
||||
}
|
||||
}
|
||||
},
|
||||
"empty-maps": {
|
||||
"text": "Keine Maps",
|
||||
"button": "Maps Herunterladen"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"mods": {
|
||||
"loading-mods": "Lade Mods...",
|
||||
"no-internet": "Kein Internet",
|
||||
"mods-not-available": "Für diese Version von Beat Saber sind noch keine Mods verfügbar",
|
||||
"buttons": {
|
||||
"more-infos": "Mehr Infos",
|
||||
"install-or-update": "Installieren oder aktualisieren"
|
||||
},
|
||||
"mods-grid": {
|
||||
"header-bar": {
|
||||
"name": "Name",
|
||||
"installed": "Installiert",
|
||||
"latest": "Neueste",
|
||||
"description": "Beschreibung",
|
||||
"dropdown": {
|
||||
"uninstall-all": "Alle deinstallieren"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dropdown": {
|
||||
"open-folder": "Ordner Öffnen",
|
||||
"verify-files": "Daten Prüfen",
|
||||
"clone": "Klonen",
|
||||
"edit": "Bearbeiten",
|
||||
"uninstall": "Entfernen",
|
||||
"create-shortcut": "Verknüpfung erstellen",
|
||||
"shared-folders": "Geteilte Ordner"
|
||||
}
|
||||
},
|
||||
"available-versions": {
|
||||
"title": "Wähle eine Version",
|
||||
"steam-release": "Versions Seite",
|
||||
"dropdown": {
|
||||
"refresh": "Liste aktualisieren",
|
||||
"import-version": "Importiere eine Version"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"steam": {
|
||||
"title": "Steam",
|
||||
"description": "Wenn Du dich von Steam abmeldest, musst Du dich erneut anmelden, um eine neue Version von Beat Saber herunterzuladen.",
|
||||
"logout": "Abmelden"
|
||||
},
|
||||
"appearance": {
|
||||
"title": "Aussehen",
|
||||
"description": "Wähle Zwei von den Hauptfarben von BSManager",
|
||||
"reset": "Zurücksetzen",
|
||||
"sub-title": "Design",
|
||||
"themes": {
|
||||
"dark": "Dunkel",
|
||||
"light": "Hell",
|
||||
"os": "Mit Computer Synchronisieren"
|
||||
}
|
||||
},
|
||||
"installation-folder": {
|
||||
"title": "Installations Ordner",
|
||||
"description": "Ändern Sie den Standardordner für Beat Saber-Versionen und andere kommende Funktionen.",
|
||||
"choose-folder": "Ordner Wählen"
|
||||
},
|
||||
"additional-content": {
|
||||
"title": "Zusätzlicher Inhalt",
|
||||
"description": "Mit zusätzlichen Inhalten kannst du BeatSaber anpassen!",
|
||||
"deep-links": {
|
||||
"sub-title": "OneClick-Installationen"
|
||||
}
|
||||
},
|
||||
"language": {
|
||||
"title": "Sprache",
|
||||
"description": "Wähle eine Sprache.",
|
||||
"languages": {
|
||||
"en-EN": "English, UK",
|
||||
"en-US": "English, US",
|
||||
"fr-FR": "Français",
|
||||
"es-ES": "Español",
|
||||
"de-DE": "Deutsch",
|
||||
"translated": {
|
||||
"en-EN": "Englisch, Vereinigtes Königreich",
|
||||
"en-US": "Englisch, USA",
|
||||
"fr-FR": "Französisch",
|
||||
"es-ES": "Spanisch",
|
||||
"de-DE": "Deutsch"
|
||||
}
|
||||
}
|
||||
},
|
||||
"patreon": {
|
||||
"title": "BSManager Unterstützen 💖",
|
||||
"description": "Unterstütze das Projekt und helfe uns, BSManager kontinuierlich zu verbessern.",
|
||||
"buttons": {
|
||||
"support": "BSManager Unterstützen 🥰",
|
||||
"supporters": "Unterstützer 👀"
|
||||
},
|
||||
"view": {
|
||||
"no-supporters": "Noch keine Unterstützer",
|
||||
"sponsors": "Sponsoren",
|
||||
"supporters": "Unterstützer"
|
||||
}
|
||||
},
|
||||
"discord": {
|
||||
"description": "Trete der BSManager-Community bei, indem Du uns in unseren sozialen Medien folgst!"
|
||||
},
|
||||
"contribution": {
|
||||
"description": "Schlage neue Funktionen vor, oder melde einen Fehler und BSManager zu verbessern!",
|
||||
"buttons": {
|
||||
"request-features": "Funktion Vorschlagen",
|
||||
"report-bug": "Fehler melden",
|
||||
"open-logs": "Protokolle öffnen"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"notifications": {
|
||||
"types": {
|
||||
"error": "🚨 Fehler",
|
||||
"warning": "⚠️ Warnung",
|
||||
"success": "🎉 Erfolg"
|
||||
},
|
||||
"common": {
|
||||
"msg": {
|
||||
"error-occurred": "Ein Fehler ist aufgetreten"
|
||||
}
|
||||
},
|
||||
"shared": {
|
||||
"errors": {
|
||||
"titles": {
|
||||
"operation-running": "Vorgang läuft",
|
||||
"no-internet": "Kein Internet"
|
||||
},
|
||||
"msg": {
|
||||
"operation-running": "Warte auf das Ende des Aktuellen Vorgangs und versuche es erneut",
|
||||
"no-internet": "Überprüfe deine Verbindung und versuche es erneut."
|
||||
}
|
||||
}
|
||||
},
|
||||
"bs-download": {
|
||||
"success": {
|
||||
"titles": {
|
||||
"download-success": "Erfolgreich Heruntergeladen",
|
||||
"verification-finished": "Verifikation Erfolgreich"
|
||||
}
|
||||
},
|
||||
"warnings": {
|
||||
"msg": {
|
||||
"ManifestChecksum": "Die zuvor heruntergeladene Manifest stimmt nicht mit dem neuen überein 🤔",
|
||||
"ConnectionTimeout": "Deine Internetverbindung scheint instabil zu sein 🥶",
|
||||
"ConnectionLost": "Die Verbindung wurde unterbrochen, versuche es erneut...",
|
||||
"ConnectionError": "Kann keine Verbindung zu Steam herstellen, versuche es erneut...",
|
||||
"Unknown": "Etwas Seltsames ist passiert 🤔 Deine Verbindung ist wahrscheinlich instabil."
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"dotnet-required": ".NET 6 Benötigt"
|
||||
},
|
||||
"msg": {
|
||||
"401": "Steam scheint uns BeatSaber nicht herunterladen zu lassen 😢",
|
||||
"404": "Steam-Server können nicht kontaktiert werden.",
|
||||
"Password": "Passwort ist ungültig.",
|
||||
"InvalidCredentials": "Deine E-Mail oder Passwort ist ungültig 😴",
|
||||
"InvalidPassword": "Dein Passwort ist ungültig 😕",
|
||||
"NoManifest": "Es wurde keine Manifest gefunden",
|
||||
"DirectoryCreate": "Die erforderlichen Ordner können nicht installiert werden.",
|
||||
"NotAvailableApp": "Versuchst du, Beat Saber herunterzuladen, wenn Du es nicht hast? 🤣",
|
||||
"DepotNotFound": "BeatSaber kann nicht heruntergeladen werden 😥 versuche es später noch einmal 😕",
|
||||
"NotCompleted": "Der Download konnte nicht beendet werden ¯\\_(ツ)_/¯",
|
||||
"InvalidManifest": "BeatSaber kann nicht heruntergeladen werden 😥 versuche es später noch einmal 😕",
|
||||
"NoValidKey": "BeatSaber kann nicht heruntergeladen werden 😥 versuche es später noch einmal 😕",
|
||||
"NoManifestCode": "BeatSaber kann nicht heruntergeladen werden 😥 versuche es später noch einmal 😕",
|
||||
"Unknown": "Ein Unbekannter Fehler ist aufgetreten ¯\\_(ツ)_/¯",
|
||||
"NoServer": "Steam-Server können nicht kontaktiert werden.",
|
||||
"NotAllowed": "Anscheinend darfst Du BeatSaber nicht herunterladen 🥱",
|
||||
"ConnectionTimeout": "Kann keine Verbindung zu Steam herstellen 😕",
|
||||
"SteamLib": "Wenn dieser Fehler auftritt, melde den Fehler auf Github mit Protokollen, bitte.",
|
||||
"ConnectionError": "Kann nach 10 Versuchen keine Verbindung zu Steam herstellen 🤯",
|
||||
"LicenceError": "Die Liste der Lizenzen kann nicht abgerufen werden.",
|
||||
"verification-failed": "Verifikation fehlgeschlagen, versuche es später erneut.",
|
||||
"RateLimitExceeded": "Du hast es zu oft versucht, warte eine Weile und versuche es später erneut.",
|
||||
"AlreadyDownloading": "Ein Download ist bereits im Gange",
|
||||
"no-internet": "Keine Internet Verbindung",
|
||||
"dotnet-required": ".NET 6 Runtime muss installiert sein, um eine Version von BeatSaber herunterzuladen. Lade es herunter, indem Du auf die Schaltfläche unten klickst."
|
||||
},
|
||||
"actions": {
|
||||
"download-dotnet": ".NET 6 Herunterladen"
|
||||
}
|
||||
}
|
||||
},
|
||||
"bs-import-version": {
|
||||
"success": {
|
||||
"start-import": {
|
||||
"title": "Import im Gange 👌",
|
||||
"desc": "Der Import kann je nach Konfiguration einige Minuten dauern."
|
||||
},
|
||||
"imported": {
|
||||
"title": "Versionen Importiert 🎉"
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"import-error": {
|
||||
"desc": "Überprüfe, ob der ausgewählte Ordner eine BeatSaber-Installation ist."
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"move-folder": {
|
||||
"success": {
|
||||
"titles": {
|
||||
"transfer-started": "Übertragung läuft",
|
||||
"transfer-finished": "Transfer abgeschlossen"
|
||||
},
|
||||
"descs": {
|
||||
"transfer-started": "Die Übertragung hat begonnen und kann je nach Konfiguration mehrere Minuten dauern."
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"transfer-failed": "Transfer fehlgeschlagen 😕"
|
||||
},
|
||||
"descs": {
|
||||
"COPY_TO_SUBPATH": "Der Zielordner darf kein Unterordner des Quellordners sein.",
|
||||
"restore-linked-folders": "Beim Wiederherstellen von freigegebenen Ordnern ist ein Fehler aufgetreten. Du kannst sie dennoch manuell über das Menü 'Freigegebene Ordner' auf der Versionsseite wiederherstellen."
|
||||
}
|
||||
}
|
||||
},
|
||||
"steam": {
|
||||
"success": {
|
||||
"titles": {
|
||||
"logout": "Von Steam getrennt."
|
||||
}
|
||||
}
|
||||
},
|
||||
"additional-content": {
|
||||
"deep-link": {
|
||||
"select-all": "Alle Auswählen",
|
||||
"activation": {
|
||||
"success": {
|
||||
"title": "OneClick aktiviert!",
|
||||
"description": "OneClick-Installationen wurden aktiviert."
|
||||
},
|
||||
"error": {
|
||||
"description": "OneClick-Installationen konnten nicht aktiviert werden."
|
||||
}
|
||||
},
|
||||
"deactivation": {
|
||||
"success": {
|
||||
"title": "OneClick deaktiviert!",
|
||||
"description": "OneClick-Installationen wurden deaktiviert."
|
||||
},
|
||||
"error": {
|
||||
"description": "Ein Unbekannter Fehler ist aufgetreten."
|
||||
}
|
||||
},
|
||||
"check-all-enabled": {
|
||||
"title": "OneClick deaktiviert",
|
||||
"description": "Eine oder mehrere OneClick-Installationen sind deaktiviert. Gehe in die Einstellungen, um sie zu aktivieren.",
|
||||
"actions": {
|
||||
"settings": "Einstellungen",
|
||||
"not-remind": "Erinnere mich nicht"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"bs-launch": {
|
||||
"success": {
|
||||
"titles": {
|
||||
"BS_LAUNCHING": "Starte...🚀",
|
||||
"STEAM_LAUNCHING": "Steam startet!"
|
||||
},
|
||||
"msg": {
|
||||
"BS_LAUNCHING": "Vergiss nicht, dich aufzuwärmen 😉",
|
||||
"STEAM_LAUNCHING": "Beat Saber wird automatisch nach Steam gestartet."
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"UNKNOWN_ERROR": "Start nicht möglich",
|
||||
"STEAM_NOT_RUNNING": "Steam läuft nicht",
|
||||
"OCULUS_NOT_RUNNING": "Oculus läuft nicht",
|
||||
"BS_ALREADY_RUNNING": "BeatSaber läuft bereits",
|
||||
"EXE_NOT_FINDED": "Dateien Fehlen",
|
||||
"EXIT": "Abrupter Stop"
|
||||
},
|
||||
"msg": {
|
||||
"UNKNOWN_ERROR": "Ein unbekannter Fehler ist aufgetreten.",
|
||||
"STEAM_NOT_RUNNING": "Steam muss laufen, um BeatSaber zu starten.",
|
||||
"OCULUS_NOT_RUNNING": "Oculus muss ausgeführt werden, um BeatSaber zu starten.",
|
||||
"BS_ALREADY_RUNNING": "Schließe BeatSaber, bevor Du es erneut startest.",
|
||||
"EXE_NOT_FINDED": "Einige Dateien scheinen zu fehlen, versuche die Dateien zu überprüfen.",
|
||||
"EXIT": "BeatSaber stoppte abrupt, versuche die Dateien zu überprüfen."
|
||||
},
|
||||
"actions": {
|
||||
"STEAM_NOT_RUNNING": "Starte Steam"
|
||||
}
|
||||
}
|
||||
},
|
||||
"steam": {
|
||||
"steam-launching": {
|
||||
"title": "Steam startet!",
|
||||
"description": "Beat Saber wird automatisch nach Steam gestartet."
|
||||
}
|
||||
},
|
||||
"custom-version": {
|
||||
"errors": {
|
||||
"titles": {
|
||||
"CantEditSteam": "Kann nicht bearbeitet werden",
|
||||
"CantRename": "Umbenennen unmöglich",
|
||||
"VersionAlreadExist": "Diese Version existiert bereits",
|
||||
"CantClone": "Klonen unmöglich"
|
||||
},
|
||||
"msg": {
|
||||
"CantEditSteam": "Die Steam-Version kann nicht bearbeitet werden. Du kannst es aber klonen."
|
||||
}
|
||||
},
|
||||
"success": {
|
||||
"titles": {
|
||||
"CloningFinished": "Klonen abgeschlossen 🎉"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mods": {
|
||||
"install-mods": {
|
||||
"titles": {
|
||||
"success": "Mods Installiert 🎉",
|
||||
"warning": "Mods Installiert 🤔"
|
||||
},
|
||||
"msg": {
|
||||
"success": "Alle Mods wurden installiert.",
|
||||
"warning": "Eine oder mehr Mods konnten nicht installiert werden.",
|
||||
"errors": {
|
||||
"no-mods": "Keine Mods zum installieren.",
|
||||
"cannot-install-bsipa": "BSIPA installation fehlgeschlagen 😨"
|
||||
}
|
||||
}
|
||||
},
|
||||
"uninstall-mod": {
|
||||
"titles": {
|
||||
"success": "Mod entfernt 🎉"
|
||||
},
|
||||
"msg": {
|
||||
"errors": {
|
||||
"no-mods": "Diese Mod kann nicht installiert werden 😑"
|
||||
}
|
||||
}
|
||||
},
|
||||
"uninstall-all-mods": {
|
||||
"titles": {
|
||||
"success": "Mods entfernt 🎉"
|
||||
},
|
||||
"msg": {
|
||||
"success": "Alle Mods wurden entfernt.",
|
||||
"errors": {
|
||||
"no-mods": "Keine Mods sind in dieser Version installiert 😑"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"one-click-install": {
|
||||
"success": "Map installation abegschlossen",
|
||||
"error": "Ein Fehler ist aufgetreten während der installation der Map"
|
||||
}
|
||||
},
|
||||
"playlists": {
|
||||
"one-click-install": {
|
||||
"success": "Playlist installation abgeschlossen",
|
||||
"error": "Ein Fehler ist aufgetreten während der installation der Playlist"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
"one-click-install": {
|
||||
"success": "Modell installation abgeschlossen",
|
||||
"error": "Ein Fehler ist aufgetreten während der installation des Modells"
|
||||
}
|
||||
},
|
||||
"shared-folder": {
|
||||
"info": {
|
||||
"userdata-backup-created": {
|
||||
"title": "Sicherung erstellt",
|
||||
"msg": "Das Freigeben des Ordners „UserData“ kann zu Fehlern führen. Bei Problemen trenne den Ordner, um die Sicherung wiederherzustellen"
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
"success": {
|
||||
"title": "Verknüpfung erstellt",
|
||||
"msg": "Die Verknüpfung wurde auf dem Desktop erstellt."
|
||||
},
|
||||
"error": {
|
||||
"msg": "Beim Erstellen der Verknüpfung ist ein Fehler aufgetreten."
|
||||
}
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
"misc": {
|
||||
"remember-my-choice": "Merke meine Wahl"
|
||||
},
|
||||
"guard": {
|
||||
"title": "Steam Guard",
|
||||
"inputs": {
|
||||
"guard-code": {
|
||||
"label": "Guard-Code",
|
||||
"placeholder": "Gebe deinen Guard-Code ein"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
"submit": "Anmelden"
|
||||
}
|
||||
},
|
||||
"steam-login": {
|
||||
"title": "Steam Login",
|
||||
"inputs": {
|
||||
"username": {
|
||||
"label": "Nutzername",
|
||||
"placeholder": "Gebe deinen Nutzernamen ein"
|
||||
},
|
||||
"password": {
|
||||
"label": "Passwort",
|
||||
"placeholder": "Gebe dein Passwort ein",
|
||||
"max-length-warning": "Das Passwort überschreitet 64 Zeichen! Wenn das Passwort ungültig ist, versuchen Sie nur die ersten 64 Zeichen einzugeben."
|
||||
},
|
||||
"stay": {
|
||||
"label": "Verbunden bleiben"
|
||||
}
|
||||
},
|
||||
"why-credentials": "Warum braucht ihr meine Anmeldeinformationen?",
|
||||
"buttons": {
|
||||
"submit": "Anmelden"
|
||||
}
|
||||
},
|
||||
"steam-credentials": {
|
||||
"title": "Steam Anmeldeinformationen",
|
||||
"p-1": "Die Anmeldeinformationen werden nur zum Herunterladen des Spiels verwendet, da Steam überprüfen muss, ob Du das Spiel bezahlt hast, um es herunterladen zu dürfen. Sie werden nicht gespeichert und direkt an DepotDownloader weitergegeben. Wenn Du deine Anmeldeinformationen nicht eingeben möchtest, kannst Du diesem Tutorial folgen:",
|
||||
"p-2": "und klicke dann auf das Zahnradsymbol in der oberen rechten Ecke und wähle \"Version importieren\", wähle den Ordner aus, in den Beat Saber heruntergeladen wurde (Wenn Du dem obigen Tutorial folgst, solltest Du den richtigen Speicherort haben)"
|
||||
},
|
||||
"bs-import-version": {
|
||||
"title": "Importiere eine Version",
|
||||
"description": "Importiert eine Version von BeatSaber zur Verwendung mit BSManager. Der Import kopiert den ausgewählten BeatSaber-Installationsordner in den BSManager-Versionsordner.",
|
||||
"buttons": {
|
||||
"submit": "Importiere eine Version"
|
||||
}
|
||||
},
|
||||
"bs-uninstall": {
|
||||
"title": "Deinstallieren",
|
||||
"description": "Möchtest du BeatSaber {version} wirklich deinstallieren? Du musst es erneut herunterladen, um es zu spielen.",
|
||||
"buttons": {
|
||||
"submit": "Deinstallieren"
|
||||
}
|
||||
},
|
||||
"install-folder": {
|
||||
"title": "Installation Ordner",
|
||||
"description": "Das Ändern des Standardinstallationsordners führt dazu, dass alle installierten Daten in den neuen Ordner verschoben werden.",
|
||||
"buttons": {
|
||||
"submit": "Ordner Wählen"
|
||||
}
|
||||
},
|
||||
"edit-version": {
|
||||
"title": "Version ändern",
|
||||
"buttons": {
|
||||
"submit": "Ändern"
|
||||
}
|
||||
},
|
||||
"clone-version": {
|
||||
"title": "Version Klonen",
|
||||
"description": "Durch das Klonen der Version kannst Du zusätzlichen BeatSaber-Inhalt zwischen zwei Versionen trennen.",
|
||||
"inputs": {
|
||||
"name": {
|
||||
"label": "Name",
|
||||
"placeholder": "Versions Name"
|
||||
},
|
||||
"color": {
|
||||
"label": "Farbe"
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
"submit": "Klonen"
|
||||
}
|
||||
},
|
||||
"uninstall-mod": {
|
||||
"title": "Entfernen",
|
||||
"description": "Bist du sicher das du die Mod {mod} entfernen möchtest? Es könnte dafür sorgen, dass andere installationen nicht mehr richtig funktionieren.",
|
||||
"description-bsipa": "Bist du sicher, dass du BSIPA entfernen möchtest? Dannach werden deine Mods nicht mehr funktionieren."
|
||||
},
|
||||
"uninstall-all-mods": {
|
||||
"title": "Entferne Alle Mods",
|
||||
"description": "Bist du sicher das du alle Mods von der Version {version} entfernen möchtest? Diese Aktion kann nicht rückgängig gemacht werden."
|
||||
},
|
||||
"maps-actions": {
|
||||
"delete-maps": {
|
||||
"title": {
|
||||
"single": "Map Entfernen?",
|
||||
"multiple": "Maps Entfernen?"
|
||||
},
|
||||
"desc": {
|
||||
"single": "Bist du sicher das du die Map {name} entfernen willst?",
|
||||
"multiple": "Bist du sicher das du alle {nb} maps entfernen willst?"
|
||||
},
|
||||
"info": {
|
||||
"desc": {
|
||||
"single": "Diese Map ist teil der geteilten Maps",
|
||||
"multiple": "Diese Maps sind teil der geteilten Maps"
|
||||
},
|
||||
"title": {
|
||||
"single": "Diese Map wird auch aus Versionen entfernt, die geteilte Maps verwenden",
|
||||
"multiple": "Diese Maps werden auch aus Versionen entfernt, die geteilte Maps verwenden"
|
||||
}
|
||||
}
|
||||
},
|
||||
"link-maps": {
|
||||
"title": "Maps Verknüpfen",
|
||||
"desc": "Das Verknüpfen von Maps ermöglicht es, Maps zwischen allen Versionen zu teilen. Nach der Verknüpfung profitiert diese Version von den geteilten Maps",
|
||||
"info": "Das Hinzufügen und Löschen von Maps wird ebenfalls geteilt",
|
||||
"keep-maps": {
|
||||
"label": "Maps behalten",
|
||||
"title": "Maps behalten verschiebt die Maps der aktuellen Version in den geteilten Maps. Andernfalls gehen sie verloren."
|
||||
},
|
||||
"valid-btn": "Maps Verknüpfen"
|
||||
},
|
||||
"unlink-maps": {
|
||||
"title": "Maps Verknüpfung aufheben",
|
||||
"desc": "Bitte beachte, dass das Aufheben der Verknüpfung von Maps die Verwendung von geteilten Maps für diese Version nicht zulässt.",
|
||||
"keep-maps": {
|
||||
"label": "Maps behalten",
|
||||
"title": "Maps behalten verschiebt die Maps der aktuellen Version in den geteilten Maps. Andernfalls gehen sie verloren."
|
||||
},
|
||||
"valid-btn": "Verknüpfung aufheben"
|
||||
}
|
||||
},
|
||||
"download-maps": {
|
||||
"search-btn": "Suchen",
|
||||
"loading-maps": "Lade Maps...",
|
||||
"no-maps-found": "Keine Maps gefunden",
|
||||
"no-internet": "Kein Internet"
|
||||
},
|
||||
"mods-disclaimer": {
|
||||
"title": "Haftungsausschluss",
|
||||
"p-1": "Indem Du dich für die Verwendung von Mods entscheiden, verstehst Du Folgendes:",
|
||||
"li-1": "Möglicherweise treten Probleme auf, die im Vanilla-Spiel nicht vorhanden sind. 99.9% der Fehler, Abstürze und Verzögerungen sind auf Mods zurückzuführen.",
|
||||
"li-2": "Mods können durch Updates beschädigt werden und das ist normal - sei geduldig und respektvoll, wenn dies passiert, da Modder Freiwillige mit echtem Leben sind.",
|
||||
"li-3": "Beat Games versuchen nicht absichtlich, Mods kaputt zu machen. Sie möchten an der Codebasis arbeiten und manchmal macht dies Mods kaputt, aber sie sind nicht darauf aus, Mods zu verbieten.",
|
||||
"p-2": "Greife die Spieleentwickler nicht wegen Problemen im Zusammenhang mit Mods an und umgekehrt - Modder und Spieleentwickler sind zwei getrennte Gruppen. Sei einfach nicht gemein, okay?"
|
||||
},
|
||||
"shared-folders": {
|
||||
"title": "Geteilte Ordner",
|
||||
"description": "Verknüpfe BeatSaber-Ordner, um ihre Inhalte mit freigegebenen Ordnern in anderen Versionen zu synchronisieren. Beachte, dass auch das Löschen von Inhalten geteilt wird.",
|
||||
"buttons": {
|
||||
"add-folder": "Ordner Hinzufügen",
|
||||
"link-folder": "Ordner Verknüpfen",
|
||||
"unlink-folder": "Ordner Verknüpfung Aufheben",
|
||||
"link-all": "Alle verlinken"
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
"title": "Verknüpfung erstellen",
|
||||
"desc": "Das Erstellen einer Verknüpfung ermöglicht es Ihnen, Beat Saber mit den ausgewählten Optionen zu starten, ohne durch BSManager zu gehen.",
|
||||
"launch-options": "Startoptionen",
|
||||
"advanced-launch": "Erweiterte Start",
|
||||
"valid-btn": "Verknüpfung erstellen"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"map-filter-panel": {
|
||||
"duration": "Länge",
|
||||
"tags": "Stichworte",
|
||||
"specificities": "Allgemein",
|
||||
"requirements": "Anforderungen"
|
||||
},
|
||||
"map-types": {
|
||||
"accuracy": "Präzision",
|
||||
"balanced": "Ausgeglichen",
|
||||
"challenge": "Herausforderung",
|
||||
"dancestyle": "Tanz",
|
||||
"fitness": "Fitness",
|
||||
"speed": "Geschwindigkeit",
|
||||
"tech": "Tech"
|
||||
},
|
||||
"map-styles": {
|
||||
"dance": "Tanz",
|
||||
"swing": "Swing",
|
||||
"nightcore": "Nightcore",
|
||||
"folk": "Folk",
|
||||
"family": "Familie",
|
||||
"ambient": "umgebung",
|
||||
"funk": "Funk",
|
||||
"jazz": "Jazz",
|
||||
"soul": "Soul",
|
||||
"speedcore": "Speedcore",
|
||||
"punk": "Punk",
|
||||
"rb": "R&B",
|
||||
"holiday": "Urlaub",
|
||||
"vocaloid": "Vokaloid",
|
||||
"jrock": "J-Rock",
|
||||
"trance": "Trance",
|
||||
"drumbass": "Basstrommel",
|
||||
"comedy": "Komödie",
|
||||
"instrumental": "Instrumental",
|
||||
"hardcore": "Hardcore",
|
||||
"kpop": "K-Pop",
|
||||
"indie": "Indie",
|
||||
"techno": "Techno",
|
||||
"house": "House",
|
||||
"game": "Videospiele",
|
||||
"film": "Filme",
|
||||
"alt": "Alternativ",
|
||||
"dubstep": "Dubstep",
|
||||
"metal": "Metal",
|
||||
"anime": "Anime",
|
||||
"hiphop": "HipHop",
|
||||
"jpop": "J-Pop",
|
||||
"rock": "Rock",
|
||||
"pop": "Pop",
|
||||
"electronic": "Elektronisch",
|
||||
"classical-orchestral": "Klassisch & Orchestra"
|
||||
},
|
||||
"map-specificities": {
|
||||
"automapper": "KI",
|
||||
"ranked": "ranked",
|
||||
"curated": "curated",
|
||||
"verified": "verifiziert",
|
||||
"fullSpread": "full spread"
|
||||
},
|
||||
"difficulties": {
|
||||
"Easy": "einfach",
|
||||
"Normal": "normal",
|
||||
"Hard": "hard",
|
||||
"Expert": "expert",
|
||||
"ExpertPlus": "expert+"
|
||||
},
|
||||
"map-item": {
|
||||
"by": "Von {songAutor}",
|
||||
"mapped-by": "Gemapped von"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
"types": {
|
||||
"singular": {
|
||||
"avatar": "Avatar",
|
||||
"saber": "Säbel",
|
||||
"platform": "Plattform",
|
||||
"bloq": "Block"
|
||||
},
|
||||
"plural": {
|
||||
"avatar": "Avatare",
|
||||
"saber": "Säbel",
|
||||
"platform": "Plattformen",
|
||||
"bloq": "Blöcke"
|
||||
}
|
||||
},
|
||||
"sorts": {
|
||||
"name": "Name",
|
||||
"date": "Datum",
|
||||
"author": "Autor"
|
||||
},
|
||||
"panel": {
|
||||
"actions": {
|
||||
"search": "Ein Modell suchen",
|
||||
"drop-down": {
|
||||
"delete": "Modelle löschen",
|
||||
"export": "Modelle exportieren"
|
||||
},
|
||||
"link-models": "Modelle verlinken",
|
||||
"unlink-models": "Modelle trennen"
|
||||
},
|
||||
"grid": {
|
||||
"loading": "Modelle laden...",
|
||||
"no-models": "Keine Modelle",
|
||||
"download-models": "Modelle herunterladen"
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
"delete-model": {
|
||||
"title": "Das Modell löschen",
|
||||
"desc": "Sind Sie sicher, dass Sie das Modell {modelName} löschen möchten?",
|
||||
"linked-annotation": "Dieses Modell wird aus allen verlinkten Versionen entfernt."
|
||||
},
|
||||
"delete-models": {
|
||||
"title": "Modelle löschen",
|
||||
"desc": "Sind Sie sicher, dass Sie die {nb} Modelle löschen möchten?",
|
||||
"linked-annotation": "Diese Modelle werden aus allen verlinkten Versionen entfernt."
|
||||
},
|
||||
"download-models": {
|
||||
"search-btn": "Suche",
|
||||
"search-placeholder": "Ein Modell suchen",
|
||||
"search-tips": {
|
||||
"header": {
|
||||
"tag": "Tag",
|
||||
"desc": "Beschreibung"
|
||||
},
|
||||
"author-desc": "Nur Modelle vom angegebenen Autor anzeigen.",
|
||||
"hash-desc": "Nur Modelle mit dem angegebenen Hash anzeigen.",
|
||||
"tag-desc": "Nur Modelle mit dem angegebenen Tag anzeigen.",
|
||||
"name-desc": "Nur Modelle mit dem angegebenen Namen anzeigen.",
|
||||
"discordid-desc": "Nur Modelle vom angegebenen Discord-Benutzer anzeigen.",
|
||||
"status-desc": "Nur Modelle mit dem angegebenen Status anzeigen. (nur Profil, und nur für den Autor)"
|
||||
},
|
||||
"no-models": "Keine Modelle gefunden.",
|
||||
"no-internet": "Keine Internetverbindung.",
|
||||
"error-occured": "Ein Fehler ist aufgetreten, versuche es später erneut."
|
||||
},
|
||||
"link-models": {
|
||||
"avatar": {
|
||||
"title": "Avatare verbinden",
|
||||
"desc": "Das Verbinden von Avataren ermöglicht das Teilen von Avataren zwischen allen Versionen. Sobald verbunden, wird diese Version von den geteilten Avataren profitieren",
|
||||
"info": "Das Hinzufügen und Entfernen von Avataren wird ebenfalls geteilt",
|
||||
"keep-models": {
|
||||
"label": "Avatare behalten",
|
||||
"title": "Das Behalten der Avatare wird die Avatare der aktuellen Version in den Ordner der geteilten Avatare verschieben. Andernfalls gehen sie verloren"
|
||||
},
|
||||
"valid-btn": "Avatare verbinden"
|
||||
},
|
||||
"saber": {
|
||||
"title": "Säbel verbinden",
|
||||
"desc": "Das Verbinden von Säbeln ermöglicht das Teilen von Säbeln zwischen allen Versionen. Sobald verbunden, wird diese Version von den geteilten Säbeln profitieren",
|
||||
"info": "Das Hinzufügen und Entfernen von Säbeln wird ebenfalls geteilt",
|
||||
"keep-models": {
|
||||
"label": "Säbel behalten",
|
||||
"title": "Das Behalten der Säbel wird die Säbel der aktuellen Version in den Ordner der geteilten Säbel verschieben. Andernfalls gehen sie verloren"
|
||||
},
|
||||
"valid-btn": "Säbel verbinden"
|
||||
},
|
||||
"platform": {
|
||||
"title": "Plattformen verbinden",
|
||||
"desc": "Das Verbinden von Plattformen ermöglicht das Teilen von Plattformen zwischen allen Versionen. Sobald verbunden, wird diese Version von den geteilten Plattformen profitieren",
|
||||
"info": "Das Hinzufügen und Entfernen von Plattformen wird ebenfalls geteilt",
|
||||
"keep-models": {
|
||||
"label": "Plattformen behalten",
|
||||
"title": "Das Behalten der Plattformen wird die Plattformen der aktuellen Version in den Ordner der geteilten Plattformen verschieben. Andernfalls gehen sie verloren"
|
||||
},
|
||||
"valid-btn": "Plattformen verbinden"
|
||||
},
|
||||
"bloq": {
|
||||
"title": "Bloqs verbinden",
|
||||
"desc": "Das Verbinden von Bloqs ermöglicht das Teilen von Bloqs zwischen allen Versionen. Sobald verbunden, wird diese Version von den geteilten Bloqs profitieren",
|
||||
"info": "Das Hinzufügen und Entfernen von Bloqs wird ebenfalls geteilt",
|
||||
"keep-models": {
|
||||
"label": "Bloqs behalten",
|
||||
"title": "Das Behalten der Bloqs wird die Bloqs der aktuellen Version in den Ordner der geteilten Bloqs verschieben. Andernfalls gehen sie verloren"
|
||||
},
|
||||
"valid-btn": "Bloqs verbinden"
|
||||
}
|
||||
},
|
||||
"unlink-models": {
|
||||
"avatar": {
|
||||
"title": "Avatare trennen",
|
||||
"desc": "Achtung, das Trennen der Avatare wird die Nutzung der geteilten Avatare für diese Version nicht mehr ermöglichen.",
|
||||
"keep-models": {
|
||||
"label": "Avatare behalten",
|
||||
"title": "Das Behalten der Avatare wird eine Kopie der geteilten Avatare für die aktuelle Version erstellen. Andernfalls wird kein Avatar für diese Version aufbewahrt."
|
||||
},
|
||||
"valid-btn": "Avatare trennen"
|
||||
},
|
||||
"saber": {
|
||||
"title": "Säbel trennen",
|
||||
"desc": "Achtung, das Trennen der Säbel wird die Nutzung der geteilten Säbel für diese Version nicht mehr ermöglichen.",
|
||||
"keep-models": {
|
||||
"label": "Säbel behalten",
|
||||
"title": "Das Behalten der Säbel wird eine Kopie der geteilten Säbel für die aktuelle Version erstellen. Andernfalls wird kein Säbel für diese Version aufbewahrt."
|
||||
},
|
||||
"valid-btn": "Säbel trennen"
|
||||
},
|
||||
"platform": {
|
||||
"title": "Plattformen trennen",
|
||||
"desc": "Achtung, das Trennen der Plattformen wird die Nutzung der geteilten Plattformen für diese Version nicht mehr ermöglichen.",
|
||||
"keep-models": {
|
||||
"label": "Plattformen behalten",
|
||||
"title": "Das Behalten der Plattformen wird eine Kopie der geteilten Plattformen für die aktuelle Version erstellen. Andernfalls wird keine Plattform für diese Version aufbewahrt."
|
||||
},
|
||||
"valid-btn": "Plattformen trennen"
|
||||
},
|
||||
"bloq": {
|
||||
"title": "Bloqs trennen",
|
||||
"desc": "Achtung, das Trennen der Bloqs wird die Nutzung der geteilten Bloqs für diese Version nicht mehr ermöglichen.",
|
||||
"keep-models": {
|
||||
"label": "Bloqs behalten",
|
||||
"title": "Das Behalten der Bloqs wird eine Kopie der geteilten Bloqs für die aktuelle Version erstellen. Andernfalls wird kein Bloq für diese Version aufbewahrt."
|
||||
},
|
||||
"valid-btn": "Bloqs trennen"
|
||||
}
|
||||
}
|
||||
},
|
||||
"notifications": {
|
||||
"prevent-for-mods": {
|
||||
"title": "Erforderliche Mods",
|
||||
"desc": "Stellen Sie sicher, dass Sie die notwendigen Mods installiert haben, um Modelle in BeatSaber zu verwenden",
|
||||
"go-to-mods": "Gehe zu Mods",
|
||||
"not-remind": "Erinnere mich nicht"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "Gebrochene Modelle",
|
||||
"desc": "Seit dem Update des BeatSaber-Motors sind Modelle für diese Version nicht mehr funktional."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Export abgeschlossen 🎉"
|
||||
}
|
||||
}
|
||||
},
|
||||
"beat-saver": {
|
||||
"maps-sorts": {
|
||||
"Latest": "Neueste",
|
||||
"Relevance": "Relevanz",
|
||||
"Rating": "Bewertung",
|
||||
"Curated": "Curated"
|
||||
}
|
||||
},
|
||||
"auto-update": {
|
||||
"checking": "Prüfe auf Updates",
|
||||
"downloading": "Lade Updates Herunter"
|
||||
},
|
||||
"bs-shortcut-launch": {
|
||||
"beat-saber-launching": "Start von Beat Saber",
|
||||
"launching": "Starten",
|
||||
"open-bsmanager": "BSManager öffnen",
|
||||
"status-text": {
|
||||
"init": "Initialisierung...",
|
||||
"success": {
|
||||
"BS_LAUNCHING": "Start von Beat Saber...",
|
||||
"STEAM_LAUNCHING": "Start von Steam...",
|
||||
"STEAM_LAUNCHED": "Steam erfolgreich gestartet!",
|
||||
"UNABLE_TO_LAUNCH_STEAM": "Steam kann nicht gestartet werden, erzwungener Start von Beat Saber..."
|
||||
}
|
||||
}
|
||||
},
|
||||
"dateformat": {
|
||||
"dayNames": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa", "Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
|
||||
"monthNames": ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez", "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
|
||||
"timeNames": ["a", "p", "am", "pm", "A", "P", "AM", "PM"]
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"misc": {
|
||||
"download": "Download",
|
||||
"add": "Add",
|
||||
"verify": "Verify",
|
||||
"launch": "Launch",
|
||||
"mods": "Mods",
|
||||
@@ -11,29 +12,39 @@
|
||||
"delete": "Delete",
|
||||
"accept": "Accept",
|
||||
"refuse": "Refuse",
|
||||
"apply": "Apply"
|
||||
"apply": "Apply",
|
||||
"copy": "Copy",
|
||||
"copied": "Copied!"
|
||||
},
|
||||
"nav-bar":{
|
||||
"nav-bar": {
|
||||
"add-version": "Add a version",
|
||||
"settings": "Settings"
|
||||
"settings": "Settings",
|
||||
"shared": {
|
||||
"text": "Shared",
|
||||
"tooltip": "Shared contents"
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
"shared-maps":{
|
||||
"shared-maps": {
|
||||
"title": "Shared maps"
|
||||
},
|
||||
"version-viewer": {
|
||||
"launch-mods": {
|
||||
"oculus": "Oculus Mode",
|
||||
"oculus-description": "If you are using Beat Saber via Steam, it allows you to use Oculus's VR composer without passing by SteamVR, to gain performances This is not necessary for using Oculus headsets.",
|
||||
"desktop": "Desktop Mode",
|
||||
"desktop-description": "This allows you to use WASD and the mouse to navigate around the menu in game. This makes testing much easier, because you don't have to put on your headset!",
|
||||
"oculus-description": "If you are using Beat Saber via Steam, this allows you to use Oculus's VR composer while bypassing SteamVR, for potential performance gain. This is not required to use Oculus headsets.",
|
||||
"desktop": "FPFC Mode",
|
||||
"desktop-description": "First Person Flying Controller mode allows you to use WASD and the mouse to navigate around the menu in game. This makes testing much easier, because you don't have to put on your headset!",
|
||||
"debug": "Debug Mode",
|
||||
"debug-description": "Enables the output log window for IPA. This will show the debug console that mods use."
|
||||
"debug-description": "Enables the output log window for IPA. This will show the debug console that mods use.",
|
||||
"advanced-launch": {
|
||||
"button": "Advanced launch",
|
||||
"placeholder": "Additional arguments ex: --revert; --nowait"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"title": "Shared maps",
|
||||
"search-bar": {
|
||||
"search-placeholder": "Search a map",
|
||||
"search-placeholder": "Search installed maps",
|
||||
"filters-btn": "Filters",
|
||||
"dropdown": {
|
||||
"export-maps": "Export maps",
|
||||
@@ -53,9 +64,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"empty-maps":{
|
||||
"text":"No maps",
|
||||
"button":"Download maps"
|
||||
"empty-maps": {
|
||||
"text": "No maps",
|
||||
"button": "Download maps"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,6 +74,7 @@
|
||||
"mods": {
|
||||
"loading-mods": "Loading mods...",
|
||||
"no-internet": "No internet",
|
||||
"mods-not-available": "No mods are available yet for this version of Beat Saber",
|
||||
"buttons": {
|
||||
"more-infos": "More info",
|
||||
"install-or-update": "Install or update"
|
||||
@@ -84,7 +96,9 @@
|
||||
"verify-files": "Verify files",
|
||||
"clone": "Clone",
|
||||
"edit": "Edit",
|
||||
"uninstall": "Uninstall"
|
||||
"uninstall": "Uninstall",
|
||||
"create-shortcut": "Create a shortcut",
|
||||
"shared-folders": "Shared Folders"
|
||||
}
|
||||
},
|
||||
"available-versions": {
|
||||
@@ -92,13 +106,13 @@
|
||||
"steam-release": "Release page",
|
||||
"dropdown": {
|
||||
"refresh": "Refresh list",
|
||||
"import-version" :"Import a version"
|
||||
"import-version": "Import a version"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"steam": {
|
||||
"title": "Steam",
|
||||
"description": "If you log out of Steam, you will have to log back in to download a new version of Beat Saber.",
|
||||
"description": "If you log out of Steam, you will have to log back in to download new versions of Beat Saber.",
|
||||
"logout": "Log out"
|
||||
},
|
||||
"appearance": {
|
||||
@@ -119,7 +133,7 @@
|
||||
},
|
||||
"additional-content": {
|
||||
"title": "Additional content",
|
||||
"description": "Additional content allows you to customize BeatSaber!",
|
||||
"description": "Additional content that allows you to customize Beat Saber!",
|
||||
"deep-links": {
|
||||
"sub-title": "OneClick installations"
|
||||
}
|
||||
@@ -132,11 +146,13 @@
|
||||
"en-US": "English, US",
|
||||
"fr-FR": "Français",
|
||||
"es-ES": "Español",
|
||||
"de-DE": "Deutsch",
|
||||
"translated": {
|
||||
"en-EN": "English, United Kingdom",
|
||||
"en-US": "English, USA",
|
||||
"fr-FR": "French",
|
||||
"es-ES": "Spanish"
|
||||
"es-ES": "Spanish",
|
||||
"de-DE": "German"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -184,7 +200,7 @@
|
||||
"no-internet": "No internet"
|
||||
},
|
||||
"msg": {
|
||||
"operation-running": "Wait for the end of the current operation then start again.",
|
||||
"operation-running": "Wait for the current operation to finish, then try again.",
|
||||
"no-internet": "Check your connection and try again."
|
||||
}
|
||||
}
|
||||
@@ -201,31 +217,31 @@
|
||||
"ManifestChecksum": "The previously downloaded manifest does not match the new 🤔",
|
||||
"ConnectionTimeout": "Your internet connection seems unstable 🥶",
|
||||
"ConnectionLost": "The connection has been lost, try again...",
|
||||
"ConnectionError": "Unable to connect to Steam, retry...",
|
||||
"ConnectionError": "Unable to connect to Steam, try again...",
|
||||
"Unknown": "Something strange has happened 🤔 Your connection is probably unstable."
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"titles":{
|
||||
"titles": {
|
||||
"dotnet-required": ".NET 6 Required"
|
||||
},
|
||||
"msg": {
|
||||
"401": "Steam doesn't seem to want to let us download BeatSaber 😢",
|
||||
"401": "Steam doesn't seem to want to let us download Beat Saber 😢",
|
||||
"404": "Unable to contact Steam servers.",
|
||||
"Password": "Password is invalid.",
|
||||
"InvalidCredentials": "Your e-mail or password is invalid 😴",
|
||||
"InvalidPassword": "Your password is invalid 😕",
|
||||
"NoManifest": "No manifest was found",
|
||||
"DirectoryCreate": "Unable to install the necessary folders.",
|
||||
"NotAvailableApp": "Are you trying to download BeatSaber when you don't have it ? 🤣",
|
||||
"DepotNotFound": "Unable to download BeatSaber 😥 try again later 😕",
|
||||
"NotAvailableApp": "Are you trying to download Beat Saber when you don't have it? 🤣",
|
||||
"DepotNotFound": "Unable to download Beat Saber 😥 try again later 😕",
|
||||
"NotCompleted": "The download could not complete ¯\\_(ツ)_/¯",
|
||||
"InvalidManifest": "Unable to download BeatSaber 😥 try again later 😕",
|
||||
"NoValidKey": "Unable to download BeatSaber 😥 try again later 😕",
|
||||
"NoManifestCode": "Unable to download BeatSaber 😥 try again later 😕",
|
||||
"InvalidManifest": "Unable to download Beat Saber 😥 try again later 😕",
|
||||
"NoValidKey": "Unable to download Beat Saber 😥 try again later 😕",
|
||||
"NoManifestCode": "Unable to download Beat Saber 😥 try again later 😕",
|
||||
"Unknown": "An unknown error occurred ¯\\_(ツ)_/¯",
|
||||
"NoServer": "Unable to contact Steam servers.",
|
||||
"NotAllowed": "Apparently you are not allowed to download BeatSaber 🥱",
|
||||
"NotAllowed": "Apparently you are not allowed to download Beat Saber 🥱",
|
||||
"ConnectionTimeout": "Cannot connect to Steam 😕",
|
||||
"SteamLib": "If you have this error, report the bug on GitHub with the logs pls.",
|
||||
"ConnectionError": "Unable to connect to Steam after 10 tries 🤯",
|
||||
@@ -234,15 +250,15 @@
|
||||
"RateLimitExceeded": "You've tried too many times, wait a while and try again later.",
|
||||
"AlreadyDownloading": "A download is already in progress",
|
||||
"no-internet": "No internet connection.",
|
||||
"dotnet-required": ".NET 6 Runtime must be installed in order to download a version of BeatSaber. Download it by clicking the button below."
|
||||
"dotnet-required": ".NET 6 Runtime must be installed in order to download a version of Beat Saber. Download it by clicking the button below."
|
||||
},
|
||||
"actions":{
|
||||
"actions": {
|
||||
"download-dotnet": "Download .NET 6"
|
||||
}
|
||||
}
|
||||
},
|
||||
"bs-import-version":{
|
||||
"success":{
|
||||
"bs-import-version": {
|
||||
"success": {
|
||||
"start-import": {
|
||||
"title": "Import in progress 👌",
|
||||
"desc": "The import may take several minutes depending on your configuration."
|
||||
@@ -251,9 +267,9 @@
|
||||
"title": "Imported version 🎉"
|
||||
}
|
||||
},
|
||||
"errors":{
|
||||
"import-error":{
|
||||
"desc": "Check that the selected folder is a BeatSaber installation."
|
||||
"errors": {
|
||||
"import-error": {
|
||||
"desc": "Check that the selected folder is a Beat Saber installation."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -261,12 +277,20 @@
|
||||
"move-folder": {
|
||||
"success": {
|
||||
"titles": {
|
||||
"transfer-started": "Transfer in progress",
|
||||
"transfer-finished": "Transfer complete"
|
||||
},
|
||||
"descs": {
|
||||
"transfer-started": "The transfer has started and may take several minutes depending on your configuration."
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"transfer-failed": "Transfer failed 😕"
|
||||
},
|
||||
"descs": {
|
||||
"COPY_TO_SUBPATH": "The destination folder cannot be a subfolder of the source folder.",
|
||||
"restore-linked-folders": "An error occurred while restoring shared folders. You can still manually restore them via the 'Shared Folders' menu on the versions page."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -277,33 +301,33 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"additional-content":{
|
||||
"additional-content": {
|
||||
"deep-link": {
|
||||
"select-all": "Select all",
|
||||
"activation":{
|
||||
"success":{
|
||||
"title":"OneClick activated!",
|
||||
"description":"OneClick installations have been activated."
|
||||
"activation": {
|
||||
"success": {
|
||||
"title": "OneClick activated!",
|
||||
"description": "OneClick installations have been activated."
|
||||
},
|
||||
"error":{
|
||||
"description":"Unable to activate OneClick installations."
|
||||
"error": {
|
||||
"description": "Unable to activate OneClick installations."
|
||||
}
|
||||
},
|
||||
"deactivation":{
|
||||
"success":{
|
||||
"title":"OneClick deactivated!",
|
||||
"description":"OneClick installations have been deactivated."
|
||||
"deactivation": {
|
||||
"success": {
|
||||
"title": "OneClick deactivated!",
|
||||
"description": "OneClick installations have been deactivated."
|
||||
},
|
||||
"error":{
|
||||
"description":"An unknown error occurred."
|
||||
"error": {
|
||||
"description": "An unknown error occurred."
|
||||
}
|
||||
},
|
||||
"check-all-enabled":{
|
||||
"check-all-enabled": {
|
||||
"title": "OneClick Disabled",
|
||||
"description": "One or more OneClick installations are disabled. Go to settings to enable them.",
|
||||
"actions":{
|
||||
"actions": {
|
||||
"settings": "Settings",
|
||||
"not-remind": "Do not remind me"
|
||||
"not-remind": "Don't remind me"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -312,34 +336,40 @@
|
||||
"bs-launch": {
|
||||
"success": {
|
||||
"titles": {
|
||||
"launching": "Launching...🚀"
|
||||
"BS_LAUNCHING": "Launching...🚀",
|
||||
"STEAM_LAUNCHING": "Steam is launching!"
|
||||
},
|
||||
"msg": {
|
||||
"BS_LAUNCHING": "Don't forget to warm up 😉",
|
||||
"STEAM_LAUNCHING": "Beat Saber will automatically launch after Steam."
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"UNABLE_TO_LAUNCH": "Unable to launch",
|
||||
"UNKNOWN_ERROR": "Unable to launch",
|
||||
"STEAM_NOT_RUNNING": "Steam is not running",
|
||||
"OCULUS_NOT_RUNNING": "Oculus is not running",
|
||||
"BS_ALREADY_RUNNING": "BeatSaber already running",
|
||||
"BS_ALREADY_RUNNING": "Beat Saber already running",
|
||||
"EXE_NOT_FINDED": "Missing files",
|
||||
"EXIT": "Abrupt stop"
|
||||
},
|
||||
"msg": {
|
||||
"UNKNOWN_ERROR": "An unknown error has occurred.",
|
||||
"STEAM_NOT_RUNNING": "Steam must be running to launch BeatSaber.",
|
||||
"OCULUS_NOT_RUNNING": "Oculus must be running to launch BeatSaber.",
|
||||
"BS_ALREADY_RUNNING": "Close BeatSaber before launching it again.",
|
||||
"EXE_NOT_FINDED": "Some files seem to be missing, try to verify the files.",
|
||||
"EXIT": "BeatSaber stopped abruptly, tries to check the files."
|
||||
},
|
||||
"actions":{
|
||||
"actions": {
|
||||
"STEAM_NOT_RUNNING": "Launch Steam"
|
||||
}
|
||||
}
|
||||
},
|
||||
"steam":{
|
||||
"steam-launching":{
|
||||
"steam": {
|
||||
"steam-launching": {
|
||||
"title": "Steam is launching!",
|
||||
"description": "Steam may take some time to launch depending on your configuration."
|
||||
"description": "Beat Saber will automatically launch after Steam."
|
||||
}
|
||||
},
|
||||
"custom-version": {
|
||||
@@ -392,32 +422,49 @@
|
||||
"msg": {
|
||||
"success": "All mods have been uninstalled.",
|
||||
"errors": {
|
||||
"no-mods": "No mod is installed in this version 😑"
|
||||
"no-mods": "No mods are installed in this version 😑"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"maps":{
|
||||
"one-click-install":{
|
||||
"success":"Map installation complete",
|
||||
"error":"An error occurred while installing the map"
|
||||
"maps": {
|
||||
"one-click-install": {
|
||||
"success": "Map installation complete",
|
||||
"error": "An error occurred while installing the map"
|
||||
}
|
||||
},
|
||||
"playlists":{
|
||||
"one-click-install":{
|
||||
"success":"Playlist installation complete",
|
||||
"error":"An error occurred while installing the playlist"
|
||||
"playlists": {
|
||||
"one-click-install": {
|
||||
"success": "Playlist installation complete",
|
||||
"error": "An error occurred while installing the playlist"
|
||||
}
|
||||
},
|
||||
"models":{
|
||||
"one-click-install":{
|
||||
"success":"Model installation complete",
|
||||
"error":"An error occurred while installing the model"
|
||||
"models": {
|
||||
"one-click-install": {
|
||||
"success": "Model installation complete",
|
||||
"error": "An error occurred while installing the model"
|
||||
}
|
||||
},
|
||||
"shared-folder": {
|
||||
"info": {
|
||||
"userdata-backup-created": {
|
||||
"title": "Backup created",
|
||||
"msg": "Sharing the 'UserData' folder can generate errors, in case of problems unlink the folder to restore the backup"
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
"success": {
|
||||
"title": "Shortcut created",
|
||||
"msg": "The shortcut has been created on the desktop."
|
||||
},
|
||||
"error": {
|
||||
"msg": "An error occurred while creating the shortcut."
|
||||
}
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
"misc":{
|
||||
"misc": {
|
||||
"remember-my-choice": "Remember my choice"
|
||||
},
|
||||
"guard": {
|
||||
@@ -441,32 +488,33 @@
|
||||
},
|
||||
"password": {
|
||||
"label": "Password",
|
||||
"placeholder": "Enter your password"
|
||||
"placeholder": "Enter your password",
|
||||
"max-length-warning": "The password exceeds 64 characters! If the password is invalid, try to put its first 64 characters."
|
||||
},
|
||||
"stay": {
|
||||
"label": "Stay connected"
|
||||
}
|
||||
},
|
||||
"why-credentials": "Why do you need my credentials ?",
|
||||
"why-credentials": "Why do you need my credentials?",
|
||||
"buttons": {
|
||||
"submit": "Login"
|
||||
}
|
||||
},
|
||||
"steam-credentials":{
|
||||
"steam-credentials": {
|
||||
"title": "Steam Credentials",
|
||||
"p-1": "The credentials are only used to download the game because steam need to verify that you paid the game in order to be allowed to download it. They aren't saved and directly passed to DepotDownloader. If you don't want to enter your credentials you can follow this tutorial :",
|
||||
"p-2": "and then click on the gear icon in the top right corner and select \"Import a version\", select the folder where beat saber has been downloaded (If you follow the tutorial above you should have the correct location)"
|
||||
},
|
||||
"bs-import-version":{
|
||||
"bs-import-version": {
|
||||
"title": "Import a version",
|
||||
"description": "Imports a version of BeatSaber to use with BSManager. The import will copy the selected BeatSaber installation folder to the BSManager versions folder.",
|
||||
"buttons":{
|
||||
"description": "Imports a version of Beat Saber to use with BSManager. This will copy the selected Beat Saber installation folder to the BSManager versions folder.",
|
||||
"buttons": {
|
||||
"submit": "Import a version"
|
||||
}
|
||||
},
|
||||
"bs-uninstall": {
|
||||
"title": "Uninstall",
|
||||
"description": "Are you sure you want to uninstall BeatSaber {version} ? You will have to download it again to play it.",
|
||||
"description": "Are you sure you want to uninstall Beat Saber {version}? You will have to download it again to play it.",
|
||||
"buttons": {
|
||||
"submit": "Uninstall"
|
||||
}
|
||||
@@ -486,7 +534,7 @@
|
||||
},
|
||||
"clone-version": {
|
||||
"title": "Clone version",
|
||||
"description": "Cloning the version allows you to separate additional BeatSaber content between two versions.",
|
||||
"description": "Cloning the version allows you to separate additional Beat Saber content between two versions.",
|
||||
"inputs": {
|
||||
"name": {
|
||||
"label": "Name",
|
||||
@@ -512,8 +560,8 @@
|
||||
"maps-actions": {
|
||||
"delete-maps": {
|
||||
"title": {
|
||||
"single": "Delete the map?",
|
||||
"multiple": "Delete maps ?"
|
||||
"single": "Delete this map?",
|
||||
"multiple": "Delete maps?"
|
||||
},
|
||||
"desc": {
|
||||
"single": "Are you sure you want to delete the map {name}?",
|
||||
@@ -532,20 +580,20 @@
|
||||
},
|
||||
"link-maps": {
|
||||
"title": "Link maps",
|
||||
"desc": "Linking maps allows to share maps between all versions. Once linked, this version will benefit from the shared maps",
|
||||
"desc": "Linking maps allows sharing maps between all versions with this feature enabled. Once linked, this version will benefit from shared maps.",
|
||||
"info": "Adding and deleting maps will also be shared",
|
||||
"keep-maps": {
|
||||
"label": "Keep maps",
|
||||
"title": "Keep maps will move the maps of the current version to the shared maps folder. Otherwise they will be lost"
|
||||
"title": "Keeping maps will copy all maps from the current version to the shared maps folder. Otherwise, no maps will be kept from this version and they will be lost."
|
||||
},
|
||||
"valid-btn": "Link maps"
|
||||
},
|
||||
"unlink-maps": {
|
||||
"title": "Unlink maps",
|
||||
"desc": "Please note that unlinking maps will not allow the use of shared maps for this version.",
|
||||
"desc": "Be careful, unlinking maps will disable the use of shared maps for this version, until it is reenabled.",
|
||||
"keep-maps": {
|
||||
"label": "Keep maps",
|
||||
"title": "Keeping the maps will create a copy of the shared maps for the current version. Otherwise, no map will be kept for this version."
|
||||
"title": "Keeping maps will copy all maps from the shared folder to the current version after unlinking. Maps will not be lost if this is disabled."
|
||||
},
|
||||
"valid-btn": "Unlink maps"
|
||||
}
|
||||
@@ -556,13 +604,30 @@
|
||||
"no-maps-found": "No maps found",
|
||||
"no-internet": "No internet"
|
||||
},
|
||||
"mods-disclaimer":{
|
||||
"mods-disclaimer": {
|
||||
"title": "disclaimer",
|
||||
"p-1": "By choosing to use mods, you understand that:",
|
||||
"li-1": "You may experience problems that don't exist in the vanilla game. 99.9% of bugs, crashes, and lag are due to mods.",
|
||||
"li-2": "Mods are subject to being broken by updates and that's normal - be patient and respectful when this happens, as modders are volunteers with real lives.",
|
||||
"li-3": "Beat Games aren't purposefully trying to break mods. They wish to work on the codebase and sometimes this breaks mods, but they are not out to kill mods.",
|
||||
"p-2": "Do not attack the game developers for issues related to mods, and vice versa - modders and game developers are two separate groups. Just don't be a jerk ok."
|
||||
},
|
||||
"shared-folders": {
|
||||
"title": "Shared Folders",
|
||||
"description": "Link Beat Saber folders to synchronize their contents with shared folders in other versions. Note that deleting content will also be shared.",
|
||||
"buttons": {
|
||||
"add-folder": "Add Folder",
|
||||
"link-folder": "Link Folder",
|
||||
"unlink-folder": "Unlink Folder",
|
||||
"link-all": "Link all"
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
"title": "Create a shortcut",
|
||||
"desc": "Creating a shortcut will allow you to start Beat Saber with the chosen options without going through BSManager.",
|
||||
"launch-options": "Launch options",
|
||||
"advanced-launch": "Advanced launch",
|
||||
"valid-btn": "Create the shortcut"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
@@ -638,6 +703,169 @@
|
||||
"mapped-by": "mapped by"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
"types": {
|
||||
"singular": {
|
||||
"avatar": "avatar",
|
||||
"saber": "saber",
|
||||
"platform": "platform",
|
||||
"bloq": "block"
|
||||
},
|
||||
"plural": {
|
||||
"avatar": "avatars",
|
||||
"saber": "sabers",
|
||||
"platform": "platforms",
|
||||
"bloq": "blocks"
|
||||
}
|
||||
},
|
||||
"sorts": {
|
||||
"name": "Name",
|
||||
"date": "Date",
|
||||
"author": "Author"
|
||||
},
|
||||
"panel": {
|
||||
"actions": {
|
||||
"search": "Search installed models",
|
||||
"drop-down": {
|
||||
"delete": "Delete models",
|
||||
"export": "Export models"
|
||||
},
|
||||
"link-models": "Link models",
|
||||
"unlink-models": "Unlink models"
|
||||
},
|
||||
"grid": {
|
||||
"loading": "Loading models...",
|
||||
"no-models": "No models",
|
||||
"download-models": "Download models"
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
"delete-model": {
|
||||
"title": "Delete the model",
|
||||
"desc": "Are you sure you want to delete the model {modelName}?",
|
||||
"linked-annotation": "This model will be removed from all linked versions."
|
||||
},
|
||||
"delete-models": {
|
||||
"title": "Delete models",
|
||||
"desc": "Are you sure you want to delete the {nb} models?",
|
||||
"linked-annotation": "These models will be removed from all linked versions."
|
||||
},
|
||||
"download-models": {
|
||||
"search-btn": "Search",
|
||||
"search-placeholder": "Search a model",
|
||||
"search-tips": {
|
||||
"header": {
|
||||
"tag": "Tag",
|
||||
"desc": "Description"
|
||||
},
|
||||
"author-desc": "Show only models from the specified author.",
|
||||
"hash-desc": "Show only models with the specified hash.",
|
||||
"tag-desc": "Show only models with the specified tag.",
|
||||
"name-desc": "Show only models with the specified name.",
|
||||
"discordid-desc": "Show only models from the specified discord user.",
|
||||
"status-desc": "Show only models with the specified status. (profile only, and only for the author)"
|
||||
},
|
||||
"no-models": "No models found.",
|
||||
"no-internet": "No internet connection.",
|
||||
"error-occured": "An error occurred, try again later."
|
||||
},
|
||||
"link-models": {
|
||||
"avatar": {
|
||||
"title": "Link Avatars",
|
||||
"desc": "Linking avatars allows sharing avatars between all versions with this feature enabled. Once linked, this version will benefit from shared avatars.",
|
||||
"info": "Adding and deleting avatars will also be shared",
|
||||
"keep-models": {
|
||||
"label": "Keep Avatars",
|
||||
"title": "Keeping avatars will copy all avatars from the current version to the shared avatars folder. Otherwise, no avatars will be kept from this version and they will be lost."
|
||||
},
|
||||
"valid-btn": "Link Avatars"
|
||||
},
|
||||
"saber": {
|
||||
"title": "Link Sabers",
|
||||
"desc": "Linking sabers allows sharing sabers between all versions with this feature enabled. Once linked, this version will benefit from shared sabers.",
|
||||
"info": "Adding and deleting sabers will also be shared",
|
||||
"keep-models": {
|
||||
"label": "Keep Sabers",
|
||||
"title": "Keeping sabers will copy all sabers from the current version to the shared sabers folder. Otherwise, no sabers will be kept from this version and they will be lost."
|
||||
},
|
||||
"valid-btn": "Link Sabers"
|
||||
},
|
||||
"platform": {
|
||||
"title": "Link Platforms",
|
||||
"desc": "Linking platforms allows sharing platforms between all versions with this feature enabled. Once linked, this version will benefit from shared platforms.",
|
||||
"info": "Adding and deleting platforms will also be shared",
|
||||
"keep-models": {
|
||||
"label": "Keep Platforms",
|
||||
"title": "Keeping platforms will copy all platforms from the current version to the shared platforms folder. Otherwise, no platforms will be kept from this version and they will be lost."
|
||||
},
|
||||
"valid-btn": "Link Platforms"
|
||||
},
|
||||
"bloq": {
|
||||
"title": "Link Bloqs",
|
||||
"desc": "Linking bloqs allows sharing bloqs between all versions with this feature enabled. Once linked, this version will benefit from shared bloqs.",
|
||||
"info": "Adding and deleting bloqs will also be shared",
|
||||
"keep-models": {
|
||||
"label": "Keep Bloqs",
|
||||
"title": "Keeping bloqs will copy all bloqs from the current version to the shared bloqs folder. Otherwise, no bloqs will be kept from this version and they will be lost."
|
||||
},
|
||||
"valid-btn": "Link Bloqs"
|
||||
}
|
||||
},
|
||||
"unlink-models": {
|
||||
"avatar": {
|
||||
"title": "Unlink Avatars",
|
||||
"desc": "Be careful, unlinking avatars will disable the use of shared avatars for this version, until it is reenabled.",
|
||||
"keep-models": {
|
||||
"label": "Keep Avatars",
|
||||
"title": "Keeping avatars will copy all avatars from the shared folder to the current version after unlinking. Avatars will not be lost if this is disabled."
|
||||
},
|
||||
"valid-btn": "Unlink Avatars"
|
||||
},
|
||||
"saber": {
|
||||
"title": "Unlink Sabers",
|
||||
"desc": "Be careful, unlinking sabers will disable the use of shared sabers for this version, until it is reenabled.",
|
||||
"keep-models": {
|
||||
"label": "Keep Sabers",
|
||||
"title": "Keeping sabers will copy all sabers from the shared folder to the current version after unlinking. Sabers will not be lost if this is disabled."
|
||||
},
|
||||
"valid-btn": "Unlink Sabers"
|
||||
},
|
||||
"platform": {
|
||||
"title": "Unlink Platforms",
|
||||
"desc": "Be careful, unlinking platforms will disable the use of shared platforms for this version, until it is reenabled.",
|
||||
"keep-models": {
|
||||
"label": "Keep Platforms",
|
||||
"title": "Keeping platforms will copy all platforms from the shared folder to the current version after unlinking. Platforms will not be lost if this is disabled."
|
||||
},
|
||||
"valid-btn": "Unlink Platforms"
|
||||
},
|
||||
"bloq": {
|
||||
"title": "Unlink Bloqs",
|
||||
"desc": "Be careful, unlinking bloqs will disable the use of shared bloqs for this version, until it is reenabled.",
|
||||
"keep-models": {
|
||||
"label": "Keep Bloqs",
|
||||
"title": "Keeping bloqs will copy all bloqs from the shared folder to the current version after unlinking. Bloqs will not be lost if this is disabled."
|
||||
},
|
||||
"valid-btn": "Unlink Bloqs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"notifications": {
|
||||
"prevent-for-mods": {
|
||||
"title": "Required mods",
|
||||
"desc": "Make sure you've installed the necessary mods to use models in Beat Saber",
|
||||
"go-to-mods": "Go to mods",
|
||||
"not-remind": "Don't remind me"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "Broken models",
|
||||
"desc": "Since the Beat Saber engine update, models are no longer functional for this version."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Export completed 🎉"
|
||||
}
|
||||
}
|
||||
},
|
||||
"beat-saver": {
|
||||
"maps-sorts": {
|
||||
"Latest": "Latest",
|
||||
@@ -650,58 +878,23 @@
|
||||
"checking": "Checking for updates",
|
||||
"downloading": "Downloading updates"
|
||||
},
|
||||
"bs-shortcut-launch": {
|
||||
"beat-saber-launching": "Launching Beat Saber",
|
||||
"launching": "Launching",
|
||||
"open-bsmanager": "Open BSManager",
|
||||
"status-text": {
|
||||
"init": "Initializing...",
|
||||
"success": {
|
||||
"BS_LAUNCHING": "Launching Beat Saber...",
|
||||
"STEAM_LAUNCHING": "Launching Steam...",
|
||||
"STEAM_LAUNCHED": "Steam successfully launched!",
|
||||
"UNABLE_TO_LAUNCH_STEAM": "Unable to launch Steam, forcing Beat Saber launch..."
|
||||
}
|
||||
}
|
||||
},
|
||||
"dateformat": {
|
||||
"dayNames": [
|
||||
"Sun",
|
||||
"Mon",
|
||||
"Tue",
|
||||
"Wed",
|
||||
"Thu",
|
||||
"Fri",
|
||||
"Sat",
|
||||
"Sunday",
|
||||
"Monday",
|
||||
"Tuesday",
|
||||
"Wednesday",
|
||||
"Thursday",
|
||||
"Friday",
|
||||
"Saturday"
|
||||
],
|
||||
"monthNames": [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"May",
|
||||
"June",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sept",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dec",
|
||||
"January",
|
||||
"February",
|
||||
"March",
|
||||
"April",
|
||||
"May",
|
||||
"June",
|
||||
"July",
|
||||
"August",
|
||||
"September",
|
||||
"October",
|
||||
"November",
|
||||
"December"
|
||||
],
|
||||
"timeNames": [
|
||||
"a",
|
||||
"p",
|
||||
"am",
|
||||
"pm",
|
||||
"A",
|
||||
"P",
|
||||
"AM",
|
||||
"PM"
|
||||
]
|
||||
"dayNames": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
||||
"monthNames": ["Jan", "Feb", "Mar", "Apr", "May", "June", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
||||
"timeNames": ["a", "p", "am", "pm", "A", "P", "AM", "PM"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"misc": {
|
||||
"download": "Descargar",
|
||||
"add": "Añadir",
|
||||
"verify": "Verificar",
|
||||
"launch": "Lanzar",
|
||||
"mods": "Mods",
|
||||
@@ -11,24 +12,34 @@
|
||||
"delete": "Borrar",
|
||||
"accept": "Aceptar",
|
||||
"refuse": "Rechazar",
|
||||
"apply": "Aplicar"
|
||||
"apply": "Aplicar",
|
||||
"copy": "Copiar",
|
||||
"copied": "¡Copiado!"
|
||||
},
|
||||
"nav-bar":{
|
||||
"nav-bar": {
|
||||
"add-version": "Agregar una versión",
|
||||
"settings": "Ajustes"
|
||||
"settings": "Ajustes",
|
||||
"shared": {
|
||||
"text": "Compartidos",
|
||||
"tooltip": "Contenidos compartidos"
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
"shared-maps":{
|
||||
"shared-maps": {
|
||||
"title": "Mapas comunes"
|
||||
},
|
||||
"version-viewer": {
|
||||
"launch-mods": {
|
||||
"oculus": "Oculus Mod",
|
||||
"oculus-description": "Si estás usando Beat Saber a través de Steam, te permite usar el compositor VR de Oculus sin pasar por SteamVR, para ganar prestaciones. Esto no es necesario para usar auriculares Oculus.",
|
||||
"desktop": "Desktop Mod",
|
||||
"desktop": "FPFC Mod",
|
||||
"desktop-description": "Esto te permite usar WASD y el mouse para navegar por el menú en juego. Esto hace que las pruebas sean mucho más fáciles, ¡porque no tienes que ponerte el auricular!",
|
||||
"debug": "Debug Mod",
|
||||
"debug-description": "Habilita la ventana de registro de salida para IPA. Esto mostrará la consola de depuración que usan los mods."
|
||||
"debug-description": "Habilita la ventana de registro de salida para IPA. Esto mostrará la consola de depuración que usan los mods.",
|
||||
"advanced-launch": {
|
||||
"button": "Lanzamiento avanzado",
|
||||
"placeholder": "Argumentos adicionales ej: --revert; --no-wait"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"search-bar": {
|
||||
@@ -52,9 +63,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"empty-maps":{
|
||||
"text":"No hay mapas",
|
||||
"button":"Descargar mapas"
|
||||
"empty-maps": {
|
||||
"text": "No hay mapas",
|
||||
"button": "Descargar mapas"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,6 +73,7 @@
|
||||
"mods": {
|
||||
"loading-mods": "Cargando mods...",
|
||||
"no-internet": "Sin internet",
|
||||
"mods-not-available": "Aún no hay mods disponibles para esta versión de Beat Saber",
|
||||
"buttons": {
|
||||
"more-infos": "Más información",
|
||||
"install-or-update": "Instalar o actualizar"
|
||||
@@ -83,7 +95,9 @@
|
||||
"verify-files": "Verificar los archivos",
|
||||
"clone": "Clonar",
|
||||
"edit": "Editar",
|
||||
"uninstall": "Desinstalar"
|
||||
"uninstall": "Desinstalar",
|
||||
"create-shortcut": "Crear un atajo",
|
||||
"shared-folders": "Carpetas Compartidas"
|
||||
}
|
||||
},
|
||||
"available-versions": {
|
||||
@@ -91,7 +105,7 @@
|
||||
"steam-release": "Publicación Página",
|
||||
"dropdown": {
|
||||
"refresh": "Actualizar la lista",
|
||||
"import-version" :"Importar una versión"
|
||||
"import-version": "Importar una versión"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
@@ -131,11 +145,13 @@
|
||||
"en-US": "English, US",
|
||||
"fr-FR": "Français",
|
||||
"es-ES": "Español",
|
||||
"de-DE": "Deutsch",
|
||||
"translated": {
|
||||
"en-EN": "Inglés, Reino Unido",
|
||||
"en-US": "Inglés, Estados Unidos",
|
||||
"fr-FR": "Francés",
|
||||
"es-ES": "Español"
|
||||
"es-ES": "Español",
|
||||
"de-DE": "Alemán"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -205,7 +221,7 @@
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"titles":{
|
||||
"titles": {
|
||||
"dotnet-required": ".NET 6 Requerido"
|
||||
},
|
||||
"msg": {
|
||||
@@ -235,13 +251,13 @@
|
||||
"no-internet": "Sin conexión a Internet.",
|
||||
"dotnet-required": "Se debe instalar el tiempo de ejecución de .NET 6 para descargar una versión de BeatSaber. Descárguelo haciendo clic en el botón de abajo."
|
||||
},
|
||||
"actions":{
|
||||
"actions": {
|
||||
"download-dotnet": "Descargar .NET 6"
|
||||
}
|
||||
}
|
||||
},
|
||||
"bs-import-version":{
|
||||
"success":{
|
||||
"bs-import-version": {
|
||||
"success": {
|
||||
"start-import": {
|
||||
"title": "Importación en curso 👌",
|
||||
"desc": "La importación puede tardar varios minutos dependiendo de su configuración."
|
||||
@@ -250,8 +266,8 @@
|
||||
"title": "Versión importada 🎉"
|
||||
}
|
||||
},
|
||||
"errors":{
|
||||
"import-error":{
|
||||
"errors": {
|
||||
"import-error": {
|
||||
"desc": "Compruebe que la carpeta seleccionada es una instalación de BeatSaber."
|
||||
}
|
||||
}
|
||||
@@ -260,12 +276,20 @@
|
||||
"move-folder": {
|
||||
"success": {
|
||||
"titles": {
|
||||
"transfer-started": "Transferencia en curso",
|
||||
"transfer-finished": "Transferencia completa"
|
||||
},
|
||||
"descs": {
|
||||
"transfer-started": "La transferencia ha comenzado y puede tomar varios minutos dependiendo de su configuración."
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"transfer-failed": "Transferencia fallida 😕"
|
||||
},
|
||||
"descs": {
|
||||
"COPY_TO_SUBPATH": "La carpeta de destino no puede ser una subcarpeta de la carpeta de origen.",
|
||||
"restore-linked-folders": "Se produjo un error al restaurar las carpetas compartidas. Aún puede restaurarlas manualmente a través del menú 'Carpetas compartidas' en la página de versiones."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -276,31 +300,31 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"additional-content":{
|
||||
"additional-content": {
|
||||
"deep-link": {
|
||||
"select-all": "Seleccionar todo",
|
||||
"activation":{
|
||||
"success":{
|
||||
"title":"¡OneClick activado!",
|
||||
"description":"Las instalaciones OneClick han sido activadas."
|
||||
"activation": {
|
||||
"success": {
|
||||
"title": "¡OneClick activado!",
|
||||
"description": "Las instalaciones OneClick han sido activadas."
|
||||
},
|
||||
"error":{
|
||||
"description":"No se pueden activar las instalaciones OneClick."
|
||||
"error": {
|
||||
"description": "No se pueden activar las instalaciones OneClick."
|
||||
}
|
||||
},
|
||||
"deactivation":{
|
||||
"success":{
|
||||
"title":"¡OneClick desactivado!",
|
||||
"description":"Las instalaciones OneClick han sido desactivadas."
|
||||
"deactivation": {
|
||||
"success": {
|
||||
"title": "¡OneClick desactivado!",
|
||||
"description": "Las instalaciones OneClick han sido desactivadas."
|
||||
},
|
||||
"error":{
|
||||
"description":"Ocurrió un error desconocido."
|
||||
"error": {
|
||||
"description": "Ocurrió un error desconocido."
|
||||
}
|
||||
},
|
||||
"check-all-enabled":{
|
||||
"check-all-enabled": {
|
||||
"title": "OneClick deshabilitado",
|
||||
"description": "Una o más instalaciones de OneClick están deshabilitadas. Vaya a la configuración para habilitarlas.",
|
||||
"actions":{
|
||||
"actions": {
|
||||
"settings": "Ajustes",
|
||||
"not-remind": "No volver a recordarme"
|
||||
}
|
||||
@@ -311,12 +335,17 @@
|
||||
"bs-launch": {
|
||||
"success": {
|
||||
"titles": {
|
||||
"launching": "Lanzamiento...🚀"
|
||||
"BS_LAUNCHING": "Lanzamiento...🚀",
|
||||
"STEAM_LAUNCHING": "¡Steam se está iniciando!"
|
||||
},
|
||||
"msg": {
|
||||
"BS_LAUNCHING": "No olvides calentarte 😉",
|
||||
"STEAM_LAUNCHING": "Beat Saber se lanzará automáticamente después de Steam."
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"UNABLE_TO_LAUNCH": "No se puede lanzar",
|
||||
"UNKNOWN_ERROR": "No se puede lanzar",
|
||||
"STEAM_NOT_RUNNING": "Steam no funciona",
|
||||
"OCULUS_NOT_RUNNING": "Oculus no funciona",
|
||||
"BS_ALREADY_RUNNING": "BeatSaber ya está en marcha",
|
||||
@@ -324,21 +353,22 @@
|
||||
"EXIT": "Parada abrupta"
|
||||
},
|
||||
"msg": {
|
||||
"UNKNOWN_ERROR": "Se ha producido un error desconocido.",
|
||||
"STEAM_NOT_RUNNING": "Para iniciar BeatSaber es necesario que Steam esté en funcionamiento.",
|
||||
"OCULUS_NOT_RUNNING": "Oculus debe estar funcionando para lanzar BeatSaber.",
|
||||
"BS_ALREADY_RUNNING": "Cierra BeatSaber antes de volver a lanzarlo.",
|
||||
"EXE_NOT_FINDED": "Parece que faltan algunos archivos, intente verificar los archivos.",
|
||||
"EXIT": "BeatSaber se detuvo abruptamente, trata de revisar los archivos."
|
||||
},
|
||||
"actions":{
|
||||
"actions": {
|
||||
"STEAM_NOT_RUNNING": "Iniciar Steam"
|
||||
}
|
||||
}
|
||||
},
|
||||
"steam":{
|
||||
"steam-launching":{
|
||||
"steam": {
|
||||
"steam-launching": {
|
||||
"title": "¡Steam se está iniciando!",
|
||||
"description": "Steam puede tardar un poco en iniciarse dependiendo de tu configuración."
|
||||
"description": "Beat Saber se lanzará automáticamente después de Steam."
|
||||
}
|
||||
},
|
||||
"custom-version": {
|
||||
@@ -396,27 +426,44 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"maps":{
|
||||
"one-click-install":{
|
||||
"success":"Instalación del mapa completada",
|
||||
"error":"Se produjo un error durante la instalación del mapa"
|
||||
"maps": {
|
||||
"one-click-install": {
|
||||
"success": "Instalación del mapa completada",
|
||||
"error": "Se produjo un error durante la instalación del mapa"
|
||||
}
|
||||
},
|
||||
"playlists":{
|
||||
"one-click-install":{
|
||||
"success":"Instalación de la lista de reproducción completada",
|
||||
"error":"Se produjo un error durante la instalación de la lista de reproducción"
|
||||
"playlists": {
|
||||
"one-click-install": {
|
||||
"success": "Instalación de la lista de reproducción completada",
|
||||
"error": "Se produjo un error durante la instalación de la lista de reproducción"
|
||||
}
|
||||
},
|
||||
"models":{
|
||||
"one-click-install":{
|
||||
"success":"Instalación del modelo completada",
|
||||
"error":"Se produjo un error durante la instalación del modelo"
|
||||
"models": {
|
||||
"one-click-install": {
|
||||
"success": "Instalación del modelo completada",
|
||||
"error": "Se produjo un error durante la instalación del modelo"
|
||||
}
|
||||
},
|
||||
"shared-folder": {
|
||||
"info": {
|
||||
"userdata-backup-created": {
|
||||
"title": "Backup creado",
|
||||
"msg": "Compartir la carpeta 'UserData' puede generar errores, en caso de problemas desvincular la carpeta para restaurar la copia de seguridad"
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
"success": {
|
||||
"title": "Acceso directo creado",
|
||||
"msg": "El acceso directo se ha creado en el escritorio."
|
||||
},
|
||||
"error": {
|
||||
"msg": "Se produjo un error al crear el acceso directo."
|
||||
}
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
"misc":{
|
||||
"misc": {
|
||||
"remember-my-choice": "Recordar mi elección"
|
||||
},
|
||||
"guard": {
|
||||
@@ -440,7 +487,8 @@
|
||||
},
|
||||
"password": {
|
||||
"label": "Contraseña",
|
||||
"placeholder": "Introduzca su contraseña"
|
||||
"placeholder": "Introduzca su contraseña",
|
||||
"max-length-warning": "¡La contraseña supera los 64 caracteres! Si la contraseña es inválida, intenta ingresar solo sus primeros 64 caracteres."
|
||||
},
|
||||
"stay": {
|
||||
"label": "Manténgase conectado"
|
||||
@@ -451,15 +499,15 @@
|
||||
"submit": "Inicio de sesión"
|
||||
}
|
||||
},
|
||||
"steam-credentials":{
|
||||
"steam-credentials": {
|
||||
"title": "Steam Credentials",
|
||||
"p-1": "Las credenciales sólo se utilizan para descargar el juego porque steam necesita verificar que has pagado el juego para que se te permita descargarlo. No se guardan y se pasan directamente a DepotDownloader. Si no quieres introducir tus credenciales puedes seguir este tutorial :",
|
||||
"p-2": "y, a continuación, haga clic en el icono de engranaje en la esquina superior derecha y seleccione \"Importar una versión\", seleccione la carpeta donde se ha descargado beat saber (Si usted sigue el tutorial anterior debe tener la ubicación correcta)"
|
||||
},
|
||||
"bs-import-version":{
|
||||
"bs-import-version": {
|
||||
"title": "Importar una versión",
|
||||
"description": "Importa una versión de BeatSaber para usar con BSManager. La importación copiará la carpeta de instalación seleccionada de BeatSaber en la carpeta de versiones de BSManager.",
|
||||
"buttons":{
|
||||
"buttons": {
|
||||
"submit": "Importar una versión"
|
||||
}
|
||||
},
|
||||
@@ -555,13 +603,30 @@
|
||||
"no-maps-found": "No se encontraron mapas",
|
||||
"no-internet": "Sin internet"
|
||||
},
|
||||
"mods-disclaimer":{
|
||||
"mods-disclaimer": {
|
||||
"title": "descargo de responsabilidad",
|
||||
"p-1": "Al elegir usar mods, entiendes y aceptas que:",
|
||||
"li-1": "Es posible que encuentres problemas que no existen en el juego base. El 99,9% de los errores, bloqueos y ralentizaciones son debidos a los mods.",
|
||||
"li-2": "Es probable que los mods dejen de funcionar debido a las actualizaciones y eso es normal. Sé paciente y respetuoso cuando suceda esto, ya que los modders son voluntarios y tienen una vida.",
|
||||
"li-3": "Beat Games no está intencionalmente tratando de romper los mods. Quieren mejorar el juego base y a veces esto rompe los mods, pero no es su objetivo matar a los mods.",
|
||||
"p-2": "No ataques a los desarrolladores por problemas relacionados con los mods y viceversa. Los modders y los desarrolladores son dos grupos distintos. No seas tonto, ¿de acuerdo?"
|
||||
},
|
||||
"shared-folders": {
|
||||
"title": "Carpetas Compartidas",
|
||||
"description": "Enlace las carpetas de BeatSaber para sincronizar su contenido con las carpetas compartidas en otras versiones. Tenga en cuenta que la eliminación de contenido también se compartirá.",
|
||||
"buttons": {
|
||||
"add-folder": "Añadir Carpeta",
|
||||
"link-folder": "Enlazar Carpeta",
|
||||
"unlink-folder": "Desenlazar Carpeta",
|
||||
"link-all": "Enlazar todo"
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
"title": "Crear un atajo",
|
||||
"desc": "Crear un atajo te permitirá iniciar Beat Saber con las opciones seleccionadas sin pasar por BSManager.",
|
||||
"launch-options": "Opciones de lanzamiento",
|
||||
"advanced-launch": "Lanzamiento avanzado",
|
||||
"valid-btn": "Crear el atajo"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
@@ -637,6 +702,169 @@
|
||||
"mapped-by": "mapeado por"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
"types": {
|
||||
"singular": {
|
||||
"avatar": "avatar",
|
||||
"saber": "sable",
|
||||
"platform": "plataforma",
|
||||
"bloq": "bloque"
|
||||
},
|
||||
"plural": {
|
||||
"avatar": "avatares",
|
||||
"saber": "sables",
|
||||
"platform": "plataformas",
|
||||
"bloq": "bloques"
|
||||
}
|
||||
},
|
||||
"sorts": {
|
||||
"name": "Nombre",
|
||||
"date": "Fecha",
|
||||
"author": "Autor"
|
||||
},
|
||||
"panel": {
|
||||
"actions": {
|
||||
"search": "Buscar un modelo",
|
||||
"drop-down": {
|
||||
"delete": "Eliminar modelos",
|
||||
"export": "Exportar modelos"
|
||||
},
|
||||
"link-models": "Vincular modelos",
|
||||
"unlink-models": "Desvincular los modelos"
|
||||
},
|
||||
"grid": {
|
||||
"loading": "Cargando modelos...",
|
||||
"no-models": "No hay modelos",
|
||||
"download-models": "Descargar modelos"
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
"delete-model": {
|
||||
"title": "Eliminar el modelo",
|
||||
"desc": "¿Estás seguro de que quieres eliminar el modelo {modelName}?",
|
||||
"linked-annotation": "Este modelo será eliminado de todas las versiones vinculadas."
|
||||
},
|
||||
"delete-models": {
|
||||
"title": "Eliminar modelos",
|
||||
"desc": "¿Estás seguro de que quieres eliminar los {nb} modelos?",
|
||||
"linked-annotation": "Estos modelos serán eliminados de todas las versiones vinculadas."
|
||||
},
|
||||
"download-models": {
|
||||
"search-btn": "Buscar",
|
||||
"search-placeholder": "Buscar un modelo",
|
||||
"search-tips": {
|
||||
"header": {
|
||||
"tag": "Etiqueta",
|
||||
"desc": "Descripción"
|
||||
},
|
||||
"author-desc": "Mostrar solo modelos del autor especificado.",
|
||||
"hash-desc": "Mostrar solo modelos con el hash especificado.",
|
||||
"tag-desc": "Mostrar solo modelos con la etiqueta especificada.",
|
||||
"name-desc": "Mostrar solo modelos con el nombre especificado.",
|
||||
"discordid-desc": "Mostrar solo modelos del usuario de discord especificado.",
|
||||
"status-desc": "Mostrar solo modelos con el estado especificado. (solo perfil, y solo para el autor)"
|
||||
},
|
||||
"no-models": "No se encontraron modelos.",
|
||||
"no-internet": "Sin conexión a Internet.",
|
||||
"error-occured": "Ocurrió un error, inténtalo de nuevo más tarde."
|
||||
},
|
||||
"link-models": {
|
||||
"avatar": {
|
||||
"title": "Vincular avatares",
|
||||
"desc": "La vinculación de avatares permite compartir avatares entre todas las versiones. Una vez vinculada, esta versión se beneficiará de los avatares compartidos",
|
||||
"info": "La adición y eliminación de avatares también se compartirá",
|
||||
"keep-models": {
|
||||
"label": "Conservar los avatares",
|
||||
"title": "Conservar los avatares moverá los avatares de la versión actual a la carpeta de avatares compartidos. De lo contrario, se perderán"
|
||||
},
|
||||
"valid-btn": "Vincular avatares"
|
||||
},
|
||||
"saber": {
|
||||
"title": "Vincular sables",
|
||||
"desc": "La vinculación de sables permite compartir sables entre todas las versiones. Una vez vinculada, esta versión se beneficiará de los sables compartidos",
|
||||
"info": "La adición y eliminación de sables también se compartirá",
|
||||
"keep-models": {
|
||||
"label": "Conservar los sables",
|
||||
"title": "Conservar los sables moverá los sables de la versión actual a la carpeta de sables compartidos. De lo contrario, se perderán"
|
||||
},
|
||||
"valid-btn": "Vincular sables"
|
||||
},
|
||||
"platform": {
|
||||
"title": "Vincular plataformas",
|
||||
"desc": "La vinculación de plataformas permite compartir plataformas entre todas las versiones. Una vez vinculada, esta versión se beneficiará de las plataformas compartidas",
|
||||
"info": "La adición y eliminación de plataformas también se compartirá",
|
||||
"keep-models": {
|
||||
"label": "Conservar las plataformas",
|
||||
"title": "Conservar las plataformas moverá las plataformas de la versión actual a la carpeta de plataformas compartidas. De lo contrario, se perderán"
|
||||
},
|
||||
"valid-btn": "Vincular plataformas"
|
||||
},
|
||||
"bloq": {
|
||||
"title": "Vincular bloqs",
|
||||
"desc": "La vinculación de bloqs permite compartir bloqs entre todas las versiones. Una vez vinculada, esta versión se beneficiará de los bloqs compartidos",
|
||||
"info": "La adición y eliminación de bloqs también se compartirá",
|
||||
"keep-models": {
|
||||
"label": "Conservar los bloqs",
|
||||
"title": "Conservar los bloqs moverá los bloqs de la versión actual a la carpeta de bloqs compartidos. De lo contrario, se perderán"
|
||||
},
|
||||
"valid-btn": "Vincular bloqs"
|
||||
}
|
||||
},
|
||||
"unlink-models": {
|
||||
"avatar": {
|
||||
"title": "Desvincular avatares",
|
||||
"desc": "Atención, desvincular los avatares ya no permitirá el uso de avatares compartidos para esta versión.",
|
||||
"keep-models": {
|
||||
"label": "Conservar los avatares",
|
||||
"title": "Conservar los avatares creará una copia de los avatares compartidos para la versión actual. En caso contrario, ningún avatar se conservará para esta versión."
|
||||
},
|
||||
"valid-btn": "Desvincular avatares"
|
||||
},
|
||||
"saber": {
|
||||
"title": "Desvincular sables",
|
||||
"desc": "Atención, desvincular los sables ya no permitirá el uso de sables compartidos para esta versión.",
|
||||
"keep-models": {
|
||||
"label": "Conservar los sables",
|
||||
"title": "Conservar los sables creará una copia de los sables compartidos para la versión actual. En caso contrario, ningún sable se conservará para esta versión."
|
||||
},
|
||||
"valid-btn": "Desvincular sables"
|
||||
},
|
||||
"platform": {
|
||||
"title": "Desvincular plataformas",
|
||||
"desc": "Atención, desvincular las plataformas ya no permitirá el uso de plataformas compartidas para esta versión.",
|
||||
"keep-models": {
|
||||
"label": "Conservar las plataformas",
|
||||
"title": "Conservar las plataformas creará una copia de las plataformas compartidas para la versión actual. En caso contrario, ninguna plataforma se conservará para esta versión."
|
||||
},
|
||||
"valid-btn": "Desvincular plataformas"
|
||||
},
|
||||
"bloq": {
|
||||
"title": "Desvincular bloqs",
|
||||
"desc": "Atención, desvincular los bloqs ya no permitirá el uso de bloqs compartidos para esta versión.",
|
||||
"keep-models": {
|
||||
"label": "Conservar los bloqs",
|
||||
"title": "Conservar los bloqs creará una copia de los bloqs compartidos para la versión actual. En caso contrario, ningún bloq se conservará para esta versión."
|
||||
},
|
||||
"valid-btn": "Desvincular bloqs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"notifications": {
|
||||
"prevent-for-mods": {
|
||||
"title": "Mods necesarios",
|
||||
"desc": "Asegúrate de haber instalado los mods necesarios para usar modelos en BeatSaber",
|
||||
"go-to-mods": "Ir a mods",
|
||||
"not-remind": "No volver a recordarme"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "Modelos rotos",
|
||||
"desc": "Desde la actualización del motor de BeatSaber, los modelos ya no son funcionales para esta versión."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Exportación completada 🎉"
|
||||
}
|
||||
}
|
||||
},
|
||||
"beat-saver": {
|
||||
"maps-sorts": {
|
||||
"Latest": "Última",
|
||||
@@ -649,58 +877,23 @@
|
||||
"checking": "Comprobar las actualizaciones",
|
||||
"downloading": "Descargar actualizaciones"
|
||||
},
|
||||
"bs-shortcut-launch": {
|
||||
"beat-saber-launching": "Iniciando Beat Saber",
|
||||
"launching": "Iniciando",
|
||||
"open-bsmanager": "Abrir BSManager",
|
||||
"status-text": {
|
||||
"init": "Inicializando...",
|
||||
"success": {
|
||||
"BS_LAUNCHING": "Iniciando Beat Saber...",
|
||||
"STEAM_LAUNCHING": "Iniciando Steam...",
|
||||
"STEAM_LAUNCHED": "¡Steam iniciado exitosamente!",
|
||||
"UNABLE_TO_LAUNCH_STEAM": "Incapaz de iniciar Steam, forzando el inicio de Beat Saber..."
|
||||
}
|
||||
}
|
||||
},
|
||||
"dateformat": {
|
||||
"dayNames": [
|
||||
"Dom",
|
||||
"Lun",
|
||||
"Mar",
|
||||
"Mié",
|
||||
"Jue",
|
||||
"Vie",
|
||||
"Sáb",
|
||||
"Domingo",
|
||||
"Lunes",
|
||||
"Martes",
|
||||
"Miércoles",
|
||||
"Jueves",
|
||||
"Viernes",
|
||||
"Sábado"
|
||||
],
|
||||
"monthNames": [
|
||||
"Ene",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Abr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Ago",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dic",
|
||||
"Enero",
|
||||
"Febrero",
|
||||
"Marzo",
|
||||
"Abril",
|
||||
"Mayo",
|
||||
"Junio",
|
||||
"Julio",
|
||||
"Agosto",
|
||||
"Septiembre",
|
||||
"Octubre",
|
||||
"Noviembre",
|
||||
"Diciembre"
|
||||
],
|
||||
"timeNames": [
|
||||
"a",
|
||||
"p",
|
||||
"am",
|
||||
"pm",
|
||||
"A",
|
||||
"P",
|
||||
"AM",
|
||||
"PM"
|
||||
]
|
||||
"dayNames": ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb", "Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
|
||||
"monthNames": ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic", "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
|
||||
"timeNames": ["a", "p", "am", "pm", "A", "P", "AM", "PM"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"misc": {
|
||||
"download": "Télécharger",
|
||||
"add": "Ajouter",
|
||||
"verify": "Vérifier",
|
||||
"launch": "Lancer",
|
||||
"mods": "Mods",
|
||||
@@ -11,24 +12,34 @@
|
||||
"delete": "Supprimer",
|
||||
"accept": "Accepter",
|
||||
"refuse": "Refuser",
|
||||
"apply": "Appliquer"
|
||||
"apply": "Appliquer",
|
||||
"copy": "Copier",
|
||||
"copied": "Copié !"
|
||||
},
|
||||
"nav-bar":{
|
||||
"nav-bar": {
|
||||
"add-version": "Ajouter une version",
|
||||
"settings": "Paramètres"
|
||||
"settings": "Paramètres",
|
||||
"shared": {
|
||||
"text": "Partagés",
|
||||
"tooltip": "Contenus partagés"
|
||||
}
|
||||
},
|
||||
"pages": {
|
||||
"shared-maps":{
|
||||
"shared-maps": {
|
||||
"title": "Maps partagées"
|
||||
},
|
||||
"version-viewer": {
|
||||
"launch-mods": {
|
||||
"oculus": "Mode Oculus",
|
||||
"oculus-description": "Si vous utilisez Beat Saber via Steam, cela vous permet d'utiliser le compositeur VR d'Oculus sans passer par SteamVR, pour gagner en performances. Ceci n'est pas nécessaire pour utiliser les casques Oculus.",
|
||||
"desktop": "Mode Bureau",
|
||||
"desktop": "Mode FPFC",
|
||||
"desktop-description": "Cela vous permet d'utiliser WASD et la souris pour naviguer dans le menu en jeu. Cela rend les tests beaucoup plus faciles, car vous n'avez pas à mettre votre casque!",
|
||||
"debug": "Mode Debug",
|
||||
"debug-description": "Active la fenêtre de log pour IPA. Cela affichera la console de débogage utilisée par les mods."
|
||||
"debug-description": "Active la fenêtre de log pour IPA. Cela affichera la console de débogage utilisée par les mods.",
|
||||
"advanced-launch": {
|
||||
"button": "Lancement avancé",
|
||||
"placeholder": "Arguments supplémentaires ex: --revert; --nowait"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
"search-bar": {
|
||||
@@ -52,9 +63,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"empty-maps":{
|
||||
"text":"Aucune map",
|
||||
"button":"Télécharger des maps"
|
||||
"empty-maps": {
|
||||
"text": "Aucune map",
|
||||
"button": "Télécharger des maps"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,6 +73,7 @@
|
||||
"mods": {
|
||||
"loading-mods": "Chargement des mods...",
|
||||
"no-internet": "Pas d'internet",
|
||||
"mods-not-available": "Aucun mod n'est encore disponible pour cette version de Beat Saber",
|
||||
"buttons": {
|
||||
"more-infos": "Plus d'infos",
|
||||
"install-or-update": "Installer ou mettre à jour"
|
||||
@@ -83,7 +95,9 @@
|
||||
"verify-files": "Vérifier les fichiers",
|
||||
"clone": "Cloner",
|
||||
"edit": "Editer",
|
||||
"uninstall": "Désinstaller"
|
||||
"uninstall": "Désinstaller",
|
||||
"create-shortcut": "Créer un raccourci",
|
||||
"shared-folders": "Dossiers Partagés"
|
||||
}
|
||||
},
|
||||
"available-versions": {
|
||||
@@ -91,7 +105,7 @@
|
||||
"steam-release": "Notes de version",
|
||||
"dropdown": {
|
||||
"refresh": "Rafraichir la liste",
|
||||
"import-version" :"Importer une version"
|
||||
"import-version": "Importer une version"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
@@ -131,11 +145,13 @@
|
||||
"en-US": "English, US",
|
||||
"fr-FR": "Français",
|
||||
"es-ES": "Español",
|
||||
"de-DE": "Deutsch",
|
||||
"translated": {
|
||||
"en-EN": "Anglais, Royaume-Uni",
|
||||
"en-US": "Anglais, États-Unis",
|
||||
"fr-FR": "Français",
|
||||
"es-ES": "Espagnol"
|
||||
"es-ES": "Espagnol",
|
||||
"de-DE": "Allemand"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -152,7 +168,7 @@
|
||||
"supporters": "Supporteurs"
|
||||
}
|
||||
},
|
||||
"discord":{
|
||||
"discord": {
|
||||
"description": "Prends part à la communauté de BSManager en nous suivant sur nos réseaux sociaux !"
|
||||
},
|
||||
"contribution": {
|
||||
@@ -205,7 +221,7 @@
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"titles":{
|
||||
"titles": {
|
||||
"dotnet-required": ".NET 6 Requis"
|
||||
},
|
||||
"msg": {
|
||||
@@ -235,13 +251,13 @@
|
||||
"no-internet": "Pas de connexion internet.",
|
||||
"dotnet-required": ".NET 6 Runtime doit être installé pour pouvoir télécharger une version de Beat Saber. Télécharge-le en cliquant sur le bouton ci-dessous."
|
||||
},
|
||||
"actions":{
|
||||
"actions": {
|
||||
"download-dotnet": "Télécharger .NET 6"
|
||||
}
|
||||
}
|
||||
},
|
||||
"bs-import-version":{
|
||||
"success":{
|
||||
"bs-import-version": {
|
||||
"success": {
|
||||
"start-import": {
|
||||
"title": "Importation en cours 👌",
|
||||
"desc": "L'importation peut durer plusieurs minutes selon votre configuration."
|
||||
@@ -250,8 +266,8 @@
|
||||
"title": "Version importée 🎉"
|
||||
}
|
||||
},
|
||||
"errors":{
|
||||
"import-error":{
|
||||
"errors": {
|
||||
"import-error": {
|
||||
"desc": "Vérifier que le dossier sélectionné est une installation de Beat Saber."
|
||||
}
|
||||
}
|
||||
@@ -260,12 +276,20 @@
|
||||
"move-folder": {
|
||||
"success": {
|
||||
"titles": {
|
||||
"transfer-started": "Transfert en cours",
|
||||
"transfer-finished": "Transfert terminé 👌"
|
||||
},
|
||||
"descs": {
|
||||
"transfer-started": "Le transfert a commencé, il peut durer plusieurs minutes selon votre configuration."
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"transfer-failed": "Le transfert a échoué 😕"
|
||||
},
|
||||
"descs": {
|
||||
"COPY_TO_SUBPATH": "Le dossier de destination ne peut pas être un sous-dossier du dossier source.",
|
||||
"restore-linked-folders": "Une erreur s'est produite lors de la restauration des dossiers partagés. Vous pouvez toujours les restaurer manuellement via le menu 'Dossiers partagés' sur la page des versions."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -276,31 +300,31 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"additional-content":{
|
||||
"additional-content": {
|
||||
"deep-link": {
|
||||
"select-all": "Tout sélectionner",
|
||||
"activation":{
|
||||
"success":{
|
||||
"title":"OneClick activé !",
|
||||
"description":"Les installations OneClick ont été activées."
|
||||
"activation": {
|
||||
"success": {
|
||||
"title": "OneClick activé !",
|
||||
"description": "Les installations OneClick ont été activées."
|
||||
},
|
||||
"error":{
|
||||
"description":"Impossible d'activer les installations OneClick."
|
||||
"error": {
|
||||
"description": "Impossible d'activer les installations OneClick."
|
||||
}
|
||||
},
|
||||
"deactivation":{
|
||||
"success":{
|
||||
"title":"OneClick désactivé !",
|
||||
"description":"Les installations OneClick ont été désactivées."
|
||||
"deactivation": {
|
||||
"success": {
|
||||
"title": "OneClick désactivé !",
|
||||
"description": "Les installations OneClick ont été désactivées."
|
||||
},
|
||||
"error":{
|
||||
"description":"Une erreur inconnue s'est produite."
|
||||
"error": {
|
||||
"description": "Une erreur inconnue s'est produite."
|
||||
}
|
||||
},
|
||||
"check-all-enabled":{
|
||||
"check-all-enabled": {
|
||||
"title": "OneClick désactivée(s)",
|
||||
"description": "Une ou plusieurs installations OneClick sont désactivées. Rendez-vous dans les paramètres pour les activer.",
|
||||
"actions":{
|
||||
"actions": {
|
||||
"settings": "Paramètres",
|
||||
"not-remind": "Ne plus me rappeler"
|
||||
}
|
||||
@@ -311,12 +335,17 @@
|
||||
"bs-launch": {
|
||||
"success": {
|
||||
"titles": {
|
||||
"launching": "Lancement...🚀"
|
||||
"BS_LAUNCHING": "Lancement...🚀",
|
||||
"STEAM_LAUNCHING": "Steam se lance !"
|
||||
},
|
||||
"msg": {
|
||||
"BS_LAUNCHING": "N'oublie pas de t'échauffer 😉",
|
||||
"STEAM_LAUNCHING": "Beat Saber se lancera automatiquement après Steam."
|
||||
}
|
||||
},
|
||||
"errors": {
|
||||
"titles": {
|
||||
"UNABLE_TO_LAUNCH": "Lancement impossible",
|
||||
"UNKNOWN_ERROR": "Lancement impossible",
|
||||
"STEAM_NOT_RUNNING": "Steam n'est pas lancé",
|
||||
"OCULUS_NOT_RUNNING": "Oculus n'est pas lancé",
|
||||
"BS_ALREADY_RUNNING": "Beat Saber est déjà lancé",
|
||||
@@ -324,21 +353,22 @@
|
||||
"EXIT": "Arrêt brutal"
|
||||
},
|
||||
"msg": {
|
||||
"UNKNOWN_ERROR": "Une erreur inconnue s'est produite.",
|
||||
"STEAM_NOT_RUNNING": "Steam doit être en cours d'exécution pour lancer Beat Saber.",
|
||||
"OCULUS_NOT_RUNNING": "Oculus doit être en cours d'exécution pour lancer Beat Saber.",
|
||||
"BS_ALREADY_RUNNING": "Ferme Beat Saber avant de le lancer à nouveau.",
|
||||
"EXE_NOT_FINDED": "Quelques fichiers semblent manquants. Essaye de vérifier les fichiers.",
|
||||
"EXIT": "BeatSaber s'est arrêté brusquement, essaye de vérifier les fichiers."
|
||||
},
|
||||
"actions":{
|
||||
"actions": {
|
||||
"STEAM_NOT_RUNNING": "Lancer Steam"
|
||||
}
|
||||
}
|
||||
},
|
||||
"steam":{
|
||||
"steam-launching":{
|
||||
"steam": {
|
||||
"steam-launching": {
|
||||
"title": "Steam se lance !",
|
||||
"description": "Steam peut mettre quelque temps à se lancer selon votre configuration."
|
||||
"description": "Beat Saber se lancera automatiquement après Steam."
|
||||
}
|
||||
},
|
||||
"custom-version": {
|
||||
@@ -396,27 +426,44 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"maps":{
|
||||
"one-click-install":{
|
||||
"success":"Installation de la map terminée",
|
||||
"error":"Une erreur s'est produite lors de l'installation de la map"
|
||||
"maps": {
|
||||
"one-click-install": {
|
||||
"success": "Installation de la map terminée",
|
||||
"error": "Une erreur s'est produite lors de l'installation de la map"
|
||||
}
|
||||
},
|
||||
"playlists":{
|
||||
"one-click-install":{
|
||||
"success":"Installation de la playlist terminée",
|
||||
"error":"Une erreur s'est produite lors de l'installation de la playlist"
|
||||
"playlists": {
|
||||
"one-click-install": {
|
||||
"success": "Installation de la playlist terminée",
|
||||
"error": "Une erreur s'est produite lors de l'installation de la playlist"
|
||||
}
|
||||
},
|
||||
"models":{
|
||||
"one-click-install":{
|
||||
"success":"Installation du modèle terminée",
|
||||
"error":"Une erreur s'est produite lors de l'installation du modèle"
|
||||
"models": {
|
||||
"one-click-install": {
|
||||
"success": "Installation du modèle terminée",
|
||||
"error": "Une erreur s'est produite lors de l'installation du modèle"
|
||||
}
|
||||
},
|
||||
"shared-folder": {
|
||||
"info": {
|
||||
"userdata-backup-created": {
|
||||
"title": "Sauvegarde créée",
|
||||
"msg": "Le partage du dossier 'UserData' peut générer des erreurs, en cas de soucis déliez le dossier pour restaurer la sauvegarde"
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
"success": {
|
||||
"title": "Raccourci créé",
|
||||
"msg": "Le raccourci a été créé sur le bureau."
|
||||
},
|
||||
"error": {
|
||||
"msg": "Une erreur s'est produite lors de la création du raccourci."
|
||||
}
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
"misc":{
|
||||
"misc": {
|
||||
"remember-my-choice": "Se souvenir de mon choix"
|
||||
},
|
||||
"guard": {
|
||||
@@ -440,7 +487,8 @@
|
||||
},
|
||||
"password": {
|
||||
"label": "Mot de passe",
|
||||
"placeholder": "Entre ton mot de passe"
|
||||
"placeholder": "Entre ton mot de passe",
|
||||
"max-length-warning": "Le mot de passe dépasse 64 caractères ! Si le mot de passe est invalide, tente d'entrer seulement ses 64 premiers caractères."
|
||||
},
|
||||
"stay": {
|
||||
"label": "Rester connecté"
|
||||
@@ -451,15 +499,15 @@
|
||||
"submit": "Se connecter"
|
||||
}
|
||||
},
|
||||
"steam-credentials":{
|
||||
"steam-credentials": {
|
||||
"title": "Steam Credentials",
|
||||
"p-1": "Les informations d'identification ne sont utilisées que pour télécharger le jeu, car Steam doit vérifier que vous avez payé le jeu afin d'être autorisé à le télécharger. Ils ne sont pas sauvegardés et transmis directement à DepotDownloader. Si vous ne voulez pas entrer vos informations d'identification, vous pouvez suivre ce tutoriel :",
|
||||
"p-2": "puis cliquez sur l'icône de l'engrenage dans le coin supérieur droit et sélectionnez \"Importer une version\", sélectionnez le dossier où beat saber a été téléchargé (Si vous suivez le tutoriel ci-dessus, vous devriez avoir le bon emplacement)."
|
||||
},
|
||||
"bs-import-version":{
|
||||
"bs-import-version": {
|
||||
"title": "Importer une version",
|
||||
"description": "Importe une version de BeatSaber pour profiter des fonctionnalités de BSManager. L'importation copiera le dossier d'installation de BeatSaber sélectionné dans le dossier de versions de BSManager.",
|
||||
"buttons":{
|
||||
"buttons": {
|
||||
"submit": "Importer une version"
|
||||
}
|
||||
},
|
||||
@@ -555,13 +603,30 @@
|
||||
"no-maps-found": "Aucune map trouvée",
|
||||
"no-internet": "Pas d'internet"
|
||||
},
|
||||
"mods-disclaimer":{
|
||||
"mods-disclaimer": {
|
||||
"title": "avis de non-responsabilité",
|
||||
"p-1": "En choisissant d'utiliser des mods, vous comprenez et acceptez que :",
|
||||
"li-1": "Vous pouvez rencontrer des problèmes qui n'existent pas dans le jeu de base. 99.9% des bugs, plantages et ralentissements sont dus aux mods.",
|
||||
"li-2": "Les mods sont susceptibles de ne plus fonctionner à cause des mises à jour et c'est normal - soyez patient et respectueux lorsque cela se produit, parce que les moddeurs sont bénévoles et ont une vie.",
|
||||
"li-3": "Beat Games ne cherche pas volontairement à casser les mods. Ils souhaitent améliorer la base du jeu et parfois cela casse les mods, mais ce n'est pas dans leur objectif de tuer les mods.",
|
||||
"p-2": "N'attaquez pas les développeurs pour des problèmes relatifs aux mods, et inversement - les moddeurs et les développeurs sont deux groupes distincts. Ne soyez pas idiots, d'accord ?"
|
||||
},
|
||||
"shared-folders": {
|
||||
"title": "Dossiers Partagés",
|
||||
"description": "Liez les dossiers de BeatSaber pour synchroniser leurs contenus avec les dossiers partagés des autres versions. Notez que la suppression de contenu sera également partagée.",
|
||||
"buttons": {
|
||||
"add-folder": "Ajouter un dossier",
|
||||
"link-folder": "Lier le dossier",
|
||||
"unlink-folder": "Délier le dossier",
|
||||
"link-all": "Tout lier"
|
||||
}
|
||||
},
|
||||
"create-launch-shortcut": {
|
||||
"title": "Créer un raccourci",
|
||||
"desc": "Créer un raccourci te permettra de démarrer Beat Saber avec les options choisi sans passé par BSManager.",
|
||||
"launch-options": "Options de lancement",
|
||||
"advanced-launch": "Lancement avancé",
|
||||
"valid-btn": "Créer le raccourci"
|
||||
}
|
||||
},
|
||||
"maps": {
|
||||
@@ -637,6 +702,169 @@
|
||||
"mapped-by": "mappée par"
|
||||
}
|
||||
},
|
||||
"models": {
|
||||
"types": {
|
||||
"singular": {
|
||||
"avatar": "avatar",
|
||||
"saber": "sabre",
|
||||
"platform": "plateforme",
|
||||
"bloq": "bloc"
|
||||
},
|
||||
"plural": {
|
||||
"avatar": "avatars",
|
||||
"saber": "sabres",
|
||||
"platform": "plateformes",
|
||||
"bloq": "blocs"
|
||||
}
|
||||
},
|
||||
"sorts": {
|
||||
"name": "nom",
|
||||
"date": "date",
|
||||
"author": "auteur"
|
||||
},
|
||||
"panel": {
|
||||
"actions": {
|
||||
"search": "Rechercher un modèle",
|
||||
"drop-down": {
|
||||
"delete": "Supprimer les modèles",
|
||||
"export": "Exporter les modèles"
|
||||
},
|
||||
"link-models": "Lier les modèles",
|
||||
"unlink-models": "Délier les modèles"
|
||||
},
|
||||
"grid": {
|
||||
"loading": "Chargement des modèles...",
|
||||
"no-models": "Aucun modèle",
|
||||
"download-models": "Télécharger des modèles"
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
"delete-model": {
|
||||
"title": "Supprimer le modèle",
|
||||
"desc": "Est-tu sûr de vouloir supprimer le modèle {modelName} ?",
|
||||
"linked-annotation": "Ce modèle sera supprimé de toutes les versions liées."
|
||||
},
|
||||
"delete-models": {
|
||||
"title": "Supprimer les modèles",
|
||||
"desc": "Est-tu sûr de vouloir supprimer les {nb} modèles ?",
|
||||
"linked-annotation": "Ces modèles seront supprimés de toutes les versions liées."
|
||||
},
|
||||
"download-models": {
|
||||
"search-btn": "Rechercher",
|
||||
"search-placeholder": "Rechercher un modèle",
|
||||
"search-tips": {
|
||||
"header": {
|
||||
"tag": "Tag",
|
||||
"desc": "Description"
|
||||
},
|
||||
"author-desc": "Afficher seulement les modèles de l'auteur spécifié.",
|
||||
"hash-desc": "Afficher seulement les modèles avec le hash spécifié.",
|
||||
"tag-desc": "Afficher seulement les modèles avec le tag spécifié.",
|
||||
"name-desc": "Afficher seulement les modèles avec le nom spécifié.",
|
||||
"discordid-desc": "Afficher seulement les modèles de l'utilisateur discord spécifié.",
|
||||
"status-desc": "Afficher seulement les modèles avec le status spécifié. (profil seulement, et seulement pour l'auteur)"
|
||||
},
|
||||
"no-models": "Aucun modèles trouvés.",
|
||||
"no-internet": "Pas de connexion internet.",
|
||||
"error-occured": "Une erreur est survenue, réessaye plus tard."
|
||||
},
|
||||
"link-models": {
|
||||
"avatar": {
|
||||
"title": "Lier les avatars",
|
||||
"desc": "La liaison des avatars permet de partager les avatars entre toute les version. Une fois liée, cette version profitera des avatars partagés",
|
||||
"info": "L'ajout et la suppression d'avatars sera également partagé",
|
||||
"keep-models": {
|
||||
"label": "Conserver les avatars",
|
||||
"title": "Conserver les avatars déplacera les avatars de la version actuelle dans le dossier des avatars partagés. Dans le cas contraire ils seront perdus"
|
||||
},
|
||||
"valid-btn": "Lier les avatars"
|
||||
},
|
||||
"saber": {
|
||||
"title": "Lier les sabres",
|
||||
"desc": "La liaison des sabres permet de partager les sabres entre toute les version. Une fois liée, cette version profitera des sabres partagés",
|
||||
"info": "L'ajout et la suppression de sabres sera également partagé",
|
||||
"keep-models": {
|
||||
"label": "Conserver les sabres",
|
||||
"title": "Conserver les sabres déplacera les sabres de la version actuelle dans le dossier des sabres partagés. Dans le cas contraire ils seront perdus"
|
||||
},
|
||||
"valid-btn": "Lier les sabres"
|
||||
},
|
||||
"platform": {
|
||||
"title": "Lier les plateformes",
|
||||
"desc": "La liaison des plateformes permet de partager les plateformes entre toute les version. Une fois liée, cette version profitera des plateformes partagées",
|
||||
"info": "L'ajout et la suppression de plateformes sera également partagé",
|
||||
"keep-models": {
|
||||
"label": "Conserver les plateformes",
|
||||
"title": "Conserver les plateformes déplacera les plateformes de la version actuelle dans le dossier des plateformes partagées. Dans le cas contraire ils seront perdus"
|
||||
},
|
||||
"valid-btn": "Lier les plateformes"
|
||||
},
|
||||
"bloq": {
|
||||
"title": "Lier les bloqs",
|
||||
"desc": "La liaison des bloqs permet de partager les bloqs entre toute les version. Une fois liée, cette version profitera des bloqs partagés",
|
||||
"info": "L'ajout et la suppression de bloqs sera également partagé",
|
||||
"keep-models": {
|
||||
"label": "Conserver les bloqs",
|
||||
"title": "Conserver les bloqs déplacera les bloqs de la version actuelle dans le dossier des bloqs partagés. Dans le cas contraire ils seront perdus"
|
||||
},
|
||||
"valid-btn": "Lier les bloqs"
|
||||
}
|
||||
},
|
||||
"unlink-models": {
|
||||
"avatar": {
|
||||
"title": "Délier les avatars",
|
||||
"desc": "Attention, délier les avatars ne permettra plus l'utilisation des avatars paratagés pour cette version.",
|
||||
"keep-models": {
|
||||
"label": "Conserver les avatars",
|
||||
"title": "Conserver les avatars créera une copie des avatars partagés pour la version actuelle. Dans le cas contraire, aucun avatar ne sera conservé pour cette version."
|
||||
},
|
||||
"valid-btn": "Délier les avatars"
|
||||
},
|
||||
"saber": {
|
||||
"title": "Délier les sabres",
|
||||
"desc": "Attention, délier les sabres ne permettra plus l'utilisation des sabres paratagés pour cette version.",
|
||||
"keep-models": {
|
||||
"label": "Conserver les sabres",
|
||||
"title": "Conserver les sabres créera une copie des sabres partagés pour la version actuelle. Dans le cas contraire, aucun sabre ne sera conservé pour cette version."
|
||||
},
|
||||
"valid-btn": "Délier les sabres"
|
||||
},
|
||||
"platform": {
|
||||
"title": "Délier les plateformes",
|
||||
"desc": "Attention, délier les plateformes ne permettra plus l'utilisation des plateformes paratagées pour cette version.",
|
||||
"keep-models": {
|
||||
"label": "Conserver les plateformes",
|
||||
"title": "Conserver les plateformes créera une copie des plateformes partagées pour la version actuelle. Dans le cas contraire, aucune plateforme ne sera conservée pour cette version."
|
||||
},
|
||||
"valid-btn": "Délier les plateformes"
|
||||
},
|
||||
"bloq": {
|
||||
"title": "Délier les bloqs",
|
||||
"desc": "Attention, délier les bloqs ne permettra plus l'utilisation des bloqs paratagés pour cette version.",
|
||||
"keep-models": {
|
||||
"label": "Conserver les bloqs",
|
||||
"title": "Conserver les bloqs créera une copie des bloqs partagés pour la version actuelle. Dans le cas contraire, aucun bloq ne sera conservé pour cette version."
|
||||
},
|
||||
"valid-btn": "Délier les bloqs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"notifications": {
|
||||
"prevent-for-mods": {
|
||||
"title": "Mods nécessaires",
|
||||
"desc": "Assurez-toi d'avoir installé les mods nécessaires pour utiliser des modèles dans BeatSaber",
|
||||
"go-to-mods": "Aller aux mods",
|
||||
"not-remind": "Ne plus me rappeler"
|
||||
},
|
||||
"prevent-for-models-breaks": {
|
||||
"title": "Modèles cassés",
|
||||
"desc": "Depuis la mise à jour du moteur de BeatSaber, les modèles ne sont plus fonctionnels pour cette version."
|
||||
},
|
||||
"export-success": {
|
||||
"title": "Export terminé 🎉"
|
||||
}
|
||||
}
|
||||
},
|
||||
"beat-saver": {
|
||||
"maps-sorts": {
|
||||
"Latest": "Dernière",
|
||||
@@ -649,58 +877,23 @@
|
||||
"checking": "Vérification des mises à jour",
|
||||
"downloading": "Téléchargement des mises à jour"
|
||||
},
|
||||
"bs-shortcut-launch": {
|
||||
"beat-saber-launching": "Lancement de Beat Saber",
|
||||
"launching": "Lancement",
|
||||
"open-bsmanager": "Ouvrir BSManager",
|
||||
"status-text": {
|
||||
"init": "Initialisation...",
|
||||
"success": {
|
||||
"BS_LAUNCHING": "Lancement de Beat Saber...",
|
||||
"STEAM_LAUNCHING": "Lancement de Steam...",
|
||||
"STEAM_LAUNCHED": "Steam lancé avec succès !",
|
||||
"UNABLE_TO_LAUNCH_STEAM": "Impossible de lancer Steam, lancement forcé de Beat Saber..."
|
||||
}
|
||||
}
|
||||
},
|
||||
"dateformat": {
|
||||
"dayNames": [
|
||||
"Dim",
|
||||
"Lun",
|
||||
"Mar",
|
||||
"Mer",
|
||||
"Jeu",
|
||||
"Ven",
|
||||
"Sam",
|
||||
"Dimanche",
|
||||
"Lundi",
|
||||
"Mardi",
|
||||
"Mercredi",
|
||||
"Jeudi",
|
||||
"Vendredi",
|
||||
"Samedi"
|
||||
],
|
||||
"monthNames": [
|
||||
"Jan",
|
||||
"Fév",
|
||||
"Mar",
|
||||
"Avr",
|
||||
"Mai",
|
||||
"Jun",
|
||||
"Juil",
|
||||
"Aou",
|
||||
"Sept",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Déc",
|
||||
"Janvier",
|
||||
"Février",
|
||||
"Mars",
|
||||
"Avril",
|
||||
"Mai",
|
||||
"Juin",
|
||||
"Juillet",
|
||||
"Août",
|
||||
"Septembre",
|
||||
"Octobre",
|
||||
"Novembre",
|
||||
"Décembre"
|
||||
],
|
||||
"timeNames": [
|
||||
"a",
|
||||
"p",
|
||||
"am",
|
||||
"pm",
|
||||
"A",
|
||||
"P",
|
||||
"AM",
|
||||
"PM"
|
||||
]
|
||||
"dayNames": ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"],
|
||||
"monthNames": ["Jan", "Fév", "Mar", "Avr", "Mai", "Jun", "Juil", "Aou", "Sept", "Oct", "Nov", "Déc", "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"],
|
||||
"timeNames": ["a", "p", "am", "pm", "A", "P", "AM", "PM"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,121 +1,121 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v6.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v6.0": {
|
||||
"DepotDownloader/2.4.6": {
|
||||
"dependencies": {
|
||||
"SteamKit2": "2.4.1",
|
||||
"protobuf-net": "3.0.101"
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v6.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v6.0": {
|
||||
"DepotDownloader/2.4.6": {
|
||||
"dependencies": {
|
||||
"SteamKit2": "2.4.1",
|
||||
"protobuf-net": "3.0.101"
|
||||
},
|
||||
"runtime": {
|
||||
"DepotDownloader.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/5.0.0": {},
|
||||
"Microsoft.Win32.Registry/5.0.0": {
|
||||
"dependencies": {
|
||||
"System.Security.AccessControl": "5.0.0",
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
}
|
||||
},
|
||||
"protobuf-net/3.0.101": {
|
||||
"dependencies": {
|
||||
"protobuf-net.Core": "3.0.101"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net5.0/protobuf-net.dll": {
|
||||
"assemblyVersion": "3.0.0.0",
|
||||
"fileVersion": "3.0.101.59408"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobuf-net.Core/3.0.101": {
|
||||
"runtime": {
|
||||
"lib/net5.0/protobuf-net.Core.dll": {
|
||||
"assemblyVersion": "3.0.0.0",
|
||||
"fileVersion": "3.0.101.59408"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SteamKit2/2.4.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Win32.Registry": "5.0.0",
|
||||
"protobuf-net": "3.0.101"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/SteamKit2.dll": {
|
||||
"assemblyVersion": "2.4.1.0",
|
||||
"fileVersion": "2.4.1.10"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Security.AccessControl/5.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "5.0.0",
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
}
|
||||
},
|
||||
"System.Security.Principal.Windows/5.0.0": {}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"DepotDownloader/2.4.6": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"runtime": {
|
||||
"DepotDownloader.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/5.0.0": {},
|
||||
"Microsoft.Win32.Registry/5.0.0": {
|
||||
"dependencies": {
|
||||
"System.Security.AccessControl": "5.0.0",
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
}
|
||||
},
|
||||
"protobuf-net/3.0.101": {
|
||||
"dependencies": {
|
||||
"protobuf-net.Core": "3.0.101"
|
||||
"Microsoft.NETCore.Platforms/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==",
|
||||
"path": "microsoft.netcore.platforms/5.0.0",
|
||||
"hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net5.0/protobuf-net.dll": {
|
||||
"assemblyVersion": "3.0.0.0",
|
||||
"fileVersion": "3.0.101.59408"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobuf-net.Core/3.0.101": {
|
||||
"runtime": {
|
||||
"lib/net5.0/protobuf-net.Core.dll": {
|
||||
"assemblyVersion": "3.0.0.0",
|
||||
"fileVersion": "3.0.101.59408"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SteamKit2/2.4.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.Win32.Registry": "5.0.0",
|
||||
"protobuf-net": "3.0.101"
|
||||
"Microsoft.Win32.Registry/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==",
|
||||
"path": "microsoft.win32.registry/5.0.0",
|
||||
"hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net6.0/SteamKit2.dll": {
|
||||
"assemblyVersion": "2.4.1.0",
|
||||
"fileVersion": "2.4.1.10"
|
||||
}
|
||||
"protobuf-net/3.0.101": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-mLm8VGfGylp9q+rbJDp3uw0BOeNzfGENecVz/EYGlzq3ss7tfajGXHCMoZm/GxJ9vSn9pcK22UXWZnQ5GJQMjA==",
|
||||
"path": "protobuf-net/3.0.101",
|
||||
"hashPath": "protobuf-net.3.0.101.nupkg.sha512"
|
||||
},
|
||||
"protobuf-net.Core/3.0.101": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-gf9QIF0RlctfjmOjbE6eOyMulkNEsH7tHncjKj/4BTu9tkuTyrH3fv5I+35GnolJqKJ6fh9kYaezvNRL3t75+Q==",
|
||||
"path": "protobuf-net.core/3.0.101",
|
||||
"hashPath": "protobuf-net.core.3.0.101.nupkg.sha512"
|
||||
},
|
||||
"SteamKit2/2.4.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-t9yptysn/2YY6KZaI123vOOnumS+ZCFcC6MhFEkTiQ04mdpZ/EWhk5RVY7jU36IQHyTQUXotmn7taKFCXMKp4g==",
|
||||
"path": "steamkit2/2.4.1",
|
||||
"hashPath": "steamkit2.2.4.1.nupkg.sha512"
|
||||
},
|
||||
"System.Security.AccessControl/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
|
||||
"path": "system.security.accesscontrol/5.0.0",
|
||||
"hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Security.Principal.Windows/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==",
|
||||
"path": "system.security.principal.windows/5.0.0",
|
||||
"hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512"
|
||||
}
|
||||
},
|
||||
"System.Security.AccessControl/5.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "5.0.0",
|
||||
"System.Security.Principal.Windows": "5.0.0"
|
||||
}
|
||||
},
|
||||
"System.Security.Principal.Windows/5.0.0": {}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"DepotDownloader/2.4.6": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==",
|
||||
"path": "microsoft.netcore.platforms/5.0.0",
|
||||
"hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.Win32.Registry/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==",
|
||||
"path": "microsoft.win32.registry/5.0.0",
|
||||
"hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"protobuf-net/3.0.101": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-mLm8VGfGylp9q+rbJDp3uw0BOeNzfGENecVz/EYGlzq3ss7tfajGXHCMoZm/GxJ9vSn9pcK22UXWZnQ5GJQMjA==",
|
||||
"path": "protobuf-net/3.0.101",
|
||||
"hashPath": "protobuf-net.3.0.101.nupkg.sha512"
|
||||
},
|
||||
"protobuf-net.Core/3.0.101": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-gf9QIF0RlctfjmOjbE6eOyMulkNEsH7tHncjKj/4BTu9tkuTyrH3fv5I+35GnolJqKJ6fh9kYaezvNRL3t75+Q==",
|
||||
"path": "protobuf-net.core/3.0.101",
|
||||
"hashPath": "protobuf-net.core.3.0.101.nupkg.sha512"
|
||||
},
|
||||
"SteamKit2/2.4.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-t9yptysn/2YY6KZaI123vOOnumS+ZCFcC6MhFEkTiQ04mdpZ/EWhk5RVY7jU36IQHyTQUXotmn7taKFCXMKp4g==",
|
||||
"path": "steamkit2/2.4.1",
|
||||
"hashPath": "steamkit2.2.4.1.nupkg.sha512"
|
||||
},
|
||||
"System.Security.AccessControl/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
|
||||
"path": "system.security.accesscontrol/5.0.0",
|
||||
"hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Security.Principal.Windows/5.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==",
|
||||
"path": "system.security.principal.windows/5.0.0",
|
||||
"hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net6.0",
|
||||
"rollForward": "LatestMajor",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "6.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
|
||||
"runtimeOptions": {
|
||||
"tfm": "net6.0",
|
||||
"rollForward": "LatestMajor",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "6.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,296 +1,310 @@
|
||||
{
|
||||
"name": "bs-manager",
|
||||
"description": "Manage maps, mods and more for Beat Saber",
|
||||
"scripts": {
|
||||
"build": "concurrently \"npm run build:main\" \"npm run build:renderer\"",
|
||||
"build:main": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.prod.ts",
|
||||
"build:renderer": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.prod.ts",
|
||||
"rebuild": "electron-rebuild --parallel --types prod,dev,optional --module-dir release/app",
|
||||
"lint": "cross-env NODE_ENV=development eslint . --ext .js,.jsx,.ts,.tsx",
|
||||
"package": "ts-node ./.erb/scripts/clean.js dist && npm run build && electron-builder build --publish never",
|
||||
"postinstall": "ts-node .erb/scripts/check-native-dep.js && electron-builder install-app-deps && cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.ts && opencollective-postinstall",
|
||||
"start": "ts-node ./.erb/scripts/check-port-in-use.js && npm run start:renderer",
|
||||
"start:main": "cross-env NODE_ENV=development electronmon -r ts-node/register/transpile-only ./src/main/main.ts",
|
||||
"start:preload": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.preload.dev.ts",
|
||||
"start:renderer": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts",
|
||||
"test": "jest",
|
||||
"publish": "npm run build && electron-builder --publish always --win --x64"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,ts,tsx}": [
|
||||
"cross-env NODE_ENV=development eslint --cache"
|
||||
],
|
||||
"*.json,.{eslintrc,prettierrc}": [
|
||||
"prettier --ignore-path .eslintignore --parser json --write"
|
||||
],
|
||||
"*.{css,scss}": [
|
||||
"prettier --ignore-path .eslintignore --single-quote --write"
|
||||
],
|
||||
"*.{html,md,yml}": [
|
||||
"prettier --ignore-path .eslintignore --single-quote --write"
|
||||
]
|
||||
},
|
||||
"build": {
|
||||
"extraResources": [
|
||||
"./assets/**"
|
||||
],
|
||||
"productName": "BSManager",
|
||||
"appId": "org.erb.BSManager",
|
||||
"asar": false,
|
||||
"asarUnpack": "**\\*.{node,dll}",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"node_modules",
|
||||
"package.json"
|
||||
],
|
||||
"afterSign": ".erb/scripts/notarize.js",
|
||||
"mac": {
|
||||
"target": {
|
||||
"target": "default",
|
||||
"arch": [
|
||||
"arm64",
|
||||
"x64"
|
||||
]
|
||||
},
|
||||
"type": "distribution",
|
||||
"hardenedRuntime": true,
|
||||
"entitlements": "assets/entitlements.mac.plist",
|
||||
"entitlementsInherit": "assets/entitlements.mac.plist",
|
||||
"gatekeeperAssess": false
|
||||
"name": "bs-manager",
|
||||
"description": "Manage maps, mods and more for Beat Saber",
|
||||
"scripts": {
|
||||
"build": "concurrently \"npm run build:main\" \"npm run build:renderer\"",
|
||||
"build:main": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.prod.ts",
|
||||
"build:renderer": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.prod.ts",
|
||||
"rebuild": "electron-rebuild --parallel --types prod,dev,optional --module-dir release/app",
|
||||
"lint": "cross-env NODE_ENV=development eslint . --ext .js,.jsx,.ts,.tsx",
|
||||
"package": "ts-node ./.erb/scripts/clean.js dist && npm run build && electron-builder build --publish never",
|
||||
"postinstall": "ts-node .erb/scripts/check-native-dep.js && electron-builder install-app-deps && cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.ts && opencollective-postinstall",
|
||||
"start": "ts-node ./.erb/scripts/check-port-in-use.js && npm run start:renderer",
|
||||
"start:main": "cross-env NODE_ENV=development electronmon -r ts-node/register/transpile-only ./src/main/main.ts",
|
||||
"start:preload": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.preload.dev.ts",
|
||||
"start:renderer": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts",
|
||||
"test": "jest",
|
||||
"publish": "npm run build && electron-builder --publish always --win --x64"
|
||||
},
|
||||
"dmg": {
|
||||
"contents": [
|
||||
{
|
||||
"x": 130,
|
||||
"y": 220
|
||||
},
|
||||
{
|
||||
"x": 410,
|
||||
"y": 220,
|
||||
"type": "link",
|
||||
"path": "/Applications"
|
||||
}
|
||||
]
|
||||
},
|
||||
"win": {
|
||||
"target": [
|
||||
"nsis",
|
||||
"nsis-web"
|
||||
],
|
||||
"icon": "assets/favicon.ico",
|
||||
"certificateSha1": "f3363a89b084f8f6b616babea3c91f9d79e15000"
|
||||
},
|
||||
"linux": {
|
||||
"target": [
|
||||
"AppImage"
|
||||
],
|
||||
"category": "Development"
|
||||
},
|
||||
"directories": {
|
||||
"app": "release/app",
|
||||
"buildResources": "assets",
|
||||
"output": "release/build"
|
||||
},
|
||||
"publish": {
|
||||
"provider": "github",
|
||||
"owner": "Zagrios"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Zagrios/bs-manager.git"
|
||||
},
|
||||
"author": {
|
||||
"name": "Zagrios",
|
||||
"email": "peroz.mathieu@gmail.com",
|
||||
"url": "https://github.com/Zagrios"
|
||||
},
|
||||
"contributors": [],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Zagrios/bs-manager/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"downgrade",
|
||||
"launcher-application",
|
||||
"beatsaber",
|
||||
"beat-saber"
|
||||
],
|
||||
"homepage": "https://github.com/Zagrios/bs-manager#readme",
|
||||
"jest": {
|
||||
"testURL": "http://localhost/",
|
||||
"testEnvironment": "jsdom",
|
||||
"transform": {
|
||||
"\\.(ts|tsx|js|jsx)$": "ts-jest"
|
||||
},
|
||||
"moduleNameMapper": {
|
||||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/.erb/mocks/fileMock.js",
|
||||
"\\.(css|less|sass|scss)$": "identity-obj-proxy"
|
||||
},
|
||||
"moduleFileExtensions": [
|
||||
"js",
|
||||
"jsx",
|
||||
"ts",
|
||||
"tsx",
|
||||
"json"
|
||||
],
|
||||
"moduleDirectories": [
|
||||
"node_modules",
|
||||
"release/app/node_modules"
|
||||
],
|
||||
"testPathIgnorePatterns": [
|
||||
"release/app/dist"
|
||||
],
|
||||
"setupFiles": [
|
||||
"./.erb/scripts/check-build-exists.ts"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
|
||||
"@teamsupercell/typings-for-css-modules-loader": "^2.5.1",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^13.3.0",
|
||||
"@types/archiver": "^5.3.1",
|
||||
"@types/dateformat": "^5.0.0",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/node": "17.0.23",
|
||||
"@types/react": "^17.0.48",
|
||||
"@types/react-dom": "^18.0.10",
|
||||
"@types/react-outside-click-handler": "^1.3.1",
|
||||
"@types/react-test-renderer": "^17.0.2",
|
||||
"@types/terser-webpack-plugin": "^5.0.4",
|
||||
"@types/use-double-click": "^1.0.1",
|
||||
"@types/webpack-bundle-analyzer": "^4.4.2",
|
||||
"@types/webpack-env": "^1.18.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.34.0",
|
||||
"@typescript-eslint/parser": "^5.34.0",
|
||||
"autoprefixer": "^10.4.8",
|
||||
"browserslist-config-erb": "^0.0.3",
|
||||
"chalk": "^4.1.2",
|
||||
"concurrently": "^7.2.2",
|
||||
"core-js": "^3.24.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^6.7.1",
|
||||
"css-minimizer-webpack-plugin": "^4.1.0",
|
||||
"detect-port": "^1.3.0",
|
||||
"electron": "^20.0.3",
|
||||
"electron-builder": "^23.6.0",
|
||||
"electron-devtools-installer": "^3.2.0",
|
||||
"electron-notarize": "^1.2.1",
|
||||
"electron-rebuild": "^3.2.9",
|
||||
"electronmon": "^2.0.2",
|
||||
"eslint": "^8.22.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-erb": "^4.0.3",
|
||||
"eslint-import-resolver-typescript": "^2.7.1",
|
||||
"eslint-import-resolver-webpack": "^0.13.2",
|
||||
"eslint-plugin-compat": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-jest": "^26.8.7",
|
||||
"eslint-plugin-jsx-a11y": "^6.6.1",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"eslint-plugin-react": "^7.30.0",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"identity-obj-proxy": "^3.0.0",
|
||||
"jest": "^27.5.1",
|
||||
"lint-staged": "^12.5.0",
|
||||
"mini-css-extract-plugin": "^2.6.1",
|
||||
"opencollective-postinstall": "^2.0.3",
|
||||
"postcss": "^8.4.16",
|
||||
"postcss-loader": "^6.2.1",
|
||||
"prettier": "^2.7.1",
|
||||
"ps-scrollbar-tailwind": "0.0.1",
|
||||
"react-refresh": "^0.12.0",
|
||||
"react-refresh-typescript": "^2.0.7",
|
||||
"react-test-renderer": "^18.2.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"sass": "^1.54.5",
|
||||
"sass-loader": "^12.6.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"tailwind-scrollbar": "^2.0.1",
|
||||
"tailwindcss": "^3.2.4",
|
||||
"terser-webpack-plugin": "^5.3.5",
|
||||
"ts-jest": "^27.1.5",
|
||||
"ts-loader": "^9.3.0",
|
||||
"ts-node": "^10.8.2",
|
||||
"typescript": "^4.7.4",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.74.0",
|
||||
"webpack-bundle-analyzer": "^4.6.1",
|
||||
"webpack-cli": "^4.10.0",
|
||||
"webpack-dev-server": "^4.10.0",
|
||||
"webpack-merge": "^5.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@node-steam/vdf": "^2.2.0",
|
||||
"@tippyjs/react": "^4.2.6",
|
||||
"@types/react-virtualized-auto-sizer": "^1.0.1",
|
||||
"@types/react-window": "^1.8.5",
|
||||
"@types/recursive-readdir": "^2.2.1",
|
||||
"archiver": "^5.3.1",
|
||||
"dateformat": "^5.0.3",
|
||||
"dot-prop": "^7.2.0",
|
||||
"electron-debug": "^3.2.0",
|
||||
"electron-log": "^4.4.8",
|
||||
"electron-store": "^8.1.0",
|
||||
"electron-updater": "^5.2.4",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"framer-motion": "^8.0.2",
|
||||
"fs-extra": "^10.1.0",
|
||||
"history": "^5.3.0",
|
||||
"is-online": "^9.0.1",
|
||||
"md5-file": "^5.0.0",
|
||||
"node-fetch": "^3.3.0",
|
||||
"node-stream-zip": "^1.15.0",
|
||||
"react": "^18.2.0",
|
||||
"react-colorful": "^5.6.1",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-range": "^1.8.14",
|
||||
"react-router-dom": "^6.3.0",
|
||||
"react-virtualized-auto-sizer": "^1.0.7",
|
||||
"react-window": "^1.8.8",
|
||||
"recursive-readdir": "^2.2.3",
|
||||
"regedit": "^5.1.1",
|
||||
"rfdc": "^1.3.0",
|
||||
"rxjs": "^7.5.6",
|
||||
"sanitize-filename": "^1.6.3",
|
||||
"semver": "^7.3.8",
|
||||
"tailwind-scrollbar-hide": "^1.1.7",
|
||||
"tailwindcss-scoped-groups": "^2.0.0",
|
||||
"use-delayed-state": "^1.2.0",
|
||||
"use-double-click": "^1.0.5",
|
||||
"use-fit-text": "^2.4.0"
|
||||
},
|
||||
"devEngines": {
|
||||
"node": ">=14.x",
|
||||
"npm": ">=7.x"
|
||||
},
|
||||
"collective": {
|
||||
"url": "https://www.patreon.com/bsmanager"
|
||||
},
|
||||
"browserslist": [],
|
||||
"prettier": {
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
".prettierrc",
|
||||
".eslintrc"
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,ts,tsx}": [
|
||||
"cross-env NODE_ENV=development eslint --cache"
|
||||
],
|
||||
"options": {
|
||||
"parser": "json"
|
||||
"*.json,.{eslintrc,prettierrc}": [
|
||||
"prettier --ignore-path .eslintignore --parser json --write"
|
||||
],
|
||||
"*.{css,scss}": [
|
||||
"prettier --ignore-path .eslintignore --single-quote --write"
|
||||
],
|
||||
"*.{html,md,yml}": [
|
||||
"prettier --ignore-path .eslintignore --single-quote --write"
|
||||
]
|
||||
},
|
||||
"build": {
|
||||
"extraResources": [
|
||||
"./assets/**"
|
||||
],
|
||||
"productName": "BSManager",
|
||||
"appId": "org.erb.BSManager",
|
||||
"asarUnpack": "**\\*.{node,dll}",
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"node_modules",
|
||||
"package.json"
|
||||
],
|
||||
"afterSign": ".erb/scripts/notarize.js",
|
||||
"mac": {
|
||||
"target": {
|
||||
"target": "default",
|
||||
"arch": [
|
||||
"arm64",
|
||||
"x64"
|
||||
]
|
||||
},
|
||||
"type": "distribution",
|
||||
"hardenedRuntime": true,
|
||||
"entitlements": "assets/entitlements.mac.plist",
|
||||
"entitlementsInherit": "assets/entitlements.mac.plist",
|
||||
"gatekeeperAssess": false
|
||||
},
|
||||
"dmg": {
|
||||
"contents": [
|
||||
{
|
||||
"x": 130,
|
||||
"y": 220
|
||||
},
|
||||
{
|
||||
"x": 410,
|
||||
"y": 220,
|
||||
"type": "link",
|
||||
"path": "/Applications"
|
||||
}
|
||||
]
|
||||
},
|
||||
"win": {
|
||||
"target": [
|
||||
"nsis",
|
||||
"nsis-web"
|
||||
],
|
||||
"icon": "assets/favicon.ico",
|
||||
"certificateSha1": "f3363a89b084f8f6b616babea3c91f9d79e15000"
|
||||
},
|
||||
"linux": {
|
||||
"target": [
|
||||
"AppImage"
|
||||
],
|
||||
"category": "Development"
|
||||
},
|
||||
"directories": {
|
||||
"app": "release/app",
|
||||
"buildResources": "assets",
|
||||
"output": "release/build"
|
||||
},
|
||||
"publish": {
|
||||
"provider": "github",
|
||||
"owner": "Zagrios"
|
||||
}
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Zagrios/bs-manager.git"
|
||||
},
|
||||
"author": {
|
||||
"name": "Zagrios",
|
||||
"email": "peroz.mathieu@gmail.com",
|
||||
"url": "https://github.com/Zagrios"
|
||||
},
|
||||
"contributors": [],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Zagrios/bs-manager/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"downgrade",
|
||||
"launcher-application",
|
||||
"beatsaber",
|
||||
"beat-saber"
|
||||
],
|
||||
"singleQuote": true
|
||||
},
|
||||
"electronmon": {
|
||||
"patterns": [
|
||||
"!src/__tests__/**",
|
||||
"!release/**",
|
||||
"!assets/**"
|
||||
],
|
||||
"logLevel": "quiet"
|
||||
}
|
||||
"homepage": "https://github.com/Zagrios/bs-manager#readme",
|
||||
"jest": {
|
||||
"testURL": "http://localhost/",
|
||||
"testEnvironment": "jsdom",
|
||||
"transform": {
|
||||
"\\.(ts|tsx|js|jsx)$": "ts-jest"
|
||||
},
|
||||
"moduleNameMapper": {
|
||||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/.erb/mocks/fileMock.js",
|
||||
"\\.(css|less|sass|scss)$": "identity-obj-proxy"
|
||||
},
|
||||
"moduleFileExtensions": [
|
||||
"js",
|
||||
"jsx",
|
||||
"ts",
|
||||
"tsx",
|
||||
"json"
|
||||
],
|
||||
"moduleDirectories": [
|
||||
"node_modules",
|
||||
"src"
|
||||
],
|
||||
"testPathIgnorePatterns": [
|
||||
"release/app/dist"
|
||||
],
|
||||
"setupFiles": [
|
||||
"./.erb/scripts/check-build-exists.ts"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron/rebuild": "^3.2.13",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
|
||||
"@teamsupercell/typings-for-css-modules-loader": "^2.5.1",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^13.3.0",
|
||||
"@types/archiver": "^5.3.1",
|
||||
"@types/color": "^3.0.3",
|
||||
"@types/dateformat": "^5.0.0",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/node": "17.0.23",
|
||||
"@types/node-fetch": "^2.6.3",
|
||||
"@types/react": "^18.0.33",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"@types/react-outside-click-handler": "^1.3.1",
|
||||
"@types/react-test-renderer": "^17.0.2",
|
||||
"@types/react-virtualized-auto-sizer": "^1.0.1",
|
||||
"@types/react-window": "^1.8.5",
|
||||
"@types/recursive-readdir": "^2.2.1",
|
||||
"@types/terser-webpack-plugin": "^5.0.4",
|
||||
"@types/to-ico": "^1.1.1",
|
||||
"@types/use-double-click": "^1.0.1",
|
||||
"@types/webpack-bundle-analyzer": "^4.4.2",
|
||||
"@types/webpack-env": "^1.18.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.34.0",
|
||||
"@typescript-eslint/parser": "^5.34.0",
|
||||
"autoprefixer": "^10.4.8",
|
||||
"browserslist-config-erb": "^0.0.3",
|
||||
"chalk": "^4.1.2",
|
||||
"concurrently": "^7.2.2",
|
||||
"core-js": "^3.24.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^6.7.1",
|
||||
"css-minimizer-webpack-plugin": "^4.1.0",
|
||||
"detect-port": "^1.3.0",
|
||||
"electron": "^25.3.0",
|
||||
"electron-builder": "^24.4.0",
|
||||
"electron-devtools-installer": "^3.2.0",
|
||||
"electron-notarize": "^1.2.1",
|
||||
"electronmon": "^2.0.2",
|
||||
"eslint": "^8.22.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-erb": "^4.0.3",
|
||||
"eslint-import-resolver-typescript": "^2.7.1",
|
||||
"eslint-import-resolver-webpack": "^0.13.2",
|
||||
"eslint-plugin-compat": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-jest": "^26.8.7",
|
||||
"eslint-plugin-jsx-a11y": "^6.6.1",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"eslint-plugin-react": "^7.30.0",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"identity-obj-proxy": "^3.0.0",
|
||||
"jest": "^27.5.1",
|
||||
"lint-staged": "^12.5.0",
|
||||
"mini-css-extract-plugin": "^2.6.1",
|
||||
"opencollective-postinstall": "^2.0.3",
|
||||
"postcss": "^8.4.16",
|
||||
"postcss-loader": "^6.2.1",
|
||||
"prettier": "^2.7.1",
|
||||
"ps-scrollbar-tailwind": "0.0.1",
|
||||
"react-refresh": "^0.12.0",
|
||||
"react-refresh-typescript": "^2.0.7",
|
||||
"react-test-renderer": "^18.2.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"sass": "^1.54.5",
|
||||
"sass-loader": "^12.6.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"tailwind-scrollbar": "^2.0.1",
|
||||
"tailwindcss": "^3.3.1",
|
||||
"terser-webpack-plugin": "^5.3.5",
|
||||
"ts-jest": "^27.1.5",
|
||||
"ts-loader": "^9.3.0",
|
||||
"ts-node": "^10.8.2",
|
||||
"typescript": "^4.7.4",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.74.0",
|
||||
"webpack-bundle-analyzer": "^4.6.1",
|
||||
"webpack-cli": "^4.10.0",
|
||||
"webpack-dev-server": "^4.10.0",
|
||||
"webpack-merge": "^5.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@node-steam/vdf": "^2.2.0",
|
||||
"@tippyjs/react": "^4.2.6",
|
||||
"archiver": "^5.3.1",
|
||||
"color": "^4.2.3",
|
||||
"dateformat": "^5.0.3",
|
||||
"dot-prop": "^8.0.0",
|
||||
"electron-debug": "^3.2.0",
|
||||
"electron-log": "^4.4.8",
|
||||
"electron-store": "^8.1.0",
|
||||
"electron-updater": "^6.1.1",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"framer-motion": "^10.12.16",
|
||||
"fs-extra": "^11.1.1",
|
||||
"history": "^5.3.0",
|
||||
"jszip": "^3.10.1",
|
||||
"md5-file": "^5.0.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"node-stream-zip": "^1.15.0",
|
||||
"ps-list": "^7.2.0",
|
||||
"react": "^18.2.0",
|
||||
"react-colorful": "^5.6.1",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-range": "^1.8.14",
|
||||
"react-router-dom": "^6.3.0",
|
||||
"react-virtualized-auto-sizer": "^1.0.12",
|
||||
"react-window": "^1.8.8",
|
||||
"recursive-readdir": "^2.2.3",
|
||||
"regedit": "^5.1.2",
|
||||
"rfdc": "^1.3.0",
|
||||
"rxjs": "^7.8.0",
|
||||
"sanitize-filename": "^1.6.3",
|
||||
"semver": "^7.5.1",
|
||||
"striptags": "^4.0.0-alpha.4",
|
||||
"tailwind-scrollbar-hide": "^1.1.7",
|
||||
"tailwindcss-scoped-groups": "^2.0.0",
|
||||
"tippy.js": "^6.3.7",
|
||||
"to-ico": "^1.1.5",
|
||||
"use-double-click": "^1.0.5",
|
||||
"use-fit-text": "^2.4.0"
|
||||
},
|
||||
"devEngines": {
|
||||
"node": ">=14.x",
|
||||
"npm": ">=7.x"
|
||||
},
|
||||
"collective": {
|
||||
"url": "https://www.patreon.com/bsmanager"
|
||||
},
|
||||
"browserslist": [],
|
||||
"prettier": {
|
||||
"printWidth": 1000,
|
||||
"bracketSameLine": false,
|
||||
"arrowParens": "avoid",
|
||||
"semi": true,
|
||||
"singleQuote": false,
|
||||
"jsxSingleQuote": false,
|
||||
"trailingComma": "es5",
|
||||
"bracketSpacing": true,
|
||||
"tabWidth": 4,
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
".prettierrc",
|
||||
".eslintrc"
|
||||
],
|
||||
"options": {
|
||||
"parser": "json"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"electronmon": {
|
||||
"patterns": [
|
||||
"!src/__tests__/**",
|
||||
"!release/**",
|
||||
"!assets/**"
|
||||
],
|
||||
"logLevel": "quiet"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@ const tailwindcss = require("tailwindcss");
|
||||
const autoprefixer = require("autoprefixer");
|
||||
|
||||
module.exports = {
|
||||
plugins: [tailwindcss, autoprefixer],
|
||||
plugins: [tailwindcss, autoprefixer],
|
||||
};
|
||||
|
||||
@@ -53,8 +53,8 @@ E.g: Blocking feedback must be addressed before merging.
|
||||
|
||||
> 🔴 This change will break something important
|
||||
|
||||
| | | |
|
||||
| --- | --- | --- |
|
||||
| Blocking | 🔴 ❌ 🚨 | RED |
|
||||
| Non-blocking | 🟡 💡 🤔 💭 | Yellow, thinking, etc |
|
||||
| Praise | 🟢 💚 😍 👍 🙌 | Green, hearts, positive emojis, etc |
|
||||
| | | |
|
||||
| ------------ | -------------- | ----------------------------------- |
|
||||
| Blocking | 🔴 ❌ 🚨 | RED |
|
||||
| Non-blocking | 🟡 💡 🤔 💭 | Yellow, thinking, etc |
|
||||
| Praise | 🟢 💚 😍 👍 🙌 | Green, hearts, positive emojis, etc |
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "bs-manager",
|
||||
"version": "1.0.4",
|
||||
"description": "A foundation for scalable desktop apps",
|
||||
"version": "1.2.0",
|
||||
"description": "BSManager",
|
||||
"main": "./dist/main/main.js",
|
||||
"author": {
|
||||
"name": "Zagrios",
|
||||
"email": "electronreactboilerplate@gmail.com",
|
||||
"email": "admin@bsmanager.io",
|
||||
"url": "https://github.com/Zagrios/bs-manager"
|
||||
},
|
||||
"scripts": {
|
||||
@@ -14,7 +14,8 @@
|
||||
"postinstall": "npm run electron-rebuild && npm run link-modules"
|
||||
},
|
||||
"dependencies": {
|
||||
"ctrlc-windows": "^2.0.0"
|
||||
"@resvg/resvg-js": "^2.4.1",
|
||||
"ps-list": "^7.2.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 337 KiB After Width: | Height: | Size: 337 KiB |
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 353 KiB After Width: | Height: | Size: 353 KiB |
|
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 176 KiB |
|
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 3.4 MiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
@@ -1,9 +1,9 @@
|
||||
import '@testing-library/jest-dom';
|
||||
import { render } from '@testing-library/react';
|
||||
import App from '../renderer/windows/App';
|
||||
import "@testing-library/jest-dom";
|
||||
import { render } from "@testing-library/react";
|
||||
import App from "../renderer/windows/App";
|
||||
|
||||
describe('App', () => {
|
||||
it('should render', () => {
|
||||
expect(render(<App />)).toBeTruthy();
|
||||
});
|
||||
describe("App", () => {
|
||||
it("should render", () => {
|
||||
expect(render(<App />)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
import { app } from "electron";
|
||||
import path from "path";
|
||||
|
||||
export const BS_EXECUTABLE = "Beat Saber.exe";
|
||||
export const OCULUS_BS_DIR = "hyperbolic-magnetism-beat-saber"
|
||||
export const OCULUS_BS_DIR = "hyperbolic-magnetism-beat-saber";
|
||||
export const BS_APP_ID = "620980";
|
||||
export const BS_DEPOT = "620981";
|
||||
export const APP_NAME = "BSManager";
|
||||
|
||||
export const STEAMVR_APP_ID = "250820";
|
||||
|
||||
export const IMAGE_CACHE_FOLDER = "imagescache";
|
||||
export const IMAGE_CACHE_PATH = path.join(app.getPath("userData"), IMAGE_CACHE_FOLDER);
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { ProviderPlatform } from "shared/models/provider-platform.enum";
|
||||
|
||||
export function execOnOs<T>(executions: { [key in ProviderPlatform]?: () => T }, noError = false): T {
|
||||
if(executions[process.platform as ProviderPlatform]) {
|
||||
return executions[process.platform as ProviderPlatform]();
|
||||
}
|
||||
|
||||
if(!noError) {
|
||||
throw new Error(`No execution found for platform ${process.platform}`);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
import { CopyOptions, copy, ensureDir, move, symlink } from "fs-extra";
|
||||
import { access, mkdir, rm, readdir, unlink, lstat, readlink } from "fs/promises";
|
||||
import path from "path";
|
||||
import { Observable } from "rxjs";
|
||||
import log from "electron-log";
|
||||
import { BsmException } from "shared/models/bsm-exception.model";
|
||||
|
||||
export async function pathExist(path: string): Promise<boolean> {
|
||||
try {
|
||||
await access(path);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export async function ensureFolderExist(path: string): Promise<void> {
|
||||
if (await pathExist(path)) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return mkdir(path, { recursive: true })
|
||||
.catch(log.error)
|
||||
.then(() => {});
|
||||
}
|
||||
|
||||
export async function deleteFolder(folderPath: string): Promise<void> {
|
||||
if (!(await pathExist(folderPath))) {
|
||||
return;
|
||||
}
|
||||
return rm(folderPath, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
export async function unlinkPath(path: string): Promise<void> {
|
||||
if (!(await pathExist(path))) {
|
||||
return;
|
||||
}
|
||||
return unlink(path);
|
||||
}
|
||||
|
||||
export async function getFoldersInFolder(folderPath: string, opts?: { ignoreSymlinkTargetError?: boolean }): Promise<string[]> {
|
||||
if (!(await pathExist(folderPath))) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const files = await readdir(folderPath, { withFileTypes: true });
|
||||
|
||||
const promises = files.map(async file => {
|
||||
if (file.isDirectory()) {
|
||||
return path.join(folderPath, file.name);
|
||||
}
|
||||
if (!file.isSymbolicLink()) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
const targetPath = await readlink(path.join(folderPath, file.name));
|
||||
return (await lstat(targetPath)).isDirectory() ? path.join(folderPath, file.name) : undefined;
|
||||
} catch (e: any) {
|
||||
if (e.code === "ENOENT" && opts?.ignoreSymlinkTargetError === true && !path.extname(file.name)) {
|
||||
return path.join(folderPath, file.name);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
});
|
||||
|
||||
return (await Promise.all(promises)).filter(folder => folder);
|
||||
}
|
||||
|
||||
export async function getFilesInFolder(folderPath: string): Promise<string[]> {
|
||||
if (!(await pathExist(folderPath))) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const dirEntries = await readdir(folderPath, { withFileTypes: true });
|
||||
|
||||
return dirEntries.filter(entry => entry.isFile()).map(file => path.join(folderPath, file.name));
|
||||
}
|
||||
|
||||
export function moveFolderContent(src: string, dest: string): Observable<Progression> {
|
||||
const progress: Progression = { current: 0, total: 0 };
|
||||
return new Observable<Progression>(subscriber => {
|
||||
subscriber.next(progress);
|
||||
(async () => {
|
||||
const srcExist = await pathExist(src);
|
||||
|
||||
if (!srcExist) {
|
||||
return subscriber.complete();
|
||||
}
|
||||
|
||||
ensureFolderExist(dest);
|
||||
|
||||
const files = await readdir(src, { encoding: "utf-8" });
|
||||
progress.total = files.length;
|
||||
|
||||
const promises = files.map(async file => {
|
||||
const srcFullPath = path.join(src, file);
|
||||
const destFullPath = path.join(dest, file);
|
||||
if (await pathExist(destFullPath)) {
|
||||
progress.current++;
|
||||
return subscriber.next(progress);
|
||||
}
|
||||
await move(srcFullPath, destFullPath);
|
||||
progress.current++;
|
||||
subscriber.next(progress);
|
||||
});
|
||||
|
||||
Promise.allSettled(promises).then(() => subscriber.complete());
|
||||
})();
|
||||
});
|
||||
}
|
||||
|
||||
export function isSubdirectory(parent: string, child: string): boolean {
|
||||
const parentNormalized = path.resolve(parent);
|
||||
const childNormalized = path.resolve(child);
|
||||
|
||||
if (parentNormalized === childNormalized) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const relativePath = path.relative(parentNormalized, childNormalized);
|
||||
|
||||
if (path.parse(parentNormalized).root !== path.parse(childNormalized).root) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return relativePath && !relativePath.startsWith("..") && !path.isAbsolute(relativePath);
|
||||
}
|
||||
|
||||
export async function copyDirectoryWithJunctions(src: string, dest: string, options?: CopyOptions): Promise<void> {
|
||||
if (isSubdirectory(src, dest)) {
|
||||
throw { message: `Cannot copy directory '${src}' into itself '${dest}'.`, code: "COPY_TO_SUBPATH" } as BsmException;
|
||||
}
|
||||
|
||||
await ensureDir(dest);
|
||||
const items = await readdir(src, { withFileTypes: true });
|
||||
|
||||
for (const item of items) {
|
||||
const sourcePath = path.join(src, item.name);
|
||||
const destinationPath = path.join(dest, item.name);
|
||||
|
||||
if (item.isDirectory()) {
|
||||
await copyDirectoryWithJunctions(sourcePath, destinationPath, options);
|
||||
} else if (item.isFile()) {
|
||||
await copy(sourcePath, destinationPath, options);
|
||||
} else if (item.isSymbolicLink()) {
|
||||
if (options?.overwrite) {
|
||||
await unlinkPath(destinationPath);
|
||||
}
|
||||
const symlinkTarget = await readlink(sourcePath);
|
||||
const relativePath = path.relative(src, symlinkTarget);
|
||||
const newTarget = path.join(dest, relativePath);
|
||||
await symlink(newTarget, destinationPath, "junction");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface Progression<T = unknown> {
|
||||
total: number;
|
||||
current: number;
|
||||
data?: T;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
export function isValidUrl(url: string): boolean{
|
||||
try{
|
||||
new URL(url);
|
||||
return true;
|
||||
}
|
||||
catch(e){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import JSZip from "jszip";
|
||||
import { pathExist } from "./fs.helpers";
|
||||
import path from "path";
|
||||
import { mkdir, writeFile } from "fs/promises";
|
||||
|
||||
export async function extractZip(zip: JSZip, dest: string): Promise<string[]> {
|
||||
if (!(await pathExist(dest))) {
|
||||
throw new Error(`Path ${dest} does not exist`);
|
||||
}
|
||||
const files: string[] = [];
|
||||
|
||||
for (const [relativePath, entry] of Object.entries(zip.files)) {
|
||||
if (entry.dir) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const content = await entry.async("nodebuffer");
|
||||
const outPath = path.join(dest, relativePath);
|
||||
const outDir = path.dirname(outPath);
|
||||
|
||||
await mkdir(outDir, { recursive: true });
|
||||
await writeFile(outPath, content);
|
||||
|
||||
files.push(outPath);
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
@@ -9,43 +9,55 @@ ipcMain.on("bsv-search-map", async (event, request: IpcRequest<SearchParams>) =>
|
||||
const utlis = UtilsService.getInstance();
|
||||
const bsvService = BeatSaverService.getInstance();
|
||||
|
||||
bsvService.searchMaps(request.args).then(maps => {
|
||||
utlis.ipcSend(request.responceChannel, {success: true, data: maps});
|
||||
}).catch(e => {
|
||||
utlis.ipcSend(request.responceChannel, {success: false, error: e});
|
||||
})
|
||||
bsvService
|
||||
.searchMaps(request.args)
|
||||
.then(maps => {
|
||||
utlis.ipcSend(request.responceChannel, { success: true, data: maps });
|
||||
})
|
||||
.catch(e => {
|
||||
utlis.ipcSend(request.responceChannel, { success: false, error: e });
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on("bsv-get-map-details-from-hashs", async (event, request: IpcRequest<string[]>) => {
|
||||
const utlis = UtilsService.getInstance();
|
||||
const bsvService = BeatSaverService.getInstance();
|
||||
|
||||
bsvService.getMapDetailsFromHashs(request.args).then(maps => {
|
||||
utlis.ipcSend(request.responceChannel, {success: true, data: maps});
|
||||
}).catch(e => {
|
||||
log.error(e);
|
||||
utlis.ipcSend(request.responceChannel, {success: false, error: e});
|
||||
})
|
||||
bsvService
|
||||
.getMapDetailsFromHashs(request.args)
|
||||
.then(maps => {
|
||||
utlis.ipcSend(request.responceChannel, { success: true, data: maps });
|
||||
})
|
||||
.catch(e => {
|
||||
log.error(e);
|
||||
utlis.ipcSend(request.responceChannel, { success: false, error: e });
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on("bsv-get-map-details-by-id", async (event, request: IpcRequest<string>) => {
|
||||
const utlis = UtilsService.getInstance();
|
||||
const bsvService = BeatSaverService.getInstance();
|
||||
|
||||
bsvService.getMapDetailsById(request.args).then(maps => {
|
||||
utlis.ipcSend(request.responceChannel, {success: true, data: maps});
|
||||
}).catch(e => {
|
||||
utlis.ipcSend(request.responceChannel, {success: false, error: e});
|
||||
})
|
||||
bsvService
|
||||
.getMapDetailsById(request.args)
|
||||
.then(maps => {
|
||||
utlis.ipcSend(request.responceChannel, { success: true, data: maps });
|
||||
})
|
||||
.catch(e => {
|
||||
utlis.ipcSend(request.responceChannel, { success: false, error: e });
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on("bsv-get-playlist-details-by-id", async (event, request: IpcRequest<string>) => {
|
||||
const utlis = UtilsService.getInstance();
|
||||
const bsvService = BeatSaverService.getInstance();
|
||||
|
||||
bsvService.getPlaylistPage(request.args).then(maps => {
|
||||
utlis.ipcSend(request.responceChannel, {success: true, data: maps});
|
||||
}).catch(e => {
|
||||
utlis.ipcSend(request.responceChannel, {success: false, error: e});
|
||||
})
|
||||
});
|
||||
bsvService
|
||||
.getPlaylistPage(request.args)
|
||||
.then(maps => {
|
||||
utlis.ipcSend(request.responceChannel, { success: true, data: maps });
|
||||
})
|
||||
.catch(e => {
|
||||
utlis.ipcSend(request.responceChannel, { success: false, error: e });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,70 +1,76 @@
|
||||
import { ipcMain } from 'electron';
|
||||
import { BSInstallerService, DownloadEventType, DownloadInfo } from '../services/bs-installer.service';
|
||||
import { IpcRequest } from 'shared/models/ipc';
|
||||
import { InstallationLocationService } from '../services/installation-location.service';
|
||||
import { UtilsService } from '../services/utils.service';
|
||||
import { BsmException } from 'shared/models/bsm-exception.model';
|
||||
import { LocalMapsManagerService } from '../services/additional-content/local-maps-manager.service';
|
||||
|
||||
import { ipcMain } from "electron";
|
||||
import { BSInstallerService, DownloadEventType, DownloadInfo } from "../services/bs-installer.service";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { InstallationLocationService } from "../services/installation-location.service";
|
||||
import { UtilsService } from "../services/utils.service";
|
||||
import { LocalMapsManagerService } from "../services/additional-content/local-maps-manager.service";
|
||||
import { IpcService } from "../services/ipc.service";
|
||||
import { from } from "rxjs";
|
||||
|
||||
export interface InitDownloadInfoInterface {
|
||||
cwd: string ,
|
||||
folder: string,
|
||||
app: string,
|
||||
depot: string,
|
||||
manifest: string,
|
||||
username: string,
|
||||
stay: boolean
|
||||
cwd: string;
|
||||
folder: string;
|
||||
app: string;
|
||||
depot: string;
|
||||
manifest: string;
|
||||
username: string;
|
||||
stay: boolean;
|
||||
}
|
||||
|
||||
ipcMain.on('is-dotnet-6-installed', async (event, request: IpcRequest<void>) => {
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
ipcMain.on("is-dotnet-6-installed", async (event, request: IpcRequest<void>) => {
|
||||
const installer = BSInstallerService.getInstance();
|
||||
const utils = UtilsService.getInstance();
|
||||
installer.isDotNet6Installed().then(installed => {
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: installed});
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: installed });
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on('bs-download.start', async (event, request: IpcRequest<DownloadInfo>) => {
|
||||
BSInstallerService.getInstance().downloadBsVersion(request.args).then(async res => {
|
||||
await LocalMapsManagerService.getInstance().linkVersionMaps(request.args.bsVersion, true).catch(e => {});
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, {success: true, data: res});
|
||||
}).catch(e => {
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, {success: false, data: e});
|
||||
});
|
||||
ipcMain.on("bs-download.start", async (event, request: IpcRequest<DownloadInfo>) => {
|
||||
BSInstallerService.getInstance()
|
||||
.downloadBsVersion(request.args)
|
||||
.then(async res => {
|
||||
await LocalMapsManagerService.getInstance()
|
||||
.linkVersionMaps(request.args.bsVersion, true)
|
||||
.catch(e => {});
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, { success: true, data: res });
|
||||
})
|
||||
.catch(e => {
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, { success: false, data: e });
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on(`bs-download.${"[2FA]" as DownloadEventType}`, async (event, args: IpcRequest<string>) => {
|
||||
BSInstallerService.getInstance().sendInputProcess(args.args);
|
||||
BSInstallerService.getInstance().sendInputProcess(args.args);
|
||||
});
|
||||
|
||||
ipcMain.on('bs-download.kill', async (event, request: IpcRequest<void>) => {
|
||||
const res = await BSInstallerService.getInstance().killDownloadProcess();
|
||||
if(request.responceChannel){ UtilsService.getInstance().ipcSend(request.responceChannel, {success: res}); }
|
||||
ipcMain.on("bs-download.kill", async (event, request: IpcRequest<void>) => {
|
||||
const res = await BSInstallerService.getInstance().killDownloadProcess();
|
||||
if (request.responceChannel) {
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, { success: res });
|
||||
}
|
||||
});
|
||||
|
||||
ipcMain.on('bs-download.installation-folder', async (event, request: IpcRequest<void>) => {
|
||||
const installationFolder = InstallationLocationService.getInstance().installationDirectory;
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, {success: true, data: installationFolder});
|
||||
ipcMain.on("bs-download.installation-folder", async (event, request: IpcRequest<void>) => {
|
||||
const installationFolder = InstallationLocationService.getInstance().installationDirectory;
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, { success: true, data: installationFolder });
|
||||
});
|
||||
|
||||
ipcMain.on('bs-download.set-installation-folder', (event, request: IpcRequest<string>) => {
|
||||
const installerService = InstallationLocationService.getInstance();
|
||||
installerService.setInstallationDirectory(request.args).then(res => {
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, {success: true, data: res});
|
||||
}).catch((err: BsmException) => {
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, {success: false, error: err});
|
||||
});
|
||||
})
|
||||
ipc.on<string>("bs-download.set-installation-folder", (req, reply) => {
|
||||
const installerService = InstallationLocationService.getInstance();
|
||||
reply(from(installerService.setInstallationDirectory(req.args)));
|
||||
});
|
||||
|
||||
ipcMain.on('bs-download.import-version', (event, request: IpcRequest<string>) => {
|
||||
ipcMain.on("bs-download.import-version", (event, request: IpcRequest<string>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const installer = BSInstallerService.getInstance();
|
||||
installer.importVersion(request.args).catch(e => {
|
||||
utils.ipcSend(request.responceChannel, {success: false, error: e});
|
||||
}).then(() => {
|
||||
utils.ipcSend(request.responceChannel, {success: true});
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
installer
|
||||
.importVersion(request.args)
|
||||
.catch(e => {
|
||||
utils.ipcSend(request.responceChannel, { success: false, error: e });
|
||||
})
|
||||
.then(() => {
|
||||
utils.ipcSend(request.responceChannel, { success: true });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { ipcMain } from 'electron';
|
||||
import { UtilsService } from '../services/utils.service'
|
||||
import { LauchOption } from "shared/models/bs-launch";
|
||||
|
||||
import { LaunchOption } from "shared/models/bs-launch";
|
||||
import { BSLauncherService } from "../services/bs-launcher.service"
|
||||
import { IpcRequest } from 'shared/models/ipc';
|
||||
import { BsmException } from 'shared/models/bsm-exception.model';
|
||||
import { IpcService } from '../services/ipc.service';
|
||||
import { from } from "rxjs";
|
||||
|
||||
ipcMain.on('bs-launch.launch', (event, request: IpcRequest<LauchOption>) => {
|
||||
const launcherService = BSLauncherService.getInstance();
|
||||
const utilsService = UtilsService.getInstance();
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
launcherService.launch(request.args).then(res => {
|
||||
utilsService.ipcSend(request.responceChannel, {success: true, data: res});
|
||||
}).catch((err: BsmException) => {
|
||||
utilsService.ipcSend(request.responceChannel, {success: false, error: err});
|
||||
})
|
||||
ipc.on<LaunchOption>('bs-launch.launch', (req, reply) => {
|
||||
const bsLauncher = BSLauncherService.getInstance();
|
||||
reply(bsLauncher.launch(req.args));
|
||||
});
|
||||
|
||||
ipc.on<LaunchOption>("create-launch-shortcut", (req, reply) => {
|
||||
const bsLauncher = BSLauncherService.getInstance();
|
||||
reply(from(bsLauncher.createLaunchShortcut(req.args)));
|
||||
});
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import { LocalMapsManagerService } from "../services/additional-content/local-maps-manager.service";
|
||||
import { UtilsService } from "../services/utils.service";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
@@ -10,7 +9,7 @@ import { from } from "rxjs";
|
||||
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
ipc.on('load-version-maps', async (request: IpcRequest<BSVersion>, reply) => {
|
||||
ipc.on("load-version-maps", async (request: IpcRequest<BSVersion>, reply) => {
|
||||
const localMaps = LocalMapsManagerService.getInstance();
|
||||
reply(localMaps.getMaps(request.args));
|
||||
});
|
||||
@@ -19,32 +18,33 @@ ipc.on("verion-have-maps-linked", async (request: IpcRequest<BSVersion>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const maps = LocalMapsManagerService.getInstance();
|
||||
|
||||
utils.ipcSend<boolean>(request.responceChannel, {success: true, data: await maps.versionIsLinked(request.args)});
|
||||
|
||||
});
|
||||
|
||||
ipc.on("link-version-maps", async (request: IpcRequest<{version: BSVersion, keepMaps: boolean}>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const maps = LocalMapsManagerService.getInstance();
|
||||
|
||||
maps.linkVersionMaps(request.args.version, request.args.keepMaps).then(() => {
|
||||
utils.ipcSend<void>(request.responceChannel, {success: true});
|
||||
}).catch(err => {
|
||||
utils.ipcSend<void>(request.responceChannel, {success: true, error: err});
|
||||
});
|
||||
|
||||
utils.ipcSend<boolean>(request.responceChannel, { success: true, data: await maps.versionIsLinked(request.args) });
|
||||
});
|
||||
|
||||
ipc.on("unlink-version-maps", async (request: IpcRequest<{version: BSVersion, keepMaps: boolean}>) => {
|
||||
ipc.on("link-version-maps", async (request: IpcRequest<{ version: BSVersion; keepMaps: boolean }>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const maps = LocalMapsManagerService.getInstance();
|
||||
|
||||
maps.unlinkVersionMaps(request.args.version, request.args.keepMaps).then(() => {
|
||||
utils.ipcSend<void>(request.responceChannel, {success: true});
|
||||
}).catch(err => {
|
||||
utils.ipcSend<void>(request.responceChannel, {success: true, error: err});
|
||||
});
|
||||
maps.linkVersionMaps(request.args.version, request.args.keepMaps)
|
||||
.then(() => {
|
||||
utils.ipcSend<void>(request.responceChannel, { success: true });
|
||||
})
|
||||
.catch(err => {
|
||||
utils.ipcSend<void>(request.responceChannel, { success: true, error: err });
|
||||
});
|
||||
});
|
||||
|
||||
ipc.on("unlink-version-maps", async (request: IpcRequest<{ version: BSVersion; keepMaps: boolean }>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const maps = LocalMapsManagerService.getInstance();
|
||||
|
||||
maps.unlinkVersionMaps(request.args.version, request.args.keepMaps)
|
||||
.then(() => {
|
||||
utils.ipcSend<void>(request.responceChannel, { success: true });
|
||||
})
|
||||
.catch(err => {
|
||||
utils.ipcSend<void>(request.responceChannel, { success: true, error: err });
|
||||
});
|
||||
});
|
||||
|
||||
ipc.on("delete-maps", async (request: IpcRequest<BsmLocalMap[]>, reply) => {
|
||||
@@ -52,68 +52,66 @@ ipc.on("delete-maps", async (request: IpcRequest<BsmLocalMap[]>, reply) => {
|
||||
reply(maps.deleteMaps(request.args));
|
||||
});
|
||||
|
||||
ipc.on("export-maps", async (request: IpcRequest<{version: BSVersion, maps: BsmLocalMap[], outPath: string}>, reply) => {
|
||||
ipc.on("export-maps", async (request: IpcRequest<{ version: BSVersion; maps: BsmLocalMap[]; outPath: string }>, reply) => {
|
||||
const maps = LocalMapsManagerService.getInstance();
|
||||
reply(await maps.exportMaps(request.args.version, request.args.maps, request.args.outPath));
|
||||
});
|
||||
|
||||
ipc.on("download-map", async (request: IpcRequest<{map: BsvMapDetail, version: BSVersion}>, reply) => {
|
||||
ipc.on("download-map", async (request: IpcRequest<{ map: BsvMapDetail; version: BSVersion }>, reply) => {
|
||||
const maps = LocalMapsManagerService.getInstance();
|
||||
reply(from(maps.downloadMap(request.args.map, request.args.version)))
|
||||
reply(from(maps.downloadMap(request.args.map, request.args.version)));
|
||||
});
|
||||
|
||||
ipc.on("one-click-install-map", async (request: IpcRequest<BsvMapDetail>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const maps = LocalMapsManagerService.getInstance();
|
||||
|
||||
maps.oneClickDownloadMap(request.args).then(() => {
|
||||
utils.ipcSend(request.responceChannel, {success: true});
|
||||
}).catch(err => {
|
||||
utils.ipcSend(request.responceChannel, {success: false, error: err});
|
||||
});
|
||||
maps.oneClickDownloadMap(request.args)
|
||||
.then(() => {
|
||||
utils.ipcSend(request.responceChannel, { success: true });
|
||||
})
|
||||
.catch(err => {
|
||||
utils.ipcSend(request.responceChannel, { success: false, error: err });
|
||||
});
|
||||
});
|
||||
|
||||
ipc.on("register-maps-deep-link", async (request: IpcRequest<void>) => {
|
||||
|
||||
const maps = LocalMapsManagerService.getInstance();
|
||||
const utils = UtilsService.getInstance();
|
||||
|
||||
try{
|
||||
try {
|
||||
const res = maps.enableDeepLinks();
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: res});
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: res });
|
||||
} catch (e) {
|
||||
utils.ipcSend(request.responceChannel, { success: false });
|
||||
}
|
||||
catch(e){
|
||||
utils.ipcSend(request.responceChannel, {success: false});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
ipc.on("unregister-maps-deep-link", async (request: IpcRequest<void>) => {
|
||||
|
||||
const maps = LocalMapsManagerService.getInstance();
|
||||
const utils = UtilsService.getInstance();
|
||||
|
||||
try{
|
||||
try {
|
||||
const res = maps.disableDeepLinks();
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: res});
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: res });
|
||||
} catch (e) {
|
||||
utils.ipcSend(request.responceChannel, { success: false });
|
||||
}
|
||||
catch(e){
|
||||
utils.ipcSend(request.responceChannel, {success: false});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
ipc.on("is-map-deep-links-enabled", async (request: IpcRequest<void>) => {
|
||||
|
||||
const maps = LocalMapsManagerService.getInstance();
|
||||
const utils = UtilsService.getInstance();
|
||||
|
||||
try{
|
||||
try {
|
||||
const res = maps.isDeepLinksEnabled();
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: res});
|
||||
}
|
||||
catch(e){
|
||||
utils.ipcSend(request.responceChannel, {success: false});
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: res });
|
||||
} catch (e) {
|
||||
utils.ipcSend(request.responceChannel, { success: false });
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
ipc.on("get-version-maps-path", async (req: IpcRequest<BSVersion>, reply) => {
|
||||
const maps = LocalMapsManagerService.getInstance();
|
||||
reply(from(maps.getMapsFolderPath(req.args)));
|
||||
});
|
||||
|
||||
@@ -1,61 +1,82 @@
|
||||
import { ipcMain } from "electron";
|
||||
import { UtilsService } from "../services/utils.service";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { MSModel } from "shared/models/model-saber/model-saber.model";
|
||||
import { MSModel, MSModelType } from "shared/models/models/model-saber.model";
|
||||
import { LocalModelsManagerService } from "../services/additional-content/local-models-manager.service";
|
||||
import { IpcService } from "../services/ipc.service";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { BsmLocalModel } from "shared/models/models/bsm-local-model.interface";
|
||||
import { ModelDownload } from "renderer/services/models-management/models-downloader.service";
|
||||
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
ipcMain.on("one-click-install-model", async (event, request: IpcRequest<MSModel>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const models = LocalModelsManagerService.getInstance();
|
||||
|
||||
models.oneClickDownloadModel(request.args).then(() => {
|
||||
utils.ipcSend(request.responceChannel, {success: true});
|
||||
}).catch(e => {
|
||||
utils.ipcSend(request.responceChannel, {success: false, error: e});
|
||||
})
|
||||
models
|
||||
.oneClickDownloadModel(request.args)
|
||||
.then(() => {
|
||||
utils.ipcSend(request.responceChannel, { success: true });
|
||||
})
|
||||
.catch(e => {
|
||||
utils.ipcSend(request.responceChannel, { success: false, error: e });
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on("register-models-deep-link", async (event, request: IpcRequest<void>) => {
|
||||
|
||||
const maps = LocalModelsManagerService.getInstance();
|
||||
const utils = UtilsService.getInstance();
|
||||
|
||||
try{
|
||||
try {
|
||||
const res = maps.enableDeepLinks();
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: res});
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: res });
|
||||
} catch (e) {
|
||||
utils.ipcSend(request.responceChannel, { success: false });
|
||||
}
|
||||
catch(e){
|
||||
utils.ipcSend(request.responceChannel, {success: false});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
ipcMain.on("unregister-models-deep-link", async (event, request: IpcRequest<void>) => {
|
||||
|
||||
const maps = LocalModelsManagerService.getInstance();
|
||||
const utils = UtilsService.getInstance();
|
||||
|
||||
try{
|
||||
try {
|
||||
const res = maps.disableDeepLinks();
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: res});
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: res });
|
||||
} catch (e) {
|
||||
utils.ipcSend(request.responceChannel, { success: false });
|
||||
}
|
||||
catch(e){
|
||||
utils.ipcSend(request.responceChannel, {success: false});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
ipcMain.on("is-models-deep-links-enabled", async (event, request: IpcRequest<void>) => {
|
||||
|
||||
const maps = LocalModelsManagerService.getInstance();
|
||||
const utils = UtilsService.getInstance();
|
||||
|
||||
try{
|
||||
try {
|
||||
const res = maps.isDeepLinksEnabled();
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: res});
|
||||
}
|
||||
catch(e){
|
||||
utils.ipcSend(request.responceChannel, {success: false});
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: res });
|
||||
} catch (e) {
|
||||
utils.ipcSend(request.responceChannel, { success: false });
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
ipc.on<ModelDownload>("download-model", async (req, reply) => {
|
||||
const models = LocalModelsManagerService.getInstance();
|
||||
reply(models.downloadModel(req.args.model, req.args.version));
|
||||
});
|
||||
|
||||
ipc.on<{ version: BSVersion; type: MSModelType }>("get-version-models", async (req, reply) => {
|
||||
const models = LocalModelsManagerService.getInstance();
|
||||
const res = await models.getModels(req.args.type, req.args.version);
|
||||
reply(res);
|
||||
});
|
||||
|
||||
ipc.on<{ version: BSVersion; models: BsmLocalModel[]; outPath: string }>("export-models", async (req, reply) => {
|
||||
const models = LocalModelsManagerService.getInstance();
|
||||
reply(models.exportModels(req.args.outPath, req.args.version, req.args.models));
|
||||
});
|
||||
|
||||
ipc.on<BsmLocalModel[]>("delete-models", async (req, reply) => {
|
||||
const models = LocalModelsManagerService.getInstance();
|
||||
reply(models.deleteModels(req.args));
|
||||
});
|
||||
|
||||
@@ -6,63 +6,62 @@ import { IpcRequest } from "shared/models/ipc";
|
||||
import { Mod } from "shared/models/mods/mod.interface";
|
||||
import { InstallModsResult } from "shared/models/mods";
|
||||
import log from "electron-log";
|
||||
import { IpcService } from "../services/ipc.service";
|
||||
import { from } from "rxjs";
|
||||
|
||||
ipcMain.on("get-available-mods", (event, request: IpcRequest<BSVersion>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
ipc.on<BSVersion>("get-available-mods", (req, reply) => {
|
||||
const modsManager = BsModsManagerService.getInstance();
|
||||
|
||||
modsManager.getAvailableMods(request.args).then(mods => {
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: mods});
|
||||
}).catch(err =>{
|
||||
utils.ipcSend(request.responceChannel, {success: false});
|
||||
log.error("ipc", "get-available-mods", err, request);
|
||||
});
|
||||
reply(from(modsManager.getAvailableMods(req.args)));
|
||||
});
|
||||
|
||||
ipcMain.on("get-installed-mods", (event, request: IpcRequest<BSVersion>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
ipc.on<BSVersion>("get-installed-mods", (req, reply) => {
|
||||
const modsManager = BsModsManagerService.getInstance();
|
||||
|
||||
modsManager.getInstalledMods(request.args).then(mods => {
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: mods});
|
||||
}).catch(err => {
|
||||
utils.ipcSend(request.responceChannel, {success: false});
|
||||
log.error("ipc", "get-installed-mods", err, request);
|
||||
});
|
||||
reply(from(modsManager.getInstalledMods(req.args)));
|
||||
});
|
||||
|
||||
ipcMain.on("install-mods", (event, request: IpcRequest<{mods: Mod[], version: BSVersion}>) => {
|
||||
ipcMain.on("install-mods", (event, request: IpcRequest<{ mods: Mod[]; version: BSVersion }>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const modsManager = BsModsManagerService.getInstance();
|
||||
|
||||
modsManager.installMods(request.args.mods, request.args.version).then(nbInstalled => {
|
||||
utils.ipcSend<InstallModsResult>(request.responceChannel, {success: true, data: nbInstalled})
|
||||
}).catch(err => {
|
||||
utils.ipcSend(request.responceChannel, {success: false, error: err});
|
||||
log.error("ipc", "install-mods", err, request);
|
||||
})
|
||||
modsManager
|
||||
.installMods(request.args.mods, request.args.version)
|
||||
.then(nbInstalled => {
|
||||
utils.ipcSend<InstallModsResult>(request.responceChannel, { success: true, data: nbInstalled });
|
||||
})
|
||||
.catch(err => {
|
||||
utils.ipcSend(request.responceChannel, { success: false, error: err });
|
||||
log.error("ipc", "install-mods", err, request);
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on("uninstall-mods", (event, request: IpcRequest<{mods: Mod[], version: BSVersion}>) => {
|
||||
ipcMain.on("uninstall-mods", (event, request: IpcRequest<{ mods: Mod[]; version: BSVersion }>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const modsManager = BsModsManagerService.getInstance();
|
||||
|
||||
modsManager.uninstallMods(request.args.mods, request.args.version).then(nbInstalled => {
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: nbInstalled})
|
||||
}).catch(err => {
|
||||
utils.ipcSend(request.responceChannel, {success: false, error: err});
|
||||
log.error("ipc", "uninstall-mods", err, request);
|
||||
})
|
||||
modsManager
|
||||
.uninstallMods(request.args.mods, request.args.version)
|
||||
.then(nbInstalled => {
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: nbInstalled });
|
||||
})
|
||||
.catch(err => {
|
||||
utils.ipcSend(request.responceChannel, { success: false, error: err });
|
||||
log.error("ipc", "uninstall-mods", err, request);
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on("uninstall-all-mods", (event, request: IpcRequest<BSVersion>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const modsManager = BsModsManagerService.getInstance();
|
||||
|
||||
modsManager.uninstallAllMods(request.args).then(nbInstalled => {
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: nbInstalled})
|
||||
}).catch(err => {
|
||||
utils.ipcSend(request.responceChannel, {success: false, error: err});
|
||||
log.error("ipc", "uninstall-all-mods", err, request);
|
||||
})
|
||||
});
|
||||
modsManager
|
||||
.uninstallAllMods(request.args)
|
||||
.then(nbInstalled => {
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: nbInstalled });
|
||||
})
|
||||
.catch(err => {
|
||||
utils.ipcSend(request.responceChannel, { success: false, error: err });
|
||||
log.error("ipc", "uninstall-all-mods", err, request);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -4,58 +4,51 @@ import { LocalPlaylistsManagerService } from "../services/additional-content/loc
|
||||
import { UtilsService } from "../services/utils.service";
|
||||
|
||||
ipcMain.on("one-click-install-playlist", async (event, request: IpcRequest<string>) => {
|
||||
|
||||
const utils = UtilsService.getInstance();
|
||||
const playlists = LocalPlaylistsManagerService.getInstance();
|
||||
|
||||
playlists.oneClickInstallPlaylist(request.args).then(() => {
|
||||
utils.ipcSend(request.responceChannel, {success: true});
|
||||
}).catch(e => {
|
||||
utils.ipcSend(request.responceChannel, {success: false, error: e});
|
||||
});
|
||||
playlists
|
||||
.oneClickInstallPlaylist(request.args)
|
||||
.then(() => {
|
||||
utils.ipcSend(request.responceChannel, { success: true });
|
||||
})
|
||||
.catch(e => {
|
||||
utils.ipcSend(request.responceChannel, { success: false, error: e });
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on("register-playlists-deep-link", async (event, request: IpcRequest<void>) => {
|
||||
|
||||
const maps = LocalPlaylistsManagerService.getInstance();
|
||||
const utils = UtilsService.getInstance();
|
||||
|
||||
try{
|
||||
try {
|
||||
const res = maps.enableDeepLinks();
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: res});
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: res });
|
||||
} catch (e) {
|
||||
utils.ipcSend(request.responceChannel, { success: false });
|
||||
}
|
||||
catch(e){
|
||||
utils.ipcSend(request.responceChannel, {success: false});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
ipcMain.on("unregister-playlists-deep-link", async (event, request: IpcRequest<void>) => {
|
||||
|
||||
const maps = LocalPlaylistsManagerService.getInstance();
|
||||
const utils = UtilsService.getInstance();
|
||||
|
||||
try{
|
||||
try {
|
||||
const res = maps.disableDeepLinks();
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: res});
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: res });
|
||||
} catch (e) {
|
||||
utils.ipcSend(request.responceChannel, { success: false });
|
||||
}
|
||||
catch(e){
|
||||
utils.ipcSend(request.responceChannel, {success: false});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
ipcMain.on("is-playlists-deep-links-enabled", async (event, request: IpcRequest<void>) => {
|
||||
|
||||
const maps = LocalPlaylistsManagerService.getInstance();
|
||||
const utils = UtilsService.getInstance();
|
||||
|
||||
try{
|
||||
try {
|
||||
const res = maps.isDeepLinksEnabled();
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: res});
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: res });
|
||||
} catch (e) {
|
||||
utils.ipcSend(request.responceChannel, { success: false });
|
||||
}
|
||||
catch(e){
|
||||
utils.ipcSend(request.responceChannel, {success: false});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import { ipcMain } from "electron";
|
||||
import { BSVersion } from 'shared/bs-version.interface';
|
||||
import { UtilsService } from "../services/utils.service";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { BSLocalVersionService } from "../services/bs-local-version.service";
|
||||
import { IpcService } from "../services/ipc.service";
|
||||
import { from } from "rxjs";
|
||||
|
||||
ipcMain.on('bs.uninstall', async (event, request: IpcRequest<BSVersion>) => {
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
ipc.on<BSVersion>("bs.uninstall", (req, reply) => {
|
||||
const bsLocalVersionService = BSLocalVersionService.getInstance();
|
||||
const utilsService = UtilsService.getInstance();
|
||||
|
||||
if(!request.args){ utilsService.ipcSend(request.responceChannel, {success: false}); }
|
||||
|
||||
const res = await bsLocalVersionService.deleteVersion(request.args);
|
||||
utilsService.ipcSend(request.responceChannel, {success: res});
|
||||
});
|
||||
reply(from(bsLocalVersionService.deleteVersion(req.args)));
|
||||
});
|
||||
|
||||
@@ -1,46 +1,173 @@
|
||||
import { ipcMain } from 'electron';
|
||||
import { UtilsService } from '../services/utils.service';
|
||||
import { BSVersionLibService } from '../services/bs-version-lib.service'
|
||||
import { BSVersion } from 'shared/bs-version.interface';
|
||||
import { exec } from 'child_process';
|
||||
import { IpcRequest } from 'shared/models/ipc';
|
||||
import { BSLocalVersionService } from '../services/bs-local-version.service';
|
||||
import { BsmException } from 'shared/models/bsm-exception.model';
|
||||
import { ipcMain, shell } from "electron";
|
||||
import { UtilsService } from "../services/utils.service";
|
||||
import { BSVersionLibService } from "../services/bs-version-lib.service";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { BSLocalVersionService } from "../services/bs-local-version.service";
|
||||
import { BsmException } from "shared/models/bsm-exception.model";
|
||||
import { IpcService } from "../services/ipc.service";
|
||||
import { from } from "rxjs";
|
||||
import path from "path";
|
||||
import { pathExist } from "../helpers/fs.helpers";
|
||||
import { FolderLinkerService, LinkOptions } from "../services/folder-linker.service";
|
||||
import { LocalMapsManagerService } from "../services/additional-content/local-maps-manager.service";
|
||||
import { readJSON, writeJSON } from "fs-extra";
|
||||
import log from "electron-log";
|
||||
import { VersionLinkerAction } from "renderer/services/version-folder-linker.service";
|
||||
import { VersionFolderLinkerService } from "../services/version-folder-linker.service";
|
||||
|
||||
ipcMain.on('bs-version.get-version-dict', (event, req: IpcRequest<void>) => {
|
||||
BSVersionLibService.getInstance().getAvailableVersions().then(versions => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, {success: true, data: versions});
|
||||
}).catch(() => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, {success: false});
|
||||
})
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
ipcMain.on("bs-version.get-version-dict", (_event, req: IpcRequest<void>) => {
|
||||
BSVersionLibService.getInstance()
|
||||
.getAvailableVersions()
|
||||
.then(versions => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, { success: true, data: versions });
|
||||
})
|
||||
.catch(() => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, { success: false });
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on('bs-version.installed-versions', async (event, req: IpcRequest<void>) => {
|
||||
BSLocalVersionService.getInstance().getInstalledVersions().then(versions => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, {success: true, data: versions});
|
||||
}).catch(() => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, {success: false});
|
||||
})
|
||||
ipcMain.on("bs-version.installed-versions", async (_event, req: IpcRequest<void>) => {
|
||||
BSLocalVersionService.getInstance()
|
||||
.getInstalledVersions()
|
||||
.then(versions => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, { success: true, data: versions });
|
||||
})
|
||||
.catch(() => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, { success: false });
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on("bs-version.open-folder", async (event, req: IpcRequest<BSVersion>) => {
|
||||
const localVersionService = BSLocalVersionService.getInstance();
|
||||
const versionFolder = await localVersionService.getVersionPath(req.args);
|
||||
UtilsService.getInstance().pathExist(versionFolder) && exec(`start "" "${versionFolder}"`);
|
||||
ipcMain.on("bs-version.open-folder", async (_event, req: IpcRequest<BSVersion>) => {
|
||||
const localVersionService = BSLocalVersionService.getInstance();
|
||||
const versionFolder = await localVersionService.getVersionPath(req.args);
|
||||
if (!(await pathExist(versionFolder))) return;
|
||||
shell.openPath(versionFolder);
|
||||
});
|
||||
|
||||
ipcMain.on("bs-version.edit", async (event, req: IpcRequest<{version: BSVersion, name: string, color: string}>) => {
|
||||
BSLocalVersionService.getInstance().editVersion(req.args.version, req.args.name, req.args.color).then(res => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, {success: !!res, data: res});
|
||||
}).catch((error: BsmException) => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, {success: false, error});
|
||||
});
|
||||
ipcMain.on("bs-version.edit", async (__event, req: IpcRequest<{ version: BSVersion; name: string; color: string }>) => {
|
||||
BSLocalVersionService.getInstance()
|
||||
.editVersion(req.args.version, req.args.name, req.args.color)
|
||||
.then(res => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, { success: !!res, data: res });
|
||||
})
|
||||
.catch((error: BsmException) => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, { success: false, error });
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on("bs-version.clone", async (event, req: IpcRequest<{version: BSVersion, name: string, color: string}>) => {
|
||||
BSLocalVersionService.getInstance().cloneVersion(req.args.version, req.args.name, req.args.color).then(res => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, {success: !!res, data: res});
|
||||
}).catch((error: BsmException) => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, {success: false, error});
|
||||
});
|
||||
ipcMain.on("bs-version.clone", async (_event, req: IpcRequest<{ version: BSVersion; name: string; color: string }>) => {
|
||||
BSLocalVersionService.getInstance()
|
||||
.cloneVersion(req.args.version, req.args.name, req.args.color)
|
||||
.then(res => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, { success: !!res, data: res });
|
||||
})
|
||||
.catch((error: BsmException) => {
|
||||
UtilsService.getInstance().ipcSend(req.responceChannel, { success: false, error });
|
||||
});
|
||||
});
|
||||
|
||||
ipc.on("get-version-full-path", async (req: IpcRequest<BSVersion>, reply) => {
|
||||
const localVersions = BSLocalVersionService.getInstance();
|
||||
reply(from(localVersions.getVersionPath(req.args)));
|
||||
});
|
||||
|
||||
ipc.on("relative-version-path-to-full", async (req: IpcRequest<{ version: BSVersion; relative: string }>, reply) => {
|
||||
path.isAbsolute(req.args.relative) && reply(from(Promise.resolve(req.args.relative)));
|
||||
|
||||
const localVersions = BSLocalVersionService.getInstance();
|
||||
const promise = localVersions
|
||||
.getVersionPath(req.args.version)
|
||||
.catch(() => null)
|
||||
.then(versionPath => {
|
||||
return path.join(versionPath, req.args.relative);
|
||||
});
|
||||
reply(from(promise));
|
||||
});
|
||||
|
||||
ipc.on("full-version-path-to-relative", async (req: IpcRequest<{ version: BSVersion; fullPath: string }>, reply) => {
|
||||
const localVersions = BSLocalVersionService.getInstance();
|
||||
const promise = localVersions
|
||||
.getVersionPath(req.args.version)
|
||||
.catch(() => null)
|
||||
.then(versionPath => {
|
||||
return path.relative(versionPath, req.args.fullPath);
|
||||
});
|
||||
reply(from(promise));
|
||||
});
|
||||
|
||||
ipc.on("get-linked-folders", async (req: IpcRequest<{ version: BSVersion; options?: { relative?: boolean } }>, reply) => {
|
||||
const versionLinker = VersionFolderLinkerService.getInstance();
|
||||
reply(from(versionLinker.getLinkedFolders(req.args.version, req.args.options)));
|
||||
});
|
||||
|
||||
ipc.on("link-folder", async (req: IpcRequest<{ folder: string; options?: LinkOptions }>, reply) => {
|
||||
req.args.options ??= {};
|
||||
|
||||
const linker = FolderLinkerService.getInstance();
|
||||
|
||||
const relativeMapsFolder = path.join(LocalMapsManagerService.LEVELS_ROOT_FOLDER, LocalMapsManagerService.CUSTOM_LEVELS_FOLDER);
|
||||
|
||||
if (req.args.folder.includes(relativeMapsFolder)) {
|
||||
return reply(from(linker.linkFolder(req.args.folder, { keepContents: req.args.options?.keepContents, intermediateFolder: LocalMapsManagerService.SHARED_MAPS_FOLDER })));
|
||||
}
|
||||
|
||||
if (req.args.folder.includes("UserData")) {
|
||||
req.args.options = { ...req.args.options, backup: true };
|
||||
}
|
||||
|
||||
const res = from(linker.linkFolder(req.args.folder, req.args.options));
|
||||
|
||||
const jsonIPAPath = path.join(req.args.folder, "Beat Saber IPA.json");
|
||||
|
||||
if (!(await pathExist(jsonIPAPath))) {
|
||||
return reply(res);
|
||||
}
|
||||
|
||||
await res.toPromise();
|
||||
|
||||
try {
|
||||
const ipaData = (await readJSON(jsonIPAPath)) ?? ({} as any);
|
||||
ipaData.YeetMods = false;
|
||||
await writeJSON(jsonIPAPath, ipaData, { spaces: 4 });
|
||||
} catch (e) {
|
||||
log.error("Disable YeetMods", e);
|
||||
}
|
||||
|
||||
reply(res);
|
||||
});
|
||||
|
||||
ipc.on("link-version-folder-action", async (req: IpcRequest<VersionLinkerAction>, reply) => {
|
||||
const versionLinker = VersionFolderLinkerService.getInstance();
|
||||
reply(from(versionLinker.doAction(req.args)));
|
||||
});
|
||||
|
||||
ipc.on("is-version-folder-linked", async (req: IpcRequest<{ version: BSVersion; relativeFolder: string }>, reply) => {
|
||||
const versionLinker = VersionFolderLinkerService.getInstance();
|
||||
reply(from(versionLinker.isFolderLinked(req.args.version, req.args.relativeFolder)));
|
||||
});
|
||||
|
||||
ipc.on("unlink-folder", async (req: IpcRequest<{ folder: string; options?: LinkOptions }>, reply) => {
|
||||
req.args.options ??= {};
|
||||
|
||||
const linker = FolderLinkerService.getInstance();
|
||||
|
||||
const relativeMapsFolder = path.join(LocalMapsManagerService.LEVELS_ROOT_FOLDER, LocalMapsManagerService.CUSTOM_LEVELS_FOLDER);
|
||||
|
||||
if (req.args.folder.includes(relativeMapsFolder)) {
|
||||
return reply(from(linker.unlinkFolder(req.args.folder, { ...req.args.options, intermediateFolder: LocalMapsManagerService.SHARED_MAPS_FOLDER })));
|
||||
}
|
||||
|
||||
if (req.args.folder.includes("UserData")) {
|
||||
req.args.options = { ...req.args.options, backup: true };
|
||||
}
|
||||
|
||||
reply(from(linker.unlinkFolder(req.args.folder, req.args.options)));
|
||||
});
|
||||
|
||||
ipc.on("relink-all-versions-folders", async (req: IpcRequest<void>, reply) => {
|
||||
const versionLinker = VersionFolderLinkerService.getInstance();
|
||||
reply(from(versionLinker.relinkAllVersionsFolders()));
|
||||
});
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import './bs-download-ipcs';
|
||||
import './os-controls-ipcs';
|
||||
import './bs-launcher-ipcs';
|
||||
import './bs-version-ipcs';
|
||||
import './bs-uninstall-ipcs';
|
||||
import './supporters-ipcs';
|
||||
import './launcher-ipcs';
|
||||
import './window-manager-ipcs';
|
||||
import './bs-mods-ipcs';
|
||||
import './bs-maps-ipcs';
|
||||
import './beat-saver-ipcs';
|
||||
import './bs-playlist-ipcs';
|
||||
import './model-saber.ipcs';
|
||||
import './bs-model-ipcs';
|
||||
import "./bs-download-ipcs";
|
||||
import "./os-controls-ipcs";
|
||||
import "./bs-launcher-ipcs";
|
||||
import "./bs-version-ipcs";
|
||||
import "./bs-uninstall-ipcs";
|
||||
import "./supporters-ipcs";
|
||||
import "./launcher-ipcs";
|
||||
import "./window-manager-ipcs";
|
||||
import "./bs-mods-ipcs";
|
||||
import "./bs-maps-ipcs";
|
||||
import "./beat-saver-ipcs";
|
||||
import "./bs-playlist-ipcs";
|
||||
import "./model-saber.ipcs";
|
||||
import "./bs-model-ipcs";
|
||||
|
||||
@@ -2,30 +2,27 @@ import { ipcMain } from "electron";
|
||||
import { AutoUpdaterService } from "../services/auto-updater.service";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { UtilsService } from "../services/utils.service";
|
||||
import { IpcService } from "../services/ipc.service";
|
||||
import { from } from "rxjs";
|
||||
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
ipcMain.on("download-update", async (event, request: IpcRequest<void>) => {
|
||||
|
||||
const updaterService = AutoUpdaterService.getInstance();
|
||||
const utilsService = UtilsService.getInstance();
|
||||
|
||||
updaterService.downloadUpdate().then(res => utilsService.ipcSend(request.responceChannel, {success: res}))
|
||||
.catch(() => utilsService.ipcSend(request.responceChannel, {success: false}));
|
||||
|
||||
updaterService
|
||||
.downloadUpdate()
|
||||
.then(res => utilsService.ipcSend(request.responceChannel, { success: res }))
|
||||
.catch(() => utilsService.ipcSend(request.responceChannel, { success: false }));
|
||||
});
|
||||
|
||||
ipcMain.on("check-update", async (event, request: IpcRequest<void>) => {
|
||||
|
||||
ipc.on("check-update", (_, reply) => {
|
||||
const updaterService = AutoUpdaterService.getInstance();
|
||||
const utilsService = UtilsService.getInstance();
|
||||
|
||||
updaterService.isUpdateAvailable().then(updateAvailable => {
|
||||
utilsService.ipcSend(request.responceChannel, {success: true, data: updateAvailable});
|
||||
})
|
||||
.catch(() => utilsService.ipcSend(request.responceChannel, {success: false}));
|
||||
|
||||
reply(from(updaterService.isUpdateAvailable()));
|
||||
});
|
||||
|
||||
ipcMain.on("install-update", async (event, request: IpcRequest<void>) => {
|
||||
const updaterService = AutoUpdaterService.getInstance();
|
||||
updaterService.quitAndInstall();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,14 +2,25 @@ import { ipcMain } from "electron";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { ModelSaberService } from "../services/thrid-party/model-saber/model-saber.service";
|
||||
import { UtilsService } from "../services/utils.service";
|
||||
import { IpcService } from "../services/ipc.service";
|
||||
import { MSGetQuery } from "shared/models/models/model-saber.model";
|
||||
|
||||
ipcMain.on("ms-get-model-by-id", async (event, request: IpcRequest<string|number>) => {
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
ipcMain.on("ms-get-model-by-id", async (event, request: IpcRequest<string | number>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const ms = ModelSaberService.getInstance();
|
||||
|
||||
ms.getModelById(request.args).then(model => {
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: model});
|
||||
}).catch(e => {
|
||||
utils.ipcSend(request.responceChannel, {success: false, error: e});
|
||||
})
|
||||
});
|
||||
ms.getModelById(request.args)
|
||||
.then(model => {
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: model });
|
||||
})
|
||||
.catch(e => {
|
||||
utils.ipcSend(request.responceChannel, { success: false, error: e });
|
||||
});
|
||||
});
|
||||
|
||||
ipc.on<MSGetQuery>("search-models", async (req, reply) => {
|
||||
const ms = ModelSaberService.getInstance();
|
||||
reply(ms.searchModels(req.args));
|
||||
});
|
||||
|
||||
@@ -1,41 +1,37 @@
|
||||
import { ipcMain, shell, dialog, app } from 'electron';
|
||||
import { UtilsService } from '../services/utils.service';
|
||||
import { IpcRequest } from 'shared/models/ipc';
|
||||
import { SystemNotificationOptions } from 'shared/models/notification/system-notification.model';
|
||||
import { NotificationService } from '../services/notification.service';
|
||||
import { SteamService } from '../services/steam.service';
|
||||
|
||||
import { ipcMain, shell, dialog, app } from "electron";
|
||||
import { UtilsService } from "../services/utils.service";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { SystemNotificationOptions } from "shared/models/notification/system-notification.model";
|
||||
import { NotificationService } from "../services/notification.service";
|
||||
import { SteamService } from "../services/steam.service";
|
||||
import { IpcService } from "../services/ipc.service";
|
||||
import { from, of } from "rxjs";
|
||||
|
||||
// TODO IMPROVE WINDOW CONTROL BY USING WINDOW SERVICE
|
||||
|
||||
ipcMain.on('window.close', async () => {
|
||||
const utils = UtilsService.getInstance();
|
||||
utils.getMainWindows("index.html")?.close();
|
||||
});
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
ipcMain.on('window.maximize', async () => {
|
||||
ipcMain.on("window.maximize", async () => {
|
||||
const utils = UtilsService.getInstance();
|
||||
utils.getMainWindows("index.html")?.maximize();
|
||||
});
|
||||
|
||||
ipcMain.on('window.minimize', async () => {
|
||||
ipcMain.on("window.minimize", async () => {
|
||||
const utils = UtilsService.getInstance();
|
||||
utils.getMainWindows("index.html")?.minimize();
|
||||
});
|
||||
|
||||
ipcMain.on('window.reset', async () => {
|
||||
ipcMain.on("window.reset", async () => {
|
||||
const utils = UtilsService.getInstance();
|
||||
utils.getMainWindows("index.html")?.restore();
|
||||
});
|
||||
|
||||
ipcMain.on('new-window', async (event, request: IpcRequest<string>) => {
|
||||
ipcMain.on("new-window", async (event, request: IpcRequest<string>) => {
|
||||
shell.openExternal(request.args);
|
||||
});
|
||||
|
||||
ipcMain.on('choose-folder', async (event, request: IpcRequest<void>) => {
|
||||
dialog.showOpenDialog({properties: ['openDirectory'],}).then(res => {
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, {success: true, data: res});
|
||||
});
|
||||
ipc.on<string>("choose-folder", async (req, reply) => {
|
||||
reply(from(dialog.showOpenDialog({ properties: ["openDirectory"], defaultPath: req.args ?? "" })));
|
||||
});
|
||||
|
||||
ipcMain.on("window.progression", async (event, request: IpcRequest<number>) => {
|
||||
@@ -43,16 +39,18 @@ ipcMain.on("window.progression", async (event, request: IpcRequest<number>) => {
|
||||
utils.getMainWindows("index.html")?.setProgressBar(request.args / 100);
|
||||
});
|
||||
|
||||
ipcMain.on('save-file', async (event, request: IpcRequest<{filename?: string, filters?: Electron.FileFilter[]}>) => {
|
||||
dialog.showSaveDialog({properties: ['showOverwriteConfirmation'], defaultPath: request.args.filename, filters: request.args.filters}).then(res => {
|
||||
ipcMain.on("save-file", async (event, request: IpcRequest<{ filename?: string; filters?: Electron.FileFilter[] }>) => {
|
||||
dialog.showSaveDialog({ properties: ["showOverwriteConfirmation"], defaultPath: request.args.filename, filters: request.args.filters }).then(res => {
|
||||
const utils = UtilsService.getInstance();
|
||||
if(res.canceled || !res.filePath){ utils.ipcSend(request.responceChannel, {success: false}); }
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, {success: true, data: res.filePath});
|
||||
})
|
||||
if (res.canceled || !res.filePath) {
|
||||
utils.ipcSend(request.responceChannel, { success: false });
|
||||
}
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, { success: true, data: res.filePath });
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on("current-version", async (event, request: IpcRequest<void>) => {
|
||||
UtilsService.getInstance().ipcSend(request.responceChannel, {success: true, data: app.getVersion()});
|
||||
ipc.on("current-version", (_, reply) => {
|
||||
reply(of(app.getVersion()));
|
||||
});
|
||||
|
||||
ipcMain.on("open-logs", async (event, request: IpcRequest<void>) => {
|
||||
@@ -60,15 +58,18 @@ ipcMain.on("open-logs", async (event, request: IpcRequest<void>) => {
|
||||
});
|
||||
|
||||
ipcMain.on("notify-system", async (event, request: IpcRequest<SystemNotificationOptions>) => {
|
||||
NotificationService.getInstance().notify(request.args)
|
||||
NotificationService.getInstance().notify(request.args);
|
||||
});
|
||||
|
||||
ipcMain.on("open-steam", async (event, request: IpcRequest<void>) => {
|
||||
const steam = SteamService.getInstance();
|
||||
const utils = UtilsService.getInstance();
|
||||
steam.openSteam().then(res => {
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: res});
|
||||
}).catch((e) => {
|
||||
utils.ipcSend(request.responceChannel, {success: false, error: e});
|
||||
});
|
||||
});
|
||||
steam
|
||||
.openSteam()
|
||||
.then(res => {
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: res });
|
||||
})
|
||||
.catch(e => {
|
||||
utils.ipcSend(request.responceChannel, { success: false, error: e });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
import { ipcMain } from "electron";
|
||||
import { SupportersService } from "../services/supporters.service";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { UtilsService } from '../services/utils.service';
|
||||
import { UtilsService } from "../services/utils.service";
|
||||
|
||||
ipcMain.on("get-supporters", (event, request: IpcRequest<void>) => {
|
||||
const utils = UtilsService.getInstance();
|
||||
const supportersService = SupportersService.getInstance();
|
||||
|
||||
supportersService.getSupporters().then(supporters => {
|
||||
utils.ipcSend(request.responceChannel, {success: true, data: supporters});
|
||||
}).catch(() => {
|
||||
utils.ipcSend(request.responceChannel, {success: false});
|
||||
});
|
||||
});
|
||||
supportersService
|
||||
.getSupporters()
|
||||
.then(supporters => {
|
||||
utils.ipcSend(request.responceChannel, { success: true, data: supporters });
|
||||
})
|
||||
.catch(() => {
|
||||
utils.ipcSend(request.responceChannel, { success: false });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,22 +1,35 @@
|
||||
import { ipcMain } from "electron";
|
||||
import { WindowManagerService } from "../services/window-manager.service";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { AppWindow } from "shared/models/window-manager/app-window.model";
|
||||
import { BSLauncherService } from "../services/bs-launcher.service";
|
||||
import { IpcService } from "../services/ipc.service";
|
||||
import { from, of } from "rxjs";
|
||||
|
||||
ipcMain.on("open-window-then-close-all", async (event, request: IpcRequest<AppWindow>) => {
|
||||
const launcher = BSLauncherService.getInstance();
|
||||
const ipc = IpcService.getInstance();
|
||||
|
||||
ipc.on<AppWindow>("open-window-then-close-all", (req, reply) => {
|
||||
const windowManager = WindowManagerService.getInstance();
|
||||
|
||||
windowManager.openWindow(request.args).then(window => {
|
||||
windowManager.closeAllWindows(request.args);
|
||||
const res = windowManager.openWindow(req.args).then(() => {
|
||||
windowManager.closeAllWindows(req.args);
|
||||
});
|
||||
|
||||
reply(from(res));
|
||||
});
|
||||
|
||||
ipcMain.on("close-all-windows", async (event, request: IpcRequest<AppWindow>) => {
|
||||
ipc.on<AppWindow>("close-all-windows", async (req, reply) => {
|
||||
await launcher.restoreSteamVR();
|
||||
const windowManager = WindowManagerService.getInstance();
|
||||
windowManager.closeAllWindows(request.args);
|
||||
reply(of(windowManager.closeAllWindows(req.args)));
|
||||
});
|
||||
|
||||
ipcMain.on("close-windows", async (event, request: IpcRequest<AppWindow[]>) => {
|
||||
ipc.on<AppWindow[]>("close-windows", async (req, reply) => {
|
||||
await launcher.restoreSteamVR();
|
||||
const windowManager = WindowManagerService.getInstance();
|
||||
windowManager.close(...request.args);
|
||||
});
|
||||
reply(of(windowManager.close(...req.args)));
|
||||
});
|
||||
|
||||
ipc.on<AppWindow>("open-window-or-focus", (req, reply) => {
|
||||
const windowManager = WindowManagerService.getInstance();
|
||||
reply(from(windowManager.openWindowOrFocus(req.args)));
|
||||
});
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint global-require: off, no-console: off, promise/always-return: off */
|
||||
|
||||
/**
|
||||
* This module executes inside of electron's main process. You can start
|
||||
* electron renderer process from here and communicate with the other processes
|
||||
@@ -8,51 +6,56 @@
|
||||
* When running `npm run build` or `npm run build:main`, this file is compiled to
|
||||
* `./src/main.js` using webpack. This gives us some performance wins.
|
||||
*/
|
||||
import path from 'path';
|
||||
import { app, protocol } from 'electron';
|
||||
import log from 'electron-log';
|
||||
import './ipcs';
|
||||
import { UtilsService } from './services/utils.service';
|
||||
import { WindowManagerService } from './services/window-manager.service';
|
||||
import { DeepLinkService } from './services/deep-link.service';
|
||||
import { AppWindow } from 'shared/models/window-manager/app-window.model';
|
||||
import { LocalMapsManagerService } from './services/additional-content/local-maps-manager.service';
|
||||
import { LocalPlaylistsManagerService } from './services/additional-content/local-playlists-manager.service';
|
||||
import { LocalModelsManagerService } from './services/additional-content/local-models-manager.service';
|
||||
import { APP_NAME } from './constants';
|
||||
import path from "path";
|
||||
import { app, ipcMain } from "electron";
|
||||
import log from "electron-log";
|
||||
import "./ipcs";
|
||||
import { WindowManagerService } from "./services/window-manager.service";
|
||||
import { DeepLinkService } from "./services/deep-link.service";
|
||||
import { AppWindow } from "shared/models/window-manager/app-window.model";
|
||||
import { LocalMapsManagerService } from "./services/additional-content/local-maps-manager.service";
|
||||
import { LocalPlaylistsManagerService } from "./services/additional-content/local-playlists-manager.service";
|
||||
import { LocalModelsManagerService } from "./services/additional-content/local-models-manager.service";
|
||||
import { APP_NAME } from "./constants";
|
||||
import { BSLauncherService } from "./services/bs-launcher.service";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
|
||||
const isDebug = process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true';
|
||||
const isDebug = process.env.NODE_ENV === "development" || process.env.DEBUG_PROD === "true";
|
||||
|
||||
log.transports.file.level = 'info';
|
||||
log.transports.file.resolvePath = (() => {
|
||||
log.transports.file.level = "info";
|
||||
log.transports.file.resolvePath = () => {
|
||||
const now = new Date();
|
||||
return path.join(app.getPath("logs"), `${now.getFullYear()}-${now.getMonth()+1}-${now.getDate()}-v${app.getVersion()}.log`);
|
||||
});
|
||||
return path.join(app.getPath("logs"), `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}-v${app.getVersion()}.log`);
|
||||
};
|
||||
|
||||
log.catchErrors();
|
||||
|
||||
const utilsService = UtilsService.getInstance();
|
||||
utilsService.setAssetsPath(app.isPackaged ? path.join(process.resourcesPath, 'assets') : path.join(__dirname, '../../assets'));
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
const sourceMapSupport = require('source-map-support');
|
||||
sourceMapSupport.install();
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
const sourceMapSupport = require("source-map-support");
|
||||
sourceMapSupport.install();
|
||||
}
|
||||
|
||||
if (isDebug) {
|
||||
require('electron-debug')();
|
||||
require("electron-debug")();
|
||||
}
|
||||
|
||||
const installExtensions = async () => {
|
||||
const installer = require('electron-devtools-installer');
|
||||
const installer = require("electron-devtools-installer");
|
||||
const forceDownload = !!process.env.UPGRADE_EXTENSIONS;
|
||||
const extensions = ['REACT_DEVELOPER_TOOLS'];
|
||||
const extensions = ["REACT_DEVELOPER_TOOLS"];
|
||||
|
||||
return installer.default(extensions.map((name) => installer[name]), forceDownload).catch(console.log);
|
||||
return installer
|
||||
.default(
|
||||
extensions.map(name => installer[name]),
|
||||
forceDownload
|
||||
)
|
||||
.catch(log.error);
|
||||
};
|
||||
|
||||
const createWindow = async (window: AppWindow = "launcher.html") => {
|
||||
if(isDebug){ await installExtensions(); }
|
||||
if (isDebug) {
|
||||
await installExtensions();
|
||||
}
|
||||
WindowManagerService.getInstance().openWindow(window);
|
||||
};
|
||||
|
||||
@@ -60,53 +63,45 @@ const initServicesMustBeInitialized = () => {
|
||||
LocalMapsManagerService.getInstance();
|
||||
LocalPlaylistsManagerService.getInstance();
|
||||
LocalModelsManagerService.getInstance();
|
||||
// Model
|
||||
}
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
// Respect the OSX convention of having the application in memory even
|
||||
// after all windows have been closed
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
BSLauncherService.getInstance();
|
||||
}
|
||||
|
||||
const gotTheLock = app.requestSingleInstanceLock();
|
||||
|
||||
if(!gotTheLock){
|
||||
if (!gotTheLock) {
|
||||
app.quit();
|
||||
}
|
||||
else{
|
||||
|
||||
app.on('second-instance', (e, argv) => {
|
||||
|
||||
} else {
|
||||
app.on("second-instance", (_, argv) => {
|
||||
const deepLink = argv.find(arg => DeepLinkService.getInstance().isDeepLink(arg));
|
||||
|
||||
if(!deepLink){ return; }
|
||||
if (!deepLink) {
|
||||
return;
|
||||
}
|
||||
|
||||
DeepLinkService.getInstance().dispatchLinkOpened(deepLink);
|
||||
|
||||
});
|
||||
|
||||
app.whenReady().then(() => {
|
||||
|
||||
|
||||
app.setAppUserModelId(APP_NAME);
|
||||
|
||||
initServicesMustBeInitialized();
|
||||
|
||||
const deepLink = process.argv.find(arg => DeepLinkService.getInstance().isDeepLink(arg));
|
||||
|
||||
if(!deepLink){
|
||||
if (!deepLink) {
|
||||
createWindow();
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
DeepLinkService.getInstance().dispatchLinkOpened(deepLink);
|
||||
}
|
||||
|
||||
protocol.registerFileProtocol('file', (request, callback) => {
|
||||
const pathname = decodeURI(request.url.replace('file:///', ''));
|
||||
callback(pathname);
|
||||
|
||||
BSLauncherService.getInstance().restoreSteamVR();
|
||||
|
||||
// Log renderer errors
|
||||
ipcMain.on("log-error", (_, args: IpcRequest<unknown>) => {
|
||||
log.error(args?.args);
|
||||
});
|
||||
|
||||
|
||||
}).catch(log.error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,68 +2,65 @@ import archiver from "archiver";
|
||||
import { createWriteStream } from "fs";
|
||||
import { Observable } from "rxjs";
|
||||
import recursive from "recursive-readdir";
|
||||
import { lstatSync } from "fs";
|
||||
import * as _path from "path";
|
||||
import { ArchiveProgress } from "shared/models/archive.interface";
|
||||
|
||||
export class Archive{
|
||||
import { Progression } from "main/helpers/fs.helpers";
|
||||
|
||||
export class Archive {
|
||||
private archive: archiver.Archiver;
|
||||
private readonly output: string;
|
||||
|
||||
private readonly directories: string[] = [];
|
||||
private readonly files: string[] = [];
|
||||
|
||||
constructor(output: string, options?: archiver.ArchiverOptions){
|
||||
constructor(output: string, options?: archiver.ArchiverOptions) {
|
||||
this.output = output;
|
||||
this.initArchive(options);
|
||||
}
|
||||
|
||||
private initArchive(options?: archiver.ArchiverOptions): void{
|
||||
private initArchive(options?: archiver.ArchiverOptions): void {
|
||||
const defaultOptions: archiver.ArchiverOptions = {
|
||||
zlib: {level: 9}
|
||||
zlib: { level: 9 },
|
||||
};
|
||||
|
||||
this.archive = archiver("zip", {...defaultOptions, ...options});
|
||||
this.archive = archiver("zip", { ...defaultOptions, ...options });
|
||||
}
|
||||
|
||||
private async loadTotalFiles(): Promise<number>{
|
||||
private async loadTotalFiles(): Promise<number> {
|
||||
let totalFiles = this.files.length;
|
||||
for(const path of this.directories){
|
||||
for (const path of this.directories) {
|
||||
const files = await recursive(path);
|
||||
totalFiles += files.length;
|
||||
}
|
||||
return totalFiles;
|
||||
}
|
||||
|
||||
public addDirectory(path: string, destPath?: string|false): void{
|
||||
public addDirectory(path: string, destPath?: string | false): void {
|
||||
this.directories.push(path);
|
||||
destPath = destPath === false ? false : _path.basename(path);
|
||||
this.archive.directory(path, destPath);
|
||||
}
|
||||
|
||||
public addFile(path: string, destPath?: string): void{
|
||||
public addFile(path: string, destPath?: string): void {
|
||||
this.files.push(path);
|
||||
destPath = destPath ||= _path.basename(path);
|
||||
this.archive.file(path, {name: destPath});
|
||||
destPath ||= _path.basename(path);
|
||||
this.archive.file(path, { name: destPath });
|
||||
}
|
||||
|
||||
|
||||
public finalize(): Observable<ArchiveProgress>{
|
||||
|
||||
const progress: ArchiveProgress = {
|
||||
totalFiles: 0,
|
||||
prossesedFiles: 0
|
||||
public finalize(): Observable<Progression> {
|
||||
const progress: Progression = {
|
||||
total: 0,
|
||||
current: 0,
|
||||
};
|
||||
|
||||
return new Observable<ArchiveProgress>(observer => {
|
||||
(async () => {
|
||||
|
||||
progress.totalFiles = await this.loadTotalFiles();
|
||||
return new Observable<Progression>(observer => {
|
||||
(async () => {
|
||||
progress.total = await this.loadTotalFiles();
|
||||
|
||||
this.archive.on("entry", e => {
|
||||
if(e.stats.isDirectory()){ return; }
|
||||
progress.prossesedFiles++;
|
||||
if (e.stats.isDirectory()) {
|
||||
return;
|
||||
}
|
||||
progress.current++;
|
||||
observer.next(progress);
|
||||
});
|
||||
|
||||
@@ -74,5 +71,4 @@ export class Archive{
|
||||
})();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,30 @@
|
||||
import { contextBridge, ipcRenderer, IpcRendererEvent } from 'electron';
|
||||
import { IpcChannel } from 'shared/models/ipc/ipc-response.interface';
|
||||
import { contextBridge, ipcRenderer, IpcRendererEvent } from "electron";
|
||||
import { ProviderPlatform } from "shared/models/provider-platform.enum";
|
||||
|
||||
contextBridge.exposeInMainWorld('electron', {
|
||||
ipcRenderer: {
|
||||
sendMessage(channel: IpcChannel, args: unknown[]) {
|
||||
ipcRenderer.send(channel, args);
|
||||
},
|
||||
on(channel: IpcChannel, func: (...args: unknown[]) => void) {
|
||||
const subscription = (_event: IpcRendererEvent, ...args: unknown[]) =>
|
||||
func(...args);
|
||||
ipcRenderer.on(channel, subscription);
|
||||
const sep = process.platform === ProviderPlatform.WINDOWS ? "\\" : "/";
|
||||
|
||||
return () => ipcRenderer.removeListener(channel, subscription);
|
||||
contextBridge.exposeInMainWorld("electron", {
|
||||
ipcRenderer: {
|
||||
sendMessage(channel: string, args: unknown[]) {
|
||||
ipcRenderer.send(channel, args);
|
||||
},
|
||||
on(channel: string, func: (...args: unknown[]) => void) {
|
||||
const subscription = (_event: IpcRendererEvent, ...args: unknown[]) => func(...args);
|
||||
ipcRenderer.on(channel, subscription);
|
||||
|
||||
return () => ipcRenderer.removeListener(channel, subscription);
|
||||
},
|
||||
once(channel: string, func: (...args: unknown[]) => void) {
|
||||
ipcRenderer.once(channel, (_event, ...args) => func(...args));
|
||||
},
|
||||
removeAllListeners(channel: string) {
|
||||
ipcRenderer.removeAllListeners(channel);
|
||||
},
|
||||
},
|
||||
once(channel: IpcChannel, func: (...args: unknown[]) => void) {
|
||||
ipcRenderer.once(channel, (_event, ...args) => func(...args));
|
||||
},
|
||||
removeAllListeners(channel: IpcChannel) {
|
||||
ipcRenderer.removeAllListeners(channel);
|
||||
path: {
|
||||
sep,
|
||||
join: (...args: string[]): string => {
|
||||
return args.join(sep);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@@ -6,34 +6,40 @@ import { BSLocalVersionService } from "../bs-local-version.service";
|
||||
import { InstallationLocationService } from "../installation-location.service";
|
||||
import { UtilsService } from "../utils.service";
|
||||
import crypto from "crypto";
|
||||
import { lstatSync, symlinkSync, unlinkSync } from "fs";
|
||||
import { copy, copySync } from "fs-extra";
|
||||
import { lstatSync, unlinkSync } from "fs";
|
||||
import { copySync } from "fs-extra";
|
||||
import StreamZip from "node-stream-zip";
|
||||
import { RequestService } from "../request.service";
|
||||
import sanitize from "sanitize-filename";
|
||||
import { DeepLinkService } from "../deep-link.service";
|
||||
import log from 'electron-log';
|
||||
import log from "electron-log";
|
||||
import { WindowManagerService } from "../window-manager.service";
|
||||
import { ipcMain } from "electron";
|
||||
import { IpcRequest } from 'shared/models/ipc';
|
||||
import { Observable } from "rxjs";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { Observable, lastValueFrom } from "rxjs";
|
||||
import { Archive } from "../../models/archive.class";
|
||||
import { deleteFolder, ensureFolderExist, getFilesInFolder, getFoldersInFolder, pathExist } from "../../helpers/fs.helpers";
|
||||
import { readFile } from "fs/promises";
|
||||
import { FolderLinkerService } from "../folder-linker.service";
|
||||
import { allSettled } from "../../../shared/helpers/promise.helpers";
|
||||
|
||||
export class LocalMapsManagerService {
|
||||
|
||||
private static instance: LocalMapsManagerService;
|
||||
|
||||
public static getInstance(): LocalMapsManagerService{
|
||||
if(!LocalMapsManagerService.instance){ LocalMapsManagerService.instance = new LocalMapsManagerService(); }
|
||||
public static getInstance(): LocalMapsManagerService {
|
||||
if (!LocalMapsManagerService.instance) {
|
||||
LocalMapsManagerService.instance = new LocalMapsManagerService();
|
||||
}
|
||||
return LocalMapsManagerService.instance;
|
||||
}
|
||||
|
||||
private readonly LEVELS_ROOT_FOLDER = "Beat Saber_Data";
|
||||
private readonly CUSTOM_LEVELS_FOLDER = "CustomLevels";
|
||||
public static readonly LEVELS_ROOT_FOLDER = "Beat Saber_Data";
|
||||
public static readonly CUSTOM_LEVELS_FOLDER = "CustomLevels";
|
||||
public static readonly SHARED_MAPS_FOLDER = "SharedMaps";
|
||||
|
||||
private readonly DEEP_LINKS = {
|
||||
BeatSaver: "beatsaver",
|
||||
ScoreSaber: "web+bsmap"
|
||||
ScoreSaber: "web+bsmap",
|
||||
};
|
||||
|
||||
private readonly localVersion: BSLocalVersionService;
|
||||
@@ -42,14 +48,16 @@ export class LocalMapsManagerService {
|
||||
private readonly reqService: RequestService;
|
||||
private readonly deepLink: DeepLinkService;
|
||||
private readonly windows: WindowManagerService;
|
||||
private readonly linker = FolderLinkerService.getInstance();
|
||||
|
||||
private constructor(){
|
||||
private constructor() {
|
||||
this.localVersion = BSLocalVersionService.getInstance();
|
||||
this.installLocation = InstallationLocationService.getInstance();
|
||||
this.utils = UtilsService.getInstance();
|
||||
this.reqService = RequestService.getInstance();
|
||||
this.deepLink = DeepLinkService.getInstance();
|
||||
this.windows = WindowManagerService.getInstance();
|
||||
this.linker = FolderLinkerService.getInstance();
|
||||
|
||||
this.deepLink.addLinkOpenedListener(this.DEEP_LINKS.BeatSaver, link => {
|
||||
log.info("DEEP-LINK RECEIVED FROM", this.DEEP_LINKS.BeatSaver, link);
|
||||
@@ -62,99 +70,97 @@ export class LocalMapsManagerService {
|
||||
});
|
||||
}
|
||||
|
||||
public async getMapsFolderPath(version?: BSVersion): Promise<string>{
|
||||
|
||||
if(version){ return path.join(await this.localVersion.getVersionPath(version), this.LEVELS_ROOT_FOLDER, this.CUSTOM_LEVELS_FOLDER); }
|
||||
const sharedMapsPath = path.join(this.installLocation.sharedMapsPath, this.CUSTOM_LEVELS_FOLDER);
|
||||
if(!(await this.utils.pathExist(sharedMapsPath))){
|
||||
this.utils.createFolderIfNotExist(sharedMapsPath);
|
||||
public async getMapsFolderPath(version?: BSVersion): Promise<string> {
|
||||
if (version) {
|
||||
return path.join(await this.localVersion.getVersionPath(version), LocalMapsManagerService.LEVELS_ROOT_FOLDER, LocalMapsManagerService.CUSTOM_LEVELS_FOLDER);
|
||||
}
|
||||
const sharedMapsPath = path.join(this.installLocation.sharedContentPath, LocalMapsManagerService.SHARED_MAPS_FOLDER, LocalMapsManagerService.CUSTOM_LEVELS_FOLDER);
|
||||
if (!(await pathExist(sharedMapsPath))) {
|
||||
await ensureFolderExist(sharedMapsPath);
|
||||
}
|
||||
return sharedMapsPath;
|
||||
}
|
||||
|
||||
private async computeMapHash(mapPath: string, rawInfoString: string): Promise<string>{
|
||||
private async computeMapHash(mapPath: string, rawInfoString: string): Promise<string> {
|
||||
const mapRawInfo = JSON.parse(rawInfoString);
|
||||
const shasum = crypto.createHash("sha1");
|
||||
shasum.update(rawInfoString);
|
||||
for(const set of mapRawInfo._difficultyBeatmapSets){
|
||||
for(const diff of set._difficultyBeatmaps){
|
||||
for (const set of mapRawInfo._difficultyBeatmapSets) {
|
||||
for (const diff of set._difficultyBeatmaps) {
|
||||
const diffFilePath = path.join(mapPath, diff._beatmapFilename);
|
||||
const diffContent = await this.utils.readFileAsync(diffFilePath).catch(() => null);
|
||||
const diffContent = await readFile(diffFilePath, { encoding: "utf-8" }).catch(() => null);
|
||||
diffContent && shasum.update(diffContent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return shasum.digest("hex");
|
||||
}
|
||||
|
||||
private async loadMapInfoFromPath(mapPath: string): Promise<BsmLocalMap>{
|
||||
const infoFilePath = path.join(mapPath, "Info.dat");
|
||||
private async loadMapInfoFromPath(mapPath: string): Promise<BsmLocalMap> {
|
||||
const files = await getFilesInFolder(mapPath);
|
||||
const infoFile = files.find(file => path.basename(file).toLowerCase() === "info.dat");
|
||||
|
||||
if(!(await this.utils.pathExist(infoFilePath))){ return null; }
|
||||
if (infoFile === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const rawInfoString = await this.utils.readFileAsync(infoFilePath);
|
||||
const rawInfoString = await readFile(infoFile, { encoding: "utf-8" });
|
||||
|
||||
const rawInfo: RawMapInfoData = JSON.parse(rawInfoString);
|
||||
const coverUrl = new URL(`file:///${path.join(mapPath, rawInfo._coverImageFilename)}`).href;
|
||||
const songUrl = new URL(`file:///${path.join(mapPath, rawInfo._songFilename)}`).href;
|
||||
|
||||
|
||||
const hash = await this.computeMapHash(mapPath, rawInfoString);
|
||||
|
||||
return {rawInfo, coverUrl, songUrl, hash, path: mapPath};
|
||||
|
||||
return { rawInfo, coverUrl, songUrl, hash, path: mapPath };
|
||||
}
|
||||
|
||||
private async downloadMapZip(zipUrl: string): Promise<{zip: StreamZip.StreamZipAsync, zipPath: string}>{
|
||||
private async downloadMapZip(zipUrl: string): Promise<{ zip: StreamZip.StreamZipAsync; zipPath: string }> {
|
||||
const fileName = path.basename(zipUrl);
|
||||
const tempPath = this.utils.getTempPath();
|
||||
this.utils.createFolderIfNotExist(this.utils.getTempPath());
|
||||
await ensureFolderExist(this.utils.getTempPath());
|
||||
const dest = path.join(tempPath, fileName);
|
||||
|
||||
const zipPath = await this.reqService.downloadFile(zipUrl, dest);
|
||||
const zip = new StreamZip.async({file : zipPath});
|
||||
const zipPath = (await lastValueFrom(this.reqService.downloadFile(zipUrl, dest))).data;
|
||||
const zip = new StreamZip.async({ file: zipPath });
|
||||
|
||||
return {zip, zipPath};
|
||||
return { zip, zipPath };
|
||||
}
|
||||
|
||||
private openOneClickDownloadMapWindow(mapId: string, isHash = false): void{
|
||||
|
||||
private openOneClickDownloadMapWindow(mapId: string, isHash = false): void {
|
||||
ipcMain.once("one-click-map-info", async (event, req: IpcRequest<void>) => {
|
||||
this.utils.ipcSend(req.responceChannel, {success: true, data: {id: mapId, isHash}});
|
||||
this.utils.ipcSend(req.responceChannel, { success: true, data: { id: mapId, isHash } });
|
||||
});
|
||||
|
||||
this.windows.openWindow("oneclick-download-map.html");
|
||||
|
||||
this.windows.openWindow("oneclick-download-map.html");
|
||||
}
|
||||
|
||||
public getMaps(version?: BSVersion): Observable<BsmLocalMapsProgress>{
|
||||
|
||||
public getMaps(version?: BSVersion): Observable<BsmLocalMapsProgress> {
|
||||
const progression: BsmLocalMapsProgress = {
|
||||
total: 0,
|
||||
loaded: 0,
|
||||
maps: []
|
||||
maps: [],
|
||||
};
|
||||
|
||||
return new Observable<BsmLocalMapsProgress>(observer => {
|
||||
(async () => {
|
||||
const levelsFolder = await this.getMapsFolderPath(version);
|
||||
|
||||
const levelsPaths = (await this.utils.pathExist(levelsFolder)) ? this.utils.listDirsInDir(levelsFolder, true) : [];
|
||||
const levelsPaths = (await pathExist(levelsFolder)) ? await getFoldersInFolder(levelsFolder) : [];
|
||||
|
||||
progression.total = levelsPaths.length;
|
||||
|
||||
const promises = levelsPaths.map(async levelPath => {
|
||||
const mapInfo = await this.loadMapInfoFromPath(levelPath);
|
||||
if(!mapInfo){ return null; }
|
||||
if (!mapInfo) {
|
||||
return null;
|
||||
}
|
||||
progression.loaded++;
|
||||
observer.next(progression);
|
||||
return mapInfo;
|
||||
});
|
||||
|
||||
const mapsInfo = (await Promise.allSettled(promises)).reduce((acc, mapInfo) => {
|
||||
if(mapInfo.status === "fulfilled" && mapInfo.value){
|
||||
acc.push(mapInfo.value);
|
||||
}
|
||||
return acc;
|
||||
} ,[] as BsmLocalMap[]);
|
||||
const mapsInfo = await allSettled(promises, { removeFalsy: true });
|
||||
|
||||
progression.maps = mapsInfo;
|
||||
|
||||
@@ -165,67 +171,46 @@ export class LocalMapsManagerService {
|
||||
});
|
||||
}
|
||||
|
||||
public async versionIsLinked(version: BSVersion): Promise<boolean>{
|
||||
|
||||
public async versionIsLinked(version: BSVersion): Promise<boolean> {
|
||||
const levelsPath = await this.getMapsFolderPath(version);
|
||||
|
||||
const isPathExist = await this.utils.pathExist(levelsPath);
|
||||
const isPathExist = await pathExist(levelsPath);
|
||||
|
||||
if(!isPathExist){ return false; }
|
||||
if (!isPathExist) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return lstatSync(levelsPath).isSymbolicLink()
|
||||
return lstatSync(levelsPath).isSymbolicLink();
|
||||
}
|
||||
|
||||
public async linkVersionMaps(version: BSVersion, keepMaps: boolean): Promise<void>{
|
||||
|
||||
if(await this.versionIsLinked(version)){ return; }
|
||||
|
||||
const sharedMapsPath = await this.getMapsFolderPath();
|
||||
public async linkVersionMaps(version: BSVersion, keepMaps: boolean): Promise<void> {
|
||||
const versionMapsPath = await this.getMapsFolderPath(version);
|
||||
|
||||
if(keepMaps){
|
||||
await this.utils.moveDirContent(versionMapsPath, sharedMapsPath);
|
||||
}
|
||||
|
||||
await this.utils.deleteFolder(versionMapsPath);
|
||||
|
||||
symlinkSync(sharedMapsPath, versionMapsPath, "junction");
|
||||
return this.linker.linkFolder(versionMapsPath, { keepContents: keepMaps, intermediateFolder: LocalMapsManagerService.SHARED_MAPS_FOLDER });
|
||||
}
|
||||
|
||||
public async unlinkVersionMaps(version: BSVersion, keepMaps: boolean): Promise<void>{
|
||||
|
||||
const sharedMapsPath = await this.getMapsFolderPath();
|
||||
public async unlinkVersionMaps(version: BSVersion, keepMaps: boolean): Promise<void> {
|
||||
const versionMapsPath = await this.getMapsFolderPath(version);
|
||||
|
||||
if(await this.versionIsLinked(version)){
|
||||
unlinkSync(versionMapsPath);
|
||||
}
|
||||
|
||||
this.utils.createFolderIfNotExist(versionMapsPath);
|
||||
|
||||
if(keepMaps){
|
||||
await copy(sharedMapsPath, versionMapsPath);
|
||||
}
|
||||
|
||||
return this.linker.unlinkFolder(versionMapsPath, { keepContents: keepMaps, intermediateFolder: LocalMapsManagerService.SHARED_MAPS_FOLDER });
|
||||
}
|
||||
|
||||
public deleteMaps(maps: BsmLocalMap[]): Observable<DeleteMapsProgress>{
|
||||
|
||||
public deleteMaps(maps: BsmLocalMap[]): Observable<DeleteMapsProgress> {
|
||||
const mapsFolders = maps.map(map => map.path);
|
||||
const mapsHashsToDelete = maps.map(map => map.hash);
|
||||
|
||||
return new Observable<DeleteMapsProgress>(observer => {
|
||||
(async () => {
|
||||
const progress: DeleteMapsProgress = { total: maps.length, deleted: 0 };
|
||||
try{
|
||||
for(const folder of mapsFolders){
|
||||
try {
|
||||
for (const folder of mapsFolders) {
|
||||
const detail = await this.loadMapInfoFromPath(folder);
|
||||
if(!mapsHashsToDelete.includes(detail?.hash)){ continue; }
|
||||
await this.utils.deleteFolder(folder);
|
||||
if (!mapsHashsToDelete.includes(detail?.hash)) {
|
||||
continue;
|
||||
}
|
||||
await deleteFolder(folder);
|
||||
progress.deleted++;
|
||||
observer.next(progress);
|
||||
}
|
||||
}catch(e){
|
||||
} catch (e) {
|
||||
observer.error(e);
|
||||
}
|
||||
observer.complete();
|
||||
@@ -233,23 +218,26 @@ export class LocalMapsManagerService {
|
||||
});
|
||||
}
|
||||
|
||||
public async downloadMap(map: BsvMapDetail, version?: BSVersion): Promise<BsmLocalMap>{
|
||||
|
||||
if(!map.versions.at(0).hash){ throw "Cannot download map, no hash found"; }
|
||||
public async downloadMap(map: BsvMapDetail, version?: BSVersion): Promise<BsmLocalMap> {
|
||||
if (!map.versions.at(0).hash) {
|
||||
throw "Cannot download map, no hash found";
|
||||
}
|
||||
|
||||
const zipUrl = map.versions.at(0).downloadURL;
|
||||
|
||||
const mapsFolder = await this.getMapsFolderPath(version);
|
||||
|
||||
const {zip, zipPath} = await this.downloadMapZip(zipUrl);
|
||||
const { zip, zipPath } = await this.downloadMapZip(zipUrl);
|
||||
|
||||
const mapFolderName = sanitize(`${map.id}-${map.name}`);
|
||||
|
||||
const mapPath = path.join(mapsFolder, mapFolderName);
|
||||
|
||||
if(!zip){ throw `Cannot download ${zipUrl}`; }
|
||||
if (!zip) {
|
||||
throw `Cannot download ${zipUrl}`;
|
||||
}
|
||||
|
||||
this.utils.createFolderIfNotExist(mapPath);
|
||||
await ensureFolderExist(mapPath);
|
||||
|
||||
await zip.extract(null, mapPath);
|
||||
await zip.close();
|
||||
@@ -262,55 +250,47 @@ export class LocalMapsManagerService {
|
||||
return localMap;
|
||||
}
|
||||
|
||||
public async exportMaps(version: BSVersion, maps: BsmLocalMap[], outPath: string){
|
||||
|
||||
public async exportMaps(version: BSVersion, maps: BsmLocalMap[], outPath: string) {
|
||||
const archive = new Archive(outPath);
|
||||
|
||||
if(!maps || maps.length === 0){
|
||||
|
||||
if (!maps || maps.length === 0) {
|
||||
const mapsFolder = await this.getMapsFolderPath(version);
|
||||
archive.addDirectory(mapsFolder, false);
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
const mapsFolders = maps.map(map => map.path);
|
||||
mapsFolders.forEach(maps => archive.addDirectory(maps));
|
||||
}
|
||||
|
||||
return archive.finalize()
|
||||
|
||||
return archive.finalize();
|
||||
}
|
||||
|
||||
public async oneClickDownloadMap(map: BsvMapDetail): Promise<void>{
|
||||
|
||||
public async oneClickDownloadMap(map: BsvMapDetail): Promise<void> {
|
||||
const downloadedMap = await this.downloadMap(map);
|
||||
|
||||
const versions = await this.localVersion.getInstalledVersions();
|
||||
|
||||
for(const version of versions){
|
||||
|
||||
if(await this.versionIsLinked(version)){ continue; }
|
||||
for (const version of versions) {
|
||||
if (await this.versionIsLinked(version)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const versionMapsPath = await this.getMapsFolderPath(version);
|
||||
|
||||
this.utils.createFolderIfNotExist(versionMapsPath);
|
||||
|
||||
copySync(downloadedMap.path, path.join(versionMapsPath, path.basename(downloadedMap.path)), {overwrite: true});
|
||||
await ensureFolderExist(versionMapsPath);
|
||||
|
||||
copySync(downloadedMap.path, path.join(versionMapsPath, path.basename(downloadedMap.path)), { overwrite: true });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enableDeepLinks(): boolean{
|
||||
public enableDeepLinks(): boolean {
|
||||
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.registerDeepLink(link));
|
||||
}
|
||||
|
||||
public disableDeepLinks(): boolean{
|
||||
public disableDeepLinks(): boolean {
|
||||
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.unRegisterDeepLink(link));
|
||||
}
|
||||
|
||||
public isDeepLinksEnabled(): boolean{
|
||||
public isDeepLinksEnabled(): boolean {
|
||||
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.isDeepLinkRegistred(link));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,34 @@
|
||||
import { DeepLinkService } from "../deep-link.service";
|
||||
import log from "electron-log"
|
||||
import log from "electron-log";
|
||||
import { ipcMain } from "electron";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { UtilsService } from "../utils.service";
|
||||
import { WindowManagerService } from "../window-manager.service";
|
||||
import { MSModel, MSModelType } from "shared/models/model-saber/model-saber.model";
|
||||
import { MSModel, MSModelType } from "../../../shared/models/models/model-saber.model";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { BSLocalVersionService } from "../bs-local-version.service";
|
||||
import path from "path";
|
||||
import { RequestService } from "../request.service";
|
||||
import { copyFileSync } from "fs-extra";
|
||||
import sanitize from "sanitize-filename";
|
||||
import { Progression, ensureFolderExist, unlinkPath } from "../../helpers/fs.helpers";
|
||||
import { MODEL_FILE_EXTENSIONS, MODEL_TYPES, MODEL_TYPE_FOLDERS } from "../../../shared/models/models/constants";
|
||||
import { InstallationLocationService } from "../installation-location.service";
|
||||
import { Observable, Subscription, lastValueFrom } from "rxjs";
|
||||
import { readdir } from "fs/promises";
|
||||
import md5File from "md5-file";
|
||||
import { allSettled } from "../../../shared/helpers/promise.helpers";
|
||||
import { ModelSaberService } from "../thrid-party/model-saber/model-saber.service";
|
||||
import { BsmLocalModel } from "shared/models/models/bsm-local-model.interface";
|
||||
import { Archive } from "../../models/archive.class";
|
||||
|
||||
export class LocalModelsManagerService {
|
||||
|
||||
private static instance: LocalModelsManagerService;
|
||||
|
||||
public static getInstance(): LocalModelsManagerService{
|
||||
if(!LocalModelsManagerService.instance){ LocalModelsManagerService.instance = new LocalModelsManagerService(); }
|
||||
public static getInstance(): LocalModelsManagerService {
|
||||
if (!LocalModelsManagerService.instance) {
|
||||
LocalModelsManagerService.instance = new LocalModelsManagerService();
|
||||
}
|
||||
return LocalModelsManagerService.instance;
|
||||
}
|
||||
|
||||
@@ -25,102 +36,218 @@ export class LocalModelsManagerService {
|
||||
ModelSaber: "modelsaber",
|
||||
};
|
||||
|
||||
private readonly MODEL_TYPE_FOLDER: Record<Exclude<MSModelType, "misc">, string> = {
|
||||
avatar: "CustomAvatars",
|
||||
bloq: "CustomNotes",
|
||||
platform: "CustomPlatforms",
|
||||
saber: "CustomSabers"
|
||||
}
|
||||
|
||||
private readonly deepLink: DeepLinkService;
|
||||
private readonly utils: UtilsService;
|
||||
private readonly windows: WindowManagerService;
|
||||
private readonly localVersion: BSLocalVersionService;
|
||||
private readonly installPaths: InstallationLocationService;
|
||||
private readonly request: RequestService;
|
||||
private readonly modelSaber: ModelSaberService;
|
||||
|
||||
private constructor(){
|
||||
private constructor() {
|
||||
this.deepLink = DeepLinkService.getInstance();
|
||||
this.utils = UtilsService.getInstance();
|
||||
this.windows = WindowManagerService.getInstance();
|
||||
this.localVersion = BSLocalVersionService.getInstance();
|
||||
this.request = RequestService.getInstance();
|
||||
this.installPaths = InstallationLocationService.getInstance();
|
||||
this.modelSaber = ModelSaberService.getInstance();
|
||||
|
||||
this.deepLink.addLinkOpenedListener(this.DEEP_LINKS.ModelSaber, (link) => {
|
||||
this.deepLink.addLinkOpenedListener(this.DEEP_LINKS.ModelSaber, link => {
|
||||
log.info("DEEP-LINK RECEIVED FROM", this.DEEP_LINKS.ModelSaber, link);
|
||||
const url = new URL(link);
|
||||
|
||||
const type = url.host
|
||||
const id = url.pathname.replace("/", '').split("/").at(0);
|
||||
const type = url.host;
|
||||
const id = url.pathname.replace("/", "").split("/").at(0);
|
||||
|
||||
this.openOneClickDownloadModelWindow(id, type);
|
||||
});
|
||||
}
|
||||
|
||||
private openOneClickDownloadModelWindow(id: string, type: string){
|
||||
|
||||
ipcMain.once("one-click-model-info", async (event, req: IpcRequest<void>) => {
|
||||
this.utils.ipcSend(req.responceChannel, {success: true, data: {id, type}});
|
||||
private openOneClickDownloadModelWindow(id: string, type: string) {
|
||||
ipcMain.once("one-click-model-info", async (_event, req: IpcRequest<void>) => {
|
||||
this.utils.ipcSend(req.responceChannel, { success: true, data: { id, type } });
|
||||
});
|
||||
|
||||
this.windows.openWindow("oneclick-download-model.html");
|
||||
|
||||
}
|
||||
|
||||
private async getModelFolderPath(type: MSModelType, version?: BSVersion): Promise<string>{
|
||||
private async getModelFolderPath(type: MSModelType, version?: BSVersion): Promise<string> {
|
||||
const rootPath = version ? await this.localVersion.getVersionPath(version) : this.installPaths.sharedContentPath;
|
||||
const modelFolderPath = path.join(rootPath, MODEL_TYPE_FOLDERS[type]);
|
||||
|
||||
if(!version){ throw "will be implemented whith models management" }
|
||||
if(type === "misc"){ throw "model type not supported"; }
|
||||
|
||||
const versionPath = await this.localVersion.getVersionPath(version);
|
||||
const modelFolderPath = path.join(versionPath, this.MODEL_TYPE_FOLDER[type]);
|
||||
|
||||
this.utils.createFolderIfNotExist(modelFolderPath);
|
||||
await ensureFolderExist(modelFolderPath);
|
||||
|
||||
return modelFolderPath;
|
||||
|
||||
}
|
||||
|
||||
public async downloadModel(model: MSModel, version: BSVersion): Promise<string>{
|
||||
|
||||
const modelFolder = await this.getModelFolderPath(model.type, version);
|
||||
const modelDest = path.join(modelFolder, sanitize(path.basename(model.download)));
|
||||
public downloadModel(model: MSModel, version: BSVersion): Observable<Progression<BsmLocalModel>> {
|
||||
return new Observable<Progression<BsmLocalModel>>(subscriber => {
|
||||
const subs: Subscription[] = [];
|
||||
|
||||
return this.request.downloadFile(model.download, modelDest);
|
||||
(async () => {
|
||||
const modelFolder = await this.getModelFolderPath(model.type, version);
|
||||
const modelDest = path.join(modelFolder, sanitize(path.basename(model.download)));
|
||||
|
||||
const url = model.download.split("/");
|
||||
url[url.length - 1] = encodeURIComponent(url[url.length - 1]);
|
||||
|
||||
const download$ = this.request.downloadFile(url.join("/"), modelDest);
|
||||
|
||||
subs.push(download$.subscribe({ next: value => subscriber.next({ ...value, data: undefined }), error: e => subscriber.error(e) }));
|
||||
|
||||
const downloaded = await lastValueFrom(download$);
|
||||
|
||||
const res: BsmLocalModel = {
|
||||
path: downloaded.data,
|
||||
fileName: path.basename(downloaded.data),
|
||||
hash: await md5File(downloaded.data),
|
||||
type: model.type,
|
||||
model,
|
||||
version,
|
||||
};
|
||||
|
||||
subscriber.next({ ...downloaded, data: res });
|
||||
})()
|
||||
.catch(err => subscriber.error(err))
|
||||
.then(() => subscriber.complete());
|
||||
|
||||
return () => {
|
||||
subs.forEach(sub => sub.unsubscribe());
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
public async oneClickDownloadModel(model: MSModel): Promise<void>{
|
||||
|
||||
if(!model){ return; }
|
||||
public async oneClickDownloadModel(model: MSModel): Promise<void> {
|
||||
if (!model) {
|
||||
return;
|
||||
}
|
||||
|
||||
const versions = await this.localVersion.getInstalledVersions();
|
||||
|
||||
if(versions?.length === 0){ return; }
|
||||
if (versions?.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const fisrtVersion = versions.shift();
|
||||
|
||||
const downloaded = await this.downloadModel(model, fisrtVersion);
|
||||
const downloaded = await lastValueFrom(this.downloadModel(model, fisrtVersion));
|
||||
|
||||
for(const version of versions){
|
||||
|
||||
const modelDest = path.join(await this.getModelFolderPath(model.type, version), path.basename(downloaded));
|
||||
|
||||
copyFileSync(downloaded, modelDest);
|
||||
for (const version of versions) {
|
||||
const modelDest = path.join(await this.getModelFolderPath(model.type, version), path.basename(downloaded.data.path));
|
||||
|
||||
copyFileSync(downloaded.data.path, modelDest);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enableDeepLinks(): boolean{
|
||||
private async getModelsPaths(type: MSModelType, version?: BSVersion): Promise<string[]> {
|
||||
const modelsPath = await this.getModelFolderPath(type, version);
|
||||
const files = await readdir(modelsPath, { withFileTypes: true });
|
||||
|
||||
return files.reduce((acc, file) => {
|
||||
if (!file.isFile() || path.extname(file.name) !== MODEL_FILE_EXTENSIONS[type]) {
|
||||
return acc;
|
||||
}
|
||||
acc.push(path.join(modelsPath, file.name));
|
||||
return acc;
|
||||
}, []);
|
||||
}
|
||||
|
||||
public getModels(type: MSModelType, version?: BSVersion): Observable<Progression<BsmLocalModel[]>> {
|
||||
const progression: Progression<BsmLocalModel[]> = {
|
||||
total: 0,
|
||||
current: 0,
|
||||
data: null,
|
||||
};
|
||||
|
||||
return new Observable<Progression<BsmLocalModel[]>>(subscriber => {
|
||||
(async () => {
|
||||
const modelsPaths = await this.getModelsPaths(type, version);
|
||||
progression.total = modelsPaths.length;
|
||||
|
||||
const models = await allSettled(
|
||||
modelsPaths.map(async modelPath => {
|
||||
const hash = await md5File(modelPath);
|
||||
|
||||
const localModel: BsmLocalModel = {
|
||||
path: modelPath,
|
||||
fileName: path.basename(modelPath, MODEL_FILE_EXTENSIONS[type]),
|
||||
model: await this.modelSaber.getModelByHash(hash),
|
||||
type,
|
||||
hash,
|
||||
version,
|
||||
};
|
||||
|
||||
progression.current++;
|
||||
|
||||
subscriber.next(progression);
|
||||
|
||||
return localModel;
|
||||
})
|
||||
);
|
||||
|
||||
progression.data = models;
|
||||
subscriber.next(progression);
|
||||
})()
|
||||
.catch(e => subscriber.error(e))
|
||||
.finally(() => subscriber.complete());
|
||||
});
|
||||
}
|
||||
|
||||
public exportModels(output: string, version?: BSVersion, models?: BsmLocalModel[]): Observable<Progression> {
|
||||
return new Observable<Progression>(subscriber => {
|
||||
const archive = new Archive(output);
|
||||
|
||||
(async () => {
|
||||
if (models?.length) {
|
||||
models.forEach(model => archive.addFile(model.path, path.join(MODEL_TYPE_FOLDERS[model.type], path.basename(model.path))));
|
||||
} else {
|
||||
for (const type of MODEL_TYPES) {
|
||||
archive.addDirectory(await this.getModelFolderPath(type, version));
|
||||
}
|
||||
}
|
||||
})()
|
||||
.catch(e => subscriber.error(e))
|
||||
.then(() => archive.finalize().subscribe(subscriber));
|
||||
});
|
||||
}
|
||||
|
||||
public deleteModels(models: BsmLocalModel[]): Observable<Progression<BsmLocalModel[]>> {
|
||||
return new Observable<Progression<BsmLocalModel[]>>(subscriber => {
|
||||
(async () => {
|
||||
const progression: Progression<BsmLocalModel[]> = {
|
||||
total: models.length,
|
||||
current: 0,
|
||||
data: [],
|
||||
};
|
||||
|
||||
for (const model of models) {
|
||||
await unlinkPath(model.path);
|
||||
progression.data.push(model);
|
||||
progression.current = progression.data.length;
|
||||
subscriber.next(progression);
|
||||
}
|
||||
})()
|
||||
.catch(e => subscriber.error(e))
|
||||
.finally(() => subscriber.complete());
|
||||
});
|
||||
}
|
||||
|
||||
public enableDeepLinks(): boolean {
|
||||
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.registerDeepLink(link));
|
||||
}
|
||||
|
||||
public disableDeepLinks(): boolean{
|
||||
public disableDeepLinks(): boolean {
|
||||
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.unRegisterDeepLink(link));
|
||||
}
|
||||
|
||||
public isDeepLinksEnabled(): boolean{
|
||||
public isDeepLinksEnabled(): boolean {
|
||||
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.isDeepLinkRegistred(link));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
export interface BsmLocalModelsProgress {
|
||||
total: number;
|
||||
loaded: number;
|
||||
models: MSModel[];
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import path from "path";
|
||||
import { BehaviorSubject, Observable } from "rxjs";
|
||||
import { BehaviorSubject, Observable, lastValueFrom } from "rxjs";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { BSLocalVersionService } from "../bs-local-version.service";
|
||||
import { DeepLinkService } from "../deep-link.service";
|
||||
import { RequestService } from "../request.service";
|
||||
import { UtilsService } from "../utils.service";
|
||||
import { LocalMapsManagerService } from "./local-maps-manager.service";
|
||||
import log from "electron-log"
|
||||
import { isValidUrl } from "../../helpers/url.helpers";
|
||||
import log from "electron-log";
|
||||
import { isValidUrl } from "../../../shared/helpers/url.helpers";
|
||||
import { ipcMain } from "electron";
|
||||
import { WindowManagerService } from "../window-manager.service";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
@@ -15,13 +15,15 @@ import { BPList, DownloadPlaylistProgression } from "shared/models/playlists/pla
|
||||
import { copyFileSync, readFileSync } from "fs";
|
||||
import { BeatSaverService } from "../thrid-party/beat-saver/beat-saver.service";
|
||||
import { copySync } from "fs-extra";
|
||||
import { ensureFolderExist, pathExist } from "../../helpers/fs.helpers";
|
||||
|
||||
export class LocalPlaylistsManagerService {
|
||||
|
||||
private static instance: LocalPlaylistsManagerService
|
||||
private static instance: LocalPlaylistsManagerService;
|
||||
|
||||
public static getInstance(): LocalPlaylistsManagerService {
|
||||
if (!LocalPlaylistsManagerService.instance) { LocalPlaylistsManagerService.instance = new LocalPlaylistsManagerService(); }
|
||||
if (!LocalPlaylistsManagerService.instance) {
|
||||
LocalPlaylistsManagerService.instance = new LocalPlaylistsManagerService();
|
||||
}
|
||||
return LocalPlaylistsManagerService.instance;
|
||||
}
|
||||
|
||||
@@ -30,7 +32,6 @@ export class LocalPlaylistsManagerService {
|
||||
BeatSaver: "bsplaylist",
|
||||
};
|
||||
|
||||
|
||||
private readonly versions: BSLocalVersionService;
|
||||
private readonly maps: LocalMapsManagerService;
|
||||
private readonly utils: UtilsService;
|
||||
@@ -39,7 +40,7 @@ export class LocalPlaylistsManagerService {
|
||||
private readonly windows: WindowManagerService;
|
||||
private readonly bsaver: BeatSaverService;
|
||||
|
||||
private constructor(){
|
||||
private constructor() {
|
||||
this.maps = LocalMapsManagerService.getInstance();
|
||||
this.versions = BSLocalVersionService.getInstance();
|
||||
this.utils = UtilsService.getInstance();
|
||||
@@ -49,110 +50,106 @@ export class LocalPlaylistsManagerService {
|
||||
this.bsaver = BeatSaverService.getInstance();
|
||||
|
||||
this.deepLink.addLinkOpenedListener(this.DEEP_LINKS.BeatSaver, link => {
|
||||
|
||||
log.info("DEEP-LINK RECEIVED FROM", this.DEEP_LINKS.BeatSaver, link);
|
||||
const url = new URL(link);
|
||||
const bplistUrl = url.host === "playlist" ? url.pathname.replace("/", "") : "";
|
||||
|
||||
this.openOneClickDownloadPlaylistWindow(bplistUrl);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private getPlaylistIdFromDownloadUrl(url: string): string{
|
||||
private getPlaylistIdFromDownloadUrl(url: string): string {
|
||||
if (!isValidUrl(url)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if(!isValidUrl(url)){ return ""; }
|
||||
|
||||
const splited = url.split("/")
|
||||
const splited = url.split("/");
|
||||
const idIndex = splited.indexOf("id");
|
||||
|
||||
if(idIndex < 0){ return ""; }
|
||||
if (idIndex < 0) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return splited[idIndex + 1];
|
||||
}
|
||||
|
||||
private async getPlaylistsFolder(version?: BSVersion){
|
||||
private async getPlaylistsFolder(version?: BSVersion) {
|
||||
if (!version) {
|
||||
throw "Playlists are not available to be linked yet";
|
||||
}
|
||||
|
||||
if(!version){ throw "Playlists are not available to be linked yet" }
|
||||
|
||||
const versionFolder = await this.versions.getVersionPath(version);
|
||||
|
||||
const folder = path.join(versionFolder, this.PLAYLISTS_FOLDER);
|
||||
const folder = path.join(versionFolder, this.PLAYLISTS_FOLDER);
|
||||
|
||||
await this.utils.createFolderIfNotExist(folder)
|
||||
await ensureFolderExist(folder);
|
||||
|
||||
return folder;
|
||||
|
||||
}
|
||||
|
||||
private async installBPListFile(bpListUrlOrPath: string, version: BSVersion): Promise<string>{
|
||||
|
||||
private async installBPListFile(bpListUrlOrPath: string, version: BSVersion): Promise<string> {
|
||||
const playlistFolder = await this.getPlaylistsFolder(version);
|
||||
|
||||
const bpListDest = path.join(playlistFolder, path.basename(bpListUrlOrPath));
|
||||
const bpListDest = path.join(playlistFolder, path.basename(bpListUrlOrPath));
|
||||
|
||||
if(this.utils.pathExist(bpListUrlOrPath)){
|
||||
if (await pathExist(bpListUrlOrPath)) {
|
||||
copyFileSync(bpListUrlOrPath, bpListDest);
|
||||
}
|
||||
else{
|
||||
await this.request.downloadFile(bpListUrlOrPath, bpListDest);
|
||||
} else {
|
||||
await lastValueFrom(this.request.downloadFile(bpListUrlOrPath, bpListDest));
|
||||
}
|
||||
|
||||
return bpListDest;
|
||||
|
||||
}
|
||||
|
||||
private async readPlaylistFile(path: string): Promise<BPList>{
|
||||
|
||||
if(!this.utils.pathExist(path)){ throw `bplist file not exist at ${path}`; }
|
||||
private async readPlaylistFile(path: string): Promise<BPList> {
|
||||
if (!(await pathExist(path))) {
|
||||
throw `bplist file not exist at ${path}`;
|
||||
}
|
||||
|
||||
const rawContent = readFileSync(path).toString();
|
||||
|
||||
return JSON.parse(rawContent);
|
||||
|
||||
}
|
||||
|
||||
private openOneClickDownloadPlaylistWindow(downloadUrl: string): void{
|
||||
|
||||
private openOneClickDownloadPlaylistWindow(downloadUrl: string): void {
|
||||
ipcMain.once("one-click-playlist-info", async (event, req: IpcRequest<void>) => {
|
||||
this.utils.ipcSend(req.responceChannel, {success: true, data: {bpListUrl: downloadUrl, id: this.getPlaylistIdFromDownloadUrl(downloadUrl)}});
|
||||
this.utils.ipcSend(req.responceChannel, { success: true, data: { bpListUrl: downloadUrl, id: this.getPlaylistIdFromDownloadUrl(downloadUrl) } });
|
||||
});
|
||||
|
||||
this.windows.openWindow("oneclick-download-playlist.html");
|
||||
|
||||
}
|
||||
|
||||
public downloadPlaylist(bpListUrl: string, version: BSVersion): Observable<DownloadPlaylistProgression>{
|
||||
public downloadPlaylist(bpListUrl: string, version: BSVersion): Observable<DownloadPlaylistProgression> {
|
||||
const res = new BehaviorSubject<DownloadPlaylistProgression>({ progression: 0, current: null, downloadedMaps: [], mapsPath: [], bpListPath: "" });
|
||||
|
||||
const res = new BehaviorSubject<DownloadPlaylistProgression>({progression: 0, current: null, downloadedMaps: [], mapsPath: [], bpListPath: ""});
|
||||
|
||||
const sub = res.subscribe(process => {
|
||||
this.utils.ipcSend("download-playlist-progress", {success: true, data: process});
|
||||
}, err => {
|
||||
this.utils.ipcSend("download-playlist-progress", {success: false, error: err});
|
||||
});
|
||||
const sub = res.subscribe(
|
||||
process => {
|
||||
this.utils.ipcSend("download-playlist-progress", { success: true, data: process });
|
||||
},
|
||||
err => {
|
||||
this.utils.ipcSend("download-playlist-progress", { success: false, error: err });
|
||||
}
|
||||
);
|
||||
|
||||
const observer = async () => {
|
||||
|
||||
try{
|
||||
|
||||
try {
|
||||
const bpListPath = await this.installBPListFile(bpListUrl, version);
|
||||
|
||||
res.next({...res.value, bpListPath});
|
||||
res.next({ ...res.value, bpListPath });
|
||||
|
||||
const bpList = await this.readPlaylistFile(bpListPath);
|
||||
|
||||
for(const song of bpList.songs){
|
||||
|
||||
if(!song.key){ continue; }
|
||||
for (const song of bpList.songs) {
|
||||
if (!song.key) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const map = await this.bsaver.getMapDetailsById(song.key);
|
||||
|
||||
res.next({
|
||||
...res.value,
|
||||
current: map,
|
||||
progression: ((res.value.downloadedMaps.length + .5) / bpList.songs.length) * 100
|
||||
progression: ((res.value.downloadedMaps.length + 0.5) / bpList.songs.length) * 100,
|
||||
});
|
||||
|
||||
const mapPath = await this.maps.downloadMap(map, version);
|
||||
@@ -164,63 +161,55 @@ export class LocalPlaylistsManagerService {
|
||||
current: null,
|
||||
downloadedMaps: [...res.value.downloadedMaps, map],
|
||||
mapsPath: [...res.value.mapsPath, mapPath.path],
|
||||
progression
|
||||
progression,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch(e){
|
||||
} catch (e) {
|
||||
res.error(e);
|
||||
}
|
||||
|
||||
res.complete();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
observer().finally(() => sub.unsubscribe());
|
||||
return res.asObservable();
|
||||
|
||||
}
|
||||
|
||||
public async oneClickInstallPlaylist(bpListUrl: string): Promise<void>{
|
||||
|
||||
public async oneClickInstallPlaylist(bpListUrl: string): Promise<void> {
|
||||
const versions = await this.versions.getInstalledVersions();
|
||||
|
||||
const firstVersion = versions.shift();
|
||||
const fistVersionLinked = await this.maps.versionIsLinked(firstVersion);
|
||||
|
||||
const {bpListPath, mapsPath} = await this.downloadPlaylist(bpListUrl, firstVersion).toPromise();
|
||||
const { bpListPath, mapsPath } = await this.downloadPlaylist(bpListUrl, firstVersion).toPromise();
|
||||
|
||||
for(const version of versions){
|
||||
|
||||
for (const version of versions) {
|
||||
await this.installBPListFile(bpListPath, version);
|
||||
|
||||
const versionIsLinked = await this.maps.versionIsLinked(version);
|
||||
|
||||
if(fistVersionLinked && versionIsLinked){ continue; }
|
||||
if (fistVersionLinked && versionIsLinked) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for(const mapPath of mapsPath){
|
||||
for (const mapPath of mapsPath) {
|
||||
const versionMapsFolder = await this.maps.getMapsFolderPath(version);
|
||||
const mapDest = path.join(versionMapsFolder, path.basename(mapPath));
|
||||
|
||||
copySync(mapPath, mapDest, {overwrite: true});
|
||||
copySync(mapPath, mapDest, { overwrite: true });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enableDeepLinks(): boolean{
|
||||
public enableDeepLinks(): boolean {
|
||||
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.registerDeepLink(link));
|
||||
}
|
||||
|
||||
public disableDeepLinks(): boolean{
|
||||
public disableDeepLinks(): boolean {
|
||||
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.unRegisterDeepLink(link));
|
||||
}
|
||||
|
||||
public isDeepLinksEnabled(): boolean{
|
||||
public isDeepLinksEnabled(): boolean {
|
||||
return Array.from(Object.values(this.DEEP_LINKS)).every(link => this.deepLink.isDeepLinkRegistred(link));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,51 +1,54 @@
|
||||
import { autoUpdater } from 'electron-updater';
|
||||
import log from 'electron-log';
|
||||
import { UtilsService } from './utils.service';
|
||||
import { gt } from 'semver';
|
||||
export class AutoUpdaterService {
|
||||
import { autoUpdater } from "electron-updater";
|
||||
import log from "electron-log";
|
||||
import { UtilsService } from "./utils.service";
|
||||
import { gt } from "semver";
|
||||
|
||||
export class AutoUpdaterService {
|
||||
private static instance: AutoUpdaterService;
|
||||
|
||||
private readonly utilsService: UtilsService;
|
||||
|
||||
public static getInstance(): AutoUpdaterService{
|
||||
if(!AutoUpdaterService.instance){ AutoUpdaterService.instance = new AutoUpdaterService(); }
|
||||
public static getInstance(): AutoUpdaterService {
|
||||
if (!AutoUpdaterService.instance) {
|
||||
AutoUpdaterService.instance = new AutoUpdaterService();
|
||||
}
|
||||
return AutoUpdaterService.instance;
|
||||
}
|
||||
|
||||
constructor(){
|
||||
constructor() {
|
||||
autoUpdater.logger = log;
|
||||
autoUpdater.autoDownload = false;
|
||||
|
||||
this.utilsService = UtilsService.getInstance();
|
||||
}
|
||||
|
||||
public isUpdateAvailable(): Promise<boolean>{
|
||||
public isUpdateAvailable(): Promise<boolean> {
|
||||
return new Promise(resolve => {
|
||||
autoUpdater.checkForUpdates().then(info => {
|
||||
const needUpdate = (() => {
|
||||
if(!info || !info.updateInfo){ return false; }
|
||||
return gt(info.updateInfo.version, autoUpdater.currentVersion.version);
|
||||
})();
|
||||
resolve(needUpdate)}
|
||||
).catch(() => resolve(false));
|
||||
autoUpdater
|
||||
.checkForUpdates()
|
||||
.then(info => {
|
||||
const needUpdate = (() => {
|
||||
if (!info?.updateInfo) {
|
||||
return false;
|
||||
}
|
||||
return gt(info.updateInfo.version, autoUpdater.currentVersion.version);
|
||||
})();
|
||||
resolve(needUpdate);
|
||||
})
|
||||
.catch(() => resolve(false));
|
||||
});
|
||||
}
|
||||
|
||||
public downloadUpdate(): Promise<boolean>{
|
||||
|
||||
public downloadUpdate(): Promise<boolean> {
|
||||
autoUpdater.removeAllListeners("download-progress");
|
||||
autoUpdater.addListener("download-progress", info => {
|
||||
this.utilsService.ipcSend("update-download-progress", {success: true, data: info.percent});
|
||||
this.utilsService.ipcSend("update-download-progress", { success: true, data: info.percent });
|
||||
});
|
||||
|
||||
|
||||
return autoUpdater.downloadUpdate().then(res => !!res && !!res.length);
|
||||
}
|
||||
|
||||
public quitAndInstall(){
|
||||
public quitAndInstall() {
|
||||
autoUpdater.quitAndInstall();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,235 +1,212 @@
|
||||
/* eslint-disable prefer-promise-reject-errors */
|
||||
import { BS_APP_ID, BS_DEPOT } from "../constants";
|
||||
import path from "path";
|
||||
import { BSVersion, PartialBSVersion } from 'shared/bs-version.interface';
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { UtilsService } from "./utils.service";
|
||||
import { ChildProcessWithoutNullStreams, spawn, spawnSync } from "child_process";
|
||||
import log from "electron-log";
|
||||
import { InstallationLocationService } from "./installation-location.service";
|
||||
import { ctrlc } from "ctrlc-windows";
|
||||
import { BSLocalVersionService } from "./bs-local-version.service";
|
||||
import isOnline from 'is-online';
|
||||
import { WindowManagerService } from "./window-manager.service";
|
||||
import { copy, copySync } from "fs-extra";
|
||||
import { clean, satisfies } from "semver";
|
||||
import { copy } from "fs-extra";
|
||||
import { ensureFolderExist, pathExist } from "../helpers/fs.helpers";
|
||||
import { net } from "electron";
|
||||
|
||||
export class BSInstallerService{
|
||||
export class BSInstallerService {
|
||||
private static instance: BSInstallerService;
|
||||
|
||||
private static instance: BSInstallerService;
|
||||
private readonly utils: UtilsService;
|
||||
private readonly installLocationService: InstallationLocationService;
|
||||
private readonly localVersionService: BSLocalVersionService;
|
||||
private readonly windows: WindowManagerService;
|
||||
|
||||
private readonly utils: UtilsService;
|
||||
private readonly installLocationService: InstallationLocationService;
|
||||
private readonly localVersionService: BSLocalVersionService;
|
||||
private readonly windows: WindowManagerService;
|
||||
private downloadProcess: ChildProcessWithoutNullStreams;
|
||||
|
||||
private downloadProcess: ChildProcessWithoutNullStreams;
|
||||
private constructor() {
|
||||
this.utils = UtilsService.getInstance();
|
||||
this.installLocationService = InstallationLocationService.getInstance();
|
||||
this.localVersionService = BSLocalVersionService.getInstance();
|
||||
this.windows = WindowManagerService.getInstance();
|
||||
|
||||
private constructor(){
|
||||
this.utils = UtilsService.getInstance();
|
||||
this.installLocationService = InstallationLocationService.getInstance();
|
||||
this.localVersionService = BSLocalVersionService.getInstance();
|
||||
this.windows = WindowManagerService.getInstance();
|
||||
|
||||
this.windows.getWindow("index.html")?.on("close", () => {
|
||||
this.killDownloadProcess();
|
||||
});
|
||||
}
|
||||
|
||||
public static getInstance(){
|
||||
if(!BSInstallerService.instance){ BSInstallerService.instance = new BSInstallerService(); }
|
||||
return BSInstallerService.instance;
|
||||
}
|
||||
|
||||
private escapeSpaces(path: string): string{
|
||||
return `\"${path}\"`
|
||||
this.windows.getWindow("index.html")?.on("close", () => {
|
||||
this.killDownloadProcess();
|
||||
});
|
||||
}
|
||||
|
||||
private getDepotDownloaderExePath(): string{
|
||||
return this.escapeSpaces(path.join(this.utils.getAssetsScriptsPath(), 'depot-downloader', 'DepotDownloader.exe'));
|
||||
public static getInstance() {
|
||||
if (!BSInstallerService.instance) {
|
||||
BSInstallerService.instance = new BSInstallerService();
|
||||
}
|
||||
return BSInstallerService.instance;
|
||||
}
|
||||
|
||||
private removeSpecialSchar(txt: string): string{ return txt.replaceAll(/\[|\]/g, ""); }
|
||||
private getDepotDownloaderExePath(): string {
|
||||
return path.join(this.utils.getAssetsScriptsPath(), "depot-downloader", "DepotDownloader.exe");
|
||||
}
|
||||
|
||||
private sendDownloadEvent(event: DownloadEventType, data?: string|number, success = true): void{
|
||||
if(typeof data === "string"){ data = this.removeSpecialSchar(data); }
|
||||
private removeSpecialSchar(txt: string): string {
|
||||
return txt.replaceAll(/[\[\]]/g, "");
|
||||
}
|
||||
|
||||
private sendDownloadEvent(event: DownloadEventType, data?: string | number, success = true): void {
|
||||
if (typeof data === "string") {
|
||||
data = this.removeSpecialSchar(data);
|
||||
}
|
||||
this.utils.ipcSend(`bs-download.${event}`, { success, data });
|
||||
}
|
||||
|
||||
public sendInputProcess(input: string){
|
||||
if(this.downloadProcess.stdin.writable){
|
||||
this.downloadProcess.stdin.write(`${input}\n`);
|
||||
public sendInputProcess(input: string) {
|
||||
if (this.downloadProcess.stdin.writable) {
|
||||
this.downloadProcess.stdin.write(`${input}\n`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public killDownloadProcess(): Promise<boolean>{
|
||||
return new Promise(resolve => {
|
||||
if(this.downloadProcess?.killed && !this.downloadProcess?.pid){ return resolve(false); }
|
||||
public killDownloadProcess(): boolean {
|
||||
return this.downloadProcess.kill();
|
||||
}
|
||||
|
||||
this.downloadProcess.once('exit', () => resolve(true));
|
||||
|
||||
ctrlc(this.downloadProcess.pid);
|
||||
setTimeout(() => resolve(false), 3000);
|
||||
});
|
||||
}
|
||||
|
||||
public async isDotNet6Installed(): Promise<boolean>{
|
||||
try{
|
||||
const process = spawnSync(this.getDepotDownloaderExePath(), {shell: true});
|
||||
if(process.stderr.toString()){
|
||||
public async isDotNet6Installed(): Promise<boolean> {
|
||||
try {
|
||||
const process = spawnSync(this.getDepotDownloaderExePath());
|
||||
if (process.stderr.toString()) {
|
||||
log.error("no dotnet", process.stderr.toString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch(e){
|
||||
} catch (e) {
|
||||
log.error("Error while checking .NET 6", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async downloadBsVersion(downloadInfos: DownloadInfo): Promise<DownloadEvent>{
|
||||
public async downloadBsVersion(downloadInfos: DownloadInfo): Promise<DownloadEvent> {
|
||||
// TODO : Can be a lot improved by using ipcV2 and Observable -- This will be reworked for qrCode login
|
||||
|
||||
if(this.downloadProcess && this.downloadProcess.connected){ throw "AlreadyDownloading"; }
|
||||
const {bsVersion} = downloadInfos;
|
||||
if(!bsVersion){ return {type: "[Error]"}; }
|
||||
if(!(await isOnline({timeout: 1500}))){ throw "no-internet"; }
|
||||
if (this.downloadProcess?.connected) {
|
||||
throw "AlreadyDownloading";
|
||||
}
|
||||
const { bsVersion } = downloadInfos;
|
||||
if (!bsVersion) {
|
||||
return { type: "[Error]" };
|
||||
}
|
||||
if (!net.isOnline()) {
|
||||
throw "no-internet";
|
||||
}
|
||||
|
||||
this.utils.createFolderIfNotExist(this.installLocationService.versionsDirectory);
|
||||
await ensureFolderExist(this.installLocationService.versionsDirectory);
|
||||
|
||||
const versionPath = await this.localVersionService.getVersionPath(bsVersion)
|
||||
const versionPath = await this.localVersionService.getVersionPath(bsVersion);
|
||||
|
||||
const dest = !downloadInfos.isVerification ? this.getPathNotAleardyExist(versionPath) : versionPath;
|
||||
const dest = !downloadInfos.isVerification ? await this.getPathNotAleardyExist(versionPath) : versionPath;
|
||||
|
||||
const downloadVersion: BSVersion = {...downloadInfos.bsVersion, ...(path.basename(dest) !== downloadInfos.bsVersion.BSVersion && {name: path.basename(dest)})}
|
||||
const downloadVersion: BSVersion = { ...downloadInfos.bsVersion, ...(path.basename(dest) !== downloadInfos.bsVersion.BSVersion && { name: path.basename(dest) }) };
|
||||
|
||||
this.downloadProcess = spawn(
|
||||
this.getDepotDownloaderExePath(),
|
||||
[
|
||||
`-app ${BS_APP_ID}`,
|
||||
`-depot ${BS_DEPOT}`,
|
||||
`-manifest ${bsVersion.BSManifest}`,
|
||||
`-username ${downloadInfos.username}`,
|
||||
`-dir \"${this.localVersionService.getVersionFolder(downloadVersion)}\"`
|
||||
],
|
||||
{shell: true, cwd: this.installLocationService.versionsDirectory}
|
||||
);
|
||||
this.downloadProcess = spawn(this.getDepotDownloaderExePath(), ["-app", BS_APP_ID, "-depot", BS_DEPOT, "-manifest", bsVersion.BSManifest, "-username", downloadInfos.username, "-dir", this.localVersionService.getVersionFolder(downloadVersion)], { cwd: this.installLocationService.versionsDirectory });
|
||||
|
||||
this.utils.ipcSend("start-download-version", {success: true, data: downloadVersion});
|
||||
this.utils.ipcSend("start-download-version", { success: true, data: downloadVersion });
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.downloadProcess.stdout.on("data", data => {
|
||||
const matched = (data.toString() as string).match(/(?:\[(.*?)\])\|(?:\[(.*?)\]\|)?(.*?)(?=$|\[)/gm) ?? [];
|
||||
matched.forEach(match => {
|
||||
const out = match.split("|");
|
||||
|
||||
this.downloadProcess.stdout.on('data', data => {
|
||||
const matched = (data.toString() as string).match(/(?:\[(.*?)\])\|(?:\[(.*?)\]\|)?(.*?)(?=$|\[)/gm) ?? [];
|
||||
matched.forEach(match => {
|
||||
const out = match.split("|");
|
||||
if (out[0] !== "[Progress]" && out[0] !== "[Validated]") {
|
||||
log.info(data.toString());
|
||||
}
|
||||
|
||||
if(out[0] !== "[Progress]" && out[0] !== "[Validated]"){ log.info(data.toString()); }
|
||||
|
||||
if(out[0] === "[Password]" as DownloadEventType && downloadInfos.password){
|
||||
this.sendInputProcess(downloadInfos.password);
|
||||
}
|
||||
else if(out[0] === "[Password]" as DownloadEventType){
|
||||
this.killDownloadProcess();
|
||||
resolve({type: "[Password]", data: bsVersion});
|
||||
}
|
||||
else if(out[0] === "[2FA]" as DownloadEventType || out[0] === "[Guard]" as DownloadEventType){
|
||||
this.sendDownloadEvent("[2FA]")
|
||||
}
|
||||
else if(out[0] === "[Progress]" as DownloadEventType || (out[0] === "[Validated]" as DownloadEventType && parseFloat(out[1]) < 100)){
|
||||
this.sendDownloadEvent("[Progress]", parseFloat(out[1].replaceAll(",", ".")));
|
||||
}
|
||||
else if(out[0] === "[Finished]" as DownloadEventType || (out[0] === "[Validated]" as DownloadEventType && parseFloat(out[1]) === 100)){
|
||||
resolve({type: "[Finished]"});
|
||||
this.killDownloadProcess();
|
||||
}
|
||||
else if(out[0] === "[SteamID]" as DownloadEventType){
|
||||
this.sendDownloadEvent("[SteamID]", out[1]);
|
||||
}
|
||||
else if(out[0] === "[Warning]" as DownloadEventType){
|
||||
this.sendDownloadEvent("[Warning]", out[1]);
|
||||
}
|
||||
else if(out[0] === "[Error]" as DownloadEventType){
|
||||
reject(this.removeSpecialSchar(out[1]));
|
||||
this.killDownloadProcess();
|
||||
log.error("Download Event, Error", data.toString());
|
||||
}
|
||||
if (out[0] === ("[Password]" as DownloadEventType) && downloadInfos.password) {
|
||||
this.sendInputProcess(downloadInfos.password);
|
||||
} else if (out[0] === ("[Password]" as DownloadEventType)) {
|
||||
this.killDownloadProcess();
|
||||
resolve({ type: "[Password]", data: bsVersion });
|
||||
} else if (out[0] === ("[2FA]" as DownloadEventType) || out[0] === ("[Guard]" as DownloadEventType)) {
|
||||
this.sendDownloadEvent("[2FA]");
|
||||
} else if (out[0] === ("[Progress]" as DownloadEventType) || (out[0] === ("[Validated]" as DownloadEventType) && parseFloat(out[1]) < 100)) {
|
||||
this.sendDownloadEvent("[Progress]", parseFloat(out[1].replaceAll(",", ".")));
|
||||
} else if (out[0] === ("[Finished]" as DownloadEventType) || (out[0] === ("[Validated]" as DownloadEventType) && parseFloat(out[1]) === 100)) {
|
||||
resolve({ type: "[Finished]" });
|
||||
this.killDownloadProcess();
|
||||
} else if (out[0] === ("[SteamID]" as DownloadEventType)) {
|
||||
this.sendDownloadEvent("[SteamID]", out[1]);
|
||||
} else if (out[0] === ("[Warning]" as DownloadEventType)) {
|
||||
this.sendDownloadEvent("[Warning]", out[1]);
|
||||
} else if (out[0] === ("[Error]" as DownloadEventType)) {
|
||||
reject(this.removeSpecialSchar(out[1]));
|
||||
this.killDownloadProcess();
|
||||
log.error("Download Event, Error", data.toString());
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this.downloadProcess.stdout.on("error", err => {
|
||||
log.error("BS-DOWNLOAD ERROR", err.toString());
|
||||
this.killDownloadProcess();
|
||||
if (err.toString().includes(".NET") || err.toString().includes("dotnet") || err.toString().includes(".dll")) {
|
||||
reject("dotnet");
|
||||
}
|
||||
reject();
|
||||
});
|
||||
this.downloadProcess.stderr.on("data", err => {
|
||||
log.error("BS-DOWNLOAD ERROR", err.toString());
|
||||
this.killDownloadProcess();
|
||||
if (err.toString().includes(".NET") || err.toString().includes("dotnet") || err.toString().includes(".dll")) {
|
||||
reject("dotnet");
|
||||
}
|
||||
reject();
|
||||
});
|
||||
this.downloadProcess.stderr.on("error", err => {
|
||||
log.error("BS-DOWNLOAD ERROR", err.toString());
|
||||
this.killDownloadProcess();
|
||||
if (err.toString().includes(".NET") || err.toString().includes("dotnet") || err.toString().includes(".dll")) {
|
||||
reject("dotnet");
|
||||
}
|
||||
reject();
|
||||
});
|
||||
|
||||
this.downloadProcess.on("close", () => reject());
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
this.downloadProcess.stdout.on('error', (err) => {
|
||||
log.error("BS-DOWNLOAD ERROR", err.toString());
|
||||
this.killDownloadProcess();
|
||||
if(err.toString().includes(".NET") || err.toString().includes("dotnet") || err.toString().includes(".dll")){
|
||||
reject("dotnet");
|
||||
}
|
||||
reject();
|
||||
});
|
||||
this.downloadProcess.stderr.on('data', (err) => {
|
||||
log.error("BS-DOWNLOAD ERROR", err.toString());
|
||||
this.killDownloadProcess();
|
||||
if(err.toString().includes(".NET") || err.toString().includes("dotnet") || err.toString().includes(".dll")){
|
||||
reject("dotnet");
|
||||
}
|
||||
reject();
|
||||
});
|
||||
this.downloadProcess.stderr.on('error', (err) => {
|
||||
log.error("BS-DOWNLOAD ERROR", err.toString());
|
||||
this.killDownloadProcess();
|
||||
if(err.toString().includes(".NET") || err.toString().includes("dotnet") || err.toString().includes(".dll")){
|
||||
reject("dotnet");
|
||||
}
|
||||
reject();
|
||||
});
|
||||
}
|
||||
|
||||
this.downloadProcess.on('close', () => reject());
|
||||
})
|
||||
}
|
||||
|
||||
private getPathNotAleardyExist(path: string): string{
|
||||
private async getPathNotAleardyExist(path: string): Promise<string> {
|
||||
let destPath = path;
|
||||
let folderExist = this.utils.pathExist(destPath);
|
||||
let folderExist = await pathExist(destPath);
|
||||
let i = 0;
|
||||
|
||||
while(folderExist){
|
||||
while (folderExist) {
|
||||
i++;
|
||||
destPath = `${path} (${i})`;
|
||||
folderExist = this.utils.pathExist(destPath);
|
||||
folderExist = await pathExist(destPath);
|
||||
}
|
||||
|
||||
return destPath
|
||||
return destPath;
|
||||
}
|
||||
|
||||
public async importVersion(path: string): Promise<PartialBSVersion>{
|
||||
|
||||
const rawBsVersion = await this.localVersionService.getVersionOfBSFolder(path);
|
||||
public async importVersion(path: string): Promise<BSVersion> {
|
||||
const version = await this.localVersionService.getVersionOfBSFolder(path);
|
||||
|
||||
if(!rawBsVersion){ throw new Error("NOT_BS_FOLDER"); }
|
||||
if (!version) {
|
||||
throw new Error("NOT_BS_FOLDER");
|
||||
}
|
||||
|
||||
const destPath = this.getPathNotAleardyExist(await this.localVersionService.getVersionPath(rawBsVersion));
|
||||
const destPath = await this.getPathNotAleardyExist(await this.localVersionService.getVersionPath(version));
|
||||
|
||||
await copy(path, destPath, {dereference: true});
|
||||
|
||||
return rawBsVersion;
|
||||
await copy(path, destPath, { dereference: true });
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export interface DownloadInfo {
|
||||
bsVersion: BSVersion,
|
||||
username: string,
|
||||
password?: string,
|
||||
stay?: boolean,
|
||||
isVerification: boolean
|
||||
bsVersion: BSVersion;
|
||||
username: string;
|
||||
password?: string;
|
||||
stay?: boolean;
|
||||
isVerification: boolean;
|
||||
}
|
||||
|
||||
export interface DownloadEvent{
|
||||
type: DownloadEventType,
|
||||
data?: unknown
|
||||
export interface DownloadEvent {
|
||||
type: DownloadEventType;
|
||||
data?: unknown;
|
||||
}
|
||||
|
||||
export type DownloadEventType = "[Password]" | "[Guard]" | "[2FA]" | "[Progress]" | "[Validated]" | "[Finished]" | "[AlreadyDownloading]" | "[Error]" | "[Warning]" | "[SteamID]" | "[Exit]" | "[NoInternet]";
|
||||
|
||||
@@ -1,67 +1,354 @@
|
||||
import path from "path";
|
||||
import { LaunchResult, LauchOption } from "shared/models/bs-launch";
|
||||
import { LaunchOption, BSLaunchEvent, BSLaunchEventData, BSLaunchWarning, BSLaunchErrorData, BSLaunchError } from "../../shared/models/bs-launch";
|
||||
import { UtilsService } from "./utils.service";
|
||||
import { BS_EXECUTABLE, BS_APP_ID } from "../constants";
|
||||
import { ChildProcessWithoutNullStreams, spawn } from "child_process";
|
||||
import { BS_EXECUTABLE, BS_APP_ID, STEAMVR_APP_ID, IMAGE_CACHE_PATH } from "../constants";
|
||||
import { ChildProcessWithoutNullStreams, SpawnOptionsWithoutStdio, spawn } from "child_process";
|
||||
import { SteamService } from "./steam.service";
|
||||
import { BSLocalVersionService } from "./bs-local-version.service";
|
||||
import { OculusService } from "./oculus.service";
|
||||
|
||||
export class BSLauncherService{
|
||||
import { pathExist } from "../helpers/fs.helpers";
|
||||
import { rename } from "fs/promises";
|
||||
import log from "electron-log";
|
||||
import { Observable, lastValueFrom, of, timer } from "rxjs";
|
||||
import { BsmProtocolService } from "./bsm-protocol.service";
|
||||
import { app, shell} from "electron";
|
||||
import { Resvg } from "@resvg/resvg-js";
|
||||
import Color from "color";
|
||||
import { ensureDir, writeFile } from "fs-extra";
|
||||
import toIco from "to-ico";
|
||||
import { objectFromEntries } from "../../shared/helpers/object.helpers";
|
||||
import { WindowManagerService } from "./window-manager.service";
|
||||
import { IpcService } from "./ipc.service";
|
||||
import { BSVersionLibService } from "./bs-version-lib.service";
|
||||
import { execOnOs } from "../helpers/env.helpers";
|
||||
|
||||
export class BSLauncherService {
|
||||
private static instance: BSLauncherService;
|
||||
|
||||
private readonly utilsService: UtilsService;
|
||||
private readonly steamService: SteamService;
|
||||
private readonly oculusService: OculusService;
|
||||
private readonly localVersionService: BSLocalVersionService;
|
||||
private readonly bsmProtocolService: BsmProtocolService;
|
||||
private readonly windows: WindowManagerService;
|
||||
private readonly ipc: IpcService;
|
||||
private readonly remoteVersion: BSVersionLibService;
|
||||
|
||||
private bsProcess: ChildProcessWithoutNullStreams;
|
||||
|
||||
public static getInstance(): BSLauncherService{
|
||||
if(!BSLauncherService.instance){ BSLauncherService.instance = new BSLauncherService(); }
|
||||
public static getInstance(): BSLauncherService {
|
||||
if (!BSLauncherService.instance) {
|
||||
BSLauncherService.instance = new BSLauncherService();
|
||||
}
|
||||
return BSLauncherService.instance;
|
||||
}
|
||||
|
||||
private constructor(){
|
||||
private constructor() {
|
||||
this.utilsService = UtilsService.getInstance();
|
||||
this.steamService = SteamService.getInstance();
|
||||
this.oculusService = OculusService.getInstance();
|
||||
this.localVersionService = BSLocalVersionService.getInstance();
|
||||
this.bsmProtocolService = BsmProtocolService.getInstance();
|
||||
this.windows = WindowManagerService.getInstance();
|
||||
this.ipc = IpcService.getInstance();
|
||||
this.remoteVersion = BSVersionLibService.getInstance();
|
||||
|
||||
this.bsmProtocolService.on("launch", link => {
|
||||
log.info("Launch from bsm protocol", link.toString());
|
||||
const shortcutParams = objectFromEntries(link.searchParams.entries()) as ShortcutParams;
|
||||
this.openShortcutLaunchWindow(shortcutParams).catch(log.error);
|
||||
});
|
||||
}
|
||||
|
||||
public isBsRunning(): boolean{
|
||||
return this.bsProcess?.connected || this.utilsService.taskRunning(BS_EXECUTABLE);
|
||||
private getSteamVRPath(): Promise<string> {
|
||||
return this.steamService.getGameFolder(STEAMVR_APP_ID, "SteamVR");
|
||||
}
|
||||
|
||||
public async launch(launchOptions: LauchOption): Promise<LaunchResult>{
|
||||
if(launchOptions.version.oculus && !this.oculusService.oculusRunning()){ return "OCULUS_NOT_RUNNING" }
|
||||
if(!launchOptions.version.oculus && !this.steamService.steamRunning()){ return "STEAM_NOT_RUNNING" }
|
||||
if(this.isBsRunning()){ return "BS_ALREADY_RUNNING" }
|
||||
private async backupSteamVR(): Promise<void> {
|
||||
const steamVrFolder = await this.getSteamVRPath();
|
||||
if (!(await pathExist(steamVrFolder))) {
|
||||
return;
|
||||
}
|
||||
return rename(steamVrFolder, `${steamVrFolder}.bak`).catch(log.error);
|
||||
}
|
||||
|
||||
const cwd = await this.localVersionService.getVersionPath(launchOptions.version);
|
||||
const exePath = path.join(cwd, BS_EXECUTABLE);
|
||||
public async restoreSteamVR(): Promise<void> {
|
||||
const steamVrFolder = await this.getSteamVRPath();
|
||||
const steamVrBackup = `${steamVrFolder}.bak`;
|
||||
if (!(await pathExist(steamVrBackup))) {
|
||||
return;
|
||||
}
|
||||
return rename(steamVrBackup, steamVrFolder).catch(log.error);
|
||||
}
|
||||
|
||||
if(!this.utilsService.pathExist(exePath)){ return "EXE_NOT_FINDED"; }
|
||||
public async isBsRunning(): Promise<boolean> {
|
||||
return this.utilsService.taskRunning(BS_EXECUTABLE);
|
||||
}
|
||||
|
||||
private buildBsLaunchArgs(launchOptions: LaunchOption): string[]{
|
||||
const launchArgs = [];
|
||||
|
||||
if (launchOptions.oculus) {
|
||||
launchArgs.push("-vrmode");
|
||||
launchArgs.push("oculus");
|
||||
}
|
||||
if (launchOptions.desktop) {
|
||||
launchArgs.push("fpfc");
|
||||
}
|
||||
if (launchOptions.debug) {
|
||||
launchArgs.push("--verbose");
|
||||
}
|
||||
if (launchOptions.additionalArgs) {
|
||||
launchArgs.push(...launchOptions.additionalArgs);
|
||||
}
|
||||
|
||||
return Array.from(new Set(launchArgs).values());
|
||||
}
|
||||
|
||||
private launchBSProcess(bsExePath: string, args: string[], debug = false): ChildProcessWithoutNullStreams{
|
||||
|
||||
const spawnOptions: SpawnOptionsWithoutStdio = { detached: true, cwd: path.dirname(bsExePath), env: {...process.env, "SteamAppId": BS_APP_ID} };
|
||||
|
||||
if(debug){
|
||||
spawnOptions.windowsVerbatimArguments = true;
|
||||
}
|
||||
|
||||
return spawn(bsExePath, args, spawnOptions);
|
||||
|
||||
}
|
||||
|
||||
public launch(launchOptions: LaunchOption): Observable<BSLaunchEventData>{
|
||||
|
||||
return new Observable<BSLaunchEventData>(obs => {(async () => {
|
||||
|
||||
if(launchOptions.skipAlreadyRunning !== true && await this.isBsRunning()){
|
||||
return obs.error({type: BSLaunchError.BS_ALREADY_RUNNING} as BSLaunchErrorData);
|
||||
}
|
||||
|
||||
const bsFolderPath = await this.localVersionService.getInstalledVersionPath(launchOptions.version);
|
||||
const exePath = path.join(bsFolderPath, BS_EXECUTABLE);
|
||||
|
||||
if(!(await pathExist(exePath))){
|
||||
return obs.error({type: BSLaunchError.BS_NOT_FOUND} as BSLaunchErrorData);
|
||||
}
|
||||
|
||||
// Open Steam if not running
|
||||
if(!launchOptions.version.oculus && !(await this.steamService.steamRunning())){
|
||||
obs.next({type: BSLaunchEvent.STEAM_LAUNCHING});
|
||||
|
||||
await this.steamService.openSteam().then(() => {
|
||||
obs.next({type: BSLaunchEvent.STEAM_LAUNCHED});
|
||||
}).catch(e => {
|
||||
log.error(e);
|
||||
obs.next({type: BSLaunchWarning.UNABLE_TO_LAUNCH_STEAM});
|
||||
});
|
||||
}
|
||||
|
||||
// Backup SteamVR when desktop mode is enabled
|
||||
if(!launchOptions.version.oculus && launchOptions.desktop){
|
||||
await this.backupSteamVR().catch(() => {
|
||||
return this.restoreSteamVR();
|
||||
});
|
||||
await lastValueFrom(timer(2_000));
|
||||
} else if(!launchOptions.version.oculus){
|
||||
await this.restoreSteamVR();
|
||||
}
|
||||
|
||||
const launchArgs = this.buildBsLaunchArgs(launchOptions);
|
||||
|
||||
obs.next({type: BSLaunchEvent.BS_LAUNCHING});
|
||||
|
||||
await new Promise<number>((resolve, reject) => {
|
||||
const bsProcess = this.launchBSProcess(exePath, launchArgs, launchOptions.debug);
|
||||
|
||||
bsProcess.on("error", reject);
|
||||
bsProcess.on("exit", resolve);
|
||||
|
||||
setTimeout(() => {
|
||||
bsProcess.removeAllListeners("error");
|
||||
bsProcess.removeAllListeners("exit");
|
||||
resolve(-1);
|
||||
}, 4000);
|
||||
|
||||
}).then(exitCode => {
|
||||
log.info("BS process exit code", exitCode);
|
||||
}).catch(err => {
|
||||
log.error(err);
|
||||
obs.error({type: BSLaunchError.BS_EXIT_ERROR, data: err} as BSLaunchErrorData);
|
||||
});
|
||||
|
||||
})().then(() => {
|
||||
obs.complete();
|
||||
}).catch(err => {
|
||||
obs.error({type: BSLaunchError.UNKNOWN_ERROR, data: err} as BSLaunchErrorData);
|
||||
})});
|
||||
}
|
||||
|
||||
private shortcutParamsToLaunchOption(params: ShortcutParams): LaunchOption{
|
||||
const res: LaunchOption = {
|
||||
version: {
|
||||
BSVersion: params.version,
|
||||
name: params.versionName,
|
||||
steam: params.versionSteam === "true",
|
||||
oculus: params.versionOculus === "true",
|
||||
ino: +params.versionIno
|
||||
},
|
||||
oculus: params.oculusMode === "true",
|
||||
desktop: params.desktopMode === "true",
|
||||
debug: params.debug === "true",
|
||||
additionalArgs: params.additionalArgs
|
||||
};
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
private launchOptionToShortcutParams(launchOptions: LaunchOption): ShortcutParams{
|
||||
const res: ShortcutParams = { version: launchOptions.version.BSVersion };
|
||||
|
||||
if(launchOptions.version.name){ res.versionName = launchOptions.version.name; }
|
||||
if(launchOptions.version.steam){ res.versionSteam = `${launchOptions.version.steam}`; }
|
||||
if(launchOptions.version.oculus){ res.versionOculus = `${launchOptions.version.oculus}`; }
|
||||
if(launchOptions.version.ino){ res.versionIno = `${launchOptions.version.ino}`; }
|
||||
|
||||
if(launchOptions.oculus){ res.oculusMode = "true"; }
|
||||
if(launchOptions.desktop){ res.desktopMode = "true"; }
|
||||
if(launchOptions.debug){ res.debug = "true"; }
|
||||
if(launchOptions.additionalArgs){ res.additionalArgs = launchOptions.additionalArgs; }
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
private createShortcutPngBuffer(color: Color): Buffer{
|
||||
|
||||
const launchMods = [];
|
||||
const svgIcon = `
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 406.4 406.4" height="406.4" width="406.4">
|
||||
<rect rx="69.453" height="406.4" width="406.4" fill="${color.hex()}"/>
|
||||
<path d="M65.467 60.6H336.4v33.867L200.933 162.2 65.467 94.467z" fill="#fff"/>
|
||||
</svg>
|
||||
`;
|
||||
|
||||
if(launchOptions.oculus){ launchMods.push("-vrmode oculus"); }
|
||||
if(launchOptions.desktop){ launchMods.push("fpfc"); }
|
||||
if(launchOptions.debug){ launchMods.push("--verbose"); }
|
||||
return new Resvg(svgIcon, {
|
||||
fitTo: { mode: "width", value: 256 }
|
||||
}).render().asPng();
|
||||
|
||||
if(launchOptions.debug){
|
||||
this.bsProcess = spawn(`\"${exePath}\"`, launchMods, {shell: true, cwd, env: {...process.env, "SteamAppId": BS_APP_ID}, detached: true, windowsVerbatimArguments: true });
|
||||
}
|
||||
else{
|
||||
this.bsProcess = spawn(`\"${exePath}\"`, launchMods, {shell: true, cwd, env: {...process.env, "SteamAppId": BS_APP_ID} });
|
||||
}
|
||||
|
||||
this.bsProcess.on('message', msg => console.log(msg));
|
||||
this.bsProcess.on('error', err => console.log(err));
|
||||
this.bsProcess.on('exit', code => this.utilsService.ipcSend("bs-launch.exit", {data: code, success: code === 0}));
|
||||
|
||||
return "LAUNCHED";
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Create .png file for the shortcut with the given color
|
||||
* @param {Color} color
|
||||
* @returns {Promise<string>} Path of the icon
|
||||
*/
|
||||
private async createShortcutPng(color: Color): Promise<string>{
|
||||
const pngBuffer = this.createShortcutPngBuffer(color);
|
||||
|
||||
await ensureDir(IMAGE_CACHE_PATH);
|
||||
|
||||
const iconPath = path.join(IMAGE_CACHE_PATH, `launch_shortcut_${color.hex()}.png`);
|
||||
|
||||
await writeFile(iconPath, pngBuffer);
|
||||
|
||||
return iconPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create .ico file for the shortcut with the given color
|
||||
* @param {Color} color
|
||||
* @returns {Promise<string>} Path of the icon
|
||||
*/
|
||||
private async createShortcutIco(color: Color): Promise<string>{
|
||||
const pngBuffer = this.createShortcutPngBuffer(color);
|
||||
const icoBuffer = await toIco([pngBuffer]);
|
||||
|
||||
await ensureDir(IMAGE_CACHE_PATH);
|
||||
|
||||
const iconPath = path.join(IMAGE_CACHE_PATH, `launch_shortcut_${color.hex()}.ico`);
|
||||
|
||||
await writeFile(iconPath, icoBuffer);
|
||||
|
||||
return iconPath;
|
||||
}
|
||||
|
||||
public async createLaunchShortcut(launchOptions: LaunchOption): Promise<boolean>{
|
||||
const shortcutParams = this.launchOptionToShortcutParams(launchOptions);
|
||||
const shortcutUrl = this.bsmProtocolService.buildLink("launch", shortcutParams).toString();
|
||||
|
||||
const shortcutName = ["Beat Saber", launchOptions.version.BSVersion, launchOptions.version.name].join(" ");
|
||||
const shortcutIconColor = new Color(launchOptions.version.color, "hex");
|
||||
|
||||
return execOnOs({
|
||||
win32: async () => (
|
||||
shell.writeShortcutLink(path.join(app.getPath("desktop"), `${shortcutName}.lnk`), {
|
||||
target: shortcutUrl,
|
||||
icon: await this.createShortcutIco(shortcutIconColor),
|
||||
iconIndex: 0,
|
||||
description: [shortcutName, launchOptions.version.color].join(" "), // <= Need color in description to help windows know that the shortcut is different
|
||||
})
|
||||
),
|
||||
linux: async () => (
|
||||
createDesktopUrlShortcut(path.join(app.getPath("desktop"), `${shortcutName}.desktop`), {
|
||||
name: shortcutName,
|
||||
url: shortcutUrl,
|
||||
icon: await this.createShortcutPng(shortcutIconColor),
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
private async openShortcutLaunchWindow(launchOptions: ShortcutParams): Promise<void>{
|
||||
const launchOption = this.shortcutParamsToLaunchOption(launchOptions);
|
||||
|
||||
const bsPath: string = await (async () => {
|
||||
const bsPath = await this.localVersionService.getInstalledVersionPath(launchOption.version);
|
||||
return bsPath ?? this.localVersionService.getVersionPath(launchOption.version);
|
||||
})().catch(e => {
|
||||
log.error(e);
|
||||
return null;
|
||||
});
|
||||
|
||||
launchOption.version = (await this.localVersionService.getVersionOfBSFolder(bsPath, {
|
||||
steam: launchOption.version.steam,
|
||||
oculus: launchOption.version.oculus,
|
||||
})) ?? launchOption.version;
|
||||
|
||||
launchOption.version = {...(await this.remoteVersion.getVersionDetails(launchOption.version.BSVersion)), ...launchOption.version};
|
||||
|
||||
this.ipc.once("shortcut-launch-options", (_data, reply) => {
|
||||
reply(of(launchOption));
|
||||
});
|
||||
|
||||
this.windows.openWindow("shortcut-launch.html");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
type ShortcutParams = {
|
||||
oculusMode?: string;
|
||||
desktopMode?: string;
|
||||
debug?: string;
|
||||
additionalArgs?: string[];
|
||||
version: string;
|
||||
versionName?: string;
|
||||
versionIno?: string;
|
||||
versionSteam?: string;
|
||||
versionOculus?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create .desktop file for url shortcut (only for linux)
|
||||
* @param {string} shortcutPath
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
function createDesktopUrlShortcut(shortcutPath: string, options?: {
|
||||
url: string
|
||||
name: string,
|
||||
icon: string
|
||||
}): Promise<boolean> {
|
||||
const { url, name, icon } = options || {};
|
||||
|
||||
const data = [
|
||||
"[Desktop Entry]",
|
||||
"Type=Link",
|
||||
`Name=${name}`,
|
||||
`Icon=${icon}`,
|
||||
`URL=${url}`
|
||||
].join("\n");
|
||||
|
||||
return writeFile(shortcutPath, data).then(() => true);
|
||||
}
|
||||
|
||||
@@ -1,79 +1,117 @@
|
||||
import { BSVersionLibService } from "./bs-version-lib.service";
|
||||
import { BSVersion, PartialBSVersion } from 'shared/bs-version.interface';
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { InstallationLocationService } from "./installation-location.service";
|
||||
import { SteamService } from "./steam.service";
|
||||
import { UtilsService } from "./utils.service";
|
||||
import { BS_APP_ID, OCULUS_BS_DIR } from "../constants";
|
||||
import path from "path";
|
||||
import { createReadStream } from "fs";
|
||||
import fs from "fs-extra";
|
||||
import { ConfigurationService } from "./configuration.service";
|
||||
import { rename } from "fs/promises";
|
||||
import { lstat, rename } from "fs/promises";
|
||||
import { BsmException } from "shared/models/bsm-exception.model";
|
||||
import log from "electron-log";
|
||||
import { OculusService } from "./oculus.service";
|
||||
import { DownloadLinkType } from "shared/models/mods";
|
||||
import sanitize from "sanitize-filename";
|
||||
import { copyDirectoryWithJunctions, deleteFolder, getFoldersInFolder, pathExist } from "../helpers/fs.helpers";
|
||||
import { FolderLinkerService } from "./folder-linker.service";
|
||||
import { ReadStream, createReadStream } from "fs-extra";
|
||||
import readline from "readline";
|
||||
|
||||
export class BSLocalVersionService{
|
||||
export class BSLocalVersionService {
|
||||
private static instance: BSLocalVersionService;
|
||||
|
||||
private static instance: BSLocalVersionService;
|
||||
private readonly CUSTOM_VERSIONS_KEY = "custom-versions";
|
||||
|
||||
private readonly CUSTOM_VERSIONS_KEY = "custom-versions";
|
||||
private readonly installLocationService: InstallationLocationService;
|
||||
private readonly steamService: SteamService;
|
||||
private readonly oculusService: OculusService;
|
||||
private readonly remoteVersionService: BSVersionLibService;
|
||||
private readonly configService: ConfigurationService;
|
||||
private readonly linker: FolderLinkerService;
|
||||
|
||||
private readonly installLocationService: InstallationLocationService;
|
||||
private readonly utilsService: UtilsService;
|
||||
private readonly steamService: SteamService;
|
||||
private readonly oculusService: OculusService;
|
||||
private readonly remoteVersionService: BSVersionLibService;
|
||||
private readonly configService: ConfigurationService;
|
||||
public static getInstance(): BSLocalVersionService {
|
||||
if (!BSLocalVersionService.instance) {
|
||||
BSLocalVersionService.instance = new BSLocalVersionService();
|
||||
}
|
||||
return BSLocalVersionService.instance;
|
||||
}
|
||||
|
||||
public static getInstance(): BSLocalVersionService{
|
||||
if(!BSLocalVersionService.instance){ BSLocalVersionService.instance = new BSLocalVersionService(); }
|
||||
return BSLocalVersionService.instance;
|
||||
}
|
||||
|
||||
private constructor(){
|
||||
private constructor() {
|
||||
this.installLocationService = InstallationLocationService.getInstance();
|
||||
this.utilsService = UtilsService.getInstance();
|
||||
this.steamService = SteamService.getInstance();
|
||||
this.oculusService = OculusService.getInstance();
|
||||
this.remoteVersionService = BSVersionLibService.getInstance();
|
||||
this.configService = ConfigurationService.getInstance();
|
||||
this.linker = FolderLinkerService.getInstance();
|
||||
}
|
||||
|
||||
|
||||
private async getVersionFromGlobalGameManagerFile(versionFilePath: string): Promise<BSVersion> {
|
||||
|
||||
public async getVersionOfBSFolder(bsPath: string): Promise<PartialBSVersion>{
|
||||
const versionFilePath = path.join(bsPath, 'Beat Saber_Data', 'globalgamemanagers');
|
||||
if(!this.utilsService.pathExist(versionFilePath)){ return null; }
|
||||
const versionsAvailable = await this.remoteVersionService.getAvailableVersions();
|
||||
return new Promise<PartialBSVersion>(resolve => {
|
||||
const stream = createReadStream(versionFilePath);
|
||||
let findVersion: PartialBSVersion = null;
|
||||
stream.on('data', (line) => {
|
||||
line = line.toString();
|
||||
for(const version of versionsAvailable){
|
||||
if(line.includes(version.BSVersion)){
|
||||
findVersion = {BSVersion: version.BSVersion};
|
||||
if(findVersion.BSVersion !== path.basename(bsPath)){
|
||||
findVersion.name = path.basename(bsPath);
|
||||
if(!(await pathExist(versionFilePath))){ return null; }
|
||||
|
||||
const versionsDict = await this.remoteVersionService.getAvailableVersions();
|
||||
|
||||
let stream: ReadStream;
|
||||
|
||||
try{
|
||||
stream = createReadStream(versionFilePath);
|
||||
const rl = readline.createInterface({
|
||||
input: stream,
|
||||
crlfDelay: Infinity
|
||||
});
|
||||
|
||||
for await (const line of rl) {
|
||||
for (const bsVersion of versionsDict) {
|
||||
if (line.includes(bsVersion.BSVersion)) {
|
||||
stream.close();
|
||||
return {...bsVersion};
|
||||
}
|
||||
stream.close();
|
||||
stream.destroy();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
stream.on('end', () => {
|
||||
if(findVersion){ resolve(findVersion) }
|
||||
resolve(findVersion);
|
||||
});
|
||||
stream.on('close', () => {
|
||||
if(findVersion){ resolve(findVersion) }
|
||||
resolve(findVersion);
|
||||
})
|
||||
})
|
||||
|
||||
} catch(e) {
|
||||
log.error(e);
|
||||
} finally {
|
||||
stream?.close();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public async getVersionOfBSFolder(
|
||||
bsPath: string,
|
||||
options?: {
|
||||
steam?: boolean;
|
||||
oculus?: boolean;
|
||||
}
|
||||
): Promise<BSVersion>{
|
||||
|
||||
if(!bsPath){ return null; }
|
||||
|
||||
const versionFilePath = path.join(bsPath, 'Beat Saber_Data', 'globalgamemanagers');
|
||||
const folderVersion = await this.getVersionFromGlobalGameManagerFile(versionFilePath);
|
||||
|
||||
if(!folderVersion){ return null; }
|
||||
|
||||
if(options?.steam || options?.oculus){
|
||||
return {...folderVersion, ...options};
|
||||
}
|
||||
|
||||
if(folderVersion.BSVersion !== path.basename(bsPath)){
|
||||
folderVersion.name = path.basename(bsPath);
|
||||
}
|
||||
|
||||
const folderStats = await lstat(bsPath);
|
||||
if(folderStats.ino){
|
||||
folderVersion.ino = folderStats.ino;
|
||||
}
|
||||
|
||||
const customVersion = this.getCustomVersions().find(customVersion => {
|
||||
return customVersion.BSVersion === folderVersion.BSVersion && customVersion.name === folderVersion.name;
|
||||
});
|
||||
|
||||
folderVersion.color = customVersion?.color;
|
||||
|
||||
return folderVersion;
|
||||
}
|
||||
|
||||
private setCustomVersions(versions: BSVersion[]): void{
|
||||
@@ -93,102 +131,127 @@ export class BSLocalVersionService{
|
||||
this.setCustomVersions(customVersions.filter(v => (v.name !== version.name || v.BSVersion !== version.BSVersion || v.color !== version.color)));
|
||||
}
|
||||
|
||||
public async getVersionPath(version: BSVersion): Promise<string>{
|
||||
if(version.steam){ return this.steamService.getGameFolder(BS_APP_ID, "Beat Saber") }
|
||||
if(version.oculus){ return this.oculusService.getGameFolder(OCULUS_BS_DIR); }
|
||||
return path.join(
|
||||
this.installLocationService.versionsDirectory,
|
||||
this.getVersionFolder(version)
|
||||
);
|
||||
}
|
||||
|
||||
private removeSpecialChar(seq: string): string{
|
||||
return sanitize(seq);
|
||||
}
|
||||
/**
|
||||
* Return path of a version even if it's not installed.
|
||||
* @param {BSVersion} version
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
public async getVersionPath(version: BSVersion): Promise<string>{
|
||||
if(version.steam){ return this.steamService.getGameFolder(BS_APP_ID, "Beat Saber") }
|
||||
if(version.oculus){ return this.oculusService.getGameFolder(OCULUS_BS_DIR); }
|
||||
|
||||
return path.join(
|
||||
this.installLocationService.versionsDirectory,
|
||||
this.getVersionFolder(version)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return path of an installed version. Returns null if not found.
|
||||
* @param {BSVersion} version
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
public async getInstalledVersionPath(version: BSVersion): Promise<string>{
|
||||
const versionPath = await this.getVersionPath(version);
|
||||
if(await pathExist(versionPath)){ return versionPath; }
|
||||
|
||||
const versionFolders = await getFoldersInFolder(this.installLocationService.versionsDirectory);
|
||||
|
||||
for(const folder of versionFolders){
|
||||
const stats = await lstat(folder);
|
||||
if(stats.ino === version.ino){
|
||||
return folder;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public getVersionFolder(version: BSVersion): string{
|
||||
return version.name ?? version.BSVersion;
|
||||
}
|
||||
|
||||
public getVersionType(version: BSVersion): DownloadLinkType{
|
||||
if(version.steam){ return "steam"; }
|
||||
if(version.oculus){ return "oculus"; }
|
||||
return "universal"
|
||||
public getVersionType(version: BSVersion): DownloadLinkType {
|
||||
if (version.steam) {
|
||||
return "steam";
|
||||
}
|
||||
if (version.oculus) {
|
||||
return "oculus";
|
||||
}
|
||||
return "universal";
|
||||
}
|
||||
|
||||
private async getSteamVersion(): Promise<BSVersion>{
|
||||
private async getSteamVersion(): Promise<BSVersion> {
|
||||
const steamBsFolder = await this.steamService.getGameFolder(BS_APP_ID, "Beat Saber");
|
||||
|
||||
if(!steamBsFolder || !this.utilsService.pathExist(steamBsFolder)){ return null; }
|
||||
const steamBsVersion = await this.getVersionOfBSFolder(steamBsFolder);
|
||||
if (!steamBsFolder || !(await pathExist(steamBsFolder))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if(!steamBsVersion){ return null; }
|
||||
const version = await this.remoteVersionService.getVersionDetails(steamBsVersion.BSVersion);
|
||||
if(!version){ return null; }
|
||||
return {...version, steam: true};
|
||||
return this.getVersionOfBSFolder(steamBsFolder, { steam: true });
|
||||
}
|
||||
|
||||
private async getOculusVersion(): Promise<BSVersion>{
|
||||
private async getOculusVersion(): Promise<BSVersion> {
|
||||
const oculusBsFolder = await this.oculusService.getGameFolder(OCULUS_BS_DIR);
|
||||
if(!oculusBsFolder){ return null; }
|
||||
const oculusBsVersion = await this.getVersionOfBSFolder(oculusBsFolder);
|
||||
if(!oculusBsVersion){ return null; }
|
||||
const version = await this.remoteVersionService.getVersionDetails(oculusBsVersion.BSVersion);
|
||||
if(!version){ return null; }
|
||||
return {...version, oculus: true};
|
||||
|
||||
if (!oculusBsFolder) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return this.getVersionOfBSFolder(oculusBsFolder, { oculus: true });
|
||||
}
|
||||
|
||||
public async getInstalledVersions(): Promise<BSVersion[]>{
|
||||
|
||||
public async getInstalledVersions(): Promise<BSVersion[]> {
|
||||
const versions: BSVersion[] = [];
|
||||
|
||||
const steamVersion = await this.getSteamVersion();
|
||||
if(steamVersion){ versions.push(steamVersion); }
|
||||
if (steamVersion) {
|
||||
versions.push(steamVersion);
|
||||
}
|
||||
|
||||
const oculusVersion = await this.getOculusVersion();
|
||||
if(oculusVersion){ versions.push(oculusVersion); }
|
||||
if (oculusVersion) {
|
||||
versions.push(oculusVersion);
|
||||
}
|
||||
|
||||
if(!this.utilsService.pathExist(this.installLocationService.versionsDirectory)){ return versions }
|
||||
if (!(await pathExist(this.installLocationService.versionsDirectory))) {
|
||||
return versions;
|
||||
}
|
||||
|
||||
const folderInInstallation = this.utilsService.listDirsInDir(this.installLocationService.versionsDirectory, true);
|
||||
const folderInInstallation = await getFoldersInFolder(this.installLocationService.versionsDirectory);
|
||||
|
||||
for(const f of folderInInstallation){
|
||||
for (const f of folderInInstallation) {
|
||||
log.info("try get version from folder", f);
|
||||
const rawVersion = await this.getVersionOfBSFolder(f);
|
||||
if(!rawVersion){ continue; }
|
||||
const bsVersion = {...await this.remoteVersionService.getVersionDetails(rawVersion.BSVersion)};
|
||||
if(!bsVersion){ continue; }
|
||||
bsVersion.name = path.basename(f) !== bsVersion.BSVersion ? path.basename(f) : undefined;
|
||||
|
||||
const customVersion = this.getCustomVersions().find(custom => custom.BSVersion === bsVersion.BSVersion && custom.name === bsVersion.name);
|
||||
|
||||
if(customVersion){
|
||||
bsVersion.color = customVersion.color;
|
||||
}
|
||||
const version = await this.getVersionOfBSFolder(f);
|
||||
|
||||
versions.push(bsVersion);
|
||||
if(!version){ continue; }
|
||||
|
||||
versions.push(version);
|
||||
};
|
||||
|
||||
this.setCustomVersions(versions.filter(v => !!v.color));
|
||||
|
||||
return versions;
|
||||
}
|
||||
}
|
||||
|
||||
public async deleteVersion(version: BSVersion): Promise<boolean>{
|
||||
if(version.steam || version.oculus){ return false; }
|
||||
const versionFolder = await this.getVersionPath(version);
|
||||
if(!this.utilsService.pathExist(versionFolder)){ return true; }
|
||||
public async deleteVersion(version: BSVersion): Promise<boolean>{
|
||||
if(version.steam || version.oculus){ return false; }
|
||||
const versionFolder = await this.getVersionPath(version);
|
||||
if(!(await pathExist(versionFolder))){ return true; }
|
||||
|
||||
return this.utilsService.deleteFolder(versionFolder)
|
||||
.then(() => { return true; })
|
||||
.catch(() => { return false; })
|
||||
}
|
||||
return deleteFolder(versionFolder)
|
||||
.then(() => { return true; })
|
||||
.catch(() => { return false; })
|
||||
}
|
||||
|
||||
public async editVersion(version: BSVersion, name: string, color: string): Promise<BSVersion>{
|
||||
if(version.steam || version.oculus){ throw {title: "CantEditSteam", msg: "CantEditSteam"} as BsmException; }
|
||||
if(version.steam || version.oculus){ throw {title: "CantEditSteam", message: "CantEditSteam"} as BsmException; }
|
||||
const oldPath = await this.getVersionPath(version);
|
||||
const editedVersion: BSVersion = version.BSVersion === name
|
||||
? {...version, name: undefined, color}
|
||||
: {...version, name: this.removeSpecialChar(name), color};
|
||||
: {...version, name: sanitize(name), color};
|
||||
const newPath = await this.getVersionPath(editedVersion);
|
||||
|
||||
if(oldPath === newPath){
|
||||
@@ -197,7 +260,7 @@ export class BSLocalVersionService{
|
||||
return editedVersion;
|
||||
}
|
||||
|
||||
if(this.utilsService.pathExist(newPath) && newPath === oldPath){ throw {title: "VersionAlreadExist"} as BsmException; }
|
||||
if((await pathExist(newPath)) && newPath === oldPath){ throw {title: "VersionAlreadExist"} as BsmException; }
|
||||
|
||||
return rename(oldPath, newPath).then(() => {
|
||||
this.deleteCustomVersion(version);
|
||||
@@ -205,15 +268,15 @@ export class BSLocalVersionService{
|
||||
return editedVersion;
|
||||
}).catch((err: Error) => {
|
||||
log.error("edit version error", err, version, name, color);
|
||||
throw {title: "CantRename", error: err} as BsmException;
|
||||
throw {title: "CantRename", ...err} as BsmException;
|
||||
});
|
||||
}
|
||||
|
||||
public async cloneVersion(version: BSVersion, name: string, color: string): Promise<BSVersion>{
|
||||
const originPath = await this.getVersionPath(version);
|
||||
const cloneVersion: BSVersion = version.BSVersion === name
|
||||
? {...version, name: undefined, color}
|
||||
: {...version, name: this.removeSpecialChar(name), color, steam: false, oculus: false};
|
||||
? {...version, name: undefined, color, steam: false, oculus: false}
|
||||
: {...version, name: sanitize(name), color, steam: false, oculus: false};
|
||||
const newPath = await this.getVersionPath(cloneVersion);
|
||||
|
||||
if(originPath === newPath){
|
||||
@@ -221,15 +284,30 @@ export class BSLocalVersionService{
|
||||
this.addCustomVersion(cloneVersion);
|
||||
}
|
||||
|
||||
if(this.utilsService.pathExist(newPath)){ throw {title: "VersionAlreadExist"} as BsmException; }
|
||||
if(await pathExist(newPath)){ throw {title: "VersionAlreadExist"} as BsmException; }
|
||||
|
||||
return fs.copy(originPath, newPath, {dereference: true}).then(() => {
|
||||
return copyDirectoryWithJunctions(originPath, newPath).then(() => {
|
||||
this.addCustomVersion(cloneVersion);
|
||||
return cloneVersion;
|
||||
}).catch((err: Error) => {
|
||||
log.error("clone version error", err, version, name, color);
|
||||
throw {title: "CantClone", error: err} as BsmException
|
||||
throw {title: "CantClone", ...err} as BsmException
|
||||
})
|
||||
}
|
||||
|
||||
public async getLinkedFolders(version: BSVersion): Promise<string[]>{
|
||||
const versionPath = await this.getVersionPath(version);
|
||||
const [rootFolders, beatSaberDataFolders] = await Promise.all([getFoldersInFolder(versionPath), getFoldersInFolder(path.join(versionPath, "Beat Saber_Data"))]);
|
||||
|
||||
const linkedFolder = Promise.all(
|
||||
[...rootFolders, ...beatSaberDataFolders].map(async folder => {
|
||||
if (!(await this.linker.isFolderSymlink(folder))) {
|
||||
return null;
|
||||
}
|
||||
return folder;
|
||||
})
|
||||
);
|
||||
|
||||
return (await linkedFolder).filter(folder => folder);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,69 +1,74 @@
|
||||
import { get } from 'https'
|
||||
import { UtilsService } from './utils.service';
|
||||
import path from 'path';
|
||||
import { writeFileSync } from 'fs';
|
||||
import { BSVersion } from 'shared/bs-version.interface';
|
||||
import { RequestService } from "./request.service"
|
||||
import isOnline from 'is-online';
|
||||
import { UtilsService } from "./utils.service";
|
||||
import path from "path";
|
||||
import { writeFileSync } from "fs";
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { RequestService } from "./request.service";
|
||||
import { readJSON } from "fs-extra";
|
||||
import { allSettled } from "../../shared/helpers/promise.helpers";
|
||||
|
||||
export class BSVersionLibService{
|
||||
export class BSVersionLibService {
|
||||
private readonly REMOTE_BS_VERSIONS_URL: string = "https://raw.githubusercontent.com/Zagrios/bs-manager/master/assets/jsons/bs-versions.json";
|
||||
private readonly VERSIONS_FILE: string = "bs-versions.json";
|
||||
|
||||
private readonly REMOTE_BS_VERSIONS_URL: string = "https://raw.githubusercontent.com/Zagrios/bs-manager/master/assets/jsons/bs-versions.json"
|
||||
private readonly VERSIONS_FILE: string = "bs-versions.json";
|
||||
private static instance: BSVersionLibService;
|
||||
|
||||
private static instance: BSVersionLibService;
|
||||
private utilsService: UtilsService;
|
||||
private requestService: RequestService;
|
||||
|
||||
private utilsService: UtilsService;
|
||||
private requestService: RequestService
|
||||
private bsVersions: BSVersion[];
|
||||
|
||||
private bsVersions: BSVersion[];
|
||||
|
||||
private constructor(){
|
||||
this.utilsService = UtilsService.getInstance();
|
||||
this.requestService = RequestService.getInstance();
|
||||
}
|
||||
|
||||
|
||||
public static getInstance(): BSVersionLibService{
|
||||
if(!BSVersionLibService.instance){ BSVersionLibService.instance = new BSVersionLibService(); }
|
||||
return BSVersionLibService.instance;
|
||||
}
|
||||
|
||||
private getRemoteVersions(): Promise<BSVersion[]>{
|
||||
return this.requestService.get<BSVersion[]>(this.REMOTE_BS_VERSIONS_URL);
|
||||
private constructor() {
|
||||
this.utilsService = UtilsService.getInstance();
|
||||
this.requestService = RequestService.getInstance();
|
||||
}
|
||||
|
||||
private async getLocalVersions(): Promise<BSVersion[]>{
|
||||
const localVersionsPath = path.join(this.utilsService.getAssestsJsonsPath(), this.VERSIONS_FILE);
|
||||
const rawVersion = await this.utilsService.readFileAsync(localVersionsPath);
|
||||
return JSON.parse(rawVersion);
|
||||
}
|
||||
public static getInstance(): BSVersionLibService {
|
||||
if (!BSVersionLibService.instance) {
|
||||
BSVersionLibService.instance = new BSVersionLibService();
|
||||
}
|
||||
return BSVersionLibService.instance;
|
||||
}
|
||||
|
||||
private async updateLocalVersions(versions: BSVersion[]): Promise<void>{
|
||||
const localVersionsPath = path.join(this.utilsService.getAssestsJsonsPath(), this.VERSIONS_FILE);
|
||||
writeFileSync(localVersionsPath, JSON.stringify(versions, null, "\t"), {encoding: 'utf-8', flag: 'w'});
|
||||
};
|
||||
private getRemoteVersions(): Promise<BSVersion[]> {
|
||||
return this.requestService.getJSON<BSVersion[]>(this.REMOTE_BS_VERSIONS_URL);
|
||||
}
|
||||
|
||||
private async getLocalVersions(): Promise<BSVersion[]> {
|
||||
const localVersionsPath = path.join(this.utilsService.getAssestsJsonsPath(), this.VERSIONS_FILE);
|
||||
return readJSON(localVersionsPath);
|
||||
}
|
||||
|
||||
private async updateLocalVersions(versions: BSVersion[]): Promise<void> {
|
||||
const localVersionsPath = path.join(this.utilsService.getAssestsJsonsPath(), this.VERSIONS_FILE);
|
||||
writeFileSync(localVersionsPath, JSON.stringify(versions, null, "\t"), { encoding: "utf-8", flag: "w" });
|
||||
}
|
||||
|
||||
private async loadBsVersions(): Promise<BSVersion[]> {
|
||||
if (this.bsVersions) {
|
||||
return this.bsVersions;
|
||||
}
|
||||
|
||||
const [localVersions, remoteVersions] = await allSettled([this.getLocalVersions(), this.getRemoteVersions()], { keepStructure: true });
|
||||
|
||||
private async loadBsVersions(): Promise<BSVersion[]>{
|
||||
if(this.bsVersions){ return this.bsVersions; }
|
||||
const [localVersions, remoteVersions] = await Promise.all([
|
||||
this.getLocalVersions(), (await isOnline({timeout: 1500}) && this.getRemoteVersions())
|
||||
]);
|
||||
let resVersions = localVersions;
|
||||
if(remoteVersions && remoteVersions.length){ resVersions = remoteVersions; this.updateLocalVersions(resVersions); }
|
||||
if (remoteVersions?.length) {
|
||||
resVersions = remoteVersions;
|
||||
this.updateLocalVersions(resVersions);
|
||||
}
|
||||
this.bsVersions = resVersions;
|
||||
return this.bsVersions;
|
||||
}
|
||||
}
|
||||
|
||||
public async getAvailableVersions(): Promise<BSVersion[]>{
|
||||
const bsVersions = await this.loadBsVersions();
|
||||
if(!bsVersions || !bsVersions.length){ return []; }
|
||||
return bsVersions;
|
||||
}
|
||||
public async getAvailableVersions(): Promise<BSVersion[]> {
|
||||
const bsVersions = await this.loadBsVersions();
|
||||
if (!bsVersions?.length) {
|
||||
return [];
|
||||
}
|
||||
return bsVersions;
|
||||
}
|
||||
|
||||
public async getVersionDetails(version: string): Promise<BSVersion>{
|
||||
public async getVersionDetails(version: string): Promise<BSVersion> {
|
||||
const versions = await this.getAvailableVersions();
|
||||
return versions.find(v => v.BSVersion === version);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
import { Subject, Subscription, filter } from "rxjs";
|
||||
import { DeepLinkService } from "./deep-link.service";
|
||||
import { URL } from "url";
|
||||
import { buildUrl, isValidUrl } from "../../shared/helpers/url.helpers";
|
||||
|
||||
export class BsmProtocolService {
|
||||
|
||||
private static instance: BsmProtocolService;
|
||||
|
||||
public static getInstance(): BsmProtocolService{
|
||||
if(!BsmProtocolService.instance){ BsmProtocolService.instance = new BsmProtocolService(); }
|
||||
return BsmProtocolService.instance;
|
||||
}
|
||||
|
||||
private readonly BSM_PROTOCOL = "bsmanager";
|
||||
|
||||
private readonly deepLink: DeepLinkService;
|
||||
|
||||
private linkeReceived$ = new Subject<URL>();
|
||||
|
||||
private constructor(){
|
||||
this.deepLink = DeepLinkService.getInstance();
|
||||
|
||||
this.registerBsmProtocol();
|
||||
|
||||
this.deepLink.addLinkOpenedListener(this.BSM_PROTOCOL, link => {
|
||||
if(!isValidUrl(link)){ return; }
|
||||
this.linkeReceived$.next(new URL(link));
|
||||
});
|
||||
}
|
||||
|
||||
private registerBsmProtocol(): boolean{
|
||||
if(this.deepLink.isDeepLinkRegistred(this.BSM_PROTOCOL)){ return true; }
|
||||
return this.deepLink.registerDeepLink(this.BSM_PROTOCOL);
|
||||
}
|
||||
|
||||
public on(host: string, listener: (link: URL) => void): Subscription {
|
||||
return this.linkeReceived$.pipe(filter(link => link.host === host)).subscribe(listener);
|
||||
}
|
||||
|
||||
public buildLink(host: string, params?: Record<string, string|string[]>): URL {
|
||||
return buildUrl({
|
||||
protocol: this.BSM_PROTOCOL,
|
||||
host,
|
||||
search: params
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,11 +2,12 @@ import ElectronStore from "electron-store";
|
||||
import { InstallationLocationService } from "./installation-location.service";
|
||||
|
||||
export class ConfigurationService {
|
||||
|
||||
private static instance: ConfigurationService;
|
||||
|
||||
public static getInstance(): ConfigurationService{
|
||||
if(!ConfigurationService.instance){ ConfigurationService.instance = new ConfigurationService(); }
|
||||
public static getInstance(): ConfigurationService {
|
||||
if (!ConfigurationService.instance) {
|
||||
ConfigurationService.instance = new ConfigurationService();
|
||||
}
|
||||
return ConfigurationService.instance;
|
||||
}
|
||||
|
||||
@@ -14,15 +15,14 @@ export class ConfigurationService {
|
||||
|
||||
private store: ElectronStore;
|
||||
|
||||
private constructor(){
|
||||
private constructor() {
|
||||
this.locations = InstallationLocationService.getInstance();
|
||||
this.initStore();
|
||||
|
||||
this.locations.onInstallLocationUpdate(() => this.initStore());
|
||||
|
||||
}
|
||||
|
||||
private initStore(){
|
||||
private initStore() {
|
||||
const contentPath = this.locations.installationDirectory;
|
||||
this.store = new ElectronStore({
|
||||
cwd: contentPath,
|
||||
@@ -31,16 +31,15 @@ export class ConfigurationService {
|
||||
});
|
||||
}
|
||||
|
||||
public set(key: string, value: unknown): void{
|
||||
public set(key: string, value: unknown): void {
|
||||
this.store.set(key, value);
|
||||
}
|
||||
|
||||
public get<T>(key: string): T{
|
||||
public get<T>(key: string): T {
|
||||
return this.store.get(key) as T;
|
||||
}
|
||||
|
||||
public delete(key: string): void{
|
||||
public delete(key: string): void {
|
||||
this.store.delete(key);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,75 +1,74 @@
|
||||
import { app } from "electron";
|
||||
import path from "path";
|
||||
import { URL } from "url";
|
||||
import log from "electron-log"
|
||||
import log from "electron-log";
|
||||
|
||||
export class DeepLinkService {
|
||||
|
||||
// See docs : https://www.electronjs.org/docs/latest/tutorial/launch-app-from-url-in-another-app#main-process-mainjs
|
||||
|
||||
private static instance: DeepLinkService;
|
||||
|
||||
public static getInstance(): DeepLinkService{
|
||||
if(!DeepLinkService.instance){ DeepLinkService.instance = new DeepLinkService(); }
|
||||
public static getInstance(): DeepLinkService {
|
||||
if (!DeepLinkService.instance) {
|
||||
DeepLinkService.instance = new DeepLinkService();
|
||||
}
|
||||
return DeepLinkService.instance;
|
||||
}
|
||||
|
||||
private readonly listeners = new Map<string, Listerner[]>()
|
||||
private readonly listeners = new Map<string, Listerner[]>();
|
||||
|
||||
private constructor(){}
|
||||
private constructor() {}
|
||||
|
||||
public registerDeepLink(protocol: string): boolean{
|
||||
|
||||
if(process.defaultApp && process.argv.length >= 2){
|
||||
public registerDeepLink(protocol: string): boolean {
|
||||
if (process.defaultApp && process.argv.length >= 2) {
|
||||
return app.setAsDefaultProtocolClient(protocol, process.execPath, [path.resolve(process.argv[1])]);
|
||||
}
|
||||
|
||||
return app.setAsDefaultProtocolClient(protocol);
|
||||
}
|
||||
}
|
||||
|
||||
public unRegisterDeepLink(protocol: string): boolean{
|
||||
|
||||
if(process.defaultApp && process.argv.length >= 2) {
|
||||
public unRegisterDeepLink(protocol: string): boolean {
|
||||
if (process.defaultApp && process.argv.length >= 2) {
|
||||
return app.removeAsDefaultProtocolClient(protocol, process.execPath, [path.resolve(process.argv[1])]);
|
||||
}
|
||||
|
||||
return app.removeAsDefaultProtocolClient(protocol);
|
||||
}
|
||||
|
||||
public isDeepLinkRegistred(protocol: string): boolean{
|
||||
|
||||
if(process.defaultApp && process.argv.length >= 2) {
|
||||
public isDeepLinkRegistred(protocol: string): boolean {
|
||||
if (process.defaultApp && process.argv.length >= 2) {
|
||||
return app.isDefaultProtocolClient(protocol, process.execPath, [path.resolve(process.argv[1])]);
|
||||
}
|
||||
|
||||
return app.isDefaultProtocolClient(protocol);
|
||||
}
|
||||
|
||||
public addLinkOpenedListener(protocol: string, fn: Listerner){
|
||||
|
||||
if(!this.listeners.has(protocol)){
|
||||
public addLinkOpenedListener(protocol: string, fn: Listerner) {
|
||||
if (!this.listeners.has(protocol)) {
|
||||
this.listeners.set(protocol, [] as Listerner[]);
|
||||
}
|
||||
|
||||
|
||||
this.listeners.get(protocol).push(fn);
|
||||
}
|
||||
|
||||
public removeLinkOpenedListener(protocol: string, fn: Listerner){
|
||||
|
||||
if(!this.listeners.get(protocol)?.length){ return; }
|
||||
public removeLinkOpenedListener(protocol: string, fn: Listerner) {
|
||||
if (!this.listeners.get(protocol)?.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
const listeners = this.listeners.get(protocol);
|
||||
const fnIndex = listeners.findIndex(listener => listener === fn);
|
||||
|
||||
if(fnIndex < 0){ return; }
|
||||
if (fnIndex < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
listeners.splice(fnIndex, 1);
|
||||
|
||||
}
|
||||
|
||||
public dispatchLinkOpened(link: string){
|
||||
|
||||
log.info("DEISPATCH", link);
|
||||
log.info("DISPATCH", link);
|
||||
|
||||
const url = new URL(link);
|
||||
|
||||
@@ -78,22 +77,17 @@ export class DeepLinkService {
|
||||
protocolListeners.forEach(listerner => {
|
||||
listerner(link);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public isDeepLink(link: string): boolean{
|
||||
|
||||
try{
|
||||
public isDeepLink(link: string): boolean {
|
||||
try {
|
||||
const url = new URL(link);
|
||||
const protocol = url.protocol.replace(":", "");
|
||||
return Array.from(this.listeners.keys()).some(key => key === protocol);
|
||||
}
|
||||
catch(e){
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
type Listerner = (link: string) => void;
|
||||
type Listerner = (link: string) => void;
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
import { InstallationLocationService } from "./installation-location.service";
|
||||
import log from "electron-log";
|
||||
import { deleteFolder, ensureFolderExist, moveFolderContent, pathExist, unlinkPath } from "../helpers/fs.helpers";
|
||||
import { lstat, symlink } from "fs/promises";
|
||||
import path from "path";
|
||||
import { copy, readlink } from "fs-extra";
|
||||
|
||||
export class FolderLinkerService {
|
||||
private static instance: FolderLinkerService;
|
||||
|
||||
public static getInstance(): FolderLinkerService {
|
||||
if (!FolderLinkerService.instance) {
|
||||
FolderLinkerService.instance = new FolderLinkerService();
|
||||
}
|
||||
return FolderLinkerService.instance;
|
||||
}
|
||||
|
||||
private readonly installLocationService = InstallationLocationService.getInstance();
|
||||
|
||||
private constructor() {
|
||||
this.installLocationService = InstallationLocationService.getInstance();
|
||||
}
|
||||
|
||||
private get sharedFolder(): string {
|
||||
return this.installLocationService.sharedContentPath;
|
||||
}
|
||||
|
||||
private getSharedFolder(folderPath: string, intermediateFolder?: string): string {
|
||||
return path.join(this.sharedFolder, intermediateFolder ?? "", path.basename(folderPath));
|
||||
}
|
||||
|
||||
private getBackupFolder(folderPath: string): string {
|
||||
return `${folderPath}_backup`;
|
||||
}
|
||||
|
||||
private async backupFolder(folderPath: string): Promise<void> {
|
||||
if (!(await pathExist(folderPath))) {
|
||||
return;
|
||||
}
|
||||
return copy(folderPath, this.getBackupFolder(folderPath), { overwrite: true, errorOnExist: false });
|
||||
}
|
||||
|
||||
private async restoreFolder(folderPath: string): Promise<void> {
|
||||
if (!(await pathExist(this.getBackupFolder(folderPath)))) {
|
||||
return;
|
||||
}
|
||||
return copy(this.getBackupFolder(folderPath), folderPath, { overwrite: true, errorOnExist: false }).then(() => {
|
||||
return deleteFolder(this.getBackupFolder(folderPath));
|
||||
});
|
||||
}
|
||||
|
||||
public async linkFolder(folderPath: string, options?: LinkOptions): Promise<void> {
|
||||
const sharedPath = this.getSharedFolder(folderPath, options?.intermediateFolder);
|
||||
|
||||
if (await this.isFolderSymlink(folderPath)) {
|
||||
const isTargetedToSharedPath = await readlink(folderPath)
|
||||
.then(target => target === sharedPath)
|
||||
.catch(() => false);
|
||||
if (isTargetedToSharedPath) {
|
||||
return;
|
||||
}
|
||||
await unlinkPath(folderPath);
|
||||
return symlink(sharedPath, folderPath, "junction");
|
||||
}
|
||||
|
||||
await ensureFolderExist(sharedPath);
|
||||
|
||||
if (options?.backup === true) {
|
||||
await this.backupFolder(folderPath);
|
||||
}
|
||||
|
||||
await ensureFolderExist(folderPath);
|
||||
|
||||
if (options?.keepContents !== false) {
|
||||
await moveFolderContent(folderPath, sharedPath).toPromise();
|
||||
}
|
||||
|
||||
await deleteFolder(folderPath);
|
||||
|
||||
return symlink(sharedPath, folderPath, "junction");
|
||||
}
|
||||
|
||||
public async unlinkFolder(folderPath: string, options?: UnlinkOptions): Promise<void> {
|
||||
if (!(await this.isFolderSymlink(folderPath))) {
|
||||
return;
|
||||
}
|
||||
await unlinkPath(folderPath);
|
||||
|
||||
const sharedPath = this.getSharedFolder(folderPath, options?.intermediateFolder);
|
||||
|
||||
await ensureFolderExist(folderPath);
|
||||
|
||||
if (options?.backup === true) {
|
||||
return this.restoreFolder(folderPath);
|
||||
}
|
||||
|
||||
if (options.moveContents === true) {
|
||||
return moveFolderContent(sharedPath, folderPath)
|
||||
.toPromise()
|
||||
.then(() => {});
|
||||
}
|
||||
|
||||
if (options?.keepContents === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
await ensureFolderExist(sharedPath);
|
||||
|
||||
return copy(sharedPath, folderPath, { errorOnExist: false, recursive: true });
|
||||
}
|
||||
|
||||
public async isFolderSymlink(folder: string): Promise<boolean> {
|
||||
try {
|
||||
if (!(await pathExist(folder))) {
|
||||
return false;
|
||||
}
|
||||
return await lstat(folder).then(stat => stat.isSymbolicLink());
|
||||
} catch (e) {
|
||||
log.error(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export interface LinkOptions {
|
||||
keepContents?: boolean;
|
||||
intermediateFolder?: string;
|
||||
backup?: boolean;
|
||||
}
|
||||
|
||||
export interface UnlinkOptions extends LinkOptions {
|
||||
moveContents?: boolean;
|
||||
}
|
||||
@@ -1,17 +1,15 @@
|
||||
import path from "path";
|
||||
import { UtilsService } from "./utils.service";
|
||||
import fs from 'fs-extra';
|
||||
import log from "electron-log";
|
||||
import { app } from "electron";
|
||||
import { BsmException } from "shared/models/bsm-exception.model";
|
||||
import ElectronStore from "electron-store";
|
||||
import { copyDirectoryWithJunctions, deleteFolder, ensureFolderExist } from "../helpers/fs.helpers";
|
||||
|
||||
export class InstallationLocationService {
|
||||
|
||||
private static instance: InstallationLocationService;
|
||||
|
||||
public static getInstance(): InstallationLocationService{
|
||||
if(!InstallationLocationService.instance){ InstallationLocationService.instance = new InstallationLocationService(); }
|
||||
public static getInstance(): InstallationLocationService {
|
||||
if (!InstallationLocationService.instance) {
|
||||
InstallationLocationService.instance = new InstallationLocationService();
|
||||
}
|
||||
return InstallationLocationService.instance;
|
||||
}
|
||||
|
||||
@@ -19,61 +17,62 @@ export class InstallationLocationService {
|
||||
private readonly VERSIONS_FOLDER = "BSInstances";
|
||||
|
||||
private readonly SHARED_CONTENT_FOLDER = "SharedContent";
|
||||
private readonly SHARED_MAPS_FOLDER = "SharedMaps";
|
||||
|
||||
private readonly STORE_INSTALLATION_PATH_KEY = "installation-folder";
|
||||
private readonly utilsService: UtilsService;
|
||||
|
||||
private readonly installPathConfig: ElectronStore;
|
||||
private readonly updateListeners: Set<Listener> = new Set();
|
||||
|
||||
private _installationDirectory: string;
|
||||
|
||||
private constructor(){
|
||||
this.installPathConfig = new ElectronStore({watch: true});
|
||||
this.utilsService = UtilsService.getInstance();
|
||||
private constructor() {
|
||||
this.installPathConfig = new ElectronStore({ watch: true });
|
||||
this.initInstallationLocation();
|
||||
|
||||
this.installPathConfig.onDidChange(this.STORE_INSTALLATION_PATH_KEY, () => {
|
||||
this.triggerListeners();
|
||||
})
|
||||
}
|
||||
|
||||
private initInstallationLocation(): void{
|
||||
this._installationDirectory = this.installPathConfig.get<string>(this.STORE_INSTALLATION_PATH_KEY) as string || app.getPath("documents");
|
||||
}
|
||||
|
||||
private triggerListeners(): void{
|
||||
this.updateListeners.forEach(listener => listener());
|
||||
}
|
||||
|
||||
public setInstallationDirectory(newDir: string): Promise<string>{
|
||||
const oldDir = this.installationDirectory;
|
||||
const newDest = path.join(newDir, this.INSTALLATION_FOLDER);
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
if(!this.utilsService.pathExist(oldDir)){ this.utilsService.createFolderIfNotExist(oldDir); }
|
||||
fs.move(oldDir, newDest, { overwrite: true }).then(() => {
|
||||
this._installationDirectory = newDir;
|
||||
this.installPathConfig.set(this.STORE_INSTALLATION_PATH_KEY, newDir);
|
||||
resolve(this.installationDirectory);
|
||||
}).catch((err: Error) => {
|
||||
reject({title: "CantMoveFolder", error: err} as BsmException);
|
||||
log.error(err);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
public onInstallLocationUpdate(fn: Listener){
|
||||
private initInstallationLocation(): void {
|
||||
this._installationDirectory = (this.installPathConfig.get<string>(this.STORE_INSTALLATION_PATH_KEY) as string) || app.getPath("documents");
|
||||
}
|
||||
|
||||
private triggerListeners(): void {
|
||||
this.updateListeners.forEach(listener => listener());
|
||||
}
|
||||
|
||||
public async setInstallationDirectory(newDir: string): Promise<string> {
|
||||
const oldDir = this.installationDirectory;
|
||||
const newDest = path.join(newDir, this.INSTALLATION_FOLDER);
|
||||
|
||||
await ensureFolderExist(oldDir);
|
||||
|
||||
await copyDirectoryWithJunctions(oldDir, newDest, { overwrite: true });
|
||||
|
||||
this._installationDirectory = newDir;
|
||||
this.installPathConfig.set(this.STORE_INSTALLATION_PATH_KEY, newDir);
|
||||
|
||||
deleteFolder(oldDir);
|
||||
|
||||
return this.installationDirectory;
|
||||
}
|
||||
|
||||
public onInstallLocationUpdate(fn: Listener) {
|
||||
this.updateListeners.add(fn);
|
||||
}
|
||||
|
||||
public get installationDirectory(): string{ return path.join(this._installationDirectory, this.INSTALLATION_FOLDER); }
|
||||
public get installationDirectory(): string {
|
||||
return path.join(this._installationDirectory, this.INSTALLATION_FOLDER);
|
||||
}
|
||||
|
||||
public get versionsDirectory(): string { return path.join(this.installationDirectory, this.VERSIONS_FOLDER); }
|
||||
|
||||
public get sharedContentPath(): string { return path.join(this.installationDirectory, this.SHARED_CONTENT_FOLDER); }
|
||||
public get sharedMapsPath(): string { return path.join(this.sharedContentPath, this.SHARED_MAPS_FOLDER); }
|
||||
public get versionsDirectory(): string {
|
||||
return path.join(this.installationDirectory, this.VERSIONS_FOLDER);
|
||||
}
|
||||
|
||||
public get sharedContentPath(): string {
|
||||
return path.join(this.installationDirectory, this.SHARED_CONTENT_FOLDER);
|
||||
}
|
||||
}
|
||||
|
||||
type Listener = () => void;
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
import { IpcResponse, IpcRequest } from "shared/models/ipc";
|
||||
import { IpcRequest } from "shared/models/ipc";
|
||||
import { ipcMain } from "electron";
|
||||
import { Observable } from "rxjs";
|
||||
import { IpcChannel, IpcCompleteChannel, IpcErrorChannel } from "shared/models/ipc/ipc-response.interface";
|
||||
import { IpcCompleteChannel, IpcErrorChannel } from "shared/models/ipc/ipc-response.interface";
|
||||
import { AppWindow } from "shared/models/window-manager/app-window.model";
|
||||
import { WindowManagerService } from "./window-manager.service";
|
||||
import { IpcReplier } from "shared/models/ipc/ipc-request.interface";
|
||||
import log from "electron-log";
|
||||
|
||||
export class IpcService {
|
||||
|
||||
private static instance: IpcService;
|
||||
|
||||
public static getInstance(): IpcService {
|
||||
if (!IpcService.instance) { IpcService.instance = new IpcService(); }
|
||||
if (!IpcService.instance) {
|
||||
IpcService.instance = new IpcService();
|
||||
}
|
||||
return IpcService.instance;
|
||||
}
|
||||
|
||||
@@ -21,44 +23,48 @@ export class IpcService {
|
||||
this.windows = WindowManagerService.getInstance();
|
||||
}
|
||||
|
||||
private getErrorChannel(channel: IpcChannel): IpcErrorChannel {
|
||||
private getErrorChannel(channel: string): IpcErrorChannel {
|
||||
return `${channel}_error`;
|
||||
}
|
||||
|
||||
private getCompleteChannel(channel: IpcChannel): IpcCompleteChannel {
|
||||
private getCompleteChannel(channel: string): IpcCompleteChannel {
|
||||
return `${channel}_complete`;
|
||||
}
|
||||
|
||||
private buildProxyListener<T>(listener: (req: IpcRequest<T>, replier: IpcReplier) => void) {
|
||||
|
||||
private buildProxyListener<T>(listener: IpcListener<T>) {
|
||||
return (event: Electron.IpcMainEvent, req: IpcRequest<T>) => {
|
||||
const window = this.windows.getAppWindowFromWebContents(event.sender);
|
||||
const replier = (data: Observable<unknown>) => this.connectStream(req.responceChannel, window, data);
|
||||
listener(req, replier);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
public send<T>(channel: IpcChannel, window: AppWindow, response?: T|Error): void{
|
||||
this.windows.getWindow(window).webContents.send(channel, response);
|
||||
public send<T>(channel: string, window: AppWindow, response?: T | Error): void {
|
||||
this.windows.getWindow(window)?.webContents?.send(channel, response);
|
||||
}
|
||||
|
||||
public connectStream(channel: IpcChannel, window: AppWindow, observable: Observable<unknown>): void{
|
||||
observable.subscribe(data => {
|
||||
this.send(channel, window, data);
|
||||
}, error => {
|
||||
this.send(this.getErrorChannel(channel), window, error);
|
||||
}, () => {
|
||||
this.send(this.getCompleteChannel(channel), window);
|
||||
});
|
||||
private connectStream(channel: string, window: AppWindow, observable: Observable<unknown>): void {
|
||||
observable.subscribe(
|
||||
data => {
|
||||
this.send(channel, window, data);
|
||||
},
|
||||
error => {
|
||||
log.error(error);
|
||||
this.send(this.getErrorChannel(channel), window, error);
|
||||
},
|
||||
() => {
|
||||
this.send(this.getCompleteChannel(channel), window);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public on<T>(channel: IpcChannel, listener: (req: IpcRequest<T>, replier: IpcReplier) => void): void{
|
||||
public on<T>(channel: string, listener: IpcListener<T>): void {
|
||||
ipcMain.on(channel, this.buildProxyListener(listener));
|
||||
}
|
||||
|
||||
public once<T>(channel: IpcChannel, listener: (req: IpcRequest<T>, replier: IpcReplier) => void): void{
|
||||
public once<T>(channel: string, listener: IpcListener<T>): void {
|
||||
ipcMain.once(channel, this.buildProxyListener(listener));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
type IpcListener<T = unknown> = (req: IpcRequest<T>, replier: IpcReplier) => void | Promise<void>;
|
||||
|
||||
@@ -3,7 +3,6 @@ import { Mod } from "shared/models/mods/mod.interface";
|
||||
import { RequestService } from "../request.service";
|
||||
|
||||
export class BeatModsApiService {
|
||||
|
||||
private static instance: BeatModsApiService;
|
||||
|
||||
private readonly requestService: RequestService;
|
||||
@@ -19,70 +18,76 @@ export class BeatModsApiService {
|
||||
|
||||
private allModsCache: Mod[];
|
||||
|
||||
public static getInstance(): BeatModsApiService{
|
||||
if(!BeatModsApiService.instance){ BeatModsApiService.instance = new BeatModsApiService(); }
|
||||
public static getInstance(): BeatModsApiService {
|
||||
if (!BeatModsApiService.instance) {
|
||||
BeatModsApiService.instance = new BeatModsApiService();
|
||||
}
|
||||
return BeatModsApiService.instance;
|
||||
}
|
||||
|
||||
private constructor(){
|
||||
private constructor() {
|
||||
this.requestService = RequestService.getInstance();
|
||||
}
|
||||
|
||||
private getVersionModsUrl(version: BSVersion): string{
|
||||
private getVersionModsUrl(version: BSVersion): string {
|
||||
return `${this.BEAT_MODS_API_URL}mod?status=approved&gameVersion=${version.BSVersion}&sort=&sortDirection=1`;
|
||||
}
|
||||
|
||||
private getAllModsUrl(): string{
|
||||
private getAllModsUrl(): string {
|
||||
return `${this.BEAT_MODS_API_URL}mod`;
|
||||
}
|
||||
|
||||
private async getVersionAlias(): Promise<Map<string, BSVersion[]>>{
|
||||
if(this.aliasesCache.size){ return this.aliasesCache; }
|
||||
return this.requestService.get<Record<string, string[]>>(this.BEAT_MODS_ALIAS).then(rawAliases => {
|
||||
private async getVersionAlias(): Promise<Map<string, BSVersion[]>> {
|
||||
if (this.aliasesCache.size) {
|
||||
return this.aliasesCache;
|
||||
}
|
||||
return this.requestService.getJSON<Record<string, string[]>>(this.BEAT_MODS_ALIAS).then(rawAliases => {
|
||||
Object.entries(rawAliases).forEach(([key, value]) => {
|
||||
this.aliasesCache.set(key, value.map(s => ({BSVersion: s} as BSVersion)));
|
||||
this.aliasesCache.set(
|
||||
key,
|
||||
value.map(s => ({ BSVersion: s } as BSVersion))
|
||||
);
|
||||
});
|
||||
return this.aliasesCache;
|
||||
})
|
||||
}
|
||||
|
||||
private async getAliasOfVersion(version: BSVersion): Promise<BSVersion>{
|
||||
return this.getVersionAlias().then(aliases => {
|
||||
if(Array.from(aliases.keys()).some(k => k === version.BSVersion)){ return version; }
|
||||
const alias = Array.from(aliases.entries()).find(([key, value]) => value.find(v => v.BSVersion === version.BSVersion))[0];
|
||||
return {BSVersion: alias} as BSVersion
|
||||
});
|
||||
}
|
||||
|
||||
private asignDependencies(mod: Mod, mods: Mod[]): Mod{
|
||||
private async getAliasOfVersion(version: BSVersion): Promise<BSVersion> {
|
||||
return this.getVersionAlias().then(aliases => {
|
||||
if (Array.from(aliases.keys()).some(k => k === version.BSVersion)) {
|
||||
return version;
|
||||
}
|
||||
const alias = Array.from(aliases.entries()).find(([key, value]) => value.find(v => v.BSVersion === version.BSVersion))[0];
|
||||
return { BSVersion: alias } as BSVersion;
|
||||
});
|
||||
}
|
||||
|
||||
private asignDependencies(mod: Mod, mods: Mod[]): Mod {
|
||||
mod.dependencies = mod.dependencies.map(dep => mods.find(mod => mod.name === dep.name));
|
||||
return mod;
|
||||
}
|
||||
|
||||
public async getVersionMods(version: BSVersion): Promise<Mod[]>{
|
||||
if(this.versionModsCache.has(version.BSVersion)){ return this.versionModsCache.get(version.BSVersion); }
|
||||
public async getVersionMods(version: BSVersion): Promise<Mod[]> {
|
||||
if (this.versionModsCache.has(version.BSVersion)) {
|
||||
return this.versionModsCache.get(version.BSVersion);
|
||||
}
|
||||
|
||||
const alias = await this.getAliasOfVersion(version);
|
||||
|
||||
return this.requestService.get<Mod[]>(this.getVersionModsUrl(alias)).then(mods => {
|
||||
return this.requestService.getJSON<Mod[]>(this.getVersionModsUrl(alias)).then(mods => {
|
||||
mods = mods.map(mod => this.asignDependencies(mod, mods));
|
||||
this.versionModsCache.set(version.BSVersion, mods);
|
||||
return mods;
|
||||
});
|
||||
}
|
||||
|
||||
public async getAllMods(): Promise<Mod[]>{
|
||||
if(!!this.allModsCache){ return this.allModsCache; }
|
||||
return this.requestService.get<Mod[]>(this.getAllModsUrl()).then(mods => {
|
||||
public async getAllMods(): Promise<Mod[]> {
|
||||
if (this.allModsCache) {
|
||||
return this.allModsCache;
|
||||
}
|
||||
return this.requestService.getJSON<Mod[]>(this.getAllModsUrl()).then(mods => {
|
||||
this.allModsCache = mods;
|
||||
return this.allModsCache;
|
||||
});
|
||||
}
|
||||
|
||||
public loadAllMods(){ return this.getAllMods(); }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
import { BSVersion } from "shared/bs-version.interface";
|
||||
import { DownloadLink, InstallModsResult, Mod, ModInstallProgression, UninstallModsResult } from "shared/models/mods";
|
||||
import { BeatModsApiService } from "./beat-mods-api.service";
|
||||
import { BSLocalVersionService } from "../bs-local-version.service"
|
||||
import { BSLocalVersionService } from "../bs-local-version.service";
|
||||
import path from "path";
|
||||
import { UtilsService } from "../utils.service";
|
||||
import md5File from "md5-file";
|
||||
import fs from "fs"
|
||||
import StreamZip from "node-stream-zip";
|
||||
import { RequestService } from "../request.service";
|
||||
import { spawn } from "child_process";
|
||||
import { BS_EXECUTABLE } from "../../constants";
|
||||
import log from "electron-log";
|
||||
import { deleteFolder, pathExist, unlinkPath, ensureFolderExist } from "../../helpers/fs.helpers";
|
||||
import { lastValueFrom } from "rxjs";
|
||||
import JSZip from "jszip";
|
||||
import { extractZip } from "../../helpers/zip.helpers";
|
||||
import recursiveReadDir from "recursive-readdir";
|
||||
|
||||
export class BsModsManagerService {
|
||||
|
||||
private static instance: BsModsManagerService;
|
||||
|
||||
private readonly beatModsApi: BeatModsApiService;
|
||||
private readonly bsLocalService: BSLocalVersionService;
|
||||
private readonly utilsService: UtilsService;
|
||||
private readonly requestService: RequestService
|
||||
private readonly requestService: RequestService;
|
||||
|
||||
private manifestMatches: Mod[];
|
||||
|
||||
@@ -29,295 +31,367 @@ export class BsModsManagerService {
|
||||
private nbModsToUninstall = 0;
|
||||
private nbUninstalledMods = 0;
|
||||
|
||||
public static getInstance(): BsModsManagerService{
|
||||
if(!BsModsManagerService.instance){ BsModsManagerService.instance = new BsModsManagerService(); }
|
||||
public static getInstance(): BsModsManagerService {
|
||||
if (!BsModsManagerService.instance) {
|
||||
BsModsManagerService.instance = new BsModsManagerService();
|
||||
}
|
||||
return BsModsManagerService.instance;
|
||||
}
|
||||
|
||||
private constructor(){
|
||||
private constructor() {
|
||||
this.beatModsApi = BeatModsApiService.getInstance();
|
||||
this.bsLocalService = BSLocalVersionService.getInstance();
|
||||
this.utilsService = UtilsService.getInstance();
|
||||
this.requestService = RequestService.getInstance();
|
||||
}
|
||||
|
||||
private async getModFromHash(hash: string): Promise<Mod>{
|
||||
private async getModFromHash(hash: string): Promise<Mod> {
|
||||
const allMods = await this.beatModsApi.getAllMods();
|
||||
return allMods.find(mod => {
|
||||
if(mod.name.toLowerCase() === "bsipa" || mod.status === "declined"){ return false; }
|
||||
if (mod.name.toLowerCase() === "bsipa") {
|
||||
return false;
|
||||
}
|
||||
return mod.downloads.some(download => download.hashMd5.some(md5 => md5.hash === hash));
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
private async getIpaFromHash(hash: string): Promise<Mod>{
|
||||
private async getIpaFromHash(hash: string): Promise<Mod> {
|
||||
const allMods = await this.beatModsApi.getAllMods();
|
||||
return allMods.find(mod => {
|
||||
if(mod.name.toLowerCase() !== "bsipa"){ return false; }
|
||||
if (mod.name.toLowerCase() !== "bsipa") {
|
||||
return false;
|
||||
}
|
||||
return mod.downloads.some(download => download.hashMd5.some(md5 => md5.hash === hash));
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
private async getModsInDir(version: BSVersion, modsDir: ModsInstallFolder): Promise<Mod[]>{
|
||||
private async getModsInDir(version: BSVersion, modsDir: ModsInstallFolder): Promise<Mod[]> {
|
||||
const bsPath = await this.bsLocalService.getVersionPath(version);
|
||||
const modsPath = path.join(bsPath, modsDir);
|
||||
if(!this.utilsService.pathExist(modsPath)){ return []; }
|
||||
const files = fs.readdirSync(modsPath);
|
||||
const promises = files.map(f => {
|
||||
return (async() => {
|
||||
const filePath = path.join(modsPath, f)
|
||||
const ext = path.extname(f);
|
||||
if(ext !== ".dll" && ext !== ".exe" && ext !== ".manifest"){ return undefined; }
|
||||
|
||||
if (!(await pathExist(modsPath))) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const files = await recursiveReadDir(modsPath);
|
||||
|
||||
const promises = files.map(async filePath => {
|
||||
const ext = path.extname(filePath);
|
||||
|
||||
if (ext !== ".dll" && ext !== ".exe" && ext !== ".manifest") {
|
||||
return undefined;
|
||||
}
|
||||
const hash = await md5File(filePath);
|
||||
|
||||
const mod = await this.getModFromHash(hash);
|
||||
if(!mod){ return undefined; }
|
||||
if(ext === ".manifest"){
|
||||
|
||||
if (!mod) {
|
||||
return undefined;
|
||||
}
|
||||
if (ext === ".manifest") {
|
||||
this.manifestMatches.push(mod);
|
||||
return undefined;
|
||||
}
|
||||
if(filePath.includes("Libs")){
|
||||
if(!this.manifestMatches.some(m => m.name === mod.name)){ return undefined; }
|
||||
if (filePath.includes("Libs")) {
|
||||
if (!this.manifestMatches.some(m => m.name === mod.name)) {
|
||||
return undefined;
|
||||
}
|
||||
const modIndex = this.manifestMatches.indexOf(mod);
|
||||
if(modIndex > -1){ this.manifestMatches.splice(modIndex, 1); }
|
||||
if (modIndex > -1) {
|
||||
this.manifestMatches.splice(modIndex, 1);
|
||||
}
|
||||
}
|
||||
return mod;
|
||||
})()
|
||||
});
|
||||
const mods = await Promise.all(promises)
|
||||
return mods.filter(m => !!m);
|
||||
|
||||
const mods = await Promise.all(promises);
|
||||
return mods.filter(Boolean);
|
||||
}
|
||||
|
||||
private async getBsipaInstalled(version: BSVersion): Promise<Mod>{
|
||||
private async getBsipaInstalled(version: BSVersion): Promise<Mod> {
|
||||
const bsPath = await this.bsLocalService.getVersionPath(version);
|
||||
const injectorPath = path.join(bsPath, "Beat Saber_Data", "Managed", "IPA.Injector.dll");
|
||||
if(!this.utilsService.pathExist(injectorPath)){ return undefined; }
|
||||
if (!(await pathExist(injectorPath))) {
|
||||
return undefined;
|
||||
}
|
||||
const injectorMd5 = await md5File(injectorPath);
|
||||
return this.getIpaFromHash(injectorMd5);
|
||||
}
|
||||
|
||||
private async downloadZip(zipUrl: string): Promise<{zip: StreamZip.StreamZipAsync, zipPath: string}>{
|
||||
private async downloadZip(zipUrl: string): Promise<JSZip> {
|
||||
zipUrl = path.join(this.beatModsApi.BEAT_MODS_URL, zipUrl);
|
||||
const fileName = path.basename(zipUrl);
|
||||
const tempPath = this.utilsService.getTempPath();
|
||||
this.utilsService.createFolderIfNotExist(this.utilsService.getTempPath());
|
||||
const dest = path.join(tempPath, fileName);
|
||||
|
||||
const zipPath = await this.requestService.downloadFile(zipUrl, dest);
|
||||
const zip = new StreamZip.async({file : zipPath});
|
||||
const buffer = await lastValueFrom(this.requestService.downloadBuffer(zipUrl))
|
||||
.then(progress => progress.data)
|
||||
.catch(e => {
|
||||
log.error("ZIP", "Error while downloading zip", e);
|
||||
return undefined;
|
||||
});
|
||||
|
||||
return {zip, zipPath};
|
||||
if (!buffer) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return JSZip.loadAsync(buffer).catch(e => {
|
||||
log.error("ZIP", "Error while loading zip", e);
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
private async executeBSIPA(version: BSVersion, args: string[]): Promise<boolean>{
|
||||
private async executeBSIPA(version: BSVersion, args: string[]): Promise<boolean> {
|
||||
const versionPath = await this.bsLocalService.getVersionPath(version);
|
||||
const ipaPath = path.join(versionPath, "IPA.exe");
|
||||
const bsExePath = path.join(versionPath, BS_EXECUTABLE);
|
||||
if(!this.utilsService.pathExist(ipaPath) || !this.utilsService.pathExist(bsExePath)){ return false; }
|
||||
if (!(await pathExist(ipaPath)) || !(await pathExist(bsExePath))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return new Promise<boolean>(resolve => {
|
||||
const processIPA = spawn(`start /wait /min "" "${ipaPath}" ${args.join(" ")}`, {cwd: versionPath, detached: true, shell: true});
|
||||
const processIPA = spawn(`start /wait /min "" "${ipaPath}" ${args.join(" ")}`, { cwd: versionPath, detached: true, shell: true });
|
||||
processIPA.once("exit", code => {
|
||||
if(code === 0){ return resolve(true); }
|
||||
if (code === 0) {
|
||||
return resolve(true);
|
||||
}
|
||||
log.error("IPA PROCESS", "exit code", code);
|
||||
resolve(false);
|
||||
});
|
||||
|
||||
setTimeout(() => resolve(false), (1 * 60) * 1000); //timeout 1min
|
||||
setTimeout(() => resolve(false), 1 * 60 * 1000); // timeout 1min
|
||||
});
|
||||
}
|
||||
|
||||
private getModDownload(mod: Mod, version: BSVersion): DownloadLink{
|
||||
private getModDownload(mod: Mod, version: BSVersion): DownloadLink {
|
||||
return mod.downloads.find(download => {
|
||||
const type = download.type.toLowerCase()
|
||||
const type = download.type.toLowerCase();
|
||||
return type === "universal" || type === this.bsLocalService.getVersionType(version);
|
||||
});
|
||||
}
|
||||
|
||||
private async installMod(mod: Mod, version: BSVersion): Promise<boolean>{
|
||||
|
||||
this.utilsService.ipcSend<ModInstallProgression>("mod-installed", {success: true, data: {name: mod.name, progression: ((this.nbInstalledMods + 1) / this.nbModsToInstall) * 100}})
|
||||
private async installMod(mod: Mod, version: BSVersion): Promise<boolean> {
|
||||
this.utilsService.ipcSend<ModInstallProgression>("mod-installed", { success: true, data: { name: mod.name, progression: ((this.nbInstalledMods + 1) / this.nbModsToInstall) * 100 } });
|
||||
|
||||
const download = this.getModDownload(mod, version);
|
||||
|
||||
if(!download){ return false; }
|
||||
if (!download) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const {zip, zipPath} = await this.downloadZip(download.url);
|
||||
const zip = await this.downloadZip(download.url);
|
||||
|
||||
if(!zip){ return false; }
|
||||
if (!zip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const crypto = require('crypto');
|
||||
const entries = await zip.entries();
|
||||
const crypto = require("crypto");
|
||||
const files = await zip.files;
|
||||
|
||||
const checkedEntries = (await Promise.all(Object.values(entries).map(async (entry) => {
|
||||
if(!entry.isFile){ return undefined; }
|
||||
const data = await zip.entryData(entry);
|
||||
const entryMd5 = crypto.createHash('md5').update(data).digest('hex')
|
||||
return download.hashMd5.some(md5 => md5.hash === entryMd5) ? entry : undefined;
|
||||
}))).filter(entry => !!entry);
|
||||
const checkedEntries = (
|
||||
await Promise.all(
|
||||
Object.values(files).map(async entry => {
|
||||
const data = await entry.async("nodebuffer");
|
||||
const entryMd5 = crypto.createHash("md5").update(data).digest("hex");
|
||||
return download.hashMd5.some(md5 => md5.hash === entryMd5) ? entry : undefined;
|
||||
})
|
||||
)
|
||||
).filter(entry => !!entry);
|
||||
|
||||
if(checkedEntries.length != download.hashMd5.length){ return false; }
|
||||
if (checkedEntries.length !== download.hashMd5.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const verionPath = await this.bsLocalService.getVersionPath(version);
|
||||
const isBSIPA = mod.name.toLowerCase() === "bsipa";
|
||||
const destDir = isBSIPA ? verionPath : path.join(verionPath, ModsInstallFolder.PENDING);
|
||||
|
||||
const extracted = await zip.extract(null, destDir).then(() => true).catch(err => {log.error(err); return false});
|
||||
await ensureFolderExist(destDir);
|
||||
const extracted = await extractZip(zip, destDir)
|
||||
.then(() => true)
|
||||
.catch(e => {
|
||||
log.error("EXTRACT MOD ZIP", e);
|
||||
return false;
|
||||
});
|
||||
|
||||
await zip.close();
|
||||
await this.utilsService.unlinkIfExist(zipPath);
|
||||
|
||||
const res = isBSIPA ? (extracted && (await this.executeBSIPA(version, ["-n"]))) : extracted;
|
||||
const res = isBSIPA
|
||||
? extracted &&
|
||||
(await this.executeBSIPA(version, ["-n"]).catch(e => {
|
||||
log.error(e);
|
||||
return false;
|
||||
}))
|
||||
: extracted;
|
||||
|
||||
res && this.nbInstalledMods++;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
private isDependency(mod: Mod, selectedMods: Mod[], availableMods: Mod[]){
|
||||
private isDependency(mod: Mod, selectedMods: Mod[], availableMods: Mod[]) {
|
||||
return selectedMods.some(m => {
|
||||
const deps = m.dependencies.map(dep => Array.from(availableMods.values()).find(m => dep.name === m.name));
|
||||
if(deps.some(depMod => depMod.name === mod.name)){ return true; }
|
||||
if (deps.some(depMod => depMod.name === mod.name)) {
|
||||
return true;
|
||||
}
|
||||
return deps.some(depMod => depMod.dependencies.some(depModDep => depModDep.name === mod.name));
|
||||
});
|
||||
}
|
||||
|
||||
private async resolveDependencies(mods: Mod[], version: BSVersion): Promise<Mod[]>{
|
||||
private async resolveDependencies(mods: Mod[], version: BSVersion): Promise<Mod[]> {
|
||||
const availableMods = await this.beatModsApi.getVersionMods(version);
|
||||
return Array.from(new Map<string, Mod>(availableMods.reduce((res, mod) => {
|
||||
if(this.isDependency(mod, mods, availableMods)){
|
||||
res.push([mod.name, mod]);
|
||||
}
|
||||
return res;
|
||||
}, [])).values());
|
||||
return Array.from(
|
||||
new Map<string, Mod>(
|
||||
availableMods.reduce((res, mod) => {
|
||||
if (this.isDependency(mod, mods, availableMods)) {
|
||||
res.push([mod.name, mod]);
|
||||
}
|
||||
return res;
|
||||
}, [])
|
||||
).values()
|
||||
);
|
||||
}
|
||||
|
||||
private async uninstallBSIPA(mod: Mod, version: BSVersion): Promise<void>{
|
||||
private async uninstallBSIPA(mod: Mod, version: BSVersion): Promise<void> {
|
||||
const download = this.getModDownload(mod, version);
|
||||
|
||||
const verionPath = await this.bsLocalService.getVersionPath(version);
|
||||
const hasIPAExe = this.utilsService.pathExist(path.join(verionPath, "IPA.exe"));
|
||||
const hasIPADir = this.utilsService.pathExist(path.join(verionPath, "IPA"));
|
||||
const hasIPAExe = await pathExist(path.join(verionPath, "IPA.exe"));
|
||||
const hasIPADir = await pathExist(path.join(verionPath, "IPA"));
|
||||
|
||||
if(!hasIPADir || !hasIPAExe){ return; }
|
||||
if (!hasIPADir || !hasIPAExe) {
|
||||
return;
|
||||
}
|
||||
|
||||
await this.executeBSIPA(version, ["--revert", "-n"]);
|
||||
|
||||
const promises = download.hashMd5.map(files => {
|
||||
const file = files.file.replaceAll("IPA/", "").replaceAll("Data", "Beat Saber_Data");
|
||||
return this.utilsService.unlinkIfExist(path.join(verionPath, file));
|
||||
})
|
||||
|
||||
return unlinkPath(path.join(verionPath, file));
|
||||
});
|
||||
|
||||
await Promise.all(promises);
|
||||
}
|
||||
|
||||
private async uninstallMod(mod: Mod, version: BSVersion): Promise<void>{
|
||||
|
||||
private async uninstallMod(mod: Mod, version: BSVersion): Promise<void> {
|
||||
this.nbUninstalledMods++;
|
||||
this.utilsService.ipcSend<ModInstallProgression>("mod-uninstalled", {success: true, data: {name: mod.name, progression: (this.nbUninstalledMods / this.nbModsToUninstall) * 100}})
|
||||
|
||||
if(mod.name.toLowerCase() === "bsipa"){ return this.uninstallBSIPA(mod, version); }
|
||||
this.utilsService.ipcSend<ModInstallProgression>("mod-uninstalled", { success: true, data: { name: mod.name, progression: (this.nbUninstalledMods / this.nbModsToUninstall) * 100 } });
|
||||
|
||||
if (mod.name.toLowerCase() === "bsipa") {
|
||||
return this.uninstallBSIPA(mod, version);
|
||||
}
|
||||
|
||||
const download = this.getModDownload(mod, version);
|
||||
const versionPath = await this.bsLocalService.getVersionPath(version);
|
||||
|
||||
const promises = download.hashMd5.map(async files => {
|
||||
this.utilsService.unlinkIfExist(path.join(versionPath, files.file));
|
||||
this.utilsService.unlinkIfExist(path.join(versionPath, "IPA", "Pending", files.file));
|
||||
return Promise.all([unlinkPath(path.join(versionPath, files.file)), unlinkPath(path.join(versionPath, "IPA", "Pending", files.file))]);
|
||||
});
|
||||
|
||||
await Promise.all(promises);
|
||||
}
|
||||
|
||||
public getAvailableMods(version: BSVersion): Promise<Mod[]>{
|
||||
public getAvailableMods(version: BSVersion): Promise<Mod[]> {
|
||||
return this.beatModsApi.getVersionMods(version);
|
||||
}
|
||||
|
||||
public async getInstalledMods(version: BSVersion): Promise<Mod[]>{
|
||||
public async getInstalledMods(version: BSVersion): Promise<Mod[]> {
|
||||
this.manifestMatches = [];
|
||||
await this.beatModsApi.loadAllMods();
|
||||
await this.beatModsApi.getAllMods();
|
||||
const bsipa = await this.getBsipaInstalled(version);
|
||||
return Promise.all([
|
||||
this.getModsInDir(version, ModsInstallFolder.PLUGINS_PENDING),
|
||||
this.getModsInDir(version, ModsInstallFolder.LIBS_PENDING),
|
||||
this.getModsInDir(version, ModsInstallFolder.PLUGINS),
|
||||
this.getModsInDir(version, ModsInstallFolder.LIBS)
|
||||
]).then(dirMods => {
|
||||
const res = [];
|
||||
if(!!bsipa){ res.push(bsipa); }
|
||||
const installedMods = Array.from(new Map<string, Mod>(dirMods.flat().map(m => [m.name, m])).values());
|
||||
res.push(...installedMods);
|
||||
return res;
|
||||
return Promise.all([this.getModsInDir(version, ModsInstallFolder.PLUGINS_PENDING), this.getModsInDir(version, ModsInstallFolder.LIBS_PENDING), this.getModsInDir(version, ModsInstallFolder.PLUGINS), this.getModsInDir(version, ModsInstallFolder.LIBS)]).then(dirMods => {
|
||||
const modsDict = new Map<string, Mod>();
|
||||
|
||||
if (bsipa) {
|
||||
modsDict.set(bsipa.name, bsipa);
|
||||
}
|
||||
|
||||
for (const mod of dirMods.flat()) {
|
||||
if (modsDict.has(mod.name)) {
|
||||
continue;
|
||||
}
|
||||
modsDict.set(mod.name, mod);
|
||||
}
|
||||
|
||||
return Array.from(modsDict.values());
|
||||
});
|
||||
}
|
||||
|
||||
public async installMods(mods: Mod[], version: BSVersion): Promise<InstallModsResult>{
|
||||
if(!mods || !mods.length){ throw "no-mods"; }
|
||||
public async installMods(mods: Mod[], version: BSVersion): Promise<InstallModsResult> {
|
||||
if (!mods?.length) {
|
||||
throw "no-mods";
|
||||
}
|
||||
|
||||
const deps = await this.resolveDependencies(mods, version);
|
||||
mods.push(...deps);
|
||||
|
||||
const bsipa = mods.find(mod => mod.name.toLowerCase() === "bsipa");
|
||||
if(bsipa){ mods = mods.filter(mod => mod.name.toLowerCase() !== "bsipa"); }
|
||||
if (bsipa) {
|
||||
mods = mods.filter(mod => mod.name.toLowerCase() !== "bsipa");
|
||||
}
|
||||
|
||||
this.nbModsToInstall = mods.length + (bsipa && 1);
|
||||
this.nbInstalledMods = 0;
|
||||
|
||||
if(bsipa){
|
||||
const installed = await this.installMod(bsipa, version).catch(err => {log.error("INSTALL BSIPA", err); return false; })
|
||||
if(!installed){ throw "cannot-install-bsipa"; }
|
||||
if (bsipa) {
|
||||
const installed = await this.installMod(bsipa, version).catch(err => {
|
||||
log.error("INSTALL BSIPA", err);
|
||||
return false;
|
||||
});
|
||||
if (!installed) {
|
||||
throw "cannot-install-bsipa";
|
||||
}
|
||||
}
|
||||
|
||||
for(const mod of mods){
|
||||
await this.installMod(mod, version);;
|
||||
for (const mod of mods) {
|
||||
await this.installMod(mod, version);
|
||||
}
|
||||
|
||||
return {
|
||||
nbModsToInstall: this.nbModsToInstall,
|
||||
nbInstalledMods: this.nbInstalledMods
|
||||
nbModsToInstall: this.nbModsToInstall,
|
||||
nbInstalledMods: this.nbInstalledMods,
|
||||
};
|
||||
}
|
||||
|
||||
public async uninstallMods(mods: Mod[], version: BSVersion): Promise<UninstallModsResult>{
|
||||
if(!mods || !mods.length){ throw "no-mods"; }
|
||||
public async uninstallMods(mods: Mod[], version: BSVersion): Promise<UninstallModsResult> {
|
||||
if (!mods?.length) {
|
||||
throw "no-mods";
|
||||
}
|
||||
|
||||
this.nbModsToUninstall = mods.length;
|
||||
this.nbUninstalledMods = 0;
|
||||
|
||||
for(const mod of mods){
|
||||
for (const mod of mods) {
|
||||
await this.uninstallMod(mod, version);
|
||||
}
|
||||
|
||||
return {
|
||||
nbModsToUninstall: this.nbModsToUninstall,
|
||||
nbUninstalledMods: this.nbUninstalledMods
|
||||
nbUninstalledMods: this.nbUninstalledMods,
|
||||
};
|
||||
}
|
||||
|
||||
public async uninstallAllMods(version: BSVersion): Promise<UninstallModsResult>{
|
||||
public async uninstallAllMods(version: BSVersion): Promise<UninstallModsResult> {
|
||||
const mods = await this.getInstalledMods(version);
|
||||
|
||||
if(!mods || !mods.length){ throw "no-mods"; }
|
||||
if (!mods?.length) {
|
||||
throw "no-mods";
|
||||
}
|
||||
|
||||
this.nbModsToUninstall = mods.length;
|
||||
this.nbUninstalledMods = 0;
|
||||
|
||||
for(const mod of mods){
|
||||
for (const mod of mods) {
|
||||
await this.uninstallMod(mod, version);
|
||||
}
|
||||
|
||||
const versionPath = await this.bsLocalService.getVersionPath(version);
|
||||
|
||||
this.utilsService.rmDirIfExist(path.join(versionPath, ModsInstallFolder.PLUGINS));
|
||||
this.utilsService.rmDirIfExist(path.join(versionPath, ModsInstallFolder.LIBS));
|
||||
this.utilsService.rmDirIfExist(path.join(versionPath, ModsInstallFolder.IPA));
|
||||
|
||||
path.resolve
|
||||
await deleteFolder(path.join(versionPath, ModsInstallFolder.PLUGINS));
|
||||
await deleteFolder(path.join(versionPath, ModsInstallFolder.LIBS));
|
||||
await deleteFolder(path.join(versionPath, ModsInstallFolder.IPA));
|
||||
|
||||
return {
|
||||
nbModsToUninstall: this.nbModsToUninstall,
|
||||
nbUninstalledMods: this.nbUninstalledMods
|
||||
nbUninstalledMods: this.nbUninstalledMods,
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const enum ModsInstallFolder {
|
||||
@@ -326,5 +400,5 @@ const enum ModsInstallFolder {
|
||||
IPA = "IPA",
|
||||
PENDING = "IPA/Pending",
|
||||
PLUGINS_PENDING = "IPA/Pending/Plugins",
|
||||
LIBS_PENDING = "IPA/Pending/Libs"
|
||||
}
|
||||
LIBS_PENDING = "IPA/Pending/Libs",
|
||||
}
|
||||
|
||||