-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
312 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,48 @@ | ||
[![][release-badge]][download]\ | ||
[![][prism-badge]][prism launcher] | ||
|
||
[release-badge]: https://img.shields.io/github/v/release/RuiNtD/PrismLauncherPortable?label=Prism+Launcher+Portable&style=for-the-badge | ||
[prism-badge]: https://img.shields.io/github/v/release/PrismLauncher/PrismLauncher?label=Prism+Launcher&style=for-the-badge | ||
|
||
- [Download] | ||
- [Help] | ||
- [Prism Launcher] | ||
|
||
[download]: https://github.com/RuiNtD/PrismLauncherPortable/releases/latest | ||
[help]: https://RuiNtD.github.io/PrismLauncherPortable/PrismLauncherPortable/help.html | ||
[prism launcher]: https://prismlauncher.org/ | ||
|
||
# Portable Java | ||
|
||
PortableApps.com has several portable versions of Java that can be esaily | ||
**TL;DR:** [OpenJDK JRE 64-bit] and [jPortable (64-bit)] (for Minecraft 1.16.5 or older) are recommended. | ||
|
||
PortableApps.com has several portable versions of Java that can be easily | ||
installed and updated from the [PortableApps.com Platform](https://portableapps.com/download). | ||
They can be found in the Utilities category and will be automatically detected by Prism Launcher Portable. | ||
|
||
| App Name | Java Version | | ||
| ----------- | ------------ | | ||
| jdkPortable | JDK 8 | | ||
| jPortable | JRE 8 | | ||
| OpenJDK | JDK 17 | | ||
| OpenJDK JRE | JRE 17 | | ||
|
||
The 64-bit versions of both OpenJDK JRE and jPortable are recommended for Minecraft. | ||
The JDK versions contain extra developer tools that you likely don't need. | ||
The 32-bit versions are likely to crash on newer versions of Minecraft and are not recommended | ||
and the JDK versions contain extra developer tools that you likely don't need. | ||
|
||
| App Name | Java Version | Minecraft Version | | ||
| ---------------------- | ---------------- | ------------------ | | ||
| [OpenJDK JRE 64-bit] | Java 17 (64-bit) | MC 1.17 or newer | | ||
| [jPortable (64-bit)] | Java 8 (64-bit) | MC 1.16.5 or older | | ||
| [OpenJDK 64-bit] | JDK 17 (64-bit) | MC 1.17 or newer | | ||
| [jdkPortable (64-bit)] | JDK 8 (64-bit) | MC 1.16.5 or older | | ||
| [OpenJDK JRE] | Java 17 (32-bit) | MC 1.17 or newer | | ||
| [jPortable] | Java 8 (32-bit) | MC 1.16.5 or older | | ||
| [OpenJDK] | JDK 17 (32-bit) | MC 1.17 or newer | | ||
| [jdkPortable] | JDK 8 (32-bit) | MC 1.16.5 or older | | ||
|
||
[jdkPortable]: https://portableapps.com/apps/utilities/jdkportable | ||
[jdkPortable (64-bit)]: https://portableapps.com/apps/utilities/jdkportable64 | ||
[jPortable]: https://portableapps.com/apps/utilities/java_portable | ||
[jPortable (64-bit)]: https://portableapps.com/apps/utilities/java_portable_64 | ||
[OpenJDK]: https://portableapps.com/apps/utilities/OpenJDK | ||
[OpenJDK 64-bit]: https://portableapps.com/apps/utilities/OpenJDK64 | ||
[OpenJDK JRE]: https://portableapps.com/apps/utilities/OpenJDKJRE | ||
[OpenJDK JRE 64-bit]: https://portableapps.com/apps/utilities/OpenJDKJRE64 | ||
|
||
# Migrating from PolyMC Portable | ||
|
||
Just copy or move your `Data` folder from `PolyMCPortable` to `PrismLauncherPortable` \ | ||
You may have to remove and re-add your accounts before you can launch the game | ||
|
||
[download]: https://github.com/RuiNtD/PrismLauncherPortable/releases/latest | ||
[help]: https://RuiNtD.github.io/PrismLauncherPortable/PrismLauncherPortable/help.html | ||
[prism launcher]: https://prismlauncher.org/ | ||
[release-badge]: https://img.shields.io/github/v/release/RuiNtD/PrismLauncherPortable?label=Prism+Launcher+Portable&style=for-the-badge | ||
[prism-badge]: https://img.shields.io/github/v/release/PrismLauncher/PrismLauncher?label=Prism+Launcher&style=for-the-badge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,11 @@ | |
"udd": "deno run -r --allow-read=. --allow-write=. --allow-net https://deno.land/x/udd/main.ts deno.json" | ||
}, | ||
"imports": { | ||
"std/": "https://deno.land/[email protected]/", | ||
"zod": "https://deno.land/x/[email protected]/mod.ts", | ||
"std/": "https://deno.land/[email protected]/", | ||
"permissions": "https://deno.land/[email protected]/permissions/mod.ts#=", | ||
"dax": "https://deno.land/x/[email protected]/mod.ts", | ||
"ini": "npm:[email protected]", | ||
"zipjs": "https://deno.land/x/[email protected]/index.js" | ||
"zipjs": "https://deno.land/x/[email protected]/index.js", | ||
"zod": "https://deno.land/x/[email protected]/mod.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
import * as path from "https://deno.land/[email protected]/path/mod.ts"; | ||
import { walk } from "https://deno.land/std@0.196.0/fs/mod.ts"; | ||
import { Select } from "https://deno.land/x/[email protected]/prompt/select.ts"; | ||
import { format as formatBytes } from "https://deno.land/std@0.196.0/fmt/bytes.ts"; | ||
import { crypto, toHashString } from "https://deno.land/std/crypto/mod.ts"; | ||
import { stripTrailingSeparators } from "https://deno.land/[email protected]/path/_util.ts"; | ||
|
||
let dir = Array.from(Deno.readDirSync(".")) | ||
.filter((v) => v.isFile && path.extname(v.name) == ".exe") | ||
import $ from "dax"; | ||
import { format as formatBytes } from "std/fmt/bytes.ts"; | ||
import { crypto } from "std/crypto/mod.ts"; | ||
import { encodeHex } from "std/encoding/hex.ts"; | ||
|
||
$.setPrintCommand(true); | ||
|
||
const dir = Array.from($.path(".").readDirFilePathsSync()) | ||
.filter((v) => v.isFileSync() && v.extname() == ".exe") | ||
.map((v) => ({ | ||
name: v.name, | ||
time: Deno.statSync(v.name).mtime?.valueOf() || 0, | ||
path: v, | ||
time: v.statSync()?.mtime?.valueOf() || 0, | ||
})) | ||
.sort((a, b) => b.time - a.time) | ||
.map((v) => v.name); | ||
const file: string = await Select.prompt({ | ||
message: "Pick a file", | ||
options: dir, | ||
}); | ||
.map((v) => v.path); | ||
|
||
const file = | ||
dir[ | ||
await $.select({ | ||
message: "Pick a file", | ||
options: dir.map((v) => v.basename()), | ||
}) | ||
]; | ||
|
||
function formatSize(size: number): string { | ||
return formatBytes(size, { | ||
|
@@ -26,26 +30,22 @@ function formatSize(size: number): string { | |
.replace("i", ""); | ||
} | ||
|
||
const downloadSize = formatSize((await Deno.stat(file)).size); | ||
const hash = toHashString( | ||
await crypto.subtle.digest("MD5", await Deno.readFile(file)) | ||
const downloadSize = formatSize((await file.stat())?.size || 0); | ||
const hash = encodeHex( | ||
await crypto.subtle.digest("MD5", await file.readBytes()) | ||
); | ||
|
||
const tempDir = await Deno.makeTempDir(); | ||
await new Deno.Command(".\\" + file, { | ||
args: [`/DESTINATION=${tempDir}\\`], | ||
}).output(); | ||
const tempDir = $.path(await Deno.makeTempDir()); | ||
await $`${file} /DESTINATION=${tempDir}\\`; | ||
|
||
let tempSize = 0; | ||
for await (const entry of walk(tempDir)) { | ||
for await (const entry of tempDir.walk()) { | ||
if (entry.isDirectory) continue; | ||
const stat = await Deno.stat(entry.path); | ||
tempSize += stat.size; | ||
const stat = await entry.path.stat(); | ||
tempSize += stat?.size || 0; | ||
} | ||
const installedSize = formatSize(tempSize); | ||
await Deno.remove(tempDir, { recursive: true }); | ||
await tempDir.remove({ recursive: true }); | ||
|
||
console.log(` | ||
[${downloadSize} download / ${installedSize} installed] | ||
(MD5: ${hash}) | ||
`); | ||
$.log(`[${downloadSize} download / ${installedSize} installed] | ||
(MD5: ${hash})`); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters