148 lines
4.7 KiB
TOML
148 lines
4.7 KiB
TOML
[package]
|
|
name = "oneclient_app"
|
|
description = "OneClient Freya App"
|
|
version = { workspace = true }
|
|
license = { workspace = true }
|
|
edition = { workspace = true }
|
|
repository = { workspace = true }
|
|
documentation = { workspace = true }
|
|
readme = { workspace = true }
|
|
homepage = { workspace = true }
|
|
authors = { workspace = true }
|
|
|
|
[features]
|
|
default = []
|
|
|
|
[dependencies]
|
|
oneclient_auth.workspace = true
|
|
oneclient_cluster.workspace = true
|
|
oneclient_common.workspace = true
|
|
oneclient_content.workspace = true
|
|
oneclient_events.workspace = true
|
|
oneclient_java.workspace = true
|
|
oneclient_mc.workspace = true
|
|
oneclient_polyplus.workspace = true
|
|
oneclient_net.workspace = true
|
|
oneclient_core.workspace = true
|
|
oneclient_db.workspace = true
|
|
chrono.workspace = true
|
|
oneclient_macro = { workspace = true, features = ["freya"] }
|
|
|
|
polyio.workspace = true
|
|
rust-embed.workspace = true
|
|
|
|
tracing.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
tokio.workspace = true
|
|
uuid.workspace = true
|
|
bytes.workspace = true
|
|
sysinfo.workspace = true
|
|
|
|
anyhow.workspace = true
|
|
regex.workspace = true
|
|
|
|
cargo-packager-updater = "=0.2.3"
|
|
|
|
rfd = "=0.17.2"
|
|
open = "=5.4.0"
|
|
|
|
# clipboard image copy + decode for it
|
|
arboard.workspace = true
|
|
image.workspace = true
|
|
|
|
freya-skia-safe.workspace = true
|
|
freya.workspace = true
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
mimalloc = "=0.1.52"
|
|
|
|
[target.'cfg(windows)'.build-dependencies]
|
|
winresource = "=0.1.31"
|
|
|
|
[package.metadata.packager]
|
|
product-name = "OneClient"
|
|
identifier = "org.polyfrost.OneClient"
|
|
category = "Game"
|
|
publisher = "Polyfrost"
|
|
copyright = "© 2026 Polyfrost Inc."
|
|
homepage = "https://polyfrost.org/projects/oneclient"
|
|
long-description = "Next-generation open source Minecraft launcher"
|
|
formats = ["nsis", "app", "dmg", "deb", "appimage"]
|
|
binaries = [{ path = "oneclient_app", main = true }]
|
|
icons = [
|
|
"icons/32x32.png",
|
|
"icons/64x64.png",
|
|
"icons/128x128.png",
|
|
"icons/128x128@2x.png",
|
|
"icons/icon.icns",
|
|
"icons/icon.ico",
|
|
]
|
|
|
|
[package.metadata.packager.macos]
|
|
minimum-system-version = "10.14"
|
|
entitlements = "distribution/App.entitlements"
|
|
info-plist-path = "distribution/Info.plist"
|
|
|
|
[package.metadata.packager.dmg]
|
|
background = "distribution/dmg-background.tiff"
|
|
window-size = { width = 600, height = 400 }
|
|
app-position = { x = 160, y = 190 }
|
|
application-folder-position = { x = 440, y = 190 }
|
|
|
|
[package.metadata.packager.windows]
|
|
digest-algorithm = "sha256"
|
|
timestamp-url = "https://timestamp.digicert.com"
|
|
|
|
[package.metadata.packager.nsis]
|
|
preinstall-section = """
|
|
Section "-OneClientTauriMigration"
|
|
; Stale Tauri root start-menu shortcut (this build only writes the sub-folder one).
|
|
Delete "$SMPROGRAMS\\${PRODUCTNAME}.lnk"
|
|
; Old Tauri main binary (renamed OneClient.exe -> oneclient_app.exe). Locked while
|
|
; the outdated app is running during an auto-update, so fall back to reboot removal.
|
|
Delete /REBOOTOK "$INSTDIR\\OneClient.exe"
|
|
SectionEnd
|
|
|
|
Section "-VCRedist"
|
|
SetRegView 64
|
|
ReadRegDWORD $R0 HKLM "SOFTWARE\\Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\X64" "Installed"
|
|
ReadRegDWORD $R1 HKLM "SOFTWARE\\Microsoft\\VisualStudio\\14.0\\VC\\Runtimes\\X64" "Minor"
|
|
SetRegView lastused
|
|
|
|
${If} $R0 == 1
|
|
${AndIf} $R1 >= 40
|
|
Goto vcredist_done
|
|
${EndIf}
|
|
|
|
DetailPrint "Installing Microsoft Visual C++ Redistributable (x64)..."
|
|
nsis_tauri_utils::Download "https://aka.ms/vs/17/release/vc_redist.x64.exe" "$PLUGINSDIR\\vc_redist.x64.exe"
|
|
Pop $R2
|
|
${If} $R2 == 0
|
|
ExecWait '"$PLUGINSDIR\\vc_redist.x64.exe" /quiet /norestart' $R3
|
|
${If} $R3 == 3010
|
|
SetRebootFlag true
|
|
${EndIf}
|
|
${ElseIf} $PassiveMode != 1
|
|
MessageBox MB_OK|MB_ICONEXCLAMATION "Could not download the Microsoft Visual C++ Redistributable. OneClient may fail to start until you install it manually from https://aka.ms/vs/17/release/vc_redist.x64.exe"
|
|
${EndIf}
|
|
vcredist_done:
|
|
SectionEnd
|
|
"""
|
|
|
|
[package.metadata.packager.deb]
|
|
desktop-template = "distribution/linux/org.polyfrost.oneclient.template"
|
|
|
|
[package.metadata.packager.appimage]
|
|
# desktop entry generated from the deb template above via the linux config
|
|
|
|
[package.metadata.generate-rpm]
|
|
auto-req = "builtin"
|
|
assets = [
|
|
{ source = "target/release/oneclient_app", dest = "/usr/bin/oneclient_app", mode = "755" },
|
|
{ source = "target/release/.cargo-packager/deb/*/data/usr/share/applications/oneclient_app.desktop", dest = "/usr/share/applications/", mode = "644" },
|
|
{ source = "icons/32x32.png", dest = "/usr/share/icons/hicolor/32x32/apps/oneclient_app.png", mode = "644" },
|
|
{ source = "icons/64x64.png", dest = "/usr/share/icons/hicolor/64x64/apps/oneclient_app.png", mode = "644" },
|
|
{ source = "icons/128x128.png", dest = "/usr/share/icons/hicolor/128x128/apps/oneclient_app.png", mode = "644" },
|
|
{ source = "icons/512x512.png", dest = "/usr/share/icons/hicolor/512x512/apps/oneclient_app.png", mode = "644" },
|
|
]
|
|
|