Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .erb/configs/webpack.config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ const configuration: webpack.Configuration = {
* Determine the array of extensions that should be used to resolve modules.
*/
resolve: {
fallback: {
"path": require.resolve("path-browserify")
},
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],
modules: [webpackPaths.srcPath, 'node_modules'],
},
Expand Down
15 changes: 14 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"md5-file": "^5.0.0",
"nx-request-api": "^0.1.21",
"open-file-explorer": "^1.0.2",
"path-browserify": "^1.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-modal": "^3.16.1",
Expand Down
17 changes: 17 additions & 0 deletions src/renderer/operations/update.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Progress } from 'nx-request-api';
import { Backend } from './backend';
import { getInstallType, getRepoName } from './install';
import path from 'path';

export async function isAvailable(
progressCallback?: (p: Progress) => void
Expand Down Expand Up @@ -204,6 +205,21 @@ export async function handleDeletions(
(p: Progress) => reportProgress(p)
);

// check for hdr-launcher.nro and delete it if we're on emulator
const platform = await backend.getPlatform();
const nroPath = path.join('atmosphere', 'contents', '01006A800016E000', 'romfs', 'skyline', 'plugins', 'hdr-launcher.nro');
try {
if (platform === "Emulator") {
const exists = await backend.fileExists(sdroot + nroPath);
if (exists) {
await backend.deleteFile(sdroot + nroPath);
console.debug('hdr-launcher.nro deleted successfully');
}
}
} catch (e) {
console.error(`Failed to detect/delete file: ${nroPath}`);
}

const str = await backend.readFile(deletions_file);
const entries = JSON.parse(str);
let count = 0;
Expand Down Expand Up @@ -242,6 +258,7 @@ export async function handleDeletions(
}
count += 1;
}

console.info('done deleting removed files.');
resolve('done deleting files.');
} catch (e) {
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7988,6 +7988,11 @@ pascal-case@^3.1.2:
no-case "^3.0.4"
tslib "^2.0.3"

path-browserify@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz"
integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==

path-exists@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz"
Expand Down