WIP: Tauri app conversion
25
.gitignore
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
src-tauri/target
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
11
README.md
|
@ -1,5 +1,5 @@
|
|||
# Rom Patcher JS
|
||||
A ROM patcher made in HTML5.
|
||||
A ROM patcher made in HTML5 and built with [Tauri](https://tauri.app/).
|
||||
|
||||
**Features:**
|
||||
* Supported formats:
|
||||
|
@ -26,3 +26,12 @@ A ROM patcher made in HTML5.
|
|||
* [Radical Red](https://patch.radicalred.net/)
|
||||
* [Rocket Edition](https://rocket-edition.com/download/)
|
||||
* [SnapCameraPreservation](https://snapchatreverse.jaku.tv/snap/)
|
||||
|
||||
|
||||
## For devs:
|
||||
|
||||
>*[Node.js](https://nodejs.org/) and [Rust](https://www.rust-lang.org/) required*
|
||||
|
||||
**Run `npm i` in order to install node modules**.
|
||||
|
||||
#### Run Vite dev server with `npm run dev` and build Tauri release with `npm run tauri build`.
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
Cache Service Worker template by mrc 2019
|
||||
mostly based in:
|
||||
https://github.com/GoogleChrome/samples/blob/gh-pages/service-worker/basic/service-worker.js
|
||||
https://github.com/chriscoyier/Simple-Offline-Site/blob/master/js/service-worker.js
|
||||
https://gist.github.com/kosamari/7c5d1e8449b2fbc97d372675f16b566e
|
||||
|
||||
Note for GitHub Pages:
|
||||
there can be an unexpected behaviour (cache not updating) when site is accessed from
|
||||
https://user.github.io/repo/ (without index.html) in some browsers (Firefox)
|
||||
use absolute paths if hosted in GitHub Pages in order to avoid it
|
||||
also invoke sw with an absolute path:
|
||||
navigator.serviceWorker.register('/repo/_cache_service_worker.js', {scope: '/repo/'})
|
||||
*/
|
||||
|
||||
var PRECACHE_ID='rom-patcher-js';
|
||||
var PRECACHE_VERSION='v281';
|
||||
var PRECACHE_URLS=[
|
||||
'/RomPatcher.js/','/RomPatcher.js/index.html',
|
||||
'/RomPatcher.js/manifest.json',
|
||||
'/RomPatcher.js/style/app_icon_16.png',
|
||||
'/RomPatcher.js/style/app_icon_114.png',
|
||||
'/RomPatcher.js/style/app_icon_144.png',
|
||||
'/RomPatcher.js/style/app_icon_192.png',
|
||||
'/RomPatcher.js/style/app_icon_maskable.png',
|
||||
'/RomPatcher.js/style/logo.png',
|
||||
'/RomPatcher.js/style/RomPatcher.css',
|
||||
'/RomPatcher.js/style/icon_close.svg',
|
||||
'/RomPatcher.js/style/icon_github.svg',
|
||||
'/RomPatcher.js/style/icon_heart.svg',
|
||||
'/RomPatcher.js/style/icon_settings.svg',
|
||||
'/RomPatcher.js/js/RomPatcher.js',
|
||||
'/RomPatcher.js/js/locale.js',
|
||||
'/RomPatcher.js/js/worker_apply.js',
|
||||
'/RomPatcher.js/js/worker_create.js',
|
||||
'/RomPatcher.js/js/worker_crc.js',
|
||||
'/RomPatcher.js/js/MarcFile.js',
|
||||
'/RomPatcher.js/js/crc.js',
|
||||
'/RomPatcher.js/js/zip.js/zip.js',
|
||||
'/RomPatcher.js/js/zip.js/z-worker.js',
|
||||
'/RomPatcher.js/js/zip.js/inflate.js',
|
||||
'/RomPatcher.js/js/formats/ips.js',
|
||||
'/RomPatcher.js/js/formats/ups.js',
|
||||
'/RomPatcher.js/js/formats/aps_n64.js',
|
||||
'/RomPatcher.js/js/formats/aps_gba.js',
|
||||
'/RomPatcher.js/js/formats/bps.js',
|
||||
'/RomPatcher.js/js/formats/rup.js',
|
||||
'/RomPatcher.js/js/formats/ppf.js',
|
||||
'/RomPatcher.js/js/formats/pmsr.js',
|
||||
'/RomPatcher.js/js/formats/vcdiff.js',
|
||||
'/RomPatcher.js/js/formats/zip.js'
|
||||
];
|
||||
|
||||
|
||||
|
||||
// install event (fired when sw is first installed): opens a new cache
|
||||
self.addEventListener('install', evt => {
|
||||
evt.waitUntil(
|
||||
caches.open('precache-'+PRECACHE_ID+'-'+PRECACHE_VERSION)
|
||||
.then(cache => cache.addAll(PRECACHE_URLS))
|
||||
.then(self.skipWaiting())
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
// activate event (fired when sw is has been successfully installed): cleans up old outdated caches
|
||||
self.addEventListener('activate', evt => {
|
||||
evt.waitUntil(
|
||||
caches.keys().then(cacheNames => {
|
||||
return cacheNames.filter(cacheName => (cacheName.startsWith('precache-'+PRECACHE_ID+'-') && !cacheName.endsWith('-'+PRECACHE_VERSION)));
|
||||
}).then(cachesToDelete => {
|
||||
return Promise.all(cachesToDelete.map(cacheToDelete => {
|
||||
console.log('delete '+cacheToDelete);
|
||||
return caches.delete(cacheToDelete);
|
||||
}));
|
||||
}).then(() => self.clients.claim())
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
// fetch event (fired when requesting a resource): returns cached resource when possible
|
||||
self.addEventListener('fetch', evt => {
|
||||
if(evt.request.url.startsWith(self.location.origin)){ //skip cross-origin requests
|
||||
evt.respondWith(
|
||||
caches.match(evt.request).then(cachedResource => {
|
||||
if (cachedResource) {
|
||||
return cachedResource;
|
||||
}else{
|
||||
return fetch(evt.request);
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
533
index.html
|
@ -1,240 +1,337 @@
|
|||
<!DOCTYPE html>
|
||||
<html translate="no">
|
||||
<head>
|
||||
<title>Rom Patcher JS</title>
|
||||
<meta http-equiv="content-Type" content="text/html; charset=UTF-8"/>
|
||||
<meta name="description" content="An online web-based ROM patcher. Supported formats: IPS, BPS, UPS, APS, RUP, PPF and xdelta."/>
|
||||
<meta name="keywords" content="ips,ups,aps,bps,rup,ninja,ppf,xdelta,patcher,online,html5,web,rom,patch,hack,translation"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
|
||||
<link rel="manifest" href="./manifest.json"/>
|
||||
<link rel="shortcut icon" href="./style/app_icon_16.png" type="image/png" sizes="16x16"/>
|
||||
<link rel="shortcut icon" href="./style/app_icon_192.png" type="image/png" sizes="192x192"/>
|
||||
<!-- iOS icons -->
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="./style/app_icon_114.png" />
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="./style/app_icon_114.png" />
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="./style/app_icon_144.png" />
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="./style/app_icon_144.png" />
|
||||
<link rel="apple-touch-icon" href="./style/app_icon_192.png" />
|
||||
<head>
|
||||
<title>Rom Patcher JS</title>
|
||||
<meta http-equiv="content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta
|
||||
name="description"
|
||||
content="An online web-based ROM patcher. Supported formats: IPS, BPS, UPS, APS, RUP, PPF and xdelta."
|
||||
/>
|
||||
<meta
|
||||
name="keywords"
|
||||
content="ips,ups,aps,bps,rup,ninja,ppf,xdelta,patcher,online,html5,web,rom,patch,hack,translation"
|
||||
/>
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
|
||||
/>
|
||||
<link rel="manifest" href="./manifest.json" />
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href="./style/app_icon_16.png"
|
||||
type="image/png"
|
||||
sizes="16x16"
|
||||
/>
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href="./style/app_icon_192.png"
|
||||
type="image/png"
|
||||
sizes="192x192"
|
||||
/>
|
||||
<!-- iOS icons -->
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="57x57"
|
||||
href="./style/app_icon_114.png"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="114x114"
|
||||
href="./style/app_icon_114.png"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="72x72"
|
||||
href="./style/app_icon_144.png"
|
||||
/>
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="144x144"
|
||||
href="./style/app_icon_144.png"
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="./style/app_icon_192.png" />
|
||||
|
||||
<!-- cache -->
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<!-- cache -->
|
||||
<meta
|
||||
http-equiv="Cache-Control"
|
||||
content="no-cache, no-store, must-revalidate"
|
||||
/>
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
|
||||
<!-- social network metatags -->
|
||||
<meta name="twitter:site" content="@marc_robledo">
|
||||
<meta name="twitter:creator" content="@marc_robledo">
|
||||
<meta name="twitter:domain" content="marcrobledo.com">
|
||||
<meta property="og:title" content="Rom Patcher JS">
|
||||
<meta name="twitter:title" content="Rom Patcher JS">
|
||||
<meta name="twitter:description" content="An online web-based ROM patcher. Supported formats: IPS, BPS, UPS, APS, RUP, PPF and xdelta.">
|
||||
<meta property="og:image" content="https://www.marcrobledo.com/RomPatcher.js/style/thumbnail.jpg">
|
||||
<meta name="twitter:image" content="https://www.marcrobledo.com/RomPatcher.js/style/thumbnail.jpg">
|
||||
<meta name="twitter:card" content="photo">
|
||||
<!-- social network metatags -->
|
||||
<meta name="twitter:site" content="@marc_robledo" />
|
||||
<meta name="twitter:creator" content="@marc_robledo" />
|
||||
<meta name="twitter:domain" content="marcrobledo.com" />
|
||||
<meta property="og:title" content="Rom Patcher JS" />
|
||||
<meta name="twitter:title" content="Rom Patcher JS" />
|
||||
<meta
|
||||
name="twitter:description"
|
||||
content="An online web-based ROM patcher. Supported formats: IPS, BPS, UPS, APS, RUP, PPF and xdelta."
|
||||
/>
|
||||
<meta
|
||||
property="og:image"
|
||||
content="https://www.marcrobledo.com/RomPatcher.js/style/thumbnail.jpg"
|
||||
/>
|
||||
<meta
|
||||
name="twitter:image"
|
||||
content="https://www.marcrobledo.com/RomPatcher.js/style/thumbnail.jpg"
|
||||
/>
|
||||
<meta name="twitter:card" content="photo" />
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="./style/RomPatcher.css" media="all"/>
|
||||
<script type="text/javascript" src="./js/locale.js"></script>
|
||||
<script type="text/javascript" src="./js/RomPatcher.js"></script>
|
||||
<script type="text/javascript" src="./js/MarcFile.js"></script>
|
||||
<script type="text/javascript" src="./js/crc.js"></script>
|
||||
<script type="text/javascript" src="./js/formats/zip.js"></script>
|
||||
<script type="text/javascript" src="./js/formats/ips.js"></script>
|
||||
<script type="text/javascript" src="./js/formats/ups.js"></script>
|
||||
<script type="text/javascript" src="./js/formats/aps_n64.js"></script>
|
||||
<script type="text/javascript" src="./js/formats/aps_gba.js"></script>
|
||||
<script type="text/javascript" src="./js/formats/bps.js"></script>
|
||||
<script type="text/javascript" src="./js/formats/rup.js"></script>
|
||||
<script type="text/javascript" src="./js/formats/ppf.js"></script>
|
||||
<script type="text/javascript" src="./js/formats/pmsr.js"></script>
|
||||
<script type="text/javascript" src="./js/formats/vcdiff.js"></script>
|
||||
<link
|
||||
type="text/css"
|
||||
rel="stylesheet"
|
||||
href="./style/RomPatcher.css"
|
||||
media="all"
|
||||
/>
|
||||
<script type="text/javascript" src="scripts/locale.js"></script>
|
||||
<script type="text/javascript" src="scripts/RomPatcher.js"></script>
|
||||
<script type="text/javascript" src="scripts/MarcFile.js"></script>
|
||||
<script type="text/javascript" src="scripts/crc.js"></script>
|
||||
<script type="text/javascript" src="scripts/formats/zip.js"></script>
|
||||
<script type="text/javascript" src="scripts/formats/ips.js"></script>
|
||||
<script type="text/javascript" src="scripts/formats/ups.js"></script>
|
||||
<script type="text/javascript" src="scripts/formats/aps_n64.js"></script>
|
||||
<script type="text/javascript" src="scripts/formats/aps_gba.js"></script>
|
||||
<script type="text/javascript" src="scripts/formats/bps.js"></script>
|
||||
<script type="text/javascript" src="scripts/formats/rup.js"></script>
|
||||
<script type="text/javascript" src="scripts/formats/ppf.js"></script>
|
||||
<script type="text/javascript" src="scripts/formats/pmsr.js"></script>
|
||||
<script type="text/javascript" src="scripts/formats/vcdiff.js"></script>
|
||||
|
||||
<script type="text/javascript" src="./js/zip.js/zip.js"></script>
|
||||
<!-- <script type="text/javascript" src="js/libunrar/rpc.js"></script> -->
|
||||
<script type="text/javascript" src="scripts/zip.js/zip.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="column">
|
||||
<!-- HEADER -->
|
||||
<header>
|
||||
<img src="./style/logo.png" />
|
||||
<h1>Rom Patcher JS</h1>
|
||||
</header>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
// CUSTOM PATCHER EXAMPLE
|
||||
// uncomment this to build your own custom exclusive patcher for your hacks/translations
|
||||
// user will only need to provide the ROM file, as patches will be fetched from your server!
|
||||
// a crc (or various crcs) can be provided for source files, allowing old formats like IPS to have validation!
|
||||
/*var CUSTOM_PATCHER=[
|
||||
{ //example: uncompressed file
|
||||
file:'./_example/SML2DXv181.ips',
|
||||
name:'Super Mario Land 2 DX v1.8.1 (USA/Europe)',
|
||||
crc:0xd5ec24e4
|
||||
},{ //example: uncompressed file
|
||||
file:'./_example/SML2DXv181_jap.ips',
|
||||
name:'Super Mario Land 2 DX v1.8.1 (Japan)',
|
||||
crc:0xa715daf5
|
||||
},{ //example: compressed file
|
||||
file:'./_example/SML2DXv181.zip',
|
||||
name:'Super Mario Land 2 DX v1.8.1 (World)',
|
||||
crc:[0xd5ec24e4,0xa715daf5]
|
||||
},{ //example: compressed file containing several patches, separate patches provided (recommended)
|
||||
file:'./_example/SML2DXv181.zip',
|
||||
patches:[{
|
||||
file:'SML2DXv181.ips',
|
||||
name:'Super Mario Land 2 DX v1.8.1 (USA/Europe)',
|
||||
crc:0xd5ec24e4
|
||||
},{
|
||||
file:'SML2DXv181_jap.ips',
|
||||
name:'Super Mario Land 2 DX v1.8.1 (Japan)',
|
||||
crc:0xa715daf5
|
||||
}]
|
||||
}
|
||||
];*/
|
||||
--></script>
|
||||
</head>
|
||||
<body><div id="column">
|
||||
<!-- APP -->
|
||||
<div id="wrapper">
|
||||
<div id="switch-container">
|
||||
<span id="switch-create-button" class="button-outer"
|
||||
><span data-localize="creator_mode">Creator mode</span>
|
||||
<span id="switch-create" class="switch disabled"></span
|
||||
></span>
|
||||
</div>
|
||||
|
||||
<div id="tab0" class="tab">
|
||||
<div class="row m-b">
|
||||
<div class="leftcol text-right">
|
||||
<label for="input-file-rom" data-localize="rom_file"
|
||||
>ROM file:</label
|
||||
>
|
||||
</div>
|
||||
<div class="rightcol">
|
||||
<input type="file" id="input-file-rom" class="enabled" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b" id="rom-info">
|
||||
<div class="leftcol text-right">CRC32:</div>
|
||||
<div class="rightcol"><span id="crc32"></span></div>
|
||||
<div class="leftcol text-right">MD5:</div>
|
||||
<div class="rightcol"><span id="md5"></span></div>
|
||||
<div class="leftcol text-right">SHA-1:</div>
|
||||
<div class="rightcol"><span id="sha1"></span></div>
|
||||
</div>
|
||||
<div class="row m-b hide" id="row-removeheader">
|
||||
<div class="leftcol text-right"></div>
|
||||
<div class="rightcol">
|
||||
<input type="checkbox" id="checkbox-removeheader" />
|
||||
<label for="checkbox-removeheader" data-localize="remove_header"
|
||||
>Remove header before patching</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b hide" id="row-addheader">
|
||||
<div class="leftcol text-right"></div>
|
||||
<div class="rightcol">
|
||||
<input type="checkbox" id="checkbox-addheader" />
|
||||
<label for="checkbox-addheader" data-localize="add_header"
|
||||
>Add temporary header</label
|
||||
>
|
||||
<small
|
||||
>(<label id="headersize" for="checkbox-addheader"></label
|
||||
>)</small
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- HEADER -->
|
||||
<header><img src="./style/logo.png" /><h1>Rom Patcher JS</h1></header>
|
||||
<div class="row m-b" id="row-file-patch">
|
||||
<div class="leftcol text-right">
|
||||
<label for="input-file-patch" data-localize="patch_file"
|
||||
>Patch file:</label
|
||||
>
|
||||
</div>
|
||||
<div class="rightcol">
|
||||
<input
|
||||
type="file"
|
||||
id="input-file-patch"
|
||||
accept=".ips,.ups,.bps,.aps,.rup,.ppf,.mod,.xdelta,.vcdiff,.zip"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- APP -->
|
||||
<div id="wrapper">
|
||||
<div id="switch-container"><span id="switch-create-button" class="button-outer"><span data-localize="creator_mode">Creator mode</span> <span id="switch-create" class="switch disabled"></span></span></div>
|
||||
<div class="buttons">
|
||||
<span id="message-apply" class="message"></span>
|
||||
<button
|
||||
id="button-apply"
|
||||
data-localize="apply_patch"
|
||||
class="disabled"
|
||||
disabled
|
||||
>
|
||||
Apply patch
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tab0" class="tab">
|
||||
<div class="row m-b">
|
||||
<div class="leftcol text-right"><label for="input-file-rom" data-localize="rom_file">ROM file:</label></div>
|
||||
<div class="rightcol">
|
||||
<input type="file" id="input-file-rom" class="enabled" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b" id="rom-info">
|
||||
<div class="leftcol text-right">CRC32:</div><div class="rightcol"><span id="crc32"></span></div>
|
||||
<div class="leftcol text-right">MD5:</div><div class="rightcol"><span id="md5"></span></div>
|
||||
<div class="leftcol text-right">SHA-1:</div><div class="rightcol"><span id="sha1"></span></div>
|
||||
</div>
|
||||
<div class="row m-b hide" id="row-removeheader">
|
||||
<div class="leftcol text-right"></div>
|
||||
<div class="rightcol">
|
||||
<input type="checkbox" id="checkbox-removeheader" /> <label for="checkbox-removeheader" data-localize="remove_header">Remove header before patching</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b hide" id="row-addheader">
|
||||
<div class="leftcol text-right"></div>
|
||||
<div class="rightcol">
|
||||
<input type="checkbox" id="checkbox-addheader" /> <label for="checkbox-addheader" data-localize="add_header">Add temporary header</label> <small>(<label id="headersize" for="checkbox-addheader"></label>)</small>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab1" class="tab">
|
||||
<div class="row m-b">
|
||||
<div class="leftcol text-right">
|
||||
<label for="input-file-rom1" data-localize="original_rom"
|
||||
>Original ROM:</label
|
||||
>
|
||||
</div>
|
||||
<div class="rightcol">
|
||||
<input type="file" id="input-file-rom1" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m-b" id="row-file-patch">
|
||||
<div class="leftcol text-right"><label for="input-file-patch" data-localize="patch_file">Patch file:</label></div>
|
||||
<div class="rightcol">
|
||||
<input type="file" id="input-file-patch" accept=".ips,.ups,.bps,.aps,.rup,.ppf,.mod,.xdelta,.vcdiff,.zip"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b">
|
||||
<div class="leftcol text-right">
|
||||
<label for="input-file-rom2" data-localize="modified_rom"
|
||||
>Modified ROM:</label
|
||||
>
|
||||
</div>
|
||||
<div class="rightcol">
|
||||
<input type="file" id="input-file-rom2" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="buttons">
|
||||
<span id="message-apply" class="message"></span>
|
||||
<button id="button-apply" data-localize="apply_patch" class="disabled" disabled>Apply patch</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b">
|
||||
<div class="leftcol text-right" data-localize="patch_type">
|
||||
Patch type:
|
||||
</div>
|
||||
<div class="rightcol">
|
||||
<select id="select-patch-type">
|
||||
<option value="ips">IPS</option>
|
||||
<option value="bps">BPS</option>
|
||||
<option value="ppf">PPF</option>
|
||||
<option value="ups">UPS</option>
|
||||
<option value="aps">APS</option>
|
||||
<option value="rup">RUP</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="buttons">
|
||||
<span id="message-create" class="message"></span>
|
||||
<button
|
||||
id="button-create"
|
||||
class="disabled"
|
||||
disabled
|
||||
data-localize="create_patch"
|
||||
>
|
||||
Create patch
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- FOOTER -->
|
||||
<footer>
|
||||
<div>
|
||||
<button id="button-settings" class="button-outer">
|
||||
<img src="style/icon_settings.svg" class="icon settings" />
|
||||
<span data-localize="settings">Settings</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="tab1" class="tab">
|
||||
<div class="row m-b">
|
||||
<div class="leftcol text-right"><label for="input-file-rom1" data-localize="original_rom" >Original ROM:</label></div>
|
||||
<div class="rightcol">
|
||||
<input type="file" id="input-file-rom1" />
|
||||
</div>
|
||||
</div>
|
||||
Rom Patcher JS <small>v2.8.1</small> by <a href="/">Marc Robledo</a>
|
||||
<br />
|
||||
<img src="style/icon_github.svg" class="icon github" />
|
||||
<a href="https://github.com/marcrobledo/RomPatcher.js/" target="_blank"
|
||||
>See on GitHub</a
|
||||
>
|
||||
<img src="style/icon_heart.svg" class="icon heart" />
|
||||
<a
|
||||
href="https://www.paypal.me/marcrobledo/5"
|
||||
target="_blank"
|
||||
rel="nofollow"
|
||||
>Donate</a
|
||||
>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<div class="row m-b">
|
||||
<div class="leftcol text-right"><label for="input-file-rom2" data-localize="modified_rom">Modified ROM:</label></div>
|
||||
<div class="rightcol">
|
||||
<input type="file" id="input-file-rom2" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- SETTINGS DIALOG -->
|
||||
<div id="dialog-backdrop">
|
||||
<div id="zip-dialog" class="dialog">
|
||||
<div id="zip-dialog-message" class="text-center"></div>
|
||||
<ul id="zip-dialog-file-list"></ul>
|
||||
</div>
|
||||
|
||||
<div class="row m-b">
|
||||
<div class="leftcol text-right" data-localize="patch_type">Patch type:</div>
|
||||
<div class="rightcol">
|
||||
<select id="select-patch-type">
|
||||
<option value="ips">IPS</option>
|
||||
<option value="bps">BPS</option>
|
||||
<option value="ppf">PPF</option>
|
||||
<option value="ups">UPS</option>
|
||||
<option value="aps">APS</option>
|
||||
<option value="rup">RUP</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="settings-dialog" class="dialog">
|
||||
<div class="text-right m-b">
|
||||
<img id="settings-close-dialog" src="style/icon_close.svg" />
|
||||
</div>
|
||||
|
||||
<div class="buttons">
|
||||
<span id="message-create" class="message"></span>
|
||||
<button id="button-create" class="disabled" disabled data-localize="create_patch">Create patch</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b">
|
||||
<div class="leftcol">
|
||||
<label for="select-language">Language</label>
|
||||
</div>
|
||||
<div class="rightcol text-right">
|
||||
<select id="select-language" class="enabled w100">
|
||||
<option value="en">English</option>
|
||||
<option value="fr">Français</option>
|
||||
<option value="de">Deutsch</option>
|
||||
<option value="it">Italiano</option>
|
||||
<option value="es">Español</option>
|
||||
<option value="nl">Nederlands</option>
|
||||
<option value="sv">Svenska</option>
|
||||
<option value="ca">Català</option>
|
||||
<option value="ca-va">Valencià</option>
|
||||
<option value="pt-br">Português Brasileiro</option>
|
||||
<option value="ru">Russian</option>
|
||||
<option value="ja">日本語</option>
|
||||
<option value="zh-cn">中文(简体)</option>
|
||||
<option value="zh-tw">中文(正體)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m-b">
|
||||
<div class="leftcol-lg">
|
||||
<label data-localize="alternate_output_name"
|
||||
>Use patch name for output</label
|
||||
>
|
||||
</div>
|
||||
<div class="rightcol-lg text-right">
|
||||
<span id="switch-output-name" class="switch disabled"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m-b">
|
||||
<div class="leftcol-lg">
|
||||
<label data-localize="fix_checksum">Fix ROM checksum</label>
|
||||
</div>
|
||||
<div class="rightcol-lg text-right">
|
||||
<span id="switch-fix-checksum" class="switch disabled"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- FOOTER -->
|
||||
<footer>
|
||||
<div>
|
||||
<button id="button-settings" class="button-outer"><img src="style/icon_settings.svg" class="icon settings" /> <span data-localize="settings">Settings</span></button>
|
||||
</div>
|
||||
|
||||
Rom Patcher JS <small>v2.8.1</small> by <a href="/">Marc Robledo</a>
|
||||
<br />
|
||||
<img src="style/icon_github.svg" class="icon github" /> <a href="https://github.com/marcrobledo/RomPatcher.js/" target="_blank">See on GitHub</a>
|
||||
<img src="style/icon_heart.svg" class="icon heart" /> <a href="https://www.paypal.me/marcrobledo/5" target="_blank" rel="nofollow">Donate</a>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- SETTINGS DIALOG -->
|
||||
<div id="dialog-backdrop">
|
||||
<div id="zip-dialog" class="dialog">
|
||||
<div id="zip-dialog-message" class="text-center"></div>
|
||||
<ul id="zip-dialog-file-list"></ul>
|
||||
</div>
|
||||
|
||||
<div id="settings-dialog" class="dialog">
|
||||
<div class="text-right m-b"><img id="settings-close-dialog" src="style/icon_close.svg" /></div>
|
||||
|
||||
<div class="row m-b">
|
||||
<div class="leftcol"><label for="select-language">Language</label></div>
|
||||
<div class="rightcol text-right">
|
||||
<select id="select-language" class="enabled w100">
|
||||
<option value="en">English</option>
|
||||
<option value="fr">Français</option>
|
||||
<option value="de">Deutsch</option>
|
||||
<option value="it">Italiano</option>
|
||||
<option value="es">Español</option>
|
||||
<option value="nl">Nederlands</option>
|
||||
<option value="sv">Svenska</option>
|
||||
<option value="ca">Català</option>
|
||||
<option value="ca-va">Valencià</option>
|
||||
<option value="pt-br">Português Brasileiro</option>
|
||||
<option value="ru">Russian</option>
|
||||
<option value="ja">日本語</option>
|
||||
<option value="zh-cn">中文(简体)</option>
|
||||
<option value="zh-tw">中文(正體)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m-b">
|
||||
<div class="leftcol-lg"><label data-localize="alternate_output_name">Use patch name for output</label></div>
|
||||
<div class="rightcol-lg text-right"><span id="switch-output-name" class="switch disabled"></span></div>
|
||||
</div>
|
||||
|
||||
<div class="row m-b">
|
||||
<div class="leftcol-lg"><label data-localize="fix_checksum">Fix ROM checksum</label></div>
|
||||
<div class="rightcol-lg text-right"><span id="switch-fix-checksum" class="switch disabled"></span></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="leftcol-lg"><label data-localize="light_theme">Light theme</label></div>
|
||||
<div class="rightcol-lg text-right"><span id="switch-theme" class="switch disabled"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body></html>
|
||||
<div class="row">
|
||||
<div class="leftcol-lg">
|
||||
<label data-localize="light_theme">Light theme</label>
|
||||
</div>
|
||||
<div class="rightcol-lg text-right">
|
||||
<span id="switch-theme" class="switch disabled"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
/* Rom Patcher JS v20230331 - Marc Robledo 2016-2023 - http://www.marcrobledo.com/license */
|
||||
|
||||
self.importScripts(
|
||||
'./MarcFile.js',
|
||||
'./crc.js',
|
||||
'./formats/ips.js',
|
||||
'./formats/aps_n64.js',
|
||||
'./formats/aps_gba.js',
|
||||
'./formats/ups.js',
|
||||
'./formats/bps.js',
|
||||
'./formats/rup.js',
|
||||
'./formats/ppf.js',
|
||||
'./formats/pmsr.js',
|
||||
'./formats/vcdiff.js'
|
||||
);
|
||||
|
||||
|
||||
self.onmessage = event => { // listen for messages from the main thread
|
||||
var romFile=new MarcFile(event.data.romFileU8Array);
|
||||
var patchFile=new MarcFile(event.data.patchFileU8Array);
|
||||
|
||||
var errorMessage=false;
|
||||
|
||||
var patch;
|
||||
var header=patchFile.readString(6);
|
||||
if(header.startsWith(IPS_MAGIC)){
|
||||
patch=parseIPSFile(patchFile);
|
||||
}else if(header.startsWith(UPS_MAGIC)){
|
||||
patch=parseUPSFile(patchFile);
|
||||
}else if(header.startsWith(APS_N64_MAGIC)){
|
||||
patch=parseAPSFile(patchFile);
|
||||
}else if(header.startsWith(APS_GBA_MAGIC)){
|
||||
patch=APSGBA.fromFile(patchFile);
|
||||
}else if(header.startsWith(BPS_MAGIC)){
|
||||
patch=parseBPSFile(patchFile);
|
||||
}else if(header.startsWith(RUP_MAGIC)){
|
||||
patch=parseRUPFile(patchFile);
|
||||
}else if(header.startsWith(PPF_MAGIC)){
|
||||
patch=parsePPFFile(patchFile);
|
||||
}else if(header.startsWith(PMSR_MAGIC)){
|
||||
patch=parseMODFile(patchFile);
|
||||
}else if(header.startsWith(VCDIFF_MAGIC)){
|
||||
patch=parseVCDIFF(patchFile);
|
||||
}else{
|
||||
errorMessage='error_invalid_patch';
|
||||
}
|
||||
|
||||
//console.log('apply');
|
||||
var patchedRom;
|
||||
if(patch){
|
||||
try{
|
||||
patchedRom=patch.apply(romFile, event.data.validateChecksums);
|
||||
}catch(evt){
|
||||
errorMessage=evt.message;
|
||||
}
|
||||
}
|
||||
|
||||
//console.log('postMessage');
|
||||
if(patchedRom){
|
||||
self.postMessage(
|
||||
{
|
||||
romFileU8Array:event.data.romFileU8Array,
|
||||
patchFileU8Array:event.data.patchFileU8Array,
|
||||
patchedRomU8Array:patchedRom._u8array,
|
||||
errorMessage:errorMessage
|
||||
},
|
||||
[
|
||||
event.data.romFileU8Array.buffer,
|
||||
event.data.patchFileU8Array.buffer,
|
||||
patchedRom._u8array.buffer
|
||||
]
|
||||
);
|
||||
}else{
|
||||
self.postMessage(
|
||||
{
|
||||
romFileU8Array:event.data.romFileU8Array,
|
||||
patchFileU8Array:event.data.patchFileU8Array,
|
||||
errorMessage:errorMessage
|
||||
},
|
||||
[
|
||||
event.data.romFileU8Array.buffer,
|
||||
event.data.patchFileU8Array.buffer
|
||||
]
|
||||
);
|
||||
}
|
||||
};
|
|
@ -1,23 +0,0 @@
|
|||
/* Rom Patcher JS v20200502 - Marc Robledo 2016-2020 - http://www.marcrobledo.com/license */
|
||||
|
||||
self.importScripts(
|
||||
'./MarcFile.js',
|
||||
'./crc.js'
|
||||
);
|
||||
|
||||
|
||||
|
||||
self.onmessage = event => { // listen for messages from the main thread
|
||||
var sourceFile=new MarcFile(event.data.u8array);
|
||||
|
||||
self.postMessage(
|
||||
{
|
||||
crc32:crc32(sourceFile, event.data.startOffset),
|
||||
md5:md5(sourceFile, event.data.startOffset),
|
||||
u8array:event.data.u8array
|
||||
},
|
||||
[
|
||||
event.data.u8array.buffer
|
||||
]
|
||||
);
|
||||
};
|
|
@ -1,63 +0,0 @@
|
|||
/* Rom Patcher JS v20200502 - Marc Robledo 2016-2020 - http://www.marcrobledo.com/license */
|
||||
|
||||
self.importScripts(
|
||||
'./MarcFile.js',
|
||||
'./crc.js',
|
||||
'./formats/ips.js',
|
||||
'./formats/aps_n64.js',
|
||||
'./formats/ups.js',
|
||||
'./formats/bps.js',
|
||||
'./formats/ppf.js',
|
||||
'./formats/rup.js'
|
||||
);
|
||||
|
||||
|
||||
|
||||
self.onmessage = event => { // listen for messages from the main thread
|
||||
var sourceFile=new MarcFile(event.data.sourceFileU8Array);
|
||||
var modifiedFile=new MarcFile(event.data.modifiedFileU8Array);
|
||||
var mode=event.data.patchMode;
|
||||
|
||||
sourceFile.seek(0);
|
||||
modifiedFile.seek(0);
|
||||
|
||||
var patch;
|
||||
if(mode==='ips'){
|
||||
patch=createIPSFromFiles(sourceFile, modifiedFile);
|
||||
}else if(mode==='bps'){
|
||||
//use delta mode (slower, but smaller patch size) only with <4mb files
|
||||
patch=createBPSFromFiles(sourceFile, modifiedFile, (sourceFile.fileSize<=4194304));
|
||||
}else if(mode==='ups'){
|
||||
patch=createUPSFromFiles(sourceFile, modifiedFile);
|
||||
}else if(mode==='aps'){
|
||||
patch=createAPSFromFiles(sourceFile, modifiedFile);
|
||||
}else if(mode==='rup'){
|
||||
patch=createRUPFromFiles(sourceFile, modifiedFile);
|
||||
}else if(mode==='ppf'){
|
||||
patch=createPPFFromFiles(sourceFile, modifiedFile);
|
||||
}else{
|
||||
throw new Error('error_invalid_patch');
|
||||
}
|
||||
|
||||
|
||||
//special case: PPF+modified size>original size, skip verification
|
||||
if(!(mode==='ppf' && sourceFile.fileSize>modifiedFile.fileSize) && crc32(modifiedFile)!==crc32(patch.apply(sourceFile))){
|
||||
throw new Error('Unexpected error: verification failed. Patched file and modified file mismatch. Please report this bug.');
|
||||
}
|
||||
|
||||
var newPatchFile=patch.export('file');
|
||||
|
||||
//console.log('postMessage');
|
||||
self.postMessage(
|
||||
{
|
||||
//sourceFileU8Array:event.data.sourceFileU8Array,
|
||||
//modifiedFileU8Array:event.data.modifiedFileU8Array,
|
||||
patchFileU8Array:newPatchFile._u8array
|
||||
},
|
||||
[
|
||||
//event.data.sourceFileU8Array.buffer,
|
||||
//event.data.modifiedFileU8Array.buffer,
|
||||
newPatchFile._u8array.buffer
|
||||
]
|
||||
);
|
||||
};
|
990
package-lock.json
generated
Normal file
|
@ -0,0 +1,990 @@
|
|||
{
|
||||
"name": "rompatcher",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "rompatcher",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^1.5.14",
|
||||
"vite": "^5.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz",
|
||||
"integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"aix"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz",
|
||||
"integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz",
|
||||
"integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-arm64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz",
|
||||
"integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/freebsd-arm64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz",
|
||||
"integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/freebsd-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-arm": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz",
|
||||
"integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-arm64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz",
|
||||
"integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-ia32": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz",
|
||||
"integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-loong64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz",
|
||||
"integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==",
|
||||
"cpu": [
|
||||
"loong64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-mips64el": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz",
|
||||
"integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==",
|
||||
"cpu": [
|
||||
"mips64el"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-ppc64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz",
|
||||
"integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-riscv64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz",
|
||||
"integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-s390x": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz",
|
||||
"integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/netbsd-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"netbsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/openbsd-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"openbsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/sunos-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"sunos"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-arm64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz",
|
||||
"integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-ia32": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz",
|
||||
"integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-x64": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz",
|
||||
"integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz",
|
||||
"integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm64": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz",
|
||||
"integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz",
|
||||
"integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-darwin-x64": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz",
|
||||
"integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz",
|
||||
"integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz",
|
||||
"integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz",
|
||||
"integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz",
|
||||
"integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz",
|
||||
"integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz",
|
||||
"integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-s390x-gnu": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz",
|
||||
"integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz",
|
||||
"integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz",
|
||||
"integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz",
|
||||
"integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz",
|
||||
"integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz",
|
||||
"integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
]
|
||||
},
|
||||
"node_modules/@tauri-apps/cli": {
|
||||
"version": "1.5.14",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.5.14.tgz",
|
||||
"integrity": "sha512-JOSMKymlg116UdEXSj69eg5p1OtZnQkUE0qIGbtNDO1sk3X/KgBN6+oHBW0BzPStp/W0AjBgrMWCqjHPwEpOug==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tauri": "tauri.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/tauri"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@tauri-apps/cli-darwin-arm64": "1.5.14",
|
||||
"@tauri-apps/cli-darwin-x64": "1.5.14",
|
||||
"@tauri-apps/cli-linux-arm-gnueabihf": "1.5.14",
|
||||
"@tauri-apps/cli-linux-arm64-gnu": "1.5.14",
|
||||
"@tauri-apps/cli-linux-arm64-musl": "1.5.14",
|
||||
"@tauri-apps/cli-linux-x64-gnu": "1.5.14",
|
||||
"@tauri-apps/cli-linux-x64-musl": "1.5.14",
|
||||
"@tauri-apps/cli-win32-arm64-msvc": "1.5.14",
|
||||
"@tauri-apps/cli-win32-ia32-msvc": "1.5.14",
|
||||
"@tauri-apps/cli-win32-x64-msvc": "1.5.14"
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-darwin-arm64": {
|
||||
"version": "1.5.14",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.5.14.tgz",
|
||||
"integrity": "sha512-lxoSOp3KKSqzHJa7iT32dukPGMlfsTuja1xXSgwR8o/fqzpYJY7FY/3ZxesP8HR66FcK+vtqa//HNqeOQ0mHkA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-darwin-x64": {
|
||||
"version": "1.5.14",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.5.14.tgz",
|
||||
"integrity": "sha512-EXSwN1n5spfG8FoXuyc90ACtmDJXzaZ1gxyENaq9xEpQoo7j/Q1vb6qXxmr6azKr8zmqY4h08ZFbv3exh93xJg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-linux-arm-gnueabihf": {
|
||||
"version": "1.5.14",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.5.14.tgz",
|
||||
"integrity": "sha512-Yb8BH/KYR7Tl+de40sZPfrqbhcU3Jlu+UPIrnXt05sjn48xqIps74Xjz8zzVp0TuHxUp8FmIGtCVhQgsbrsvvg==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-linux-arm64-gnu": {
|
||||
"version": "1.5.14",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.5.14.tgz",
|
||||
"integrity": "sha512-QrKHP4gRaHiup478rPBZ+BmNd88yze9jMmheoNy9mN1K/aECRmTHO+tWhsxv5moFHZzRhO0QDWxxvTtiaPXaGg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-linux-arm64-musl": {
|
||||
"version": "1.5.14",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.14.tgz",
|
||||
"integrity": "sha512-Hb1C1VMxmUcyGjW/K/INKF87zzzgLEVRmWZZnQd7M1P4uue4xPyIwUELSdX12Z2jREPgmLW4AXPD0m6wsNu7iw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-linux-x64-gnu": {
|
||||
"version": "1.5.14",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.5.14.tgz",
|
||||
"integrity": "sha512-kD9v/UwPDuhIgq2TJj/s2/7rqk+vmExVV6xHPKI8vVbIvlNAOZqmx3fpxjej1241vhJ/piGd/m6q6YMWGsL0oQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-linux-x64-musl": {
|
||||
"version": "1.5.14",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.14.tgz",
|
||||
"integrity": "sha512-204Drgg9Zx0+THKndqASz4+iPCwqA3gQVF9C0CDIArNXrjPyJjVvW8VP5CHiZYaTNWxlz/ltyxluM6UFWbXNFw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-win32-arm64-msvc": {
|
||||
"version": "1.5.14",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-1.5.14.tgz",
|
||||
"integrity": "sha512-sqPSni2MnWNCm+8YZnLdWCclxfSHaYqKuPFSz8q7Tn1G1m/cA9gyPoC1G0esHftY7bu/ZM5lB4kM3I4U0KlLiA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-win32-ia32-msvc": {
|
||||
"version": "1.5.14",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.5.14.tgz",
|
||||
"integrity": "sha512-8xN8W0zTs8oFsQmvYLxHFeqhzVI7oTaPK1xQMc5gbpFP45jN41c21aCXfjnvzT+h90EfCHUF9EWj2HTEJSb7Iw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@tauri-apps/cli-win32-x64-msvc": {
|
||||
"version": "1.5.14",
|
||||
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.5.14.tgz",
|
||||
"integrity": "sha512-U0slee5tNM2PYECBpPHavLSwkT3szGMZ+qhcikQQbDan84bQdLn/kHWjyXOgLJs4KSve4+KxcrN+AVqj0VyHnw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
|
||||
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz",
|
||||
"integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"bin": {
|
||||
"esbuild": "bin/esbuild"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/aix-ppc64": "0.20.2",
|
||||
"@esbuild/android-arm": "0.20.2",
|
||||
"@esbuild/android-arm64": "0.20.2",
|
||||
"@esbuild/android-x64": "0.20.2",
|
||||
"@esbuild/darwin-arm64": "0.20.2",
|
||||
"@esbuild/darwin-x64": "0.20.2",
|
||||
"@esbuild/freebsd-arm64": "0.20.2",
|
||||
"@esbuild/freebsd-x64": "0.20.2",
|
||||
"@esbuild/linux-arm": "0.20.2",
|
||||
"@esbuild/linux-arm64": "0.20.2",
|
||||
"@esbuild/linux-ia32": "0.20.2",
|
||||
"@esbuild/linux-loong64": "0.20.2",
|
||||
"@esbuild/linux-mips64el": "0.20.2",
|
||||
"@esbuild/linux-ppc64": "0.20.2",
|
||||
"@esbuild/linux-riscv64": "0.20.2",
|
||||
"@esbuild/linux-s390x": "0.20.2",
|
||||
"@esbuild/linux-x64": "0.20.2",
|
||||
"@esbuild/netbsd-x64": "0.20.2",
|
||||
"@esbuild/openbsd-x64": "0.20.2",
|
||||
"@esbuild/sunos-x64": "0.20.2",
|
||||
"@esbuild/win32-arm64": "0.20.2",
|
||||
"@esbuild/win32-ia32": "0.20.2",
|
||||
"@esbuild/win32-x64": "0.20.2"
|
||||
}
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.7",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
||||
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
|
||||
"integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.38",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz",
|
||||
"integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/postcss"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.7",
|
||||
"picocolors": "^1.0.0",
|
||||
"source-map-js": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14"
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "4.18.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz",
|
||||
"integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "1.0.5"
|
||||
},
|
||||
"bin": {
|
||||
"rollup": "dist/bin/rollup"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0",
|
||||
"npm": ">=8.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-android-arm-eabi": "4.18.0",
|
||||
"@rollup/rollup-android-arm64": "4.18.0",
|
||||
"@rollup/rollup-darwin-arm64": "4.18.0",
|
||||
"@rollup/rollup-darwin-x64": "4.18.0",
|
||||
"@rollup/rollup-linux-arm-gnueabihf": "4.18.0",
|
||||
"@rollup/rollup-linux-arm-musleabihf": "4.18.0",
|
||||
"@rollup/rollup-linux-arm64-gnu": "4.18.0",
|
||||
"@rollup/rollup-linux-arm64-musl": "4.18.0",
|
||||
"@rollup/rollup-linux-powerpc64le-gnu": "4.18.0",
|
||||
"@rollup/rollup-linux-riscv64-gnu": "4.18.0",
|
||||
"@rollup/rollup-linux-s390x-gnu": "4.18.0",
|
||||
"@rollup/rollup-linux-x64-gnu": "4.18.0",
|
||||
"@rollup/rollup-linux-x64-musl": "4.18.0",
|
||||
"@rollup/rollup-win32-arm64-msvc": "4.18.0",
|
||||
"@rollup/rollup-win32-ia32-msvc": "4.18.0",
|
||||
"@rollup/rollup-win32-x64-msvc": "4.18.0",
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
||||
"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.2.12",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.2.12.tgz",
|
||||
"integrity": "sha512-/gC8GxzxMK5ntBwb48pR32GGhENnjtY30G4A0jemunsBkiEZFw60s8InGpN8gkhHEkjnRK1aSAxeQgwvFhUHAA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.20.1",
|
||||
"postcss": "^8.4.38",
|
||||
"rollup": "^4.13.0"
|
||||
},
|
||||
"bin": {
|
||||
"vite": "bin/vite.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.0.0 || >=20.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/vitejs/vite?sponsor=1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/node": "^18.0.0 || >=20.0.0",
|
||||
"less": "*",
|
||||
"lightningcss": "^1.21.0",
|
||||
"sass": "*",
|
||||
"stylus": "*",
|
||||
"sugarss": "*",
|
||||
"terser": "^5.4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/node": {
|
||||
"optional": true
|
||||
},
|
||||
"less": {
|
||||
"optional": true
|
||||
},
|
||||
"lightningcss": {
|
||||
"optional": true
|
||||
},
|
||||
"sass": {
|
||||
"optional": true
|
||||
},
|
||||
"stylus": {
|
||||
"optional": true
|
||||
},
|
||||
"sugarss": {
|
||||
"optional": true
|
||||
},
|
||||
"terser": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
36
package.json
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"name": "rompatcher",
|
||||
"description": "A ROM patcher made in HTML5 built with tauri",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^1.5.14",
|
||||
"vite": "^5.2.0"
|
||||
},
|
||||
"author": {
|
||||
"name": "Marc Robledo",
|
||||
"url": "https://www.marcrobledo.com/"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Iranon",
|
||||
"url": "https://github.com/Iranon"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"ips",
|
||||
"patcher",
|
||||
"rom",
|
||||
"romhacking",
|
||||
"ups"
|
||||
],
|
||||
"homepage": "https://www.marcrobledo.com/RomPatcher.js/"
|
||||
}
|
|
@ -10,85 +10,8 @@ const HEADERS_INFO=[
|
|||
];
|
||||
|
||||
|
||||
|
||||
/* service worker */
|
||||
const FORCE_HTTPS=true;
|
||||
if(FORCE_HTTPS && location.protocol==='http:')
|
||||
location.href=window.location.href.replace('http:','https:');
|
||||
else if(location.protocol==='https:' && 'serviceWorker' in navigator && window.location.hostname==='www.marcrobledo.com')
|
||||
navigator.serviceWorker.register('/RomPatcher.js/_cache_service_worker.js', {scope: '/RomPatcher.js/'});
|
||||
|
||||
|
||||
|
||||
var romFile, patchFile, patch, romFile1, romFile2, tempFile, headerSize, oldHeader;
|
||||
|
||||
var CAN_USE_WEB_WORKERS=true;
|
||||
var webWorkerApply,webWorkerCreate,webWorkerCrc;
|
||||
try{
|
||||
webWorkerApply=new Worker('./js/worker_apply.js');
|
||||
webWorkerApply.onmessage = event => { // listen for events from the worker
|
||||
//retrieve arraybuffers back from webworker
|
||||
if(!el('checkbox-removeheader').checked && !el('checkbox-addheader').checked){ //when adding/removing header we don't need the arraybuffer back since we made a copy previously
|
||||
romFile._u8array=event.data.romFileU8Array;
|
||||
romFile._dataView=new DataView(romFile._u8array.buffer);
|
||||
}
|
||||
patchFile._u8array=event.data.patchFileU8Array;
|
||||
patchFile._dataView=new DataView(patchFile._u8array.buffer);
|
||||
|
||||
if(event.data.patchedRomU8Array)
|
||||
preparePatchedRom(romFile, new MarcFile(event.data.patchedRomU8Array.buffer), headerSize);
|
||||
|
||||
setTabApplyEnabled(true);
|
||||
if(event.data.errorMessage)
|
||||
setMessage('apply', _(event.data.errorMessage.replace('Error: ','')), 'error');
|
||||
else
|
||||
setMessage('apply');
|
||||
};
|
||||
webWorkerApply.onerror = event => { // listen for events from the worker
|
||||
setTabApplyEnabled(true);
|
||||
setMessage('apply', _(event.message.replace('Error: ','')), 'error');
|
||||
};
|
||||
|
||||
|
||||
|
||||
webWorkerCreate=new Worker('./js/worker_create.js');
|
||||
webWorkerCreate.onmessage = event => { // listen for events from the worker
|
||||
var newPatchFile=new MarcFile(event.data.patchFileU8Array);
|
||||
newPatchFile.fileName=romFile2.fileName.replace(/\.[^\.]+$/,'')+'.'+el('select-patch-type').value;
|
||||
newPatchFile.save();
|
||||
|
||||
setMessage('create');
|
||||
setTabCreateEnabled(true);
|
||||
};
|
||||
webWorkerCreate.onerror = event => { // listen for events from the worker
|
||||
setTabCreateEnabled(true);
|
||||
setMessage('create', _(event.message.replace('Error: ','')), 'error');
|
||||
};
|
||||
|
||||
|
||||
|
||||
webWorkerCrc=new Worker('./js/worker_crc.js');
|
||||
webWorkerCrc.onmessage = event => { // listen for events from the worker
|
||||
//console.log('received_crc');
|
||||
el('crc32').innerHTML=padZeroes(event.data.crc32, 4);
|
||||
el('md5').innerHTML=padZeroes(event.data.md5, 16);
|
||||
romFile._u8array=event.data.u8array;
|
||||
romFile._dataView=new DataView(event.data.u8array.buffer);
|
||||
|
||||
if(window.crypto&&window.crypto.subtle&&window.crypto.subtle.digest){
|
||||
sha1(romFile);
|
||||
}
|
||||
|
||||
validateSource();
|
||||
setTabApplyEnabled(true);
|
||||
};
|
||||
webWorkerCrc.onerror = event => { // listen for events from the worker
|
||||
setMessage('apply', event.message.replace('Error: ',''), 'error');
|
||||
};
|
||||
}catch(e){
|
||||
CAN_USE_WEB_WORKERS=false;
|
||||
}
|
||||
|
||||
|
||||
/* Shortcuts */
|
||||
function addEvent(e,ev,f){e.addEventListener(ev,f,false)}
|
||||
|
@ -286,16 +209,11 @@ var AppSettings={
|
|||
/* initialize app */
|
||||
addEvent(window,'load',function(){
|
||||
/* zip-js web worker */
|
||||
if(CAN_USE_WEB_WORKERS){
|
||||
zip.useWebWorkers=true;
|
||||
zip.workerScriptsPath='./js/zip.js/';
|
||||
}else{
|
||||
zip.useWebWorkers=false;
|
||||
zip.useWebWorkers=false;
|
||||
|
||||
var script=document.createElement('script');
|
||||
script.src='./js/zip.js/inflate.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(script);
|
||||
}
|
||||
var script=document.createElement('script');
|
||||
script.src='scripts/zip.js/inflate.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(script);
|
||||
|
||||
/* load settings */
|
||||
AppSettings.load();
|
||||
|
@ -532,26 +450,17 @@ function updateChecksums(file, startOffset, force){
|
|||
el('crc32').innerHTML='Calculating...';
|
||||
el('md5').innerHTML='Calculating...';
|
||||
|
||||
if(CAN_USE_WEB_WORKERS){
|
||||
setTabApplyEnabled(false);
|
||||
webWorkerCrc.postMessage({u8array:file._u8array, startOffset:startOffset}, [file._u8array.buffer]);
|
||||
window.setTimeout(function(){
|
||||
el('crc32').innerHTML=padZeroes(crc32(file, startOffset), 4);
|
||||
el('md5').innerHTML=padZeroes(md5(file, startOffset), 16);
|
||||
|
||||
if(window.crypto&&window.crypto.subtle&&window.crypto.subtle.digest){
|
||||
el('sha1').innerHTML='Calculating...';
|
||||
}
|
||||
}else{
|
||||
window.setTimeout(function(){
|
||||
el('crc32').innerHTML=padZeroes(crc32(file, startOffset), 4);
|
||||
el('md5').innerHTML=padZeroes(md5(file, startOffset), 16);
|
||||
validateSource();
|
||||
setTabApplyEnabled(true);
|
||||
}, 30);
|
||||
|
||||
validateSource();
|
||||
setTabApplyEnabled(true);
|
||||
}, 30);
|
||||
|
||||
if(window.crypto&&window.crypto.subtle&&window.crypto.subtle.digest){
|
||||
el('sha1').innerHTML='Calculating...';
|
||||
sha1(file);
|
||||
}
|
||||
if(window.crypto&&window.crypto.subtle&&window.crypto.subtle.digest){
|
||||
el('sha1').innerHTML='Calculating...';
|
||||
sha1(file);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -765,31 +674,14 @@ function applyPatch(p,r,validateChecksums){
|
|||
}
|
||||
}
|
||||
|
||||
if(CAN_USE_WEB_WORKERS){
|
||||
setMessage('apply', 'applying_patch', 'loading');
|
||||
setTabApplyEnabled(false);
|
||||
setMessage('apply', 'applying_patch', 'loading');
|
||||
|
||||
webWorkerApply.postMessage(
|
||||
{
|
||||
romFileU8Array:r._u8array,
|
||||
patchFileU8Array:patchFile._u8array,
|
||||
validateChecksums:validateChecksums
|
||||
},[
|
||||
r._u8array.buffer,
|
||||
patchFile._u8array.buffer
|
||||
]
|
||||
);
|
||||
try{
|
||||
p.apply(r, validateChecksums);
|
||||
preparePatchedRom(r, p.apply(r, validateChecksums), headerSize);
|
||||
|
||||
}else{
|
||||
setMessage('apply', 'applying_patch', 'loading');
|
||||
|
||||
try{
|
||||
p.apply(r, validateChecksums);
|
||||
preparePatchedRom(r, p.apply(r, validateChecksums), headerSize);
|
||||
|
||||
}catch(e){
|
||||
setMessage('apply', 'Error: '+_(e.message), 'error');
|
||||
}
|
||||
}catch(e){
|
||||
setMessage('apply', 'Error: '+_(e.message), 'error');
|
||||
}
|
||||
|
||||
}else{
|
3
src-tauri/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Generated by Cargo
|
||||
# will have compiled files and executables
|
||||
/target/
|
3676
src-tauri/Cargo.lock
generated
Normal file
26
src-tauri/Cargo.toml
Normal file
|
@ -0,0 +1,26 @@
|
|||
[package]
|
||||
name = "app"
|
||||
version = "0.1.0"
|
||||
description = "A Tauri App"
|
||||
authors = ["you"]
|
||||
license = ""
|
||||
repository = ""
|
||||
default-run = "app"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "1.5.2", features = [] }
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tauri = { version = "1.6.5", features = [] }
|
||||
|
||||
[features]
|
||||
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled.
|
||||
# If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes.
|
||||
# DO NOT REMOVE!!
|
||||
custom-protocol = [ "tauri/custom-protocol" ]
|
3
src-tauri/build.rs
Normal file
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
tauri_build::build()
|
||||
}
|
BIN
src-tauri/icons/128x128.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
src-tauri/icons/128x128@2x.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
src-tauri/icons/32x32.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src-tauri/icons/Square107x107Logo.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
src-tauri/icons/Square142x142Logo.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src-tauri/icons/Square150x150Logo.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src-tauri/icons/Square284x284Logo.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
src-tauri/icons/Square30x30Logo.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
src-tauri/icons/Square310x310Logo.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
src-tauri/icons/Square44x44Logo.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
src-tauri/icons/Square71x71Logo.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
src-tauri/icons/Square89x89Logo.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
src-tauri/icons/StoreLogo.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
src-tauri/icons/icon.icns
Normal file
BIN
src-tauri/icons/icon.ico
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
src-tauri/icons/icon.png
Normal file
After Width: | Height: | Size: 72 KiB |
8
src-tauri/src/main.rs
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
fn main() {
|
||||
tauri::Builder::default()
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
66
src-tauri/tauri.conf.json
Normal file
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
||||
"build": {
|
||||
"beforeBuildCommand": "npm run build",
|
||||
"beforeDevCommand": "npm run dev",
|
||||
"devPath": "http://localhost:5555",
|
||||
"distDir": "../dist"
|
||||
},
|
||||
"package": {
|
||||
"productName": "rompatcher",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
"all": false
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"category": "DeveloperTool",
|
||||
"copyright": "",
|
||||
"deb": {
|
||||
"depends": []
|
||||
},
|
||||
"externalBin": [],
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"identifier": "com.tauri.rompatcher",
|
||||
"longDescription": "",
|
||||
"macOS": {
|
||||
"entitlements": null,
|
||||
"exceptionDomain": "",
|
||||
"frameworks": [],
|
||||
"providerShortName": null,
|
||||
"signingIdentity": null
|
||||
},
|
||||
"resources": [],
|
||||
"shortDescription": "",
|
||||
"targets": "all",
|
||||
"windows": {
|
||||
"certificateThumbprint": null,
|
||||
"digestAlgorithm": "sha256",
|
||||
"timestampUrl": ""
|
||||
}
|
||||
},
|
||||
"security": {
|
||||
"csp": null
|
||||
},
|
||||
"updater": {
|
||||
"active": false
|
||||
},
|
||||
"windows": [
|
||||
{
|
||||
"fullscreen": false,
|
||||
"height": 600,
|
||||
"resizable": true,
|
||||
"title": "RomPatcher",
|
||||
"width": 800
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
27
vite.config.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
export default {
|
||||
// prevent vite from obscuring rust errors
|
||||
clearScreen: false,
|
||||
// Tauri expects a fixed port, fail if that port is not available
|
||||
server: {
|
||||
port: 5555,
|
||||
strictPort: true,
|
||||
},
|
||||
// to access the Tauri environment variables set by the CLI with information about the current target
|
||||
envPrefix: [
|
||||
"VITE_",
|
||||
"TAURI_PLATFORM",
|
||||
"TAURI_ARCH",
|
||||
"TAURI_FAMILY",
|
||||
"TAURI_PLATFORM_VERSION",
|
||||
"TAURI_PLATFORM_TYPE",
|
||||
"TAURI_DEBUG",
|
||||
],
|
||||
build: {
|
||||
// Tauri uses Chromium on Windows and WebKit on macOS and Linux
|
||||
target: process.env.TAURI_PLATFORM == "windows" ? "chrome105" : "safari13",
|
||||
// don't minify for debug builds
|
||||
minify: !process.env.TAURI_DEBUG ? "esbuild" : false,
|
||||
// produce sourcemaps for debug builds
|
||||
sourcemap: !!process.env.TAURI_DEBUG,
|
||||
},
|
||||
};
|