feat: Add the Game Jolt store (#1986)

This commit is contained in:
FX1922 authored and GitHub committed 2026-11-02 10:05:30 -05:00
1 parent 0050b5eb6b
commit 3583643a11
74 files changed
+3215 -275

No files matched your search

@@ -55,6 +55,7 @@ class App : Application() {
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.epic.EpicBackend)
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.amazon.AmazonBackend)
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.itch.ItchBackend)
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.gamejolt.GameJoltBackend)
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.xbox.XboxBackend)
com.droiddeck.launcher.sync.Syncthing.init(this)
com.droiddeck.launcher.stores.StoresState.register(com.droiddeck.launcher.stores.battlenet.BattleNetBackend)
@@ -87,7 +87,7 @@ object CloudSaves {
val item = sidecar.extra["catalogItemId"].orEmpty()
if (ns.isEmpty() || item.isEmpty()) "" else EpicApiClient.getCustomAttribute(token, ns, item, "CloudSaveFolder")
}
Store.AMAZON, Store.ITCH, Store.XBOX, Store.BATTLENET -> ""
Store.AMAZON, Store.ITCH, Store.GAMEJOLT, Store.XBOX, Store.BATTLENET -> ""
} ?: return null
p.edit()
.putString("cloud_template_$id", fetched.ifEmpty { TEMPLATE_NONE })
@@ -148,7 +148,7 @@ object CloudSaves {
val dir = when (store) {
Store.GOG -> CloudSavePaths.gog(template, pfx, folder)
Store.EPIC -> CloudSavePaths.epic(template, pfx, folder, EpicCredentialStore.load(context)?.accountId.orEmpty(), id)
Store.AMAZON, Store.ITCH, Store.XBOX, Store.BATTLENET -> null
Store.AMAZON, Store.ITCH, Store.GAMEJOLT, Store.XBOX, Store.BATTLENET -> null
}
return dir to (if (dir == null) "unresolved" else "ok")
}
@@ -173,7 +173,7 @@ object CloudSaves {
val account = EpicCredentialStore.load(context)?.accountId.orEmpty()
if (token == null || account.isEmpty()) null else EpicCloud(account, id, token)
}
Store.AMAZON, Store.ITCH, Store.XBOX, Store.BATTLENET -> null
Store.AMAZON, Store.ITCH, Store.GAMEJOLT, Store.XBOX, Store.BATTLENET -> null
}
private fun gogScopedToken(context: Context, id: String, clientId: String): String? {
@@ -12,11 +12,13 @@ internal object LoginFlows {
Store.GOG -> GogFlow(state, browserUserAgent)
Store.EPIC -> epicFlow()
Store.AMAZON -> amazonFlow()
Store.GAMEJOLT -> gameJoltFlow(browserUserAgent)
Store.ITCH, Store.XBOX, Store.BATTLENET -> null
}
@Volatile var epicFlow: () -> StoreLoginActivity.Flow? = { null }
@Volatile var amazonFlow: () -> StoreLoginActivity.Flow? = { null }
@Volatile var gameJoltFlow: (String) -> StoreLoginActivity.Flow? = { null }
private class GogFlow(private val state: String, override val userAgent: String) : StoreLoginActivity.Flow {
override val startUrl: String get() = GogAuth.authUrl(state)
@@ -5,9 +5,12 @@ enum class Store(val id: String, val label: String, val shortLabel: String) {
EPIC("epic", "Epic Games", "Epic"),
AMAZON("amazon", "Amazon Games", "Amazon"),
XBOX("xbox", "Xbox", "Xbox"),
ITCH("itch", "itch.io", "itch"),
ITCH("itch", "Itch.io", "Itch.io"),
GAMEJOLT("gamejolt", "Game Jolt", "Game Jolt"),
BATTLENET("battlenet", "Battle.net", "Battle.net");
val folder: String get() = if (this == ITCH) "itch" else shortLabel
companion object {
fun byId(id: String?): Store? = entries.firstOrNull { it.id == id }
}
@@ -0,0 +1,231 @@
package com.droiddeck.launcher.stores
import android.content.Context
import com.droiddeck.launcher.runtime.GuestCommand
import com.droiddeck.launcher.runtime.LinuxRuntime
import com.droiddeck.launcher.stores.download.DownloadQueue
import com.droiddeck.launcher.stores.itch.ItchArchives
import org.apache.commons.compress.MemoryLimitException
import org.apache.commons.compress.archivers.sevenz.SevenZFile
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream
import org.apache.commons.compress.archivers.zip.ZipFile
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream
import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream
import org.apache.commons.compress.compressors.xz.XZCompressorInputStream
import java.io.BufferedInputStream
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
import java.nio.file.Files
import java.util.concurrent.atomic.AtomicBoolean
internal class StoreArchiveUnpacker(
private val app: Context,
private val cancelled: AtomicBoolean,
private val label: String,
private val unsupported: Int,
private val extractFailed: Int,
private val logName: String,
) {
var work: File = File("")
fun unpack(archive: File, filename: String, handle: DownloadQueue.JobHandle) {
when (val kind = ItchArchives.kind(archive, filename)) {
"zip" -> unzip(archive, handle)
"7z" -> try {
sevenZip(archive, handle)
} catch (e: MemoryLimitException) {
handle.log("$label: ${archive.name} needs more memory than the app has, unpacking it in the runtime")
unrar(archive, handle, kind)
}
"rar" -> unrar(archive, handle, kind)
"exe" -> copy(archive, File(work, filename.ifBlank { "game.exe" }))
"tar" -> untar(archive, null, handle)
"gz", "bz2", "xz" -> untar(archive, kind, handle) ?: single(archive, kind, handle)
else -> copy(archive, File(work, filename.ifBlank { "game" }))
}
}
private fun target(name: String): File? {
val file = File(work, name.replace('\\', '/'))
val root = work.canonicalPath
val path = file.canonicalPath
return if (path == root || path.startsWith(root + File.separator)) file else null
}
private fun unrar(archive: File, handle: DownloadQueue.JobHandle, kind: String) {
if (!LinuxRuntime.isInstalled(app)) throw IllegalStateException(app.getString(unsupported, kind))
val binds = if (listOf(app.filesDir, app.cacheDir).any { work.absolutePath.startsWith(it.absolutePath + "/") }) null
else listOf(work.absolutePath)
fun bsdtar(args: List<String>, onLine: (String) -> Unit) =
GuestCommand.run(app, listOf("/usr/bin/bsdtar") + args, logName = logName, extraBinds = binds, fastPath = true, cancelled = cancelled) { line ->
if (!line.startsWith("proot ")) onLine(line)
}
var entries = 0L
bsdtar(listOf("-tf", archive.absolutePath)) { entries++ }
var done = 0L
val tail = ArrayDeque<String>()
val code = bsdtar(listOf("-xvf", archive.absolutePath, "-C", work.absolutePath)) { line ->
if (line.startsWith("x ")) handle.stageProgress(++done, entries) else {
if (tail.size == 5) tail.removeFirst()
tail.addLast(line)
}
}
if (cancelled.get()) return
if (code != 0) {
handle.log("$label: bsdtar exited $code: ${tail.joinToString(" | ")}")
throw IllegalStateException(app.getString(extractFailed, code))
}
}
private fun sevenZip(archive: File, handle: DownloadQueue.JobHandle) {
val total = archive.length()
var written = 0L
val buffer = ByteArray(64 * 1024)
val limitKb = (Runtime.getRuntime().maxMemory() / 4 / 1024).coerceIn(32L * 1024, Int.MAX_VALUE.toLong()).toInt()
Files.newByteChannel(archive.toPath()).use { channel ->
SevenZFile.builder().setSeekableByteChannel(channel).setMaxMemoryLimitKb(limitKb).get().use { seven ->
while (true) {
if (cancelled.get()) return
val entry = seven.nextEntry ?: break
val file = target(entry.name)
if (file == null) {
handle.log("$label: skipped an entry outside the game folder")
continue
}
if (entry.isDirectory) {
file.mkdirs()
continue
}
file.parentFile?.mkdirs()
FileOutputStream(file).use { out ->
while (true) {
if (cancelled.get()) return
val read = seven.read(buffer, 0, buffer.size)
if (read < 0) break
out.write(buffer, 0, read)
written += read
handle.stageProgress(written, total)
}
}
}
}
}
}
private fun untar(archive: File, codec: String?, handle: DownloadQueue.JobHandle): Unit? {
val total = archive.length()
var written = 0L
var entries = 0
val buffer = ByteArray(64 * 1024)
val opened = runCatching {
FileInputStream(archive).use { raw ->
val stream = when (codec) {
"gz" -> GzipCompressorInputStream(BufferedInputStream(raw))
"bz2" -> BZip2CompressorInputStream(BufferedInputStream(raw))
"xz" -> XZCompressorInputStream(BufferedInputStream(raw))
else -> BufferedInputStream(raw)
}
stream.use { input ->
TarArchiveInputStream(input).use { tar ->
while (true) {
if (cancelled.get()) return null
val entry = tar.nextEntry ?: break
entries++
val file = target(entry.name)
if (file == null) {
handle.log("$label: skipped an entry outside the game folder")
continue
}
if (entry.isDirectory) {
file.mkdirs()
continue
}
file.parentFile?.mkdirs()
FileOutputStream(file).use { out ->
while (true) {
if (cancelled.get()) return null
val read = tar.read(buffer, 0, buffer.size)
if (read < 0) break
out.write(buffer, 0, read)
written += read
handle.stageProgress(written, total)
}
}
}
}
}
}
true
}
if (opened.isSuccess && entries > 0) return Unit
if (opened.isFailure && codec == null) throw opened.exceptionOrNull() ?: IllegalStateException("tar")
return null
}
private fun single(archive: File, codec: String, handle: DownloadQueue.JobHandle) {
val name = archive.name.substringBeforeLast('.')
val file = target(name.ifBlank { "game" }) ?: throw IllegalStateException("archive")
file.parentFile?.mkdirs()
val total = archive.length()
var written = 0L
val buffer = ByteArray(64 * 1024)
FileInputStream(archive).use { raw ->
val stream = when (codec) {
"bz2" -> BZip2CompressorInputStream(BufferedInputStream(raw))
"xz" -> XZCompressorInputStream(BufferedInputStream(raw))
else -> GzipCompressorInputStream(BufferedInputStream(raw))
}
stream.use { input ->
FileOutputStream(file).use { out ->
while (true) {
if (cancelled.get()) return
val read = input.read(buffer)
if (read < 0) break
out.write(buffer, 0, read)
written += read
handle.stageProgress(written, total)
}
}
}
}
}
private fun copy(source: File, target: File) {
target.parentFile?.mkdirs()
FileInputStream(source).use { input -> FileOutputStream(target).use { out -> input.copyTo(out, 128 * 1024) } }
}
private fun unzip(archive: File, handle: DownloadQueue.JobHandle) {
val total = archive.length()
var written = 0L
val buffer = ByteArray(64 * 1024)
ZipFile.builder().setFile(archive).get().use { zip ->
for (entry in zip.entries) {
if (cancelled.get()) return
val target = target(entry.name)
if (target == null) {
handle.log("$label: skipped an entry outside the game folder")
continue
}
if (entry.isDirectory) {
target.mkdirs()
continue
}
target.parentFile?.mkdirs()
zip.getInputStream(entry).use { input ->
FileOutputStream(target).use { out ->
while (true) {
if (cancelled.get()) return
val read = input.read(buffer)
if (read < 0) break
out.write(buffer, 0, read)
written += read
handle.stageProgress(written, total)
}
}
}
}
}
}
}
@@ -218,7 +218,7 @@ object StoreInstallRoot {
fun isRemovable(context: Context, folder: File): Boolean = !folder.absolutePath.startsWith(internalRoot(context).absolutePath + "/")
fun storeDir(root: File, store: Store): File = File(root, store.shortLabel)
fun storeDir(root: File, store: Store): File = File(root, store.folder)
fun gameFolders(context: Context): List<File> = roots(context).flatMap { root ->
Store.entries.flatMap { store ->
@@ -273,6 +273,10 @@ class StoreLoginActivity : ComponentActivity() {
if (url != null && view != null && flow?.isRedirect(url) == true && flow?.readsPage != true) complete(view, url)
}
override fun doUpdateVisitedHistory(view: WebView?, url: String?, isReload: Boolean) {
if (!isPopup && store == Store.GAMEJOLT && url != null && view != null && flow?.isRedirect(url) == true && flow?.readsPage != true) complete(view, url)
}
override fun onPageFinished(view: WebView?, url: String?) {
if (url != null && view != null && flow?.readsPage == true && flow?.isRedirect(url) == true) complete(view, url)
}
@@ -54,7 +54,7 @@ object StoreSizes {
when (item.store) {
Store.EPIC -> EpicPrefs.get(app).edit().putLong("size_${item.id}", it).apply()
Store.AMAZON -> AmazonPrefs.get(app).edit().putLong("size_${item.id}", it).apply()
Store.ITCH -> {}
Store.ITCH, Store.GAMEJOLT -> {}
Store.GOG, Store.XBOX, Store.BATTLENET -> {}
}
}
@@ -113,5 +113,6 @@ object StoreSizes {
}
Store.GOG, Store.XBOX, Store.BATTLENET -> 0L
Store.ITCH -> com.droiddeck.launcher.stores.itch.ItchLibrary.size(context, item)
Store.GAMEJOLT -> com.droiddeck.launcher.stores.gamejolt.GameJoltBuilds.size(context, item)
} }
}
@@ -131,7 +131,11 @@ object StoresState {
fun detailItem(store: Store, id: String): CatalogItem? = detailCatalogItem(
store, id, library[store].orEmpty(),
found[store].orEmpty() + if (store == Store.ITCH) com.droiddeck.launcher.stores.itch.ItchBrowseState.items + com.droiddeck.launcher.stores.itch.ItchCollections.items() else emptyList(),
found[store].orEmpty() + when (store) {
Store.ITCH -> com.droiddeck.launcher.stores.itch.ItchBrowseState.items + com.droiddeck.launcher.stores.itch.ItchCollections.items()
Store.GAMEJOLT -> com.droiddeck.launcher.stores.gamejolt.GameJoltBrowseState.items + com.droiddeck.launcher.stores.gamejolt.GameJoltCollections.items()
else -> emptyList()
},
shelves[store],
)
@@ -191,6 +195,10 @@ object StoresState {
backend?.signOut(app)
if (store == Store.GOG) com.droiddeck.launcher.stores.gog.GogComet.replaceAccount { StoreAccounts.clear(app, store) }
else if (store != Store.XBOX || backend == null) StoreAccounts.clear(app, store)
if (store == Store.GAMEJOLT) {
com.droiddeck.launcher.stores.gamejolt.GameJoltCollections.clear()
com.droiddeck.launcher.stores.gamejolt.GameJoltUpdates.clear(app)
}
if (store == Store.ITCH) {
com.droiddeck.launcher.stores.itch.ItchCollections.clear()
com.droiddeck.launcher.stores.itch.ItchUpdates.clear(app)
@@ -218,10 +226,12 @@ object StoresState {
var pendingInstall by mutableStateOf<CatalogItem?>(null)
var itchPicking by mutableStateOf<CatalogItem?>(null)
var gameJoltPicking by mutableStateOf<CatalogItem?>(null)
fun requestInstall(context: Context, item: CatalogItem) {
askForNotifications(context)
if (item.store == Store.ITCH && item.extra["uploadId"].isNullOrEmpty()) { itchPicking = item; return }
if (item.store == Store.GAMEJOLT && item.extra["buildId"].isNullOrEmpty()) { gameJoltPicking = item; return }
if (isUnfinished(item)) { install(context, item); return }
val targets = StoreInstallRoot.targets(context)
val preferred = StoreInstallRoot.defaultTarget(context)
@@ -285,6 +295,7 @@ object StoresState {
installed = installed.filterNot { it.folder.absolutePath == game.folder.absolutePath }
uninstalling.remove(key)
if (game.sidecar.store == Store.ITCH) com.droiddeck.launcher.stores.itch.ItchUpdates.applied(app, key)
if (game.sidecar.store == Store.GAMEJOLT) com.droiddeck.launcher.stores.gamejolt.GameJoltUpdates.applied(app, key)
}
})
main.post(onDone)
@@ -0,0 +1,72 @@
package com.droiddeck.launcher.stores.gamejolt
import com.droiddeck.launcher.stores.StoreNet
import org.json.JSONObject
import java.net.HttpURLConnection
import java.net.URL
import java.net.URLEncoder
internal class GameJoltAnswer(val code: Int, val json: JSONObject?) {
val ok: Boolean get() = code in 200..299
val payload: JSONObject? get() = json?.optJSONObject("payload")
val user: JSONObject? get() = json?.optJSONObject("user")
}
internal object GameJoltApi {
const val SITE = "https://gamejolt.com"
const val LOGIN = "$SITE/login"
private const val BASE = "$SITE/site-api"
private const val MAX_BYTES = 6_000_000
fun get(path: String, cookies: String = ""): GameJoltAnswer = send("GET", path, cookies, null)
fun post(path: String, cookies: String = "", body: String = ""): GameJoltAnswer = send("POST", path, cookies, body)
fun overview(gameId: String, cookies: String): GameJoltAnswer = get("/web/discover/games/overview/$gameId", cookies)
fun search(query: String, page: Int, cookies: String): GameJoltAnswer =
get("/web/search/games?q=${URLEncoder.encode(query, "UTF-8")}&page=$page", cookies)
fun browse(queryString: String, cookies: String): GameJoltAnswer = get("/web/discover/games?$queryString", cookies)
fun pageUrl(slug: String, id: String): String = "$SITE/games/$slug/$id"
private fun readBounded(input: java.io.InputStream): String {
val out = java.io.ByteArrayOutputStream()
val buffer = ByteArray(16 * 1024)
while (out.size() < MAX_BYTES) {
val read = input.read(buffer, 0, minOf(buffer.size, MAX_BYTES - out.size()))
if (read < 0) break
out.write(buffer, 0, read)
}
return out.toString(Charsets.UTF_8.name())
}
private fun send(method: String, path: String, cookies: String, body: String?): GameJoltAnswer {
var conn: HttpURLConnection? = null
return try {
conn = (URL(BASE + path).openConnection() as HttpURLConnection).apply {
connectTimeout = 25_000
readTimeout = 25_000
requestMethod = method
setRequestProperty("User-Agent", StoreNet.BROWSER_UA)
setRequestProperty("Accept", "application/json")
if (cookies.isNotBlank()) setRequestProperty("Cookie", cookies)
if (body != null) {
doOutput = true
setRequestProperty("Content-Type", "application/x-www-form-urlencoded")
}
}
if (body != null) conn.outputStream.use { it.write(body.toByteArray()) }
val code = conn.responseCode
val stream = if (code in 200..399) conn.inputStream else conn.errorStream
val text = stream?.use { readBounded(it) }.orEmpty()
GameJoltAnswer(code, runCatching { JSONObject(text) }.getOrNull())
} catch (e: Exception) {
GameJoltAnswer(0, null)
} finally {
runCatching { conn?.disconnect() }
}
}
}
@@ -0,0 +1,24 @@
package com.droiddeck.launcher.stores.gamejolt
import android.content.Context
import com.droiddeck.launcher.stores.Store
import com.droiddeck.launcher.stores.StoreAccounts
import org.json.JSONObject
internal object GameJoltAuth {
fun cookies(context: Context): String = StoreAccounts.read(context.applicationContext, Store.GAMEJOLT)?.optString("access_token").orEmpty()
fun save(context: Context, cookies: String, user: JSONObject) {
val name = user.optString("display_name").ifBlank { user.optString("username") }
StoreAccounts.write(
context.applicationContext, Store.GAMEJOLT,
JSONObject().put("access_token", cookies).put("user_id", user.optLong("id").toString()).put("username", user.optString("username")).put("display_name", name),
)
}
fun username(context: Context): String = StoreAccounts.read(context.applicationContext, Store.GAMEJOLT)?.optString("username").orEmpty()
fun userId(context: Context): String = StoreAccounts.read(context.applicationContext, Store.GAMEJOLT)?.optString("user_id").orEmpty()
fun clear(context: Context) = StoreAccounts.clear(context.applicationContext, Store.GAMEJOLT)
}
@@ -0,0 +1,86 @@
package com.droiddeck.launcher.stores.gamejolt
import android.content.Context
import android.content.Intent
import com.droiddeck.launcher.stores.CatalogItem
import com.droiddeck.launcher.stores.InstalledStoreGame
import com.droiddeck.launcher.stores.LoginFlows
import com.droiddeck.launcher.stores.Store
import com.droiddeck.launcher.stores.StoreBackend
import com.droiddeck.launcher.stores.StoreInstallRoot
import com.droiddeck.launcher.stores.StoreLoginActivity
import com.droiddeck.launcher.stores.StoreShelves
import com.droiddeck.launcher.stores.StoreSizes
import com.droiddeck.launcher.stores.StoresState
import com.droiddeck.launcher.stores.download.DownloadEntry
import com.droiddeck.launcher.stores.download.DownloadQueue
import java.io.File
object GameJoltBackend : StoreBackend {
override val store: Store = Store.GAMEJOLT
init {
LoginFlows.gameJoltFlow = { agent -> GameJoltLogin(agent) }
}
override fun signIn(context: Context) {
context.startActivity(
Intent(context, StoreLoginActivity::class.java)
.putExtra(StoreLoginActivity.EXTRA_STORE, store.id)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
)
}
override fun signOut(context: Context) {
val app = context.applicationContext
GameJoltPrefs.get(app).edit().clear().apply()
GameJoltAuth.clear(app)
GameJoltLibrary.reset()
StoresState.post {
StoresState.library.remove(store)
StoresState.shelves.remove(store)
StoresState.found.remove(store)
StoresState.problems.remove(store)
StoresState.status.remove(store)
}
}
override fun syncLibrary(context: Context, force: Boolean) {
val app = context.applicationContext
if (force) GameJoltLibrary.reset()
Thread({ GameJoltLibrary.sync(app, force) }, "gamejolt-sync").start()
}
override fun loadShelves(context: Context, force: Boolean) {
StoresState.post { StoresState.shelves[store] = StoreShelves() }
}
override fun search(context: Context, query: String): List<CatalogItem> {
val cookies = GameJoltAuth.cookies(context)
val items = ArrayList<CatalogItem>()
for (page in 1..2) {
val answer = GameJoltApi.search(query, page, cookies)
val found = if (answer.ok) GameJoltCatalog.items(answer.payload?.optJSONArray("games")) else emptyList()
if (found.isEmpty()) break
items.addAll(found)
}
StoresState.logLine("Game Jolt search: \"$query\" returned ${items.size} games")
return items.distinctBy { it.id }
}
override fun install(context: Context, item: CatalogItem, root: File) {
val app = context.applicationContext
if (!item.isFree && !item.owned) {
StoresState.logLine("Game Jolt: \"${item.title}\" is a paid game, opening its page instead")
return
}
val folder = StoreInstallRoot.folderFor(app, Store.GAMEJOLT, item.id, item.title, root)
val entry = DownloadEntry(
Store.GAMEJOLT, item.id, item.title, cover = item.imageUrl, bytesTotal = StoreSizes.size(item),
location = StoreInstallRoot.labelFor(app, folder),
)
DownloadQueue.enqueue(app, entry) { GameJoltInstaller(app, item, folder) }
}
override fun uninstall(context: Context, game: InstalledStoreGame) {}
}
@@ -0,0 +1,163 @@
package com.droiddeck.launcher.stores.gamejolt
import android.content.Context
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import com.droiddeck.launcher.stores.CatalogItem
import com.droiddeck.launcher.session.SessionPrefs
import com.droiddeck.launcher.stores.StoresState
import java.net.URLEncoder
internal data class GameJoltQuery(
val section: String = GameJoltBrowse.SECTION_FEATURED,
val price: String = GameJoltBrowse.PRICE_ANY,
val os: Set<String> = emptySet(),
val browser: Set<String> = emptySet(),
val maturity: Set<String> = emptySet(),
val status: Set<String> = emptySet(),
val partners: Boolean = false,
val tags: List<String> = emptyList(),
)
internal object GameJoltBrowse {
const val SECTION_FEATURED = "featured"
const val SECTION_HOT = "hot"
const val SECTION_BEST = "best"
const val SECTION_NEW = "new"
val sections = listOf(SECTION_FEATURED, SECTION_HOT, SECTION_BEST, SECTION_NEW)
const val PRICE_ANY = "any"
const val PRICE_FREE = "free"
const val PRICE_SALE = "sale"
const val PRICE_PAID = "paid"
const val PRICE_UNDER_5 = "5-less"
const val PRICE_UNDER_15 = "15-less"
const val PRICE_UNDER_30 = "30-less"
val prices = listOf(PRICE_ANY, PRICE_FREE, PRICE_SALE, PRICE_PAID, PRICE_UNDER_5, PRICE_UNDER_15, PRICE_UNDER_30)
val systems = listOf("windows", "mac", "linux", "other")
val browsers = listOf("html", "flash", "unity")
val maturities = listOf("everyone", "teen", "adult")
val statuses = listOf("complete", "wip")
fun tagSlug(tag: String): String = tag.trim().lowercase().replace(Regex("[^a-z0-9]+"), "-").trim('-')
fun queryString(query: GameJoltQuery, page: Int): String {
val parts = ArrayList<String>()
parts.add("section=${query.section.takeIf { it in sections } ?: SECTION_FEATURED}")
query.tags.forEach { parts.add("tag=" + enc(tagSlug(it))) }
if (query.price != PRICE_ANY && query.price in prices) parts.add("f_price=${query.price}")
systems.filter { it in query.os }.forEach { parts.add("f_os%5B%5D=$it") }
browsers.filter { it in query.browser }.forEach { parts.add("f_browser%5B%5D=$it") }
maturities.filter { it in query.maturity }.forEach { parts.add("f_maturity%5B%5D=$it") }
statuses.filter { it in query.status }.forEach { parts.add("f_status%5B%5D=$it") }
if (query.partners) parts.add("f_partners%5B%5D=partners")
if (page > 1) parts.add("page=$page")
return parts.joinToString("&")
}
private fun enc(value: String): String = URLEncoder.encode(value, "UTF-8")
class Page(val items: List<CatalogItem>, val code: Int, val rawIds: List<String>)
fun effective(query: GameJoltQuery, showMature: Boolean): GameJoltQuery {
val playable = query.copy(status = query.status.filterTo(HashSet()) { it in statuses }.ifEmpty { statuses.toSet() })
if (showMature) return playable
val allowed = playable.maturity - "adult"
return playable.copy(maturity = allowed.ifEmpty { setOf("everyone", "teen") })
}
fun page(context: Context, query: GameJoltQuery, page: Int, showMature: Boolean): Page {
val cookies = GameJoltAuth.cookies(context)
val asked = effective(query, showMature)
val answer = fetch(queryString(asked, page), cookies)
val all = if (answer.ok) GameJoltCatalog.items(answer.payload?.optJSONArray("games")) else emptyList()
return Page(all, answer.code, all.map { it.id })
}
private fun fetch(qs: String, cookies: String): GameJoltAnswer {
val answer = GameJoltApi.browse(qs, cookies)
val games = if (answer.ok) answer.payload?.optJSONArray("games") else null
StoresState.logLine("Game Jolt browse: ?$qs answered ${answer.code} with ${games?.length() ?: 0} games")
return answer
}
}
internal object GameJoltBrowseState {
var query by mutableStateOf(GameJoltQuery())
private set
var items by mutableStateOf<List<CatalogItem>>(emptyList())
private set
var loading by mutableStateOf(false)
private set
var ended by mutableStateOf(false)
private set
var failed by mutableStateOf(false)
private set
private var next = 1
private var generation = 0
private var loadedMature: Boolean? = null
private val seenRaw = HashSet<String>()
fun sync(context: Context, showMature: Boolean) {
if (!showMature && "adult" in query.maturity) {
reset()
query = query.copy(maturity = query.maturity - "adult")
more(context)
return
}
val before = loadedMature ?: return
if (before != showMature) more(context)
}
private fun reset() {
generation++
items = emptyList()
ended = false
failed = false
loading = false
next = 1
seenRaw.clear()
}
fun choose(context: Context, wanted: GameJoltQuery) {
if (wanted == query) return
reset()
query = wanted
more(context)
}
fun more(context: Context, retry: Boolean = false) {
val app = context.applicationContext
val mature = SessionPrefs.storesShowMature(app)
if (loadedMature != null && loadedMature != mature) reset()
if (loading || ended || (failed && !retry)) return
loading = true
failed = false
val mine = generation
val asked = query
val page = next
loadedMature = mature
Thread({
val answer = runCatching { GameJoltBrowse.page(app, asked, page, mature) }.getOrNull()
StoresState.post {
if (mine != generation) return@post
loading = false
if (answer == null || answer.code !in 200..299) {
failed = true
return@post
}
if (answer.rawIds.filter { seenRaw.add(it) }.isEmpty()) {
ended = true
return@post
}
next = page + 1
val known = items.mapTo(HashSet()) { it.id }
val fresh = answer.items.filter { known.add(it.id) }
if (fresh.isEmpty()) more(app) else items = items + fresh
}
}, "gamejolt-browse").start()
}
}
@@ -0,0 +1,85 @@
package com.droiddeck.launcher.stores.gamejolt
import android.content.Context
import com.droiddeck.launcher.stores.CatalogItem
import org.json.JSONArray
import org.json.JSONObject
internal class GameJoltBuild(
val id: String,
val packageId: String,
val packageTitle: String,
val version: String,
val filename: String,
val size: Long,
val stamp: String,
val platforms: Set<String>,
val folder: String,
val executable: String,
) {
val installable: Boolean get() = "windows" in platforms
}
internal object GameJoltBuilds {
fun parse(payload: JSONObject?): List<GameJoltBuild> {
if (payload == null) return emptyList()
val packages = objects(payload.optJSONArray("packages")).associate { it.optLong("id") to it.optString("title") }
val releases = objects(payload.optJSONArray("releases")).associateBy { it.optLong("id") }
val launch = objects(payload.optJSONArray("launchOptions"))
val builds = objects(payload.optJSONArray("builds")).filter { it.optJSONObject("primary_file") != null }
val newest = builds.groupBy { it.optLong("game_package_id") }.mapValues { (_, list) ->
list.maxOfOrNull { releaseRank(releases[it.optLong("game_release_id")], it.optLong("game_release_id")) }
}
return builds
.filter { newest[it.optLong("game_package_id")] == releaseRank(releases[it.optLong("game_release_id")], it.optLong("game_release_id")) }
.map { build ->
val file = build.optJSONObject("primary_file")
val release = releases[build.optLong("game_release_id")]
val id = build.optLong("id")
GameJoltBuild(
id = id.toString(),
packageId = build.optLong("game_package_id").toString(),
packageTitle = packages[build.optLong("game_package_id")].orEmpty(),
version = release?.optString("version_number").orEmpty(),
filename = file?.optString("filename").orEmpty().substringAfterLast('/').substringAfterLast('\\'),
size = file?.optLong("filesize") ?: 0L,
stamp = release?.optLong("published_on")?.takeIf { it > 0L }?.toString().orEmpty(),
platforms = platforms(build),
folder = build.optString("folder"),
executable = launch.firstOrNull { it.optLong("game_build_id") == id && it.optString("os").startsWith("windows") }?.optString("executable_path").orEmpty(),
)
}
.sortedWith(compareByDescending<GameJoltBuild> { it.installable }.thenByDescending { it.stamp.toLongOrNull() ?: 0L }.thenByDescending { it.id.toLongOrNull() ?: 0L })
}
fun platforms(build: JSONObject): Set<String> {
val found = LinkedHashSet<String>()
if (build.optBoolean("os_windows") || build.optBoolean("os_windows_64")) found.add("windows")
if (build.optBoolean("os_linux") || build.optBoolean("os_linux_64")) found.add("linux")
if (build.optBoolean("os_mac") || build.optBoolean("os_mac_64")) found.add("osx")
if (build.optBoolean("os_other")) found.add("other")
return if (found.isEmpty()) setOf("web") else found
}
fun load(context: Context, gameId: String): List<GameJoltBuild>? {
val answer = GameJoltApi.overview(gameId, GameJoltAuth.cookies(context))
if (!answer.ok) return null
return parse(answer.payload)
}
fun byId(builds: List<GameJoltBuild>, id: String): GameJoltBuild? = builds.firstOrNull { it.id == id }
fun preferred(builds: List<GameJoltBuild>): GameJoltBuild? = builds.firstOrNull { it.installable }
fun size(context: Context, item: CatalogItem): Long {
val gameId = item.extra["gameId"].orEmpty().ifEmpty { item.id }
val builds = load(context, gameId) ?: return 0L
val chosen = item.extra["buildId"]?.let { byId(builds, it) } ?: preferred(builds)
return chosen?.size ?: 0L
}
private fun releaseRank(release: JSONObject?, id: Long): Long = (release?.optLong("published_on") ?: 0L) * 1_000_000L + id
private fun objects(array: JSONArray?): List<JSONObject> =
if (array == null) emptyList() else (0 until array.length()).mapNotNull { array.optJSONObject(it) }
}
@@ -0,0 +1,76 @@
package com.droiddeck.launcher.stores.gamejolt
import com.droiddeck.launcher.stores.CatalogItem
import com.droiddeck.launcher.stores.Store
import com.droiddeck.launcher.stores.StoresState
import com.droiddeck.launcher.stores.cleanStoreText
import org.json.JSONArray
import org.json.JSONObject
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
import java.util.TimeZone
import java.util.concurrent.atomic.AtomicBoolean
internal object GameJoltCatalog {
private const val PAID = "paid"
private val sellableLogged = AtomicBoolean(false)
fun items(games: JSONArray?, owned: Boolean = false): List<CatalogItem> {
if (games == null) return emptyList()
return (0 until games.length()).mapNotNull { games.optJSONObject(it)?.let { game -> item(game, owned) } }.distinctBy { it.id }
}
fun item(game: JSONObject, owned: Boolean = false): CatalogItem? {
val id = game.optLong("id")
if (id <= 0L) return null
val slug = game.optString("slug")
val sellable = game.optJSONObject("sellable")
val paid = sellable?.optString("type") == PAID
if (paid) noteSellable(sellable)
val developer = game.optJSONObject("developer")
val author = developer?.optString("display_name").orEmpty().ifBlank { developer?.optString("username").orEmpty() }
val thumbnail = game.optJSONObject("thumbnail_media_item")?.optString("img_url").orEmpty().ifBlank { game.optString("img_thumbnail") }
val header = game.optJSONObject("header_media_item")?.optString("img_url").orEmpty().ifBlank { game.optString("img_thumbnail") }
val price = if (paid) GameJoltPricing.of(sellable) else null
val compatibility = game.optJSONObject("compatibility")
val tags = buildList {
if (compatibility?.optBoolean("os_windows") == true) add("Windows")
if (compatibility?.optBoolean("os_linux") == true) add("Linux")
if (compatibility?.optBoolean("os_mac") == true) add("macOS")
}.joinToString(", ")
return CatalogItem(
store = Store.GAMEJOLT,
id = id.toString(),
title = game.optString("title").ifBlank { "Game Jolt game $id" },
imageUrl = header.ifBlank { null },
tallImageUrl = thumbnail.ifBlank { null },
tags = tags,
isFree = !paid,
hasPrice = paid,
finalPrice = price?.final.orEmpty(),
originalPrice = price?.original.orEmpty(),
discountPercent = price?.discount ?: 0,
owned = owned,
storeUrl = GameJoltApi.pageUrl(slug.ifBlank { "game" }, id.toString()),
developer = author,
publisher = author,
releaseDate = date(game.optLong("published_on")),
description = cleanStoreText(game.optString("description")),
mature = game.optBoolean("has_adult_content"),
extra = mapOf("gameId" to id.toString(), "slug" to slug),
)
}
private fun noteSellable(sellable: JSONObject?) {
if (sellable == null || !sellableLogged.compareAndSet(false, true)) return
val pricing = sellable.optJSONArray("pricings")?.optJSONObject(0)
StoresState.logLine("Game Jolt: a paid game carries sellable keys [${sellable.keys().asSequence().joinToString(",")}] and pricing keys [${pricing?.keys()?.asSequence()?.joinToString(",").orEmpty()}]")
}
private fun date(stamp: Long): String {
if (stamp <= 0L) return ""
val millis = if (stamp > 100_000_000_000L) stamp else stamp * 1000L
return SimpleDateFormat("yyyy-MM-dd", Locale.US).apply { timeZone = TimeZone.getTimeZone("UTC") }.format(Date(millis))
}
}
@@ -0,0 +1,120 @@
package com.droiddeck.launcher.stores.gamejolt
import android.content.Context
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateMapOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import com.droiddeck.launcher.R
import com.droiddeck.launcher.stores.CatalogItem
import com.droiddeck.launcher.stores.StoresState
import org.json.JSONArray
import org.json.JSONObject
import java.net.URLEncoder
import java.util.concurrent.ConcurrentHashMap
internal class GameJoltCollection(val id: String, val title: String)
internal object GameJoltCollections {
const val FOLLOWED = "followed"
private const val PLAYLIST = "playlist:"
var list by mutableStateOf<List<GameJoltCollection>>(emptyList())
private set
var selected by mutableStateOf<String?>(null)
private set
private val games = mutableStateMapOf<String, List<CatalogItem>>()
private val loading = ConcurrentHashMap.newKeySet<String>()
@Volatile private var generation = 0
fun items(): List<CatalogItem> = games.values.flatten()
fun gamesOf(id: String): List<CatalogItem>? = games[id]
fun chosen(): GameJoltCollection? = list.firstOrNull { it.id == selected }
fun clear() {
generation++
StoresState.post {
list = emptyList()
selected = null
games.clear()
}
}
fun load(context: Context) {
val app = context.applicationContext
val started = generation
val guard = "$started:"
if (!loading.add(guard)) return
Thread({
try {
val cookies = GameJoltAuth.cookies(app)
if (cookies.isBlank()) return@Thread
val playlists = playlists(cookies) ?: return@Thread
val parsed = listOf(GameJoltCollection(FOLLOWED, app.getString(R.string.stores_gamejolt_followed))) + parse(playlists)
if (started != generation) return@Thread
StoresState.post {
if (started != generation) return@post
list = parsed
if (selected != null && parsed.none { it.id == selected }) selected = null
}
StoresState.logLine("Game Jolt: ${parsed.size} collections")
selected?.let { fetchGames(app, it, started) }
} finally {
loading.remove(guard)
}
}, "gamejolt-collections").start()
}
fun select(context: Context, id: String?) {
selected = id
if (id == null) return
val app = context.applicationContext
val started = generation
Thread({ fetchGames(app, id, started) }, "gamejolt-collection-games").start()
}
private fun playlists(cookies: String): JSONArray? {
val library = GameJoltApi.get("/web/library", cookies)
if (!library.ok) return null
library.payload?.optJSONArray("playlists")?.let { return it }
val nested = library.payload?.optJSONArray("collections")
if (nested != null) {
val out = JSONArray()
for (i in 0 until nested.length()) nested.optJSONObject(i)?.optJSONObject("playlist")?.let { out.put(it) }
if (out.length() > 0) return out
}
return GameJoltApi.get("/web/library/playlists", cookies).takeIf { it.ok }?.payload?.optJSONArray("playlists") ?: JSONArray()
}
internal fun parse(playlists: JSONArray): List<GameJoltCollection> = (0 until playlists.length()).mapNotNull { i ->
val playlist = playlists.optJSONObject(i) ?: return@mapNotNull null
val id = playlist.optLong("id").takeIf { it > 0L } ?: return@mapNotNull null
val title = playlist.optString("name").ifBlank { return@mapNotNull null }
GameJoltCollection("$PLAYLIST$id", title)
}
internal fun path(id: String, username: String): String? = when {
id == FOLLOWED -> "/web/library/games/followed/@${URLEncoder.encode(username, "UTF-8")}"
id.startsWith(PLAYLIST) -> id.removePrefix(PLAYLIST).toLongOrNull()?.let { "/web/library/games/playlist/$it" }
else -> null
}
private fun fetchGames(app: Context, id: String, started: Int) {
val guard = "$started:$id"
if (!loading.add(guard)) return
try {
val path = path(id, GameJoltAuth.username(app)) ?: return
val found = GameJoltLibrary.games(app, path, false)
if (found == null) {
StoresState.logLine("Game Jolt: collection $id failed")
return
}
StoresState.post { if (started == generation) games[id] = found }
StoresState.logLine("Game Jolt: collection $id has ${found.size} games")
} finally {
loading.remove(guard)
}
}
}
@@ -0,0 +1,239 @@
package com.droiddeck.launcher.stores.gamejolt
import android.content.Context
import com.droiddeck.launcher.R
import com.droiddeck.launcher.stores.CatalogItem
import com.droiddeck.launcher.stores.Store
import com.droiddeck.launcher.stores.StoreArchiveUnpacker
import com.droiddeck.launcher.stores.StoreExe
import com.droiddeck.launcher.stores.StoreGameSidecar
import com.droiddeck.launcher.stores.StoreInstallRoot
import com.droiddeck.launcher.stores.StoreInstalls
import com.droiddeck.launcher.stores.StoreNet
import com.droiddeck.launcher.stores.download.DownloadQueue
import com.droiddeck.launcher.stores.download.DownloadStage
import com.droiddeck.launcher.stores.itch.ItchArchives
import com.droiddeck.launcher.stores.itch.ItchStaging
import java.io.File
import java.io.FileOutputStream
import java.net.HttpURLConnection
import java.net.URL
import java.util.concurrent.atomic.AtomicBoolean
internal class GameJoltInstaller(
private val app: Context,
private val item: CatalogItem,
private val folder: File,
) : DownloadQueue.DownloadJob {
private val cancelled = AtomicBoolean(false)
private var work: File = folder
private var updating = false
private var previous: StoreGameSidecar? = null
private val commit = Any()
private val unpacker = StoreArchiveUnpacker(app, cancelled, "Game Jolt", R.string.stores_gamejolt_archive, R.string.stores_gamejolt_extract_failed, "gamejolt-unrar")
override fun run(handle: DownloadQueue.JobHandle): String? {
val cookies = GameJoltAuth.cookies(app)
if (cookies.isBlank()) throw IllegalStateException(app.getString(R.string.stores_sync_sign_in))
if (!item.isFree && !item.owned) throw IllegalStateException(app.getString(R.string.stores_gamejolt_not_owned))
val gameId = item.extra["gameId"].orEmpty().ifEmpty { item.id }
val before = StoreGameSidecar.read(folder)
previous = before
updating = before != null && (before.isInstalled || before.state == StoreGameSidecar.STATE_UPDATING)
val resuming = before?.let { it.state == StoreGameSidecar.STATE_INSTALLING && it.id == item.id } == true
StoreInstalls.begin(folder, Store.GAMEJOLT, item.id, item.title, item.imageUrl, item.imageUrl)
handle.stage(DownloadStage.MANIFEST)
val builds = GameJoltBuilds.load(app, gameId) ?: throw IllegalStateException(app.getString(R.string.stores_gamejolt_no_game))
val chosen = item.extra["buildId"].orEmpty()
val build = (if (chosen.isBlank()) GameJoltBuilds.preferred(builds) else GameJoltBuilds.byId(builds, chosen))?.takeIf { it.installable }
?: throw IllegalStateException(app.getString(R.string.stores_gamejolt_no_build))
handle.log("Game Jolt: installing build ${build.id} (${build.filename}, ${build.size} bytes, platforms ${build.platforms.joinToString(",")}, launch ${build.executable.ifBlank { "none" }})")
val scratch = StoreInstallRoot.scratchDir(app, Store.GAMEJOLT, item.id)
scratch.mkdirs()
val filename = build.filename.trim().takeUnless { it.isBlank() || it == "." || it == ".." } ?: "download.bin"
val archive = File(scratch, filename)
val exe = try {
handle.stage(DownloadStage.DOWNLOAD)
download(build, archive, handle)
if (cancelled.get()) return null
handle.stage(DownloadStage.INSTALL)
install(build, archive, filename, handle, resuming)
} catch (t: Throwable) {
if (!cancelled.get()) dropCaches(scratch)
throw t
}
if (exe == null) {
if (cancelled.get()) return null
dropCaches(scratch)
throw IllegalStateException(app.getString(R.string.stores_gamejolt_no_exe))
}
archive.delete()
StoreInstalls.deleteTree(scratch)
val sidecar = StoreGameSidecar(
store = Store.GAMEJOLT,
id = item.id,
title = item.title,
exe = exe,
args = previous?.args.orEmpty(),
env = previous?.env.orEmpty(),
installVersion = build.stamp,
installedAt = System.currentTimeMillis(),
cover = item.imageUrl,
hero = item.imageUrl,
extra = mapOf("gameId" to gameId, "buildId" to build.id, "packageId" to build.packageId) + (if (item.isFree) emptyMap() else mapOf("paid" to "1")),
cloud = false,
)
StoreInstalls.complete(app, folder, sidecar) { done, steps -> handle.stageProgress(done.toLong(), steps.toLong()) }
GameJoltUpdates.applied(app, item.key)
return folder.path
}
override fun cancel(deleteFiles: Boolean) {
cancelled.set(true)
if (deleteFiles) dropCaches(StoreInstallRoot.scratchDir(app, Store.GAMEJOLT, item.id))
}
private fun dropCaches(scratch: File) {
if (!updating) {
StoreInstalls.discard(app, folder, listOf(scratch))
return
}
synchronized(commit) {
StoreInstalls.deleteTree(scratch)
ItchStaging.delete(File(folder, ItchStaging.DIR))
}
}
private fun download(build: GameJoltBuild, target: File, handle: DownloadQueue.JobHandle) {
val origin = File(target.path + ".from")
val stamp = "${build.id} ${build.stamp} ${build.size}"
if (!target.isFile || runCatching { origin.readText() }.getOrNull() != stamp) {
target.delete()
origin.writeText(stamp)
}
val expected = build.size
if (expected > 0 && target.length() == expected) {
handle.progress(expected, expected)
return
}
for (attempt in 0..1) {
val have = target.length()
val url = downloadLink(build)
var conn: HttpURLConnection? = null
try {
conn = (URL(url).openConnection() as HttpURLConnection).apply {
connectTimeout = 30_000
readTimeout = 60_000
instanceFollowRedirects = true
setRequestProperty("User-Agent", StoreNet.BROWSER_UA)
setRequestProperty("Accept", "*/*")
if (have > 0) setRequestProperty("Range", "bytes=$have-")
}
val code = conn.responseCode
if (code == 416 && attempt == 0) {
target.delete()
continue
}
if (code !in 200..299) throw IllegalStateException(app.getString(R.string.stores_gamejolt_download_failed, code))
val append = code == 206 && have > 0
if (have > 0) handle.log(if (append) "Game Jolt: resuming at $have bytes" else "Game Jolt: server ignored the resume, starting over")
var done = if (append) have else 0L
val total = conn.contentLengthLong.takeIf { it > 0 }?.let { if (append) it + have else it } ?: expected
handle.progress(done, total)
val buffer = ByteArray(128 * 1024)
conn.inputStream.use { input ->
FileOutputStream(target, append).use { out ->
while (true) {
if (cancelled.get()) return
val read = input.read(buffer)
if (read < 0) break
out.write(buffer, 0, read)
done += read
handle.progress(done, total)
}
}
}
if (total > 0 && done < total) throw IllegalStateException(app.getString(R.string.stores_gamejolt_download_failed, code))
return
} finally {
runCatching { conn?.disconnect() }
}
}
}
private fun downloadLink(build: GameJoltBuild): String {
val answer = GameJoltApi.post("/web/discover/games/builds/get-download-url/${build.id}", GameJoltAuth.cookies(app))
val url = answer.payload?.optString("url").orEmpty()
if (url.startsWith("https://")) return url
throw IllegalStateException(
when {
answer.code == 0 -> app.getString(R.string.stores_gamejolt_download_unreachable)
answer.ok -> app.getString(R.string.stores_gamejolt_download_no_link)
else -> app.getString(R.string.stores_gamejolt_download_failed, answer.code)
},
)
}
private fun clearPartialInstall() {
folder.listFiles()?.forEach {
if (it.name == StoreGameSidecar.FILE_NAME) return@forEach
if (it.isDirectory) StoreInstalls.deleteTree(it) else it.delete()
}
}
private fun install(build: GameJoltBuild, archive: File, filename: String, handle: DownloadQueue.JobHandle, resuming: Boolean): String? {
work = if (updating) File(folder, ItchStaging.DIR) else folder
if (updating) ItchStaging.delete(work)
work.mkdirs()
unpacker.work = work
if (resuming) clearPartialInstall()
val exe = try {
val kind = ItchArchives.kind(archive, filename)
if (kind == "exe") archive.copyTo(File(work, filename), overwrite = true) else unpacker.unpack(archive, filename, handle)
var picked = pick(build, filename)
var passes = 0
while (picked.isBlank() && passes < 2 && !cancelled.get()) {
val inner = ItchArchives.inner(work) ?: break
handle.log("Game Jolt: no exe yet, unpacking ${inner.name}")
unpacker.unpack(inner, inner.name, handle)
if (cancelled.get()) break
inner.delete()
picked = pick(build, inner.name.substringBeforeLast('.').takeIf { it.endsWith(".exe", ignoreCase = true) })
passes++
}
picked
} catch (t: Throwable) {
if (updating) ItchStaging.delete(work)
throw t
}
if (exe.isBlank()) {
handle.log("Game Jolt: no exe found in ${folder.name}")
if (updating) ItchStaging.delete(work)
return null
}
if (updating) synchronized(commit) {
if (cancelled.get()) {
ItchStaging.delete(work)
return null
}
try {
StoreInstalls.markUpdating(folder)
} catch (t: Throwable) {
ItchStaging.delete(work)
throw t
}
ItchStaging.merge(work, folder)
ItchStaging.delete(work)
}
return exe
}
private fun pick(build: GameJoltBuild, hint: String?): String {
if (build.executable.isNotBlank()) {
val declared = File(work, build.executable.trimStart('/'))
val inside = runCatching { declared.canonicalPath.startsWith(work.canonicalPath + File.separator) }.getOrDefault(false)
if (inside && declared.isFile) return declared.relativeTo(work).path
}
return StoreExe.pick(work, hint?.ifBlank { null } ?: build.filename.substringBeforeLast('.').ifBlank { null }, item.title)
}
}
@@ -0,0 +1,74 @@
package com.droiddeck.launcher.stores.gamejolt
import android.content.Context
import com.droiddeck.launcher.R
import com.droiddeck.launcher.stores.CatalogItem
import com.droiddeck.launcher.stores.Store
import com.droiddeck.launcher.stores.StoresState
import com.droiddeck.launcher.stores.mergeItems
import java.net.URLEncoder
import java.util.concurrent.atomic.AtomicBoolean
internal object GameJoltLibrary {
private const val MAX_PAGES = 20
private const val THROTTLE_MS = 10 * 60 * 1000L
private val running = AtomicBoolean(false)
@Volatile private var syncedAt = 0L
fun sync(context: Context, force: Boolean) {
val app = context.applicationContext
if (!running.compareAndSet(false, true)) return
try {
val cookies = GameJoltAuth.cookies(app)
val name = GameJoltAuth.username(app)
if (cookies.isBlank() || name.isBlank()) {
StoresState.post {
StoresState.status.remove(Store.GAMEJOLT)
StoresState.problems[Store.GAMEJOLT] = app.getString(R.string.stores_sync_sign_in)
}
return
}
val have = StoresState.library[Store.GAMEJOLT].orEmpty()
if (!force && have.isNotEmpty() && System.currentTimeMillis() - syncedAt < THROTTLE_MS) return
if (have.isEmpty()) StoresState.post { StoresState.status[Store.GAMEJOLT] = app.getString(R.string.stores_sync_game_list) }
val items = games(app, "/web/library/games/owned/@${URLEncoder.encode(name, "UTF-8")}", true)
if (items == null) {
StoresState.post {
StoresState.status.remove(Store.GAMEJOLT)
StoresState.problems[Store.GAMEJOLT] = app.getString(R.string.stores_sync_failed)
}
return
}
syncedAt = System.currentTimeMillis()
StoresState.post {
StoresState.status.remove(Store.GAMEJOLT)
StoresState.problems.remove(Store.GAMEJOLT)
StoresState.library[Store.GAMEJOLT] = mergeItems(StoresState.library[Store.GAMEJOLT], items)
}
StoresState.logLine("Game Jolt: ${items.size} owned games")
} finally {
running.set(false)
}
}
fun reset() {
syncedAt = 0L
}
fun games(context: Context, path: String, owned: Boolean): List<CatalogItem>? {
val cookies = GameJoltAuth.cookies(context)
val out = ArrayList<CatalogItem>()
val seen = HashSet<String>()
for (page in 1..MAX_PAGES) {
val answer = GameJoltApi.get(if (page == 1) path else "$path?page=$page", cookies)
if (!answer.ok) return if (page == 1) null else out
val batch = GameJoltCatalog.items(answer.payload?.optJSONArray("games"), owned).filter { seen.add(it.id) }
if (batch.isEmpty()) break
out.addAll(batch)
val total = answer.payload?.optInt("totalGamesCount") ?: 0
if (total in 1..out.size) break
}
return out
}
}
@@ -0,0 +1,55 @@
package com.droiddeck.launcher.stores.gamejolt
import android.net.Uri
import android.util.Log
import android.webkit.CookieManager
import android.webkit.WebView
import com.droiddeck.launcher.R
import com.droiddeck.launcher.stores.StoreLoginActivity
import com.droiddeck.launcher.stores.WebCookies
internal class GameJoltLogin(override val userAgent: String) : StoreLoginActivity.Flow {
override val startUrl: String get() = GameJoltApi.LOGIN
override fun isRedirect(url: String): Boolean {
val uri = Uri.parse(url)
if (uri.host != HOST && uri.host != "www.$HOST") return false
val path = uri.path.orEmpty()
return AUTH_PATHS.none { path == it || path.startsWith("$it/") }
}
override fun forgetSignIn(done: () -> Unit) {
runCatching { WebCookies.expire(listOf(GameJoltApi.SITE), HOST, listOf("/")) { done() } }
.onFailure {
Log.w(TAG, "could not clear the previous web sign-in: ${it.javaClass.simpleName}")
done()
}
}
override fun finish(activity: StoreLoginActivity, view: WebView, url: String): String? {
val manager = CookieManager.getInstance()
manager.flush()
val cookies = manager.getCookie(GameJoltApi.SITE).orEmpty()
if (cookies.isBlank()) {
Log.w(TAG, "no cookies after the sign-in redirect")
return activity.getString(R.string.stores_login_error_verification)
}
val answer = GameJoltApi.get("/web/search/games?q=a", cookies)
val user = answer.user
Log.d(TAG, "verify: code=${answer.code} cookies=${cookies.split(';').joinToString(",") { it.substringBefore('=').trim() }} userKeys=${user?.keys()?.asSequence()?.joinToString(",").orEmpty()}")
if (user == null || user.optLong("id") <= 0L) return activity.getString(R.string.stores_login_error_verification)
return try {
GameJoltAuth.save(activity, cookies, user)
null
} catch (e: Exception) {
Log.w(TAG, "saving the sign-in failed: ${e.javaClass.simpleName}")
activity.getString(R.string.stores_login_error_generic)
}
}
companion object {
private const val TAG = "GameJoltLogin"
private const val HOST = "gamejolt.com"
private val AUTH_PATHS = listOf("/login", "/join", "/auth", "/forgot", "/terms", "/privacy", "/help", "/legal", "/site-api", "/x", "/oauth")
}
}
@@ -0,0 +1,11 @@
package com.droiddeck.launcher.stores.gamejolt
import android.content.Context
import android.content.SharedPreferences
object GameJoltPrefs {
const val FILE = "stores.gamejolt"
@JvmStatic
fun get(context: Context): SharedPreferences = context.applicationContext.getSharedPreferences(FILE, Context.MODE_PRIVATE)
}
@@ -0,0 +1,28 @@
package com.droiddeck.launcher.stores.gamejolt
import org.json.JSONObject
import java.util.Locale
internal object GameJoltPricing {
class Price(val final: String, val original: String, val discount: Int)
fun of(sellable: JSONObject?): Price? {
val list = sellable?.optJSONArray("pricings") ?: return null
val entries = (0 until list.length()).mapNotNull { list.optJSONObject(it) }.filter { it.optLong("amount") > 0L }
val sale = entries.firstOrNull { it.optBoolean("promotional") }
val regular = entries.firstOrNull { !it.optBoolean("promotional") }
val now = sale ?: regular ?: return null
val was = if (sale != null && regular != null && regular.optLong("amount") > sale.optLong("amount")) regular else null
val percent = if (was == null) 0 else {
val before = was.optLong("amount")
(((before - now.optLong("amount")) * 100 + before / 2) / before).toInt()
}
return Price(format(now), was?.let(::format).orEmpty(), percent)
}
private fun format(pricing: JSONObject): String {
val amount = String.format(Locale.US, "%.2f", pricing.optLong("amount") / 100.0)
val currency = pricing.optString("currency_code").takeIf { it.isNotBlank() && it != "null" && !it.equals("USD", ignoreCase = true) }
return if (currency == null) "$$amount" else "$amount $currency"
}
}
@@ -0,0 +1,188 @@
package com.droiddeck.launcher.stores.gamejolt
import android.content.Context
import android.widget.Toast
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateMapOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import com.droiddeck.launcher.R
import com.droiddeck.launcher.stores.CatalogItem
import com.droiddeck.launcher.stores.InstalledStoreGame
import com.droiddeck.launcher.stores.Store
import com.droiddeck.launcher.stores.StoresState
import org.json.JSONObject
import java.util.concurrent.atomic.AtomicBoolean
internal class GameJoltUpdate(val buildId: String, val stamp: String, val filename: String, val replaced: Boolean)
internal object GameJoltUpdates {
private const val KEY_AT = "updates_checked_at"
private const val KEY_FOUND = "updates_found"
private const val THROTTLE_MS = 6 * 60 * 60 * 1000L
private const val GAP_MS = 1_000L
val available = mutableStateMapOf<String, GameJoltUpdate>()
var checkingKey by mutableStateOf<String?>(null)
private set
private val running = AtomicBoolean(false)
private val restored = AtomicBoolean(false)
@Volatile private var generation = 0
internal fun evaluate(builds: List<GameJoltBuild>?, buildId: String, packageId: String, version: String): GameJoltUpdate? {
if (builds == null || buildId.isBlank()) return null
val installable = builds.filter { it.installable }
val samePackage = installable.filter { it.packageId == packageId }
if (samePackage.isNotEmpty()) {
if (samePackage.any { it.id == buildId }) return null
val same = samePackage.firstOrNull { newer(it, buildId, version) } ?: return null
return GameJoltUpdate(same.id, same.stamp, same.filename, false)
}
val next = installable.firstOrNull() ?: return null
return if (next.id == buildId) null else GameJoltUpdate(next.id, next.stamp, next.filename, true)
}
private fun newer(build: GameJoltBuild, buildId: String, version: String): Boolean {
val stamp = build.stamp.toLongOrNull() ?: 0L
val have = version.toLongOrNull() ?: 0L
if (stamp != have) return stamp > have
return (build.id.toLongOrNull() ?: 0L) > (buildId.toLongOrNull() ?: 0L)
}
internal fun encode(found: Map<String, GameJoltUpdate>): String = JSONObject().also { out ->
for ((key, u) in found) out.put(key, JSONObject().put("buildId", u.buildId).put("stamp", u.stamp).put("filename", u.filename).put("replaced", u.replaced))
}.toString()
internal fun decode(raw: String?): Map<String, GameJoltUpdate> {
val json = runCatching { JSONObject(raw.orEmpty()) }.getOrNull() ?: return emptyMap()
val out = LinkedHashMap<String, GameJoltUpdate>()
for (key in json.keys()) {
val u = json.optJSONObject(key) ?: continue
val id = u.optString("buildId")
if (id.isBlank()) continue
out[key] = GameJoltUpdate(id, u.optString("stamp"), u.optString("filename"), u.optBoolean("replaced"))
}
return out
}
private fun restore(app: Context) {
if (!restored.compareAndSet(false, true)) return
val started = generation
val saved = decode(GameJoltPrefs.get(app).getString(KEY_FOUND, null))
StoresState.post {
if (started != generation) return@post
for ((k, v) in saved) if (k !in available) available[k] = v
}
}
private fun save(app: Context) {
GameJoltPrefs.get(app).edit().putString(KEY_FOUND, encode(available.toMap())).apply()
}
private fun snapshot(game: InstalledStoreGame): Triple<String, String, String> =
Triple(game.sidecar.installVersion, game.sidecar.extra["buildId"].orEmpty(), game.sidecar.extra["packageId"].orEmpty())
fun check(context: Context) {
val app = context.applicationContext
if (!running.compareAndSet(false, true)) return
val started = generation
Thread({
try {
restore(app)
val prefs = GameJoltPrefs.get(app)
if (System.currentTimeMillis() - prefs.getLong(KEY_AT, 0L) < THROTTLE_MS) return@Thread
if (GameJoltAuth.cookies(app).isBlank()) return@Thread
val games = StoresState.installed.toList().filter { it.sidecar.store == Store.GAMEJOLT && it.sidecar.isInstalled }
val found = LinkedHashMap<String, GameJoltUpdate>()
val answered = HashSet<String>()
val seen = HashMap<String, Triple<String, String, String>>()
var failed = false
games.forEachIndexed { i, game ->
if (i > 0) Thread.sleep(GAP_MS)
val extra = game.sidecar.extra
seen[game.key] = snapshot(game)
val builds = GameJoltBuilds.load(app, extra["gameId"].orEmpty().ifEmpty { game.sidecar.id })
if (builds == null) failed = true
else {
answered += game.key
evaluate(builds, extra["buildId"].orEmpty(), extra["packageId"].orEmpty(), game.sidecar.installVersion)?.let { found[game.key] = it }
}
}
if (started != generation) return@Thread
StoresState.post {
if (started != generation) return@post
for (k in answered) {
val now = StoresState.installed.firstOrNull { it.key == k } ?: continue
if (seen[k] != snapshot(now)) continue
val u = found[k]
if (u != null) available[k] = u else available.remove(k)
}
save(app)
}
if (!failed && started == generation) prefs.edit().putLong(KEY_AT, System.currentTimeMillis()).apply()
StoresState.logLine("Game Jolt: checked ${games.size} installed games, ${found.size} with updates")
} finally {
running.set(false)
}
}, "gamejolt-updates").start()
}
fun checkGame(context: Context, game: InstalledStoreGame) {
val app = context.applicationContext
if (checkingKey != null) return
checkingKey = game.key
val started = generation
val before = snapshot(game)
Thread({
try {
val extra = game.sidecar.extra
val builds = GameJoltBuilds.load(app, extra["gameId"].orEmpty().ifEmpty { game.sidecar.id })
val found = evaluate(builds, before.second, before.third, before.first)
StoresState.post {
if (started != generation) return@post
val now = StoresState.installed.firstOrNull { it.key == game.key }
if (builds != null && now != null && snapshot(now) == before) {
if (found != null) available[game.key] = found else available.remove(game.key)
save(app)
}
val text = when {
builds == null -> app.getString(R.string.stores_sync_failed)
found != null -> app.getString(R.string.stores_itch_updates_found, 1)
else -> app.getString(R.string.upd_current_status)
}
Toast.makeText(app, text, Toast.LENGTH_SHORT).show()
}
StoresState.logLine("Game Jolt: checked ${game.sidecar.title}, ${if (found != null) "update available" else "up to date"}")
} finally {
StoresState.post { checkingKey = null }
}
}, "gamejolt-update-check").start()
}
fun start(context: Context, game: InstalledStoreGame, update: GameJoltUpdate) {
val app = context.applicationContext
if (StoresState.uninstalling.containsKey(game.key)) return
val root = game.folder.parentFile?.parentFile ?: return
val item = CatalogItem(
Store.GAMEJOLT, game.sidecar.id, game.sidecar.title, game.sidecar.hero, tallImageUrl = game.sidecar.cover,
isFree = game.sidecar.extra["paid"] != "1", owned = true, extra = game.sidecar.extra + ("buildId" to update.buildId),
)
StoresState.install(app, item, root)
}
fun applied(context: Context, key: String) {
val app = context.applicationContext
StoresState.post {
available.remove(key)
save(app)
}
}
fun clear(context: Context) {
val app = context.applicationContext
generation++
GameJoltPrefs.get(app).edit().remove(KEY_AT).remove(KEY_FOUND).apply()
StoresState.post { available.clear() }
}
}
@@ -2,10 +2,9 @@ package com.droiddeck.launcher.stores.itch
import android.content.Context
import com.droiddeck.launcher.R
import com.droiddeck.launcher.runtime.GuestCommand
import com.droiddeck.launcher.runtime.LinuxRuntime
import com.droiddeck.launcher.stores.CatalogItem
import com.droiddeck.launcher.stores.Store
import com.droiddeck.launcher.stores.StoreArchiveUnpacker
import com.droiddeck.launcher.stores.StoreExe
import com.droiddeck.launcher.stores.StoreGameSidecar
import com.droiddeck.launcher.stores.StoreInstallRoot
@@ -13,20 +12,10 @@ import com.droiddeck.launcher.stores.StoreInstalls
import com.droiddeck.launcher.stores.StoreNet
import com.droiddeck.launcher.stores.download.DownloadQueue
import com.droiddeck.launcher.stores.download.DownloadStage
import org.apache.commons.compress.MemoryLimitException
import org.apache.commons.compress.archivers.sevenz.SevenZFile
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream
import org.apache.commons.compress.archivers.zip.ZipFile
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream
import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream
import org.apache.commons.compress.compressors.xz.XZCompressorInputStream
import java.io.BufferedInputStream
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
import java.net.HttpURLConnection
import java.net.URL
import java.nio.file.Files
import java.util.concurrent.atomic.AtomicBoolean
internal class ItchInstaller(
@@ -39,6 +28,7 @@ internal class ItchInstaller(
private var updating = false
private var previous: StoreGameSidecar? = null
private val commit = Any()
private val unpacker = StoreArchiveUnpacker(app, cancelled, "itch.io", R.string.stores_itch_archive, R.string.stores_itch_extract_failed, "itch-unrar")
override fun run(handle: DownloadQueue.JobHandle): String? {
val key = ItchAuth.key(app)
@@ -225,16 +215,17 @@ internal class ItchInstaller(
work = if (updating) File(folder, ItchStaging.DIR) else folder
if (updating && !patched) ItchStaging.delete(work)
work.mkdirs()
unpacker.work = work
if (resuming) clearPartialInstall()
val exe = try {
if (!patched) unpack(archive, filename, handle)
if (!patched) unpacker.unpack(archive, filename, handle)
val hint = filename.substringBeforeLast('.')
var picked = StoreExe.pick(work, hint.ifBlank { null }, item.title)
var passes = 0
while (picked.isBlank() && passes < 2 && !cancelled.get()) {
val inner = ItchArchives.inner(work) ?: break
handle.log("itch.io: no exe yet, unpacking ${inner.name}")
unpack(inner, inner.name, handle)
unpacker.unpack(inner, inner.name, handle)
if (cancelled.get()) break
inner.delete()
picked = StoreExe.pick(work, inner.name.substringBeforeLast('.').takeIf { it.endsWith(".exe", ignoreCase = true) }, item.title)
@@ -267,205 +258,5 @@ internal class ItchInstaller(
return exe
}
private fun unpack(archive: File, filename: String, handle: DownloadQueue.JobHandle) {
when (val kind = ItchArchives.kind(archive, filename)) {
"zip" -> unzip(archive, handle)
"7z" -> try {
sevenZip(archive, handle)
} catch (e: MemoryLimitException) {
handle.log("itch.io: ${archive.name} needs more memory than the app has, unpacking it in the runtime")
unrar(archive, handle, kind)
}
"rar" -> unrar(archive, handle, kind)
"exe" -> copy(archive, File(work, filename.ifBlank { "game.exe" }))
"tar" -> untar(archive, null, handle)
"gz", "bz2", "xz" -> untar(archive, kind, handle) ?: single(archive, kind, handle)
else -> copy(archive, File(work, filename.ifBlank { "game" }))
}
}
private fun target(name: String): File? {
val file = File(work, name.replace('\\', '/'))
val root = work.canonicalPath
val path = file.canonicalPath
return if (path == root || path.startsWith(root + File.separator)) file else null
}
private fun unrar(archive: File, handle: DownloadQueue.JobHandle, kind: String) {
if (!LinuxRuntime.isInstalled(app)) throw IllegalStateException(app.getString(R.string.stores_itch_archive, kind))
val binds = if (listOf(app.filesDir, app.cacheDir).any { work.absolutePath.startsWith(it.absolutePath + "/") }) null
else listOf(work.absolutePath)
fun bsdtar(args: List<String>, onLine: (String) -> Unit) =
GuestCommand.run(app, listOf("/usr/bin/bsdtar") + args, logName = "itch-unrar", extraBinds = binds, fastPath = true, cancelled = cancelled) { line ->
if (!line.startsWith("proot ")) onLine(line)
}
var entries = 0L
bsdtar(listOf("-tf", archive.absolutePath)) { entries++ }
var done = 0L
val tail = ArrayDeque<String>()
val code = bsdtar(listOf("-xvf", archive.absolutePath, "-C", work.absolutePath)) { line ->
if (line.startsWith("x ")) handle.stageProgress(++done, entries) else {
if (tail.size == 5) tail.removeFirst()
tail.addLast(line)
}
}
if (cancelled.get()) return
if (code != 0) {
handle.log("itch.io: bsdtar exited $code: ${tail.joinToString(" | ")}")
throw IllegalStateException(app.getString(R.string.stores_itch_extract_failed, code))
}
}
private fun sevenZip(archive: File, handle: DownloadQueue.JobHandle) {
val total = archive.length()
var written = 0L
val buffer = ByteArray(64 * 1024)
val limitKb = (Runtime.getRuntime().maxMemory() / 4 / 1024).coerceIn(32L * 1024, Int.MAX_VALUE.toLong()).toInt()
Files.newByteChannel(archive.toPath()).use { channel ->
SevenZFile.builder().setSeekableByteChannel(channel).setMaxMemoryLimitKb(limitKb).get().use { seven ->
while (true) {
if (cancelled.get()) return
val entry = seven.nextEntry ?: break
val file = target(entry.name)
if (file == null) {
handle.log("itch.io: skipped an entry outside the game folder")
continue
}
if (entry.isDirectory) {
file.mkdirs()
continue
}
file.parentFile?.mkdirs()
FileOutputStream(file).use { out ->
while (true) {
if (cancelled.get()) return
val read = seven.read(buffer, 0, buffer.size)
if (read < 0) break
out.write(buffer, 0, read)
written += read
handle.stageProgress(written, total)
}
}
}
}
}
}
private fun untar(archive: File, codec: String?, handle: DownloadQueue.JobHandle): Unit? {
val total = archive.length()
var written = 0L
var entries = 0
val buffer = ByteArray(64 * 1024)
val opened = runCatching {
FileInputStream(archive).use { raw ->
val stream = when (codec) {
"gz" -> GzipCompressorInputStream(BufferedInputStream(raw))
"bz2" -> BZip2CompressorInputStream(BufferedInputStream(raw))
"xz" -> XZCompressorInputStream(BufferedInputStream(raw))
else -> BufferedInputStream(raw)
}
stream.use { input ->
TarArchiveInputStream(input).use { tar ->
while (true) {
if (cancelled.get()) return null
val entry = tar.nextEntry ?: break
entries++
val file = target(entry.name)
if (file == null) {
handle.log("itch.io: skipped an entry outside the game folder")
continue
}
if (entry.isDirectory) {
file.mkdirs()
continue
}
file.parentFile?.mkdirs()
FileOutputStream(file).use { out ->
while (true) {
if (cancelled.get()) return null
val read = tar.read(buffer, 0, buffer.size)
if (read < 0) break
out.write(buffer, 0, read)
written += read
handle.stageProgress(written, total)
}
}
}
}
}
}
true
}
if (opened.isSuccess && entries > 0) return Unit
if (opened.isFailure && codec == null) throw opened.exceptionOrNull() ?: IllegalStateException("tar")
return null
}
private fun single(archive: File, codec: String, handle: DownloadQueue.JobHandle) {
val name = archive.name.substringBeforeLast('.')
val file = target(name.ifBlank { "game" }) ?: throw IllegalStateException("archive")
file.parentFile?.mkdirs()
val total = archive.length()
var written = 0L
val buffer = ByteArray(64 * 1024)
FileInputStream(archive).use { raw ->
val stream = when (codec) {
"bz2" -> BZip2CompressorInputStream(BufferedInputStream(raw))
"xz" -> XZCompressorInputStream(BufferedInputStream(raw))
else -> GzipCompressorInputStream(BufferedInputStream(raw))
}
stream.use { input ->
FileOutputStream(file).use { out ->
while (true) {
if (cancelled.get()) return
val read = input.read(buffer)
if (read < 0) break
out.write(buffer, 0, read)
written += read
handle.stageProgress(written, total)
}
}
}
}
}
private fun copy(source: File, target: File) {
target.parentFile?.mkdirs()
FileInputStream(source).use { input -> FileOutputStream(target).use { out -> input.copyTo(out, 128 * 1024) } }
}
private fun unzip(archive: File, handle: DownloadQueue.JobHandle) {
val total = archive.length()
var written = 0L
val buffer = ByteArray(64 * 1024)
ZipFile.builder().setFile(archive).get().use { zip ->
for (entry in zip.entries) {
if (cancelled.get()) return
val target = target(entry.name)
if (target == null) {
handle.log("itch.io: skipped an entry outside the game folder")
continue
}
if (entry.isDirectory) {
target.mkdirs()
continue
}
target.parentFile?.mkdirs()
zip.getInputStream(entry).use { input ->
FileOutputStream(target).use { out ->
while (true) {
if (cancelled.get()) return
val read = input.read(buffer)
if (read < 0) break
out.write(buffer, 0, read)
written += read
handle.stageProgress(written, total)
}
}
}
}
}
}
private companion object
}
@@ -701,6 +701,7 @@ private fun FrontEndScreenBody(s: FrontEndState, a: FrontEndActions, page: (@Com
StoreTheme(com.droiddeck.launcher.stores.Store.XBOX) { XboxStoreDialogs() }
com.droiddeck.launcher.stores.StoresState.pendingInstall?.let { item -> StoreTheme(item.store) { InstallWhere(item) } }
com.droiddeck.launcher.stores.StoresState.itchPicking?.let { item -> StoreTheme(item.store) { ItchBuildPicker(item) { com.droiddeck.launcher.stores.StoresState.itchPicking = null } } }
com.droiddeck.launcher.stores.StoresState.gameJoltPicking?.let { item -> StoreTheme(item.store) { GameJoltBuildPicker(item) { com.droiddeck.launcher.stores.StoresState.gameJoltPicking = null } } }
StepsLayer(screenAt)
appToChooseDisplay?.let { app ->
@@ -98,6 +98,7 @@ import com.droiddeck.launcher.stores.StoreInstallRoot
import com.droiddeck.launcher.stores.StoreLanguage
import com.droiddeck.launcher.stores.StoreSizes
import com.droiddeck.launcher.stores.StoresState
import com.droiddeck.launcher.stores.gamejolt.GameJoltApi
import com.droiddeck.launcher.stores.battlenet.BattleNetInstall
import com.droiddeck.launcher.stores.download.DownloadQueue
import com.droiddeck.launcher.stores.download.DownloadState
@@ -139,7 +140,7 @@ internal enum class GameTab { ABOUT, ACHIEVEMENTS, LAUNCH, SAVES, INSTALL }
@Composable
internal fun GameDetail(
key: String, s: FrontEndState, a: FrontEndActions, lead: FocusRequester, backLabel: String, hopRail: String?, onBack: () -> Unit,
key: String, s: FrontEndState, a: FrontEndActions, lead: FocusRequester, backLabel: String, hopRail: String?, onBack: () -> Unit, inStore: Boolean = false,
) {
val narrow = LocalNarrowPane.current
val stacked = narrow || LocalConfiguration.current.screenWidthDp < 700
@@ -218,6 +219,7 @@ internal fun GameDetail(
if (!s.shortcutPicker) CompositionLocalProvider(LocalPillButtons provides true) {
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
if (installed != null && installed.sidecar.store == Store.ITCH) ItchCheckButton(installed)
if (installed != null && installed.sidecar.store == Store.GAMEJOLT) GameJoltCheckButton(installed)
RemoveButton(title, game, installed, a)
}
}
@@ -232,7 +234,7 @@ internal fun GameDetail(
color = MaterialTheme.colorScheme.error, maxLines = 3, overflow = TextOverflow.Ellipsis,
)
Spacer(Modifier.height(2.dp))
GameCapsule(scores) { GameActions(store, id, game, item, installed, s, a, Modifier.focusRequester(lead), compactMenu = stacked) }
GameCapsule(scores) { GameActions(store, id, game, item, installed, s, a, Modifier.focusRequester(lead), compactMenu = stacked, inStore = inStore) }
}
}
if (StoresMotion.heroLands) header() else Rise(1) { header() }
@@ -382,7 +384,7 @@ private fun GameTitle(title: String, logo: Any?, titleSize: TextUnit) {
@Composable
internal fun GameActions(
store: Store?, id: String?, game: Library.SteamGame?, item: CatalogItem?, installed: InstalledStoreGame?,
s: FrontEndState, a: FrontEndActions, leadOn: Modifier, compactMenu: Boolean = false,
s: FrontEndState, a: FrontEndActions, leadOn: Modifier, compactMenu: Boolean = false, inStore: Boolean = false,
) {
val ctx = LocalContext.current
val storeKey = if (store != null && id != null) "${store.id}:$id" else null
@@ -409,10 +411,16 @@ internal fun GameActions(
if (compactMenu) GameMoreMenu(game, a) else {
FileButtons(game, a)
GameShortcutMenu(game, a)
EditArtButton(game)
}
}
if (store == Store.ITCH && installed != null) ItchUpdateButton(installed, download == null && StoresState.uninstalling[installed.key] == null)
if (store == Store.GAMEJOLT && installed != null) GameJoltUpdateButton(installed, download == null && StoresState.uninstalling[installed.key] == null)
if (store == Store.GAMEJOLT && installed != null) GameJoltVersionButton(installed, download == null && StoresState.uninstalling[installed.key] == null)
if (inStore && store == Store.GAMEJOLT && installed != null) {
SecondaryButton(stringResource(R.string.stores_view_on, Store.GAMEJOLT.shortLabel)) {
openUrl(ctx, item?.storeUrl.orEmpty().ifBlank { GameJoltApi.pageUrl("game", installed.sidecar.id) })
}
}
if (store == Store.GOG && installed != null) GogMaintenanceActions(installed)
if (store == Store.XBOX && id != null) XboxInstalledStream(id, game?.name ?: item?.title.orEmpty(), item)
if (store == Store.XBOX && installed != null && id != null) {
@@ -435,6 +443,7 @@ internal fun GameActions(
}
SecondaryButton(stringResource(R.string.bnet_open)) { a.onBattleNet() }
}
if (game != null && !compactMenu) EditArtButton(game)
}
download != null -> {
ActionChip(downloadLabel(download), ok = false)
@@ -482,7 +491,7 @@ internal fun GameActions(
}
if (!item.accessible) SecondaryButton(buyLabel(item)) { openStoreUrl(ctx, item) }
}
item != null && item.store == Store.ITCH && item.isFree -> {
item != null && (item.store == Store.ITCH || item.store == Store.GAMEJOLT) && item.isFree -> {
InstallButton(stringResource(R.string.stores_install), leadOn) { StoresState.requestInstall(ctx, item) }
SecondaryButton(stringResource(R.string.stores_view_on, item.store.shortLabel)) { openStoreUrl(ctx, item) }
}
@@ -0,0 +1,157 @@
package com.droiddeck.launcher.ui
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.droiddeck.launcher.R
import com.droiddeck.launcher.stores.gamejolt.GameJoltBrowse
import com.droiddeck.launcher.stores.gamejolt.GameJoltBrowseState
import com.droiddeck.launcher.stores.gamejolt.GameJoltQuery
@Composable
internal fun GameJoltBrowseBar(showMature: Boolean) {
val ctx = LocalContext.current
val query = GameJoltBrowseState.query
var picking by remember { mutableStateOf(false) }
LaunchedEffect(Unit) { if (GameJoltBrowseState.items.isEmpty()) GameJoltBrowseState.more(ctx) }
fun toggle(set: Set<String>, value: String): Set<String> = if (value in set) set - value else set + value
Column(Modifier.fillMaxWidth().padding(top = 6.dp, bottom = 8.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) {
ChipRow {
BrowseDropdown(sectionLabel(query.section)) { first, close ->
GameJoltBrowse.sections.forEachIndexed { index, section ->
MenuItem(sectionLabel(section), query.section == section, focusRequester = if (index == 0) first else null) {
GameJoltBrowseState.choose(ctx, query.copy(section = section))
close()
}
}
}
BrowseDropdown(priceLabel(query.price)) { first, close ->
GameJoltBrowse.prices.forEachIndexed { index, price ->
MenuItem(priceLabel(price), query.price == price, focusRequester = if (index == 0) first else null) {
GameJoltBrowseState.choose(ctx, query.copy(price = price))
close()
}
}
}
val anyPlatform = stringResource(R.string.stores_itch_platform_any)
BrowseDropdown(browseSummary(GameJoltBrowse.systems.filter { it in query.os }.map { systemLabel(it) }, anyPlatform)) { first, _ ->
MenuItem(anyPlatform, query.os.isEmpty(), focusRequester = first) { GameJoltBrowseState.choose(ctx, query.copy(os = emptySet())) }
for (os in GameJoltBrowse.systems) MenuItem(systemLabel(os), os in query.os) { GameJoltBrowseState.choose(ctx, query.copy(os = toggle(query.os, os))) }
}
BrowseDropdown(browseSummary(GameJoltBrowse.browsers.filter { it in query.browser }.map { browserLabel(it) }, stringResource(R.string.stores_gamejolt_filter_browser))) { first, _ ->
GameJoltBrowse.browsers.forEachIndexed { index, browser ->
MenuItem(browserLabel(browser), browser in query.browser, focusRequester = if (index == 0) first else null) { GameJoltBrowseState.choose(ctx, query.copy(browser = toggle(query.browser, browser))) }
}
}
val maturities = GameJoltBrowse.maturities.filter { showMature || it != "adult" }
BrowseDropdown(browseSummary(maturities.filter { it in query.maturity }.map { maturityLabel(it) }, stringResource(R.string.stores_gamejolt_filter_maturity))) { first, _ ->
maturities.forEachIndexed { index, maturity ->
MenuItem(maturityLabel(maturity), maturity in query.maturity, focusRequester = if (index == 0) first else null) { GameJoltBrowseState.choose(ctx, query.copy(maturity = toggle(query.maturity, maturity))) }
}
}
BrowseDropdown(browseSummary(GameJoltBrowse.statuses.filter { it in query.status }.map { statusLabel(it) }, stringResource(R.string.stores_gamejolt_filter_status))) { first, _ ->
GameJoltBrowse.statuses.forEachIndexed { index, status ->
MenuItem(statusLabel(status), status in query.status, focusRequester = if (index == 0) first else null) { GameJoltBrowseState.choose(ctx, query.copy(status = toggle(query.status, status))) }
}
}
val partners = stringResource(R.string.stores_gamejolt_partners)
BrowseDropdown(if (query.partners) partners else stringResource(R.string.stores_gamejolt_filter_partners)) { first, _ ->
MenuItem(partners, query.partners, focusRequester = first) { GameJoltBrowseState.choose(ctx, query.copy(partners = !query.partners)) }
}
}
ChipRow {
for (tag in query.tags) BrowseChip("$tag ✕", true) { GameJoltBrowseState.choose(ctx, query.copy(tags = query.tags - tag)) }
BrowseChip(stringResource(R.string.stores_itch_tag_add), false) { picking = true }
}
}
if (picking) TextEntryDialog(
stringResource(R.string.stores_itch_tag_title), "", number = false, confirm = stringResource(R.string.common_ok),
onSubmit = { value -> GameJoltBrowse.tagSlug(value).takeIf { it.isNotEmpty() }?.let { GameJoltBrowseState.choose(ctx, query.copy(tags = (query.tags + it).distinct())) } },
onDismiss = { picking = false }, id = "gamejolt-tag",
)
}
@Composable
internal fun GameJoltLoadMore() {
val ctx = LocalContext.current
val count = GameJoltBrowseState.items.size
LaunchedEffect(Unit) { GameJoltBrowseState.more(ctx) }
if (GameJoltBrowseState.loading) LinearProgressIndicator(Modifier.fillMaxWidth().padding(vertical = 12.dp))
else if (GameJoltBrowseState.failed) Box(Modifier.fillMaxWidth().padding(vertical = 8.dp), contentAlignment = Alignment.Center) {
BrowseChip(stringResource(R.string.stores_dl_retry), false) { GameJoltBrowseState.more(ctx, retry = true) }
}
else if (!GameJoltBrowseState.ended && count > 0) Box(Modifier.fillMaxWidth().padding(vertical = 8.dp), contentAlignment = Alignment.Center) {
BrowseChip(stringResource(R.string.stores_itch_load_more), false) { GameJoltBrowseState.more(ctx) }
}
}
@Composable
private fun sectionLabel(section: String): String = stringResource(
when (section) {
GameJoltBrowse.SECTION_HOT -> R.string.stores_gamejolt_section_hot
GameJoltBrowse.SECTION_BEST -> R.string.stores_gamejolt_section_best
GameJoltBrowse.SECTION_NEW -> R.string.stores_gamejolt_section_new
else -> R.string.stores_gamejolt_section_featured
},
)
@Composable
private fun priceLabel(price: String): String = stringResource(
when (price) {
GameJoltBrowse.PRICE_FREE -> R.string.stores_itch_price_free
GameJoltBrowse.PRICE_SALE -> R.string.stores_itch_price_sale
GameJoltBrowse.PRICE_PAID -> R.string.stores_itch_price_paid
GameJoltBrowse.PRICE_UNDER_5 -> R.string.stores_itch_price_under_5
GameJoltBrowse.PRICE_UNDER_15 -> R.string.stores_itch_price_under_15
GameJoltBrowse.PRICE_UNDER_30 -> R.string.stores_gamejolt_price_under_30
else -> R.string.stores_itch_price_any
},
)
@Composable
private fun systemLabel(os: String): String = stringResource(
when (os) {
"windows" -> R.string.stores_itch_platform_windows
"mac" -> R.string.stores_itch_platform_macos
"linux" -> R.string.stores_itch_platform_linux
else -> R.string.stores_gamejolt_os_other
},
)
@Composable
private fun browserLabel(browser: String): String = when (browser) {
"html" -> "HTML"
"flash" -> "Flash"
else -> "Unity"
}
@Composable
private fun maturityLabel(maturity: String): String = stringResource(
when (maturity) {
"everyone" -> R.string.stores_gamejolt_maturity_everyone
"teen" -> R.string.stores_gamejolt_maturity_teen
else -> R.string.stores_gamejolt_maturity_adult
},
)
@Composable
private fun statusLabel(status: String): String = stringResource(
when (status) {
"complete" -> R.string.stores_gamejolt_status_complete
else -> R.string.stores_gamejolt_status_early
},
)
@@ -0,0 +1,129 @@
package com.droiddeck.launcher.ui
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.key
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.droiddeck.launcher.R
import com.droiddeck.launcher.stores.CatalogItem
import com.droiddeck.launcher.stores.InstalledStoreGame
import com.droiddeck.launcher.stores.Store
import com.droiddeck.launcher.stores.StoresState
import com.droiddeck.launcher.stores.formatBytes
import com.droiddeck.launcher.stores.gamejolt.GameJoltApi
import com.droiddeck.launcher.stores.gamejolt.GameJoltBuild
import com.droiddeck.launcher.stores.gamejolt.GameJoltBuilds
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
private const val CHOOSE = "choose"
@Composable
internal fun GameJoltVersionButton(installed: InstalledStoreGame, enabled: Boolean) {
SecondaryButton(stringResource(R.string.stores_itch_pick_title), enabled = enabled) {
val sidecar = installed.sidecar
val paid = sidecar.extra["paid"] == "1"
StoresState.gameJoltPicking = CatalogItem(
store = Store.GAMEJOLT, id = sidecar.id, title = sidecar.title, imageUrl = sidecar.cover, isFree = !paid,
storeUrl = GameJoltApi.pageUrl("game", sidecar.id),
extra = mapOf("gameId" to (sidecar.extra["gameId"] ?: sidecar.id), CHOOSE to "1"),
)
}
}
@Composable
internal fun GameJoltBuildPicker(requested: CatalogItem, onDismiss: () -> Unit) {
val item = requested.copy(owned = requested.owned || StoresState.library[Store.GAMEJOLT].orEmpty().any { it.id == requested.id && it.owned })
val ctx = LocalContext.current
val app = ctx.applicationContext
val colors = MaterialTheme.colorScheme
val shown = rememberShown(onDismiss)
val close = { shown.targetState = false }
var loaded by remember(requested) { mutableStateOf<List<GameJoltBuild>?>(null) }
var failed by remember(requested) { mutableStateOf(false) }
val install: (GameJoltBuild) -> Unit = install@{ build ->
if (!shown.targetState) return@install
val tagged = item.copy(
extra = item.extra + mapOf("buildId" to build.id),
sizeBytes = build.size.takeIf { it > 0 } ?: item.sizeBytes,
)
close()
StoresState.requestInstall(ctx, tagged)
}
LaunchedEffect(requested) {
val gameId = item.extra["gameId"].orEmpty().ifEmpty { item.id }
val result = withContext(Dispatchers.IO) { GameJoltBuilds.load(app, gameId) }
if (result == null) { failed = true; return@LaunchedEffect }
loaded = result
if ((item.isFree || item.owned) && item.extra[CHOOSE] != "1" && shown.targetState) result.singleOrNull()?.takeIf { it.installable }?.let { install(it) }
}
AppDialog(shown, close, "gameJoltBuilds", wide = false, maxWidth = 460.dp) {
DialogTitleRow(stringResource(R.string.stores_itch_pick_title), close)
Text(item.title, fontSize = 12.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis)
val list = loaded
when {
failed -> Text(stringResource(R.string.stores_gamejolt_pick_failed), fontSize = 13.sp, color = colors.onSurfaceVariant)
list == null -> LinearProgressIndicator(Modifier.fillMaxWidth().padding(vertical = 8.dp))
list.isEmpty() -> Text(stringResource(R.string.stores_itch_pick_none), fontSize = 13.sp, color = colors.onSurfaceVariant)
else -> Column(verticalArrangement = Arrangement.spacedBy(8.dp), modifier = Modifier.fillMaxWidth()) {
for (build in list) key(build.id) { BuildRow(item, build) { install(build) } }
}
}
}
}
@Composable
private fun BuildRow(item: CatalogItem, build: GameJoltBuild, onInstall: () -> Unit) {
val ctx = LocalContext.current
val colors = MaterialTheme.colorScheme
val linux = "linux" in build.platforms && !build.installable
val canInstall = build.installable && (item.isFree || item.owned)
val names = build.platforms.map { platformName(it) }
val detail = listOfNotNull(
names.joinToString(", "),
build.size.takeIf { it > 0 }?.let { formatBytes(it) },
build.version.takeIf { it.isNotBlank() },
).joinToString(" · ")
ListRow(enabled = !linux, onClick = { if (canInstall) onInstall() else openStoreUrl(ctx, item) }) {
Column(Modifier.weight(1f)) {
Text(build.filename.ifBlank { build.packageTitle.ifBlank { item.title } }, fontSize = 13.sp, color = colors.onBackground, maxLines = 1, overflow = TextOverflow.Ellipsis)
Text(detail, fontSize = 11.sp, color = colors.onSurfaceVariant, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
val label = when {
canInstall -> stringResource(R.string.stores_install)
linux -> stringResource(R.string.stores_itch_build_linux_soon)
else -> stringResource(R.string.stores_gamejolt_build_open)
}
Text(label, fontSize = 12.sp, color = colors.onSurfaceVariant, maxLines = 1)
}
}
@Composable
private fun platformName(platform: String): String = stringResource(
when (platform) {
"windows" -> R.string.stores_itch_build_windows
"linux" -> R.string.stores_itch_build_linux
"osx" -> R.string.stores_itch_build_macos
"other" -> R.string.stores_gamejolt_os_other
else -> R.string.stores_itch_build_web
},
)
@@ -0,0 +1,61 @@
package com.droiddeck.launcher.ui
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Refresh
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.droiddeck.launcher.R
import com.droiddeck.launcher.stores.InstalledStoreGame
import com.droiddeck.launcher.stores.gamejolt.GameJoltUpdate
import com.droiddeck.launcher.stores.gamejolt.GameJoltUpdates
@Composable
internal fun GameJoltCheckButton(installed: InstalledStoreGame) {
val ctx = LocalContext.current
IconAction(Icons.Filled.Refresh, stringResource(R.string.store_check_updates), "game:check-updates", enabled = GameJoltUpdates.checkingKey == null, frosted = true) {
GameJoltUpdates.checkGame(ctx, installed)
}
}
@Composable
internal fun GameJoltUpdateButton(installed: InstalledStoreGame, enabled: Boolean) {
val ctx = LocalContext.current
val update = GameJoltUpdates.available[installed.key] ?: return
var asking by remember { mutableStateOf(false) }
SecondaryButton(stringResource(R.string.common_update), enabled = enabled) {
if (update.replaced) asking = true else GameJoltUpdates.start(ctx, installed, update)
}
if (asking) GameJoltReplacedDialog(installed, update) { asking = false }
}
@Composable
private fun GameJoltReplacedDialog(installed: InstalledStoreGame, update: GameJoltUpdate, onDismiss: () -> Unit) {
val ctx = LocalContext.current
val shown = rememberShown(onDismiss)
val close = { shown.targetState = false }
AppDialog(shown, close, "gameJoltUpdate", wide = false, maxWidth = 460.dp) {
DialogTitleRow(installed.sidecar.title, close)
Text(
stringResource(R.string.stores_itch_update_replaced, update.filename.ifBlank { update.buildId }),
fontSize = 13.sp, color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
PrimaryButton(stringResource(R.string.common_update)) {
close()
GameJoltUpdates.start(ctx, installed, update)
}
SecondaryButton(stringResource(R.string.common_cancel)) { close() }
}
}
}
@@ -8,6 +8,7 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
@@ -19,6 +20,7 @@ import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -27,6 +29,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.Role
@@ -44,16 +47,29 @@ internal fun ItchBrowseBar() {
var picking by remember { mutableStateOf(false) }
Column(Modifier.fillMaxWidth().padding(top = 6.dp, bottom = 8.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) {
ChipRow {
for (sort in ItchBrowse.sorts) BrowseChip(sortLabel(sort), query.sort == sort) { ItchBrowseState.choose(ctx, query.copy(sort = sort)) }
}
ChipRow {
for (price in ItchBrowse.prices) BrowseChip(priceLabel(price), query.price == price) { ItchBrowseState.choose(ctx, query.copy(price = price)) }
}
ChipRow {
BrowseChip(stringResource(R.string.stores_itch_platform_any), query.platforms.isEmpty()) { ItchBrowseState.choose(ctx, query.copy(platforms = emptySet())) }
for (platform in ItchBrowse.platformNames) {
val on = platform in query.platforms
BrowseChip(platformLabel(platform), on) { ItchBrowseState.choose(ctx, query.copy(platforms = if (on) query.platforms - platform else query.platforms + platform)) }
BrowseDropdown(sortLabel(query.sort)) { first, close ->
ItchBrowse.sorts.forEachIndexed { index, sort ->
MenuItem(sortLabel(sort), query.sort == sort, focusRequester = if (index == 0) first else null) {
ItchBrowseState.choose(ctx, query.copy(sort = sort))
close()
}
}
}
BrowseDropdown(priceLabel(query.price)) { first, close ->
ItchBrowse.prices.forEachIndexed { index, price ->
MenuItem(priceLabel(price), query.price == price, focusRequester = if (index == 0) first else null) {
ItchBrowseState.choose(ctx, query.copy(price = price))
close()
}
}
}
val anyPlatform = stringResource(R.string.stores_itch_platform_any)
BrowseDropdown(browseSummary(ItchBrowse.platformNames.filter { it in query.platforms }.map { platformLabel(it) }, anyPlatform)) { first, _ ->
MenuItem(anyPlatform, query.platforms.isEmpty(), focusRequester = first) { ItchBrowseState.choose(ctx, query.copy(platforms = emptySet())) }
for (platform in ItchBrowse.platformNames) {
val on = platform in query.platforms
MenuItem(platformLabel(platform), on) { ItchBrowseState.choose(ctx, query.copy(platforms = if (on) query.platforms - platform else query.platforms + platform)) }
}
}
}
ChipRow {
@@ -83,7 +99,7 @@ internal fun ItchLoadMore() {
}
@Composable
private fun ChipRow(content: @Composable () -> Unit) {
internal fun ChipRow(content: @Composable () -> Unit) {
Row(
horizontalArrangement = Arrangement.spacedBy(6.dp), verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.fillMaxWidth().horizontalScroll(rememberScrollState()).selectableGroup(),
@@ -91,7 +107,22 @@ private fun ChipRow(content: @Composable () -> Unit) {
}
@Composable
private fun BrowseChip(label: String, selected: Boolean, onClick: () -> Unit) {
internal fun BrowseDropdown(text: String, content: @Composable ColumnScope.(FocusRequester, () -> Unit) -> Unit) {
var expanded by remember { mutableStateOf(false) }
Box {
CompositionLocalProvider(LocalChipMinWidth provides 0.dp) { ValueChip(text, expanded) { expanded = !expanded } }
AnchoredMenu(expanded, onDismiss = { expanded = false }, compact = true, minWidth = 160.dp) { first -> content(first) { expanded = false } }
}
}
internal fun browseSummary(labels: List<String>, empty: String): String = when (labels.size) {
0 -> empty
1, 2 -> labels.joinToString(", ")
else -> "${labels.first()} +${labels.size - 1}"
}
@Composable
internal fun BrowseChip(label: String, selected: Boolean, onClick: () -> Unit) {
val colors = MaterialTheme.colorScheme
val pal = LocalPalette.current
val shape = RoundedCornerShape(8.dp)
@@ -102,7 +102,8 @@ import com.droiddeck.launcher.stores.download.DownloadEntry
import com.droiddeck.launcher.stores.download.DownloadStage
import com.droiddeck.launcher.stores.download.DownloadState
import com.droiddeck.launcher.stores.formatBytes
import com.droiddeck.launcher.stores.itch.ItchCollection
import com.droiddeck.launcher.stores.gamejolt.GameJoltCollections
import com.droiddeck.launcher.stores.gamejolt.GameJoltUpdates
import com.droiddeck.launcher.stores.itch.ItchCollections
import com.droiddeck.launcher.stores.itch.ItchUpdates
import com.droiddeck.launcher.stores.gog.GogMaintenance
@@ -142,20 +143,20 @@ internal fun libraryEntries(
return out.distinctBy { it.key }
}
internal fun collectionEntries(all: List<LibraryEntry>, items: List<CatalogItem>): List<LibraryEntry> {
internal fun collectionEntries(all: List<LibraryEntry>, items: List<CatalogItem>, store: Store = Store.ITCH): List<LibraryEntry> {
val keys = items.map { it.key }.toSet()
val itch = all.filter { it.source == Store.ITCH.id }
val have = itch.mapNotNull { it.storeKey }.toSet()
return itch.filter { it.storeKey in keys } +
items.filter { it.key !in have }.map { LibraryEntry(GameRef.key(it), Store.ITCH.id, it.title, null, it, false) }
val own = all.filter { it.source == store.id }
val have = own.mapNotNull { it.storeKey }.toSet()
return own.filter { it.storeKey in keys } +
items.filter { it.key !in have }.map { LibraryEntry(GameRef.key(it), store.id, it.title, null, it, false) }
}
internal fun installedFirst(entries: List<LibraryEntry>): List<LibraryEntry> = entries.partition { it.installed }.let { (on, off) -> on + off }
internal const val LIBRARY_ALL = "all"
internal fun librarySources(entries: List<LibraryEntry>, order: List<String>): List<String> =
internal fun librarySources(entries: List<LibraryEntry>, order: List<String>, always: Set<String> = emptySet()): List<String> =
(listOf(Library.SOURCE_STEAM) + arrangeStoreTabs(order, emptySet()).map { it.store.id } + Library.ADDED)
.filter { source -> entries.any { it.source == source } }
.filter { source -> source in always || entries.any { it.source == source } }
internal object LibraryDisplay {
val scales = listOf(0.75f, 0.875f, 1f, 1.2f, 1.45f)
@@ -225,7 +226,11 @@ internal fun LibraryPage(s: FrontEndState, a: FrontEndActions, selected: String,
var showUninstalled by remember(LibraryView.ownedRequest) { mutableStateOf(SessionPrefs.libraryShowUninstalled(ctx)) }
var collectionShows by remember { mutableStateOf<Pair<String, Boolean>?>(null) }
val setShowUninstalled = { show: Boolean ->
val picked = ItchCollections.selected.takeIf { LibraryView.source == Store.ITCH.id }
val picked = when (LibraryView.source) {
Store.ITCH.id -> ItchCollections.selected
Store.GAMEJOLT.id -> GameJoltCollections.selected
else -> null
}
if (picked != null) collectionShows = picked to show
else {
showUninstalled = show
@@ -233,21 +238,32 @@ internal fun LibraryPage(s: FrontEndState, a: FrontEndActions, selected: String,
}
}
val itchSignedIn = owned.containsKey(Store.ITCH)
val listed = librarySources(all, SessionPrefs.storesTabOrder(ctx))
val sources = if (itchSignedIn && Store.ITCH.id !in listed) listed + Store.ITCH.id else listed
val gameJoltSignedIn = owned.containsKey(Store.GAMEJOLT)
val sources = librarySources(all, SessionPrefs.storesTabOrder(ctx), listOfNotNull(Store.ITCH.id.takeIf { itchSignedIn }, Store.GAMEJOLT.id.takeIf { gameJoltSignedIn }).toSet())
val source = LibraryView.source.takeIf { it == LIBRARY_ALL || it in sources } ?: LIBRARY_ALL
val q = LibraryView.query.trim().lowercase()
val xboxFilter = if (source == Store.XBOX.id) XboxLibraryFilter.current else XboxLibraryFilter.ALL
LaunchedEffect(source, itchSignedIn) { if (source == Store.ITCH.id && itchSignedIn) {
ItchCollections.load(ctx)
ItchUpdates.check(ctx)
} }
val collection = if (source == Store.ITCH.id) ItchCollections.chosen() else null
val pool = if (collection == null) all else collectionEntries(all, ItchCollections.gamesOf(collection.id).orEmpty())
LaunchedEffect(source, itchSignedIn, gameJoltSignedIn) {
if (source == Store.ITCH.id && itchSignedIn) {
ItchCollections.load(ctx)
ItchUpdates.check(ctx)
}
if (source == Store.GAMEJOLT.id && gameJoltSignedIn) {
GameJoltCollections.load(ctx)
GameJoltUpdates.check(ctx)
}
}
val collectionId = when (source) {
Store.ITCH.id -> ItchCollections.chosen()?.id
Store.GAMEJOLT.id -> GameJoltCollections.chosen()?.id
else -> null
}
val collectionItems = collectionId?.let { if (source == Store.GAMEJOLT.id) GameJoltCollections.gamesOf(it) else ItchCollections.gamesOf(it) }
val pool = if (collectionId == null) all else collectionEntries(all, collectionItems.orEmpty(), Store.byId(source) ?: Store.ITCH)
val matching = pool.filter {
(source == LIBRARY_ALL || it.source == source) && (q.isEmpty() || it.title.lowercase().contains(q)) && keepsXbox(xboxFilter, it)
}
val listUninstalled = if (collection == null) showUninstalled else collectionShows?.takeIf { it.first == collection.id }?.second ?: true
val listUninstalled = if (collectionId == null) showUninstalled else collectionShows?.takeIf { it.first == collectionId }?.second ?: true
val candidates = if (listUninstalled) matching else matching.filter { it.installed }
val hiddenUninstalled = if (listUninstalled) 0 else matching.count { !it.installed }
val sort = s.storesSort
@@ -332,7 +348,7 @@ internal fun LibraryPage(s: FrontEndState, a: FrontEndActions, selected: String,
kotlinx.coroutines.delay(Motion.ms(240).toLong())
focusWithinFrames({ ff.last?.startsWith("card:") == true }) { if (ff.firstTileAttached > 0) ff.firstTile else FocusRequester.Default }
}
if (all.isEmpty() && open == null && !itchSignedIn) {
if (all.isEmpty() && open == null && !itchSignedIn && !gameJoltSignedIn) {
LibraryEmpty(s, a, modifier)
return
}
@@ -453,7 +469,7 @@ private fun LibraryGrid(
contentPadding = PaddingValues(top = 4.dp, bottom = 16.dp),
) {
item(key = "header", span = { GridItemSpan(maxLineSpan) }) {
Rise(0) { LibraryHeader(s, a, total, searchCleared, source == Store.XBOX.id, showUninstalled, onShowUninstalled, collections = source == Store.ITCH.id) }
Rise(0) { LibraryHeader(s, a, total, searchCleared, source == Store.XBOX.id, showUninstalled, onShowUninstalled, collections = Store.byId(source)?.takeIf { it == Store.ITCH || it == Store.GAMEJOLT }) }
}
item(key = "filters", span = { GridItemSpan(maxLineSpan) }) {
Rise(1) { LibraryFilters(sources, source, onSource) }
@@ -514,7 +530,7 @@ private fun LazyGridScope.libraryGrid(entries: List<LibraryEntry>, empty: Int, t
@Composable
private fun LibraryHeader(
s: FrontEndState, a: FrontEndActions, total: Int, searchCleared: Boolean, xbox: Boolean,
showUninstalled: Boolean?, onShowUninstalled: (Boolean) -> Unit, collections: Boolean,
showUninstalled: Boolean?, onShowUninstalled: (Boolean) -> Unit, collections: Store?,
) {
val colors = MaterialTheme.colorScheme
val narrow = LocalNarrowPane.current
@@ -532,7 +548,7 @@ private fun LibraryHeader(
) {
DisplayButton()
if (showUninstalled != null || xbox) LibraryFilterButton(showUninstalled, onShowUninstalled, xbox)
if (collections) CollectionsButton()
if (collections != null) CollectionsButton(collections)
SortButton(s, a)
ViewButton(s, a)
GameFileFolderActions(s, a)
@@ -725,7 +741,7 @@ internal fun LibraryMarker(e: LibraryEntry, download: DownloadEntry?, showDownlo
}
}
private fun libraryUpdateAvailable(e: LibraryEntry): Boolean = e.storeKey?.let { it in ItchUpdates.available } == true ||
private fun libraryUpdateAvailable(e: LibraryEntry): Boolean = e.storeKey?.let { it in ItchUpdates.available || it in GameJoltUpdates.available } == true ||
e.source == Store.GOG.id && (e.item?.id ?: e.game?.storeId)?.let { GogMaintenance.checks[it]?.state } == GogMaintenance.State.AVAILABLE
@Composable
@@ -863,16 +879,21 @@ private fun LibraryFilterButton(showUninstalled: Boolean?, onShowUninstalled: (B
}
@Composable
private fun CollectionsButton() {
private fun CollectionsButton(store: Store) {
val pal = LocalPalette.current
val ctx = LocalContext.current
val title = stringResource(R.string.itch_collections)
val all = stringResource(R.string.stores_tab_all)
var at by remember { mutableStateOf<Rect?>(null) }
val gameJolt = store == Store.GAMEJOLT
val chosenTitle = if (gameJolt) GameJoltCollections.chosen()?.title else ItchCollections.chosen()?.title
val selectedId = if (gameJolt) GameJoltCollections.selected else ItchCollections.selected
Box(Modifier.onGloballyPositioned { at = it.boundsInRoot() }) {
HeaderIconButton(title + " · " + (ItchCollections.chosen()?.title ?: all), CollectionsIcon, "itch-collections") {
HeaderIconButton(title + " · " + (chosenTitle ?: all), CollectionsIcon, "${store.id}-collections") {
val from = at ?: return@HeaderIconButton
val choices = listOf<ItchCollection?>(null) + ItchCollections.list
val choices = listOf<Pair<String, String>?>(null) + if (gameJolt) GameJoltCollections.list.map { c ->
c.id to (c.title + (GameJoltCollections.gamesOf(c.id)?.let { " (" + it.size + ")" }.orEmpty()))
} else ItchCollections.list.map { c -> c.id to (c.title + " (" + c.count + ")") }
Steps.ask(StepAsk(
anchor = from, side = StepSide.Left, accent = pal.signal, pillCorner = 8.dp, items = choices.size,
handle = { Icon(CollectionsIcon, null, tint = pal.signal, modifier = Modifier.size(18.dp)) },
@@ -880,12 +901,12 @@ private fun CollectionsButton() {
StepTitle(title)
StepList {
choices.forEachIndexed { i, c ->
val picked = c?.id == ItchCollections.selected
val picked = c?.first == selectedId
StepChoice(
c?.let { it.title + " (" + it.count + ")" } ?: all, selected = picked, enabled = open,
c?.second ?: all, selected = picked, enabled = open,
modifier = Modifier.fillMaxWidth().stepItem(i).then(if (picked) Modifier.focusRequester(first) else Modifier),
) {
ItchCollections.select(ctx, c?.id)
if (gameJolt) GameJoltCollections.select(ctx, c?.first) else ItchCollections.select(ctx, c?.first)
Steps.fold()
}
}
@@ -26,6 +26,7 @@ import androidx.compose.foundation.horizontalScroll
import androidx.compose.foundation.layout.size
import androidx.compose.ui.focus.focusProperties
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.stateDescription
import androidx.compose.foundation.shape.CircleShape
@@ -371,11 +372,12 @@ fun MenuItem(
.background(if (hot && enabled) Color.White.copy(alpha = 0.07f) else Color.Transparent)
.glideBorder(hot && enabled, RoundedCornerShape(8.dp), pal.signal)
.alpha(if (enabled) 1f else 0.4f)
.semantics { selected = checked }
.hoverable(src).clickable(role = androidx.compose.ui.semantics.Role.Button, interactionSource = src, indication = LocalIndication.current, enabled = enabled, onClick = onClick)
.controllerConfirm(enabled = enabled, onClick = onClick)
.padding(horizontal = 10.dp, vertical = 9.dp),
) {
Text("✓", fontSize = 12.sp, color = pal.signal, modifier = Modifier.width(18.dp).alpha(if (checked) 1f else 0f))
Text("✓", fontSize = 12.sp, color = pal.signal, modifier = Modifier.width(18.dp).alpha(if (checked) 1f else 0f).clearAndSetSemantics {})
if (leading != null) {
leading()
Spacer(Modifier.width(8.dp))
@@ -31,6 +31,7 @@ internal fun sourceColours(source: String): SourceColours = when (source) {
Store.AMAZON.id -> SourceColours(Color(0xFF3A2A0A), Color(0xFFFFC266), Color(0xFFFF9900))
Store.XBOX.id -> SourceColours(Color(0xFF17381B), Color(0xFFC6EDC2), Color(0xFF70C850))
Store.ITCH.id -> SourceColours(Color(0xFF3A1A1E), Color(0xFFFFB3B3), Color(0xFFFF5C5C))
Store.GAMEJOLT.id -> SourceColours(Color(0xFF232E00), Color(0xFFE3FF66), Color(0xFFCCFF00))
Store.BATTLENET.id -> SourceColours(Color(0xFF0A2440), Color(0xFF9DD1FF), Color(0xFF148EFF))
Library.SOURCE_STEAM -> SourceColours(Color(0xFF16293D), Color(0xFF7CC4FF), Color(0xFF1A9FFF))
FLATHUB -> SourceColours(Color(0xFF0B2E2B), Color(0xFF9FE3DD), FlathubTeal)
@@ -45,6 +46,7 @@ internal fun sourceLabel(source: String): String = when (source) {
Store.AMAZON.id -> Store.AMAZON.label
Store.XBOX.id -> Store.XBOX.label
Store.ITCH.id -> Store.ITCH.label
Store.GAMEJOLT.id -> Store.GAMEJOLT.label
Store.BATTLENET.id -> Store.BATTLENET.label
else -> stringResource(R.string.source_added)
}
@@ -130,6 +130,7 @@ import coil.compose.AsyncImage
import com.droiddeck.launcher.R
import com.droiddeck.launcher.session.SessionPrefs
import com.droiddeck.launcher.stores.CatalogItem
import com.droiddeck.launcher.stores.gamejolt.GameJoltBrowseState
import com.droiddeck.launcher.stores.itch.ItchBrowseState
import com.droiddeck.launcher.stores.Store
import com.droiddeck.launcher.stores.StoreTab
@@ -389,7 +390,7 @@ internal fun StoresPage(s: FrontEndState, a: FrontEndActions, modifier: Modifier
}
}
},
) { key -> GameDetail(key, s, a, heroFocus, backLabel, hopRail = null, onBack = { closeGame() }) }
) { key -> GameDetail(key, s, a, heroFocus, backLabel, hopRail = null, onBack = { closeGame() }, inStore = true) }
}
FlightLayer(hostAt)
StoresMotion.step?.let { ask ->
@@ -827,8 +828,10 @@ private fun Storefront(
fun shown(i: CatalogItem) = s.storesShowMature || !i.mature || i.accessible
fun shelf(l: List<CatalogItem>?) = l?.filter(::shown)
LaunchedEffect(store, q) { StoresState.search(ctx, store, q) }
val browsing = store == Store.ITCH && q.isEmpty() && ItchBrowseState.active
val browseItems = if (browsing) ItchBrowseState.items else emptyList()
val gameJolt = store == Store.GAMEJOLT
LaunchedEffect(gameJolt, s.storesShowMature) { if (gameJolt) GameJoltBrowseState.sync(ctx, s.storesShowMature) }
val browsing = q.isEmpty() && ((store == Store.ITCH && ItchBrowseState.active) || gameJolt)
val browseItems = if (!browsing) emptyList() else if (gameJolt) GameJoltBrowseState.items else ItchBrowseState.items
val catalog = store == Store.BATTLENET && q.isEmpty()
val visible = remember(found, library, shelves, q, s.storesShowMature, browsing, browseItems, catalog) {
if (catalog) shelf(shelves?.trending) ?: emptyList()
@@ -840,8 +843,10 @@ private fun Storefront(
.filter { (it.title.lowercase().contains(q) || it.key in foundKeys) && shown(it) }
}
val nothing = stringResource(when {
browsing && ItchBrowseState.loading -> R.string.stores_shelves_loading
browsing && ItchBrowseState.failed -> R.string.stores_itch_browse_failed
browsing && gameJolt && GameJoltBrowseState.loading -> R.string.stores_shelves_loading
browsing && gameJolt && GameJoltBrowseState.failed -> R.string.stores_gamejolt_browse_failed
browsing && !gameJolt && ItchBrowseState.loading -> R.string.stores_shelves_loading
browsing && !gameJolt && ItchBrowseState.failed -> R.string.stores_itch_browse_failed
catalog && shelves == null -> R.string.stores_shelves_loading
else -> R.string.stores_nothing_matches
})
@@ -857,7 +862,8 @@ private fun Storefront(
val bareTab = if (searching) visible.isEmpty() else shelves == null || shelves.isEmpty
val barLine = StoresState.status[store]?.takeIf { bareTab && syncCount(it) != null }
val itchBar = store == Store.ITCH && q.isEmpty()
val headerItems = 2 + (if (barLine != null) 1 else 0) + (if (StoresState.problems[store] != null) 1 else 0) + (if (itchBar) 1 else 0) + (if (catalog) 1 else 0)
val gameJoltBar = gameJolt && q.isEmpty()
val headerItems = 2 + (if (barLine != null) 1 else 0) + (if (StoresState.problems[store] != null) 1 else 0) + (if (itchBar || gameJoltBar) 1 else 0) + (if (catalog) 1 else 0)
val card: @Composable (CatalogItem) -> Unit = { item ->
val first = if (searching) item.key == visible.firstOrNull()?.key else !firstPlaced
firstPlaced = true
@@ -906,12 +912,14 @@ private fun Storefront(
barLine?.let { line -> item(key = "sync", span = { GridItemSpan(maxLineSpan) }) { Rise(3) { SyncBar(line) } } }
StoresState.problems[store]?.let { line -> item(key = "problem", span = { GridItemSpan(maxLineSpan) }) { Rise(3) { Box(Modifier.padding(bottom = 8.dp)) { Note(line) } } } }
if (itchBar) item(key = "itch-browse-bar", span = { GridItemSpan(maxLineSpan) }) { ItchBrowseBar() }
if (gameJoltBar) item(key = "gamejolt-browse-bar", span = { GridItemSpan(maxLineSpan) }) { GameJoltBrowseBar(s.storesShowMature) }
if (catalog) item(key = "catalog-label", span = { GridItemSpan(maxLineSpan) }) {
Box(Modifier.padding(top = 10.dp)) { SectionLabel(stringResource(R.string.bnet_store)) }
}
if (searching) {
storeGrid(visible, nothing, card)
if (browsing) item(key = "itch-more", span = { GridItemSpan(maxLineSpan) }) { ItchLoadMore() }
if (browsing && gameJolt) item(key = "gamejolt-more", span = { GridItemSpan(maxLineSpan) }) { GameJoltLoadMore() }
else if (browsing) item(key = "itch-more", span = { GridItemSpan(maxLineSpan) }) { ItchLoadMore() }
} else item(key = "shelves", span = { GridItemSpan(maxLineSpan) }) {
Column {
Shelf(stringResource(R.string.stores_shelf_new), shelf(shelves?.whatsNew), card)
@@ -1147,6 +1155,7 @@ internal fun storePalette(base: Palette, store: Store?): Palette {
Store.AMAZON -> Color(0xFFFF9900) to Color(0xFFE07800)
Store.XBOX -> Color(0xFF70C850) to Color(0xFF107C10)
Store.ITCH -> Color(0xFFFF5C5C) to Color(0xFFD93B3B)
Store.GAMEJOLT -> Color(0xFFCCFF00) to Color(0xFFA3CC00)
Store.BATTLENET -> Color(0xFF148EFF) to Color(0xFF0B6BD3)
null -> return base
}
+29
View File
@@ -3754,4 +3754,33 @@
<string name="gog_repair_action">إصلاح الملفات</string>
<string name="gog_refresh_action">تحديث التثبيت</string>
<string name="gog_select_patch">اختيار</string>
<string name="stores_gamejolt_not_owned">ليس في مكتبة Game Jolt الخاصة بك</string>
<string name="stores_gamejolt_no_build">لا يوجد تنزيل لنظام Windows لهذه اللعبة</string>
<string name="stores_gamejolt_no_exe">لم يتم العثور على لعبة Windows في التنزيل</string>
<string name="stores_gamejolt_no_game">تعذر العثور على هذه اللعبة على Game Jolt</string>
<string name="stores_gamejolt_browse_failed">تعذّر تحميل الألعاب من Game Jolt</string>
<string name="stores_gamejolt_download_failed">استجاب Game Jolt بـ HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">تعذر تحميل التنزيلات من Game Jolt</string>
<string name="stores_gamejolt_build_open">فتح على Game Jolt</string>
<string name="stores_gamejolt_archive">أرشيفات %1$s غير مدعومة</string>
<string name="stores_gamejolt_extract_failed">تعذر استخراج التنزيل (رمز الخروج %1$d)</string>
<string name="stores_gamejolt_download_unreachable">تعذر الوصول إلى Game Jolt</string>
<string name="stores_gamejolt_download_no_link">لم يوفر Game Jolt رابط تنزيل</string>
<string name="stores_gamejolt_section_featured">مميزة</string>
<string name="stores_gamejolt_section_hot">رائجة</string>
<string name="stores_gamejolt_section_best">الأفضل</string>
<string name="stores_gamejolt_section_new">جديدة</string>
<string name="stores_gamejolt_price_under_30">30$ أو أقل</string>
<string name="stores_gamejolt_os_other">أخرى</string>
<string name="stores_gamejolt_maturity_everyone">لجميع الأعمار</string>
<string name="stores_gamejolt_maturity_teen">المراهقون</string>
<string name="stores_gamejolt_maturity_adult">للبالغين</string>
<string name="stores_gamejolt_status_complete">مكتملة</string>
<string name="stores_gamejolt_status_early">وصول مبكر</string>
<string name="stores_gamejolt_partners">ألعاب الشركاء</string>
<string name="stores_gamejolt_filter_browser">المتصفح</string>
<string name="stores_gamejolt_filter_maturity">التصنيف العمري</string>
<string name="stores_gamejolt_filter_status">الحالة</string>
<string name="stores_gamejolt_filter_partners">الشركاء</string>
<string name="stores_gamejolt_followed">الألعاب المتابَعة</string>
</resources>
@@ -3616,4 +3616,33 @@
<string name="gog_repair_action">Reparar archivos</string>
<string name="gog_refresh_action">Renovar la instalación</string>
<string name="gog_select_patch">Seleccionar</string>
<string name="stores_gamejolt_not_owned">No está en tu biblioteca de Game Jolt</string>
<string name="stores_gamejolt_no_build">Este juego no tiene descarga para Windows</string>
<string name="stores_gamejolt_no_exe">No se encontró un juego de Windows en la descarga</string>
<string name="stores_gamejolt_no_game">No se encontró este juego en Game Jolt</string>
<string name="stores_gamejolt_browse_failed">No se pudieron cargar los juegos de Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt respondió HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">No se pudieron cargar las descargas de Game Jolt</string>
<string name="stores_gamejolt_build_open">Abrir en Game Jolt</string>
<string name="stores_gamejolt_archive">Los archivos %1$s no son compatibles</string>
<string name="stores_gamejolt_extract_failed">No se pudo extraer la descarga (salida %1$d)</string>
<string name="stores_gamejolt_download_unreachable">No se pudo conectar con Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt no entregó un enlace de descarga</string>
<string name="stores_gamejolt_section_featured">Destacados</string>
<string name="stores_gamejolt_section_hot">Populares</string>
<string name="stores_gamejolt_section_best">Mejores</string>
<string name="stores_gamejolt_section_new">Nuevos</string>
<string name="stores_gamejolt_price_under_30">$30 o menos</string>
<string name="stores_gamejolt_os_other">Otros</string>
<string name="stores_gamejolt_maturity_everyone">Todas las edades</string>
<string name="stores_gamejolt_maturity_teen">Adolescentes</string>
<string name="stores_gamejolt_maturity_adult">Maduro</string>
<string name="stores_gamejolt_status_complete">Completo</string>
<string name="stores_gamejolt_status_early">Acceso anticipado</string>
<string name="stores_gamejolt_partners">Juegos de socios</string>
<string name="stores_gamejolt_filter_browser">Navegador</string>
<string name="stores_gamejolt_filter_maturity">Clasificación</string>
<string name="stores_gamejolt_filter_status">Estado</string>
<string name="stores_gamejolt_filter_partners">Socios</string>
<string name="stores_gamejolt_followed">Juegos seguidos</string>
</resources>
+29
View File
@@ -3606,4 +3606,33 @@
<string name="gog_repair_action">Поправка на файловете</string>
<string name="gog_refresh_action">Обновяване на инсталацията</string>
<string name="gog_select_patch">Избор</string>
<string name="stores_gamejolt_not_owned">Не е в библиотеката ви в Game Jolt</string>
<string name="stores_gamejolt_no_build">Няма изтегляне за Windows за тази игра</string>
<string name="stores_gamejolt_no_exe">В изтеглянето не е намерена игра за Windows</string>
<string name="stores_gamejolt_no_game">Играта не беше намерена в Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Игрите от Game Jolt не можаха да се заредят</string>
<string name="stores_gamejolt_download_failed">Game Jolt отговори HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Изтеглянията от Game Jolt не можаха да се заредят</string>
<string name="stores_gamejolt_build_open">Отваряне в Game Jolt</string>
<string name="stores_gamejolt_archive">Архивите %1$s не се поддържат</string>
<string name="stores_gamejolt_extract_failed">Изтеглянето не можа да бъде разархивирано (код %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Game Jolt не може да бъде достигнат</string>
<string name="stores_gamejolt_download_no_link">Game Jolt не даде връзка за изтегляне</string>
<string name="stores_gamejolt_section_featured">Препоръчани</string>
<string name="stores_gamejolt_section_hot">Популярни</string>
<string name="stores_gamejolt_section_best">Най-добри</string>
<string name="stores_gamejolt_section_new">Нови</string>
<string name="stores_gamejolt_price_under_30">$30 или по-малко</string>
<string name="stores_gamejolt_os_other">Други</string>
<string name="stores_gamejolt_maturity_everyone">За всички възрасти</string>
<string name="stores_gamejolt_maturity_teen">Тийнейджъри</string>
<string name="stores_gamejolt_maturity_adult">За възрастни</string>
<string name="stores_gamejolt_status_complete">Завършени</string>
<string name="stores_gamejolt_status_early">Ранен достъп</string>
<string name="stores_gamejolt_partners">Игри на партньори</string>
<string name="stores_gamejolt_filter_browser">Браузър</string>
<string name="stores_gamejolt_filter_maturity">Зрялост</string>
<string name="stores_gamejolt_filter_status">Статус</string>
<string name="stores_gamejolt_filter_partners">Партньори</string>
<string name="stores_gamejolt_followed">Следвани игри</string>
</resources>
+29
View File
@@ -3680,4 +3680,33 @@
<string name="gog_repair_action">Opravit soubory</string>
<string name="gog_refresh_action">Obnovit instalaci</string>
<string name="gog_select_patch">Vybrat</string>
<string name="stores_gamejolt_not_owned">Není ve vaší knihovně Game Jolt</string>
<string name="stores_gamejolt_no_build">Pro tuto hru není ke stažení verze pro Windows</string>
<string name="stores_gamejolt_no_exe">Ve stahování nebyla nalezena hra pro Windows</string>
<string name="stores_gamejolt_no_game">Tuto hru se na Game Jolt nepodařilo najít</string>
<string name="stores_gamejolt_browse_failed">Hry z Game Jolt se nepodařilo načíst</string>
<string name="stores_gamejolt_download_failed">Game Jolt odpovědělo HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Stahování z Game Jolt se nepodařilo načíst</string>
<string name="stores_gamejolt_build_open">Otevřít na Game Jolt</string>
<string name="stores_gamejolt_archive">Archivy %1$s nejsou podporovány</string>
<string name="stores_gamejolt_extract_failed">Stažený soubor nelze rozbalit (kód %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Game Jolt není dostupný</string>
<string name="stores_gamejolt_download_no_link">Game Jolt neposkytl odkaz ke stažení</string>
<string name="stores_gamejolt_section_featured">Doporučené</string>
<string name="stores_gamejolt_section_hot">Populární</string>
<string name="stores_gamejolt_section_best">Nejlepší</string>
<string name="stores_gamejolt_section_new">Nové</string>
<string name="stores_gamejolt_price_under_30">30 $ nebo méně</string>
<string name="stores_gamejolt_os_other">Jiné</string>
<string name="stores_gamejolt_maturity_everyone">Pro všechny věkové skupiny</string>
<string name="stores_gamejolt_maturity_teen">Teenageři</string>
<string name="stores_gamejolt_maturity_adult">Pro dospělé</string>
<string name="stores_gamejolt_status_complete">Dokončeno</string>
<string name="stores_gamejolt_status_early">Předběžný přístup</string>
<string name="stores_gamejolt_partners">Hry partnerů</string>
<string name="stores_gamejolt_filter_browser">Prohlížeč</string>
<string name="stores_gamejolt_filter_maturity">Věkové hodnocení</string>
<string name="stores_gamejolt_filter_status">Stav</string>
<string name="stores_gamejolt_filter_partners">Partneři</string>
<string name="stores_gamejolt_followed">Sledované hry</string>
</resources>
+29
View File
@@ -3606,4 +3606,33 @@
<string name="gog_repair_action">Reparer filer</string>
<string name="gog_refresh_action">Opdater installationen</string>
<string name="gog_select_patch">Vælg</string>
<string name="stores_gamejolt_not_owned">Ikke i dit Game Jolt-bibliotek</string>
<string name="stores_gamejolt_no_build">Ingen Windows-download til dette spil</string>
<string name="stores_gamejolt_no_exe">Der blev ikke fundet et Windows-spil i downloaden</string>
<string name="stores_gamejolt_no_game">Kunne ikke finde dette spil på Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Kunne ikke hente spil fra Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt svarede HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Kunne ikke indlæse downloads fra Game Jolt</string>
<string name="stores_gamejolt_build_open">Åbn på Game Jolt</string>
<string name="stores_gamejolt_archive">%1$s-arkiver understøttes ikke</string>
<string name="stores_gamejolt_extract_failed">Downloaden kunne ikke udpakkes (kode %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Kunne ikke nå Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt gav ikke et downloadlink</string>
<string name="stores_gamejolt_section_featured">Fremhævede</string>
<string name="stores_gamejolt_section_hot">Populære</string>
<string name="stores_gamejolt_section_best">Bedste</string>
<string name="stores_gamejolt_section_new">Nye</string>
<string name="stores_gamejolt_price_under_30">$30 eller mindre</string>
<string name="stores_gamejolt_os_other">Andet</string>
<string name="stores_gamejolt_maturity_everyone">Alle aldre</string>
<string name="stores_gamejolt_maturity_teen">Teenagere</string>
<string name="stores_gamejolt_maturity_adult">Voksne</string>
<string name="stores_gamejolt_status_complete">Færdige</string>
<string name="stores_gamejolt_status_early">Early access</string>
<string name="stores_gamejolt_partners">Partnerspil</string>
<string name="stores_gamejolt_filter_browser">Browser</string>
<string name="stores_gamejolt_filter_maturity">Modenhed</string>
<string name="stores_gamejolt_filter_status">Status</string>
<string name="stores_gamejolt_filter_partners">Partnere</string>
<string name="stores_gamejolt_followed">Fulgte spil</string>
</resources>
+29
View File
@@ -3606,4 +3606,33 @@
<string name="gog_repair_action">Dateien reparieren</string>
<string name="gog_refresh_action">Installation erneuern</string>
<string name="gog_select_patch">Auswählen</string>
<string name="stores_gamejolt_not_owned">Nicht in deiner Game Jolt-Bibliothek</string>
<string name="stores_gamejolt_no_build">Kein Windows-Download für dieses Spiel</string>
<string name="stores_gamejolt_no_exe">Im Download wurde kein Windows-Spiel gefunden</string>
<string name="stores_gamejolt_no_game">Dieses Spiel wurde auf Game Jolt nicht gefunden</string>
<string name="stores_gamejolt_browse_failed">Spiele von Game Jolt konnten nicht geladen werden</string>
<string name="stores_gamejolt_download_failed">Game Jolt antwortete mit HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Die Downloads von Game Jolt konnten nicht geladen werden</string>
<string name="stores_gamejolt_build_open">Auf Game Jolt öffnen</string>
<string name="stores_gamejolt_archive">%1$s-Archive werden nicht unterstützt</string>
<string name="stores_gamejolt_extract_failed">Download konnte nicht entpackt werden (Code %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Game Jolt ist nicht erreichbar</string>
<string name="stores_gamejolt_download_no_link">Game Jolt hat keinen Download-Link geliefert</string>
<string name="stores_gamejolt_section_featured">Empfohlen</string>
<string name="stores_gamejolt_section_hot">Angesagt</string>
<string name="stores_gamejolt_section_best">Beste</string>
<string name="stores_gamejolt_section_new">Neu</string>
<string name="stores_gamejolt_price_under_30">30 $ oder weniger</string>
<string name="stores_gamejolt_os_other">Andere</string>
<string name="stores_gamejolt_maturity_everyone">Alle Altersgruppen</string>
<string name="stores_gamejolt_maturity_teen">Jugendliche</string>
<string name="stores_gamejolt_maturity_adult">Erwachsene</string>
<string name="stores_gamejolt_status_complete">Fertig</string>
<string name="stores_gamejolt_status_early">Early Access</string>
<string name="stores_gamejolt_partners">Partnerspiele</string>
<string name="stores_gamejolt_filter_browser">Browser</string>
<string name="stores_gamejolt_filter_maturity">Altersfreigabe</string>
<string name="stores_gamejolt_filter_status">Status</string>
<string name="stores_gamejolt_filter_partners">Partner</string>
<string name="stores_gamejolt_followed">Gefolgte Spiele</string>
</resources>
+29
View File
@@ -3606,4 +3606,33 @@
<string name="gog_repair_action">Επιδιόρθωση αρχείων</string>
<string name="gog_refresh_action">Ανανέωση εγκατάστασης</string>
<string name="gog_select_patch">Επιλογή</string>
<string name="stores_gamejolt_not_owned">Δεν είναι στη βιβλιοθήκη σας στο Game Jolt</string>
<string name="stores_gamejolt_no_build">Δεν υπάρχει λήψη για Windows για αυτό το παιχνίδι</string>
<string name="stores_gamejolt_no_exe">Δεν βρέθηκε παιχνίδι Windows στη λήψη</string>
<string name="stores_gamejolt_no_game">Δεν βρέθηκε αυτό το παιχνίδι στο Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Δεν ήταν δυνατή η φόρτωση παιχνιδιών από το Game Jolt</string>
<string name="stores_gamejolt_download_failed">Το Game Jolt απάντησε HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Δεν ήταν δυνατή η φόρτωση των λήψεων από το Game Jolt</string>
<string name="stores_gamejolt_build_open">Άνοιγμα στο Game Jolt</string>
<string name="stores_gamejolt_archive">Τα αρχεία %1$s δεν υποστηρίζονται</string>
<string name="stores_gamejolt_extract_failed">Δεν ήταν δυνατή η αποσυμπίεση της λήψης (κωδικός %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Δεν ήταν δυνατή η σύνδεση με το Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Το Game Jolt δεν έδωσε σύνδεσμο λήψης</string>
<string name="stores_gamejolt_section_featured">Προτεινόμενα</string>
<string name="stores_gamejolt_section_hot">Δημοφιλή</string>
<string name="stores_gamejolt_section_best">Καλύτερα</string>
<string name="stores_gamejolt_section_new">Νέα</string>
<string name="stores_gamejolt_price_under_30">30$ ή λιγότερο</string>
<string name="stores_gamejolt_os_other">Άλλα</string>
<string name="stores_gamejolt_maturity_everyone">Όλες οι ηλικίες</string>
<string name="stores_gamejolt_maturity_teen">Έφηβοι</string>
<string name="stores_gamejolt_maturity_adult">Ενήλικες</string>
<string name="stores_gamejolt_status_complete">Ολοκληρωμένα</string>
<string name="stores_gamejolt_status_early">Πρώιμη πρόσβαση</string>
<string name="stores_gamejolt_partners">Παιχνίδια συνεργατών</string>
<string name="stores_gamejolt_filter_browser">Πρόγραμμα περιήγησης</string>
<string name="stores_gamejolt_filter_maturity">Ωριμότητα</string>
<string name="stores_gamejolt_filter_status">Κατάσταση</string>
<string name="stores_gamejolt_filter_partners">Συνεργάτες</string>
<string name="stores_gamejolt_followed">Παιχνίδια που ακολουθείτε</string>
</resources>
+29
View File
@@ -3643,4 +3643,33 @@
<string name="gog_repair_action">Reparar archivos</string>
<string name="gog_refresh_action">Renovar la instalación</string>
<string name="gog_select_patch">Seleccionar</string>
<string name="stores_gamejolt_not_owned">No está en tu biblioteca de Game Jolt</string>
<string name="stores_gamejolt_no_build">No hay descarga para Windows de este juego</string>
<string name="stores_gamejolt_no_exe">No se ha encontrado un juego de Windows en la descarga</string>
<string name="stores_gamejolt_no_game">No se ha encontrado este juego en Game Jolt</string>
<string name="stores_gamejolt_browse_failed">No se pudieron cargar los juegos de Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt respondió HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">No se pudieron cargar las descargas de Game Jolt</string>
<string name="stores_gamejolt_build_open">Abrir en Game Jolt</string>
<string name="stores_gamejolt_archive">Los archivos %1$s no son compatibles</string>
<string name="stores_gamejolt_extract_failed">No se ha podido extraer la descarga (código %1$d)</string>
<string name="stores_gamejolt_download_unreachable">No se pudo conectar con Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt no proporcionó un enlace de descarga</string>
<string name="stores_gamejolt_section_featured">Destacados</string>
<string name="stores_gamejolt_section_hot">Populares</string>
<string name="stores_gamejolt_section_best">Mejores</string>
<string name="stores_gamejolt_section_new">Nuevos</string>
<string name="stores_gamejolt_price_under_30">30 $ o menos</string>
<string name="stores_gamejolt_os_other">Otros</string>
<string name="stores_gamejolt_maturity_everyone">Todas las edades</string>
<string name="stores_gamejolt_maturity_teen">Adolescentes</string>
<string name="stores_gamejolt_maturity_adult">Adultos</string>
<string name="stores_gamejolt_status_complete">Completo</string>
<string name="stores_gamejolt_status_early">Acceso anticipado</string>
<string name="stores_gamejolt_partners">Juegos de socios</string>
<string name="stores_gamejolt_filter_browser">Navegador</string>
<string name="stores_gamejolt_filter_maturity">Clasificación</string>
<string name="stores_gamejolt_filter_status">Estado</string>
<string name="stores_gamejolt_filter_partners">Socios</string>
<string name="stores_gamejolt_followed">Juegos seguidos</string>
</resources>
+29
View File
@@ -3606,4 +3606,33 @@
<string name="gog_repair_action">Korjaa tiedostot</string>
<string name="gog_refresh_action">Päivitä asennus</string>
<string name="gog_select_patch">Valitse</string>
<string name="stores_gamejolt_not_owned">Ei Game Jolt-kirjastossasi</string>
<string name="stores_gamejolt_no_build">Ei Windows-latausta tälle pelille</string>
<string name="stores_gamejolt_no_exe">Latauksesta ei löytynyt Windows-peliä</string>
<string name="stores_gamejolt_no_game">Peliä ei löytynyt Game Joltista</string>
<string name="stores_gamejolt_browse_failed">Pelien lataaminen Game Joltista epäonnistui</string>
<string name="stores_gamejolt_download_failed">Game Jolt vastasi HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Latausten haku Game Joltista epäonnistui</string>
<string name="stores_gamejolt_build_open">Avaa Game Joltissa</string>
<string name="stores_gamejolt_archive">%1$s-arkistot eivät ole tuettuja</string>
<string name="stores_gamejolt_extract_failed">Latausta ei voitu purkaa (koodi %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Game Joltiin ei saatu yhteyttä</string>
<string name="stores_gamejolt_download_no_link">Game Jolt ei antanut latauslinkkiä</string>
<string name="stores_gamejolt_section_featured">Esittelyssä</string>
<string name="stores_gamejolt_section_hot">Kuumat</string>
<string name="stores_gamejolt_section_best">Parhaat</string>
<string name="stores_gamejolt_section_new">Uudet</string>
<string name="stores_gamejolt_price_under_30">30 $ tai alle</string>
<string name="stores_gamejolt_os_other">Muu</string>
<string name="stores_gamejolt_maturity_everyone">Kaikenikäisille</string>
<string name="stores_gamejolt_maturity_teen">Nuoret</string>
<string name="stores_gamejolt_maturity_adult">Aikuiset</string>
<string name="stores_gamejolt_status_complete">Valmis</string>
<string name="stores_gamejolt_status_early">Ennakkojulkaisu</string>
<string name="stores_gamejolt_partners">Kumppanien pelit</string>
<string name="stores_gamejolt_filter_browser">Selain</string>
<string name="stores_gamejolt_filter_maturity">Ikärajat</string>
<string name="stores_gamejolt_filter_status">Tila</string>
<string name="stores_gamejolt_filter_partners">Kumppanit</string>
<string name="stores_gamejolt_followed">Seuratut pelit</string>
</resources>
+29
View File
@@ -3643,4 +3643,33 @@
<string name="gog_repair_action">Réparer les fichiers</string>
<string name="gog_refresh_action">Actualiser l\'installation</string>
<string name="gog_select_patch">Sélectionner</string>
<string name="stores_gamejolt_not_owned">Absent de votre bibliothèque Game Jolt</string>
<string name="stores_gamejolt_no_build">Pas de téléchargement Windows pour ce jeu</string>
<string name="stores_gamejolt_no_exe">Aucun jeu Windows trouvé dans le téléchargement</string>
<string name="stores_gamejolt_no_game">Ce jeu est introuvable sur Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Impossible de charger les jeux de Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt a répondu HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Impossible de charger les téléchargements depuis Game Jolt</string>
<string name="stores_gamejolt_build_open">Ouvrir sur Game Jolt</string>
<string name="stores_gamejolt_archive">Les archives %1$s ne sont pas prises en charge</string>
<string name="stores_gamejolt_extract_failed">Impossible d\'extraire le téléchargement (code %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Impossible de joindre Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt n\'a pas fourni de lien de téléchargement</string>
<string name="stores_gamejolt_section_featured">À la une</string>
<string name="stores_gamejolt_section_hot">Tendances</string>
<string name="stores_gamejolt_section_best">Meilleurs</string>
<string name="stores_gamejolt_section_new">Nouveaux</string>
<string name="stores_gamejolt_price_under_30">30 $ ou moins</string>
<string name="stores_gamejolt_os_other">Autre</string>
<string name="stores_gamejolt_maturity_everyone">Tous publics</string>
<string name="stores_gamejolt_maturity_teen">Adolescents</string>
<string name="stores_gamejolt_maturity_adult">Adultes</string>
<string name="stores_gamejolt_status_complete">Terminé</string>
<string name="stores_gamejolt_status_early">Accès anticipé</string>
<string name="stores_gamejolt_partners">Jeux partenaires</string>
<string name="stores_gamejolt_filter_browser">Navigateur</string>
<string name="stores_gamejolt_filter_maturity">Classification</string>
<string name="stores_gamejolt_filter_status">Statut</string>
<string name="stores_gamejolt_filter_partners">Partenaires</string>
<string name="stores_gamejolt_followed">Jeux suivis</string>
</resources>
+29
View File
@@ -3606,4 +3606,33 @@
<string name="gog_repair_action">फ़ाइलें रिपेयर करें</string>
<string name="gog_refresh_action">इंस्टॉलेशन रिफ़्रेश करें</string>
<string name="gog_select_patch">चुनें</string>
<string name="stores_gamejolt_not_owned">आपकी Game Jolt लाइब्रेरी में नहीं</string>
<string name="stores_gamejolt_no_build">इस गेम के लिए Windows डाउनलोड नहीं है</string>
<string name="stores_gamejolt_no_exe">डाउनलोड में कोई Windows गेम नहीं मिला</string>
<string name="stores_gamejolt_no_game">यह गेम Game Jolt पर नहीं मिला</string>
<string name="stores_gamejolt_browse_failed">Game Jolt से गेम लोड नहीं हो सके</string>
<string name="stores_gamejolt_download_failed">Game Jolt ने HTTP %1$d लौटाया</string>
<string name="stores_gamejolt_pick_failed">Game Jolt से डाउनलोड लोड नहीं हो सके</string>
<string name="stores_gamejolt_build_open">Game Jolt पर खोलें</string>
<string name="stores_gamejolt_archive">%1$s आर्काइव समर्थित नहीं हैं</string>
<string name="stores_gamejolt_extract_failed">डाउनलोड एक्सट्रैक्ट नहीं हो सका (कोड %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Game Jolt तक नहीं पहुँचा जा सका</string>
<string name="stores_gamejolt_download_no_link">Game Jolt ने डाउनलोड लिंक नहीं दिया</string>
<string name="stores_gamejolt_section_featured">फ़ीचर्ड</string>
<string name="stores_gamejolt_section_hot">लोकप्रिय</string>
<string name="stores_gamejolt_section_best">सर्वश्रेष्ठ</string>
<string name="stores_gamejolt_section_new">नए</string>
<string name="stores_gamejolt_price_under_30">$30 या उससे कम</string>
<string name="stores_gamejolt_os_other">अन्य</string>
<string name="stores_gamejolt_maturity_everyone">सभी उम्र</string>
<string name="stores_gamejolt_maturity_teen">किशोर</string>
<string name="stores_gamejolt_maturity_adult">वयस्क</string>
<string name="stores_gamejolt_status_complete">पूर्ण</string>
<string name="stores_gamejolt_status_early">अर्ली एक्सेस</string>
<string name="stores_gamejolt_partners">पार्टनर गेम</string>
<string name="stores_gamejolt_filter_browser">ब्राउज़र</string>
<string name="stores_gamejolt_filter_maturity">आयु वर्ग</string>
<string name="stores_gamejolt_filter_status">स्थिति</string>
<string name="stores_gamejolt_filter_partners">पार्टनर</string>
<string name="stores_gamejolt_followed">फ़ॉलो किए गए गेम</string>
</resources>
+29
View File
@@ -3606,4 +3606,33 @@
<string name="gog_repair_action">Fájlok javítása</string>
<string name="gog_refresh_action">Telepítés frissítése</string>
<string name="gog_select_patch">Kiválasztás</string>
<string name="stores_gamejolt_not_owned">Nincs a Game Jolt-könyvtáradban</string>
<string name="stores_gamejolt_no_build">Ehhez a játékhoz nincs Windows-letöltés</string>
<string name="stores_gamejolt_no_exe">A letöltésben nem található Windows-játék</string>
<string name="stores_gamejolt_no_game">A játék nem található a Game Jolt-on</string>
<string name="stores_gamejolt_browse_failed">Nem sikerült betölteni a játékokat a Game Jolt-ról</string>
<string name="stores_gamejolt_download_failed">A Game Jolt HTTP %1$d választ adott</string>
<string name="stores_gamejolt_pick_failed">A letöltések betöltése a Game Jolt-ról nem sikerült</string>
<string name="stores_gamejolt_build_open">Megnyitás a Game Jolt-on</string>
<string name="stores_gamejolt_archive">A(z) %1$s archívumok nem támogatottak</string>
<string name="stores_gamejolt_extract_failed">A letöltés nem bontható ki (kód: %1$d)</string>
<string name="stores_gamejolt_download_unreachable">A Game Jolt nem érhető el</string>
<string name="stores_gamejolt_download_no_link">A Game Jolt nem adott letöltési hivatkozást</string>
<string name="stores_gamejolt_section_featured">Kiemelt</string>
<string name="stores_gamejolt_section_hot">Népszerű</string>
<string name="stores_gamejolt_section_best">Legjobb</string>
<string name="stores_gamejolt_section_new">Új</string>
<string name="stores_gamejolt_price_under_30">30 $ vagy kevesebb</string>
<string name="stores_gamejolt_os_other">Egyéb</string>
<string name="stores_gamejolt_maturity_everyone">Minden korosztály</string>
<string name="stores_gamejolt_maturity_teen">Tinédzserek</string>
<string name="stores_gamejolt_maturity_adult">Felnőtt</string>
<string name="stores_gamejolt_status_complete">Kész</string>
<string name="stores_gamejolt_status_early">Korai hozzáférés</string>
<string name="stores_gamejolt_partners">Partnerjátékok</string>
<string name="stores_gamejolt_filter_browser">Böngésző</string>
<string name="stores_gamejolt_filter_maturity">Korhatár</string>
<string name="stores_gamejolt_filter_status">Állapot</string>
<string name="stores_gamejolt_filter_partners">Partnerek</string>
<string name="stores_gamejolt_followed">Követett játékok</string>
</resources>
+29
View File
@@ -3578,4 +3578,33 @@
<string name="gog_repair_action">Perbaiki file</string>
<string name="gog_refresh_action">Segarkan instalasi</string>
<string name="gog_select_patch">Pilih</string>
<string name="stores_gamejolt_not_owned">Tidak ada di pustaka Game Jolt Anda</string>
<string name="stores_gamejolt_no_build">Tidak ada unduhan Windows untuk game ini</string>
<string name="stores_gamejolt_no_exe">Tidak ada game Windows di unduhan</string>
<string name="stores_gamejolt_no_game">Game ini tidak ditemukan di Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Tidak dapat memuat game dari Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt menjawab HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Tidak dapat memuat unduhan dari Game Jolt</string>
<string name="stores_gamejolt_build_open">Buka di Game Jolt</string>
<string name="stores_gamejolt_archive">Arsip %1$s tidak didukung</string>
<string name="stores_gamejolt_extract_failed">Tidak dapat mengekstrak unduhan (kode %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Tidak dapat menghubungi Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt tidak memberikan tautan unduhan</string>
<string name="stores_gamejolt_section_featured">Unggulan</string>
<string name="stores_gamejolt_section_hot">Sedang tren</string>
<string name="stores_gamejolt_section_best">Terbaik</string>
<string name="stores_gamejolt_section_new">Baru</string>
<string name="stores_gamejolt_price_under_30">$30 atau kurang</string>
<string name="stores_gamejolt_os_other">Lainnya</string>
<string name="stores_gamejolt_maturity_everyone">Semua umur</string>
<string name="stores_gamejolt_maturity_teen">Remaja</string>
<string name="stores_gamejolt_maturity_adult">Dewasa</string>
<string name="stores_gamejolt_status_complete">Selesai</string>
<string name="stores_gamejolt_status_early">Akses awal</string>
<string name="stores_gamejolt_partners">Game mitra</string>
<string name="stores_gamejolt_filter_browser">Peramban</string>
<string name="stores_gamejolt_filter_maturity">Klasifikasi usia</string>
<string name="stores_gamejolt_filter_status">Status</string>
<string name="stores_gamejolt_filter_partners">Mitra</string>
<string name="stores_gamejolt_followed">Game yang diikuti</string>
</resources>
+29
View File
@@ -3643,4 +3643,33 @@
<string name="gog_repair_action">Ripara file</string>
<string name="gog_refresh_action">Aggiorna installazione</string>
<string name="gog_select_patch">Seleziona</string>
<string name="stores_gamejolt_not_owned">Non è nella tua libreria Game Jolt</string>
<string name="stores_gamejolt_no_build">Nessun download per Windows di questo gioco</string>
<string name="stores_gamejolt_no_exe">Nessun gioco Windows trovato nel download</string>
<string name="stores_gamejolt_no_game">Gioco non trovato su Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Impossibile caricare i giochi da Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt ha risposto HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Impossibile caricare i download da Game Jolt</string>
<string name="stores_gamejolt_build_open">Apri su Game Jolt</string>
<string name="stores_gamejolt_archive">Gli archivi %1$s non sono supportati</string>
<string name="stores_gamejolt_extract_failed">Impossibile estrarre il download (codice %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Impossibile raggiungere Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt non ha fornito un link di download</string>
<string name="stores_gamejolt_section_featured">In evidenza</string>
<string name="stores_gamejolt_section_hot">Di tendenza</string>
<string name="stores_gamejolt_section_best">Migliori</string>
<string name="stores_gamejolt_section_new">Nuovi</string>
<string name="stores_gamejolt_price_under_30">30 $ o meno</string>
<string name="stores_gamejolt_os_other">Altro</string>
<string name="stores_gamejolt_maturity_everyone">Per tutti</string>
<string name="stores_gamejolt_maturity_teen">Adolescenti</string>
<string name="stores_gamejolt_maturity_adult">Adulti</string>
<string name="stores_gamejolt_status_complete">Completo</string>
<string name="stores_gamejolt_status_early">Accesso anticipato</string>
<string name="stores_gamejolt_partners">Giochi dei partner</string>
<string name="stores_gamejolt_filter_browser">Browser</string>
<string name="stores_gamejolt_filter_maturity">Classificazione</string>
<string name="stores_gamejolt_filter_status">Stato</string>
<string name="stores_gamejolt_filter_partners">Partner</string>
<string name="stores_gamejolt_followed">Giochi seguiti</string>
</resources>
+29
View File
@@ -3578,4 +3578,33 @@
<string name="gog_repair_action">ファイルを修復</string>
<string name="gog_refresh_action">インストールを更新</string>
<string name="gog_select_patch">選択</string>
<string name="stores_gamejolt_not_owned">Game Jolt ライブラリにありません</string>
<string name="stores_gamejolt_no_build">このゲームには Windows 版のダウンロードがありません</string>
<string name="stores_gamejolt_no_exe">ダウンロードに Windows 版のゲームが見つかりません</string>
<string name="stores_gamejolt_no_game">Game Jolt でこのゲームが見つかりませんでした</string>
<string name="stores_gamejolt_browse_failed">Game Jolt のゲームを読み込めませんでした</string>
<string name="stores_gamejolt_download_failed">Game Jolt が HTTP %1$d を返しました</string>
<string name="stores_gamejolt_pick_failed">Game Jolt からダウンロードを読み込めませんでした</string>
<string name="stores_gamejolt_build_open">Game Jolt で開く</string>
<string name="stores_gamejolt_archive">%1$s 形式のアーカイブには対応していません</string>
<string name="stores_gamejolt_extract_failed">ダウンロードを展開できませんでした (終了コード %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Game Jolt に接続できませんでした</string>
<string name="stores_gamejolt_download_no_link">Game Jolt がダウンロードリンクを提供しませんでした</string>
<string name="stores_gamejolt_section_featured">注目</string>
<string name="stores_gamejolt_section_hot">人気急上昇</string>
<string name="stores_gamejolt_section_best">ベスト</string>
<string name="stores_gamejolt_section_new">新着</string>
<string name="stores_gamejolt_price_under_30">30ドル以下</string>
<string name="stores_gamejolt_os_other">その他</string>
<string name="stores_gamejolt_maturity_everyone">全年齢</string>
<string name="stores_gamejolt_maturity_teen">ティーン</string>
<string name="stores_gamejolt_maturity_adult">成人向け</string>
<string name="stores_gamejolt_status_complete">完成</string>
<string name="stores_gamejolt_status_early">アーリーアクセス</string>
<string name="stores_gamejolt_partners">パートナーのゲーム</string>
<string name="stores_gamejolt_filter_browser">ブラウザ</string>
<string name="stores_gamejolt_filter_maturity">対象年齢</string>
<string name="stores_gamejolt_filter_status">ステータス</string>
<string name="stores_gamejolt_filter_partners">パートナー</string>
<string name="stores_gamejolt_followed">フォロー中のゲーム</string>
</resources>
+29
View File
@@ -3578,4 +3578,33 @@
<string name="gog_repair_action">파일 복구</string>
<string name="gog_refresh_action">설치 새로 고침</string>
<string name="gog_select_patch">선택</string>
<string name="stores_gamejolt_not_owned">Game Jolt 라이브러리에 없습니다</string>
<string name="stores_gamejolt_no_build">이 게임의 Windows 다운로드가 없습니다</string>
<string name="stores_gamejolt_no_exe">다운로드에서 Windows 게임을 찾을 수 없습니다</string>
<string name="stores_gamejolt_no_game">Game Jolt에서 이 게임을 찾을 수 없습니다</string>
<string name="stores_gamejolt_browse_failed">Game Jolt에서 게임을 불러오지 못했습니다</string>
<string name="stores_gamejolt_download_failed">Game Jolt가 HTTP %1$d을(를) 반환했습니다</string>
<string name="stores_gamejolt_pick_failed">Game Jolt에서 다운로드를 불러오지 못했습니다</string>
<string name="stores_gamejolt_build_open">Game Jolt에서 열기</string>
<string name="stores_gamejolt_archive">%1$s 압축 파일은 지원하지 않습니다</string>
<string name="stores_gamejolt_extract_failed">다운로드한 파일의 압축을 풀 수 없습니다(코드 %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Game Jolt에 연결할 수 없습니다</string>
<string name="stores_gamejolt_download_no_link">Game Jolt에서 다운로드 링크를 제공하지 않았습니다</string>
<string name="stores_gamejolt_section_featured">추천</string>
<string name="stores_gamejolt_section_hot">인기</string>
<string name="stores_gamejolt_section_best">베스트</string>
<string name="stores_gamejolt_section_new">신규</string>
<string name="stores_gamejolt_price_under_30">$30 이하</string>
<string name="stores_gamejolt_os_other">기타</string>
<string name="stores_gamejolt_maturity_everyone">전체 이용가</string>
<string name="stores_gamejolt_maturity_teen">청소년</string>
<string name="stores_gamejolt_maturity_adult">성인</string>
<string name="stores_gamejolt_status_complete">완성</string>
<string name="stores_gamejolt_status_early">앞서 해보기</string>
<string name="stores_gamejolt_partners">파트너 게임</string>
<string name="stores_gamejolt_filter_browser">브라우저</string>
<string name="stores_gamejolt_filter_maturity">연령 등급</string>
<string name="stores_gamejolt_filter_status">상태</string>
<string name="stores_gamejolt_filter_partners">파트너</string>
<string name="stores_gamejolt_followed">팔로우한 게임</string>
</resources>
+29
View File
@@ -3578,4 +3578,33 @@
<string name="gog_repair_action">Baik pulih fail</string>
<string name="gog_refresh_action">Segar semula pemasangan</string>
<string name="gog_select_patch">Pilih</string>
<string name="stores_gamejolt_not_owned">Tiada dalam pustaka Game Jolt anda</string>
<string name="stores_gamejolt_no_build">Tiada muat turun Windows untuk permainan ini</string>
<string name="stores_gamejolt_no_exe">Tiada permainan Windows ditemui dalam muat turun</string>
<string name="stores_gamejolt_no_game">Permainan ini tidak ditemui di Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Tidak dapat memuatkan permainan daripada Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt menjawab HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Tidak dapat memuatkan muat turun daripada Game Jolt</string>
<string name="stores_gamejolt_build_open">Buka di Game Jolt</string>
<string name="stores_gamejolt_archive">Arkib %1$s tidak disokong</string>
<string name="stores_gamejolt_extract_failed">Tidak dapat mengekstrak muat turun (kod %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Tidak dapat menghubungi Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt tidak memberikan pautan muat turun</string>
<string name="stores_gamejolt_section_featured">Pilihan</string>
<string name="stores_gamejolt_section_hot">Hangat</string>
<string name="stores_gamejolt_section_best">Terbaik</string>
<string name="stores_gamejolt_section_new">Baharu</string>
<string name="stores_gamejolt_price_under_30">$30 atau kurang</string>
<string name="stores_gamejolt_os_other">Lain-lain</string>
<string name="stores_gamejolt_maturity_everyone">Semua peringkat umur</string>
<string name="stores_gamejolt_maturity_teen">Remaja</string>
<string name="stores_gamejolt_maturity_adult">Dewasa</string>
<string name="stores_gamejolt_status_complete">Siap</string>
<string name="stores_gamejolt_status_early">Akses awal</string>
<string name="stores_gamejolt_partners">Permainan rakan kongsi</string>
<string name="stores_gamejolt_filter_browser">Pelayar</string>
<string name="stores_gamejolt_filter_maturity">Kematangan</string>
<string name="stores_gamejolt_filter_status">Status</string>
<string name="stores_gamejolt_filter_partners">Rakan kongsi</string>
<string name="stores_gamejolt_followed">Permainan diikuti</string>
</resources>
+29
View File
@@ -3606,4 +3606,33 @@
<string name="gog_repair_action">Reparer filer</string>
<string name="gog_refresh_action">Oppdater installasjonen</string>
<string name="gog_select_patch">Velg</string>
<string name="stores_gamejolt_not_owned">Ikke i Game Jolt-biblioteket ditt</string>
<string name="stores_gamejolt_no_build">Ingen Windows-nedlasting for dette spillet</string>
<string name="stores_gamejolt_no_exe">Fant ikke noe Windows-spill i nedlastingen</string>
<string name="stores_gamejolt_no_game">Fant ikke dette spillet på Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Kunne ikke laste spill fra Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt svarte HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Kunne ikke laste inn nedlastingene fra Game Jolt</string>
<string name="stores_gamejolt_build_open">Åpne på Game Jolt</string>
<string name="stores_gamejolt_archive">%1$s-arkiver støttes ikke</string>
<string name="stores_gamejolt_extract_failed">Kunne ikke pakke ut nedlastingen (kode %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Kunne ikke nå Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt ga ingen nedlastingslenke</string>
<string name="stores_gamejolt_section_featured">Fremhevet</string>
<string name="stores_gamejolt_section_hot">Populære</string>
<string name="stores_gamejolt_section_best">Beste</string>
<string name="stores_gamejolt_section_new">Nye</string>
<string name="stores_gamejolt_price_under_30">$30 eller mindre</string>
<string name="stores_gamejolt_os_other">Annet</string>
<string name="stores_gamejolt_maturity_everyone">Alle aldre</string>
<string name="stores_gamejolt_maturity_teen">Tenåringer</string>
<string name="stores_gamejolt_maturity_adult">Voksne</string>
<string name="stores_gamejolt_status_complete">Ferdig</string>
<string name="stores_gamejolt_status_early">Early access</string>
<string name="stores_gamejolt_partners">Partnerspill</string>
<string name="stores_gamejolt_filter_browser">Nettleser</string>
<string name="stores_gamejolt_filter_maturity">Aldersgrense</string>
<string name="stores_gamejolt_filter_status">Status</string>
<string name="stores_gamejolt_filter_partners">Partnere</string>
<string name="stores_gamejolt_followed">Fulgte spill</string>
</resources>
+29
View File
@@ -3606,4 +3606,33 @@
<string name="gog_repair_action">Bestanden repareren</string>
<string name="gog_refresh_action">Installatie vernieuwen</string>
<string name="gog_select_patch">Kiezen</string>
<string name="stores_gamejolt_not_owned">Niet in je Game Jolt-bibliotheek</string>
<string name="stores_gamejolt_no_build">Geen Windows-download voor dit spel</string>
<string name="stores_gamejolt_no_exe">Geen Windows-game gevonden in de download</string>
<string name="stores_gamejolt_no_game">Deze game is niet gevonden op Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Games van Game Jolt konden niet worden geladen</string>
<string name="stores_gamejolt_download_failed">Game Jolt antwoordde HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">De downloads van Game Jolt konden niet worden geladen</string>
<string name="stores_gamejolt_build_open">Openen op Game Jolt</string>
<string name="stores_gamejolt_archive">%1$s-archieven worden niet ondersteund</string>
<string name="stores_gamejolt_extract_failed">Download kan niet worden uitgepakt (code %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Game Jolt is niet bereikbaar</string>
<string name="stores_gamejolt_download_no_link">Game Jolt gaf geen downloadlink</string>
<string name="stores_gamejolt_section_featured">Uitgelicht</string>
<string name="stores_gamejolt_section_hot">Populair</string>
<string name="stores_gamejolt_section_best">Beste</string>
<string name="stores_gamejolt_section_new">Nieuw</string>
<string name="stores_gamejolt_price_under_30">$30 of minder</string>
<string name="stores_gamejolt_os_other">Overig</string>
<string name="stores_gamejolt_maturity_everyone">Alle leeftijden</string>
<string name="stores_gamejolt_maturity_teen">Tieners</string>
<string name="stores_gamejolt_maturity_adult">Volwassenen</string>
<string name="stores_gamejolt_status_complete">Voltooid</string>
<string name="stores_gamejolt_status_early">Early access</string>
<string name="stores_gamejolt_partners">Partnerspellen</string>
<string name="stores_gamejolt_filter_browser">Browser</string>
<string name="stores_gamejolt_filter_maturity">Leeftijdsklasse</string>
<string name="stores_gamejolt_filter_status">Status</string>
<string name="stores_gamejolt_filter_partners">Partners</string>
<string name="stores_gamejolt_followed">Gevolgde games</string>
</resources>
+29
View File
@@ -3680,4 +3680,33 @@
<string name="gog_repair_action">Napraw pliki</string>
<string name="gog_refresh_action">Odśwież instalację</string>
<string name="gog_select_patch">Wybierz</string>
<string name="stores_gamejolt_not_owned">Nie ma go w Twojej bibliotece Game Jolt</string>
<string name="stores_gamejolt_no_build">Brak wersji na Windows dla tej gry</string>
<string name="stores_gamejolt_no_exe">W pobranych plikach nie znaleziono gry na Windows</string>
<string name="stores_gamejolt_no_game">Nie znaleziono tej gry w Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Nie udało się wczytać gier z Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt odpowiedziało HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Nie udało się wczytać plików z Game Jolt</string>
<string name="stores_gamejolt_build_open">Otwórz w Game Jolt</string>
<string name="stores_gamejolt_archive">Archiwa %1$s nie są obsługiwane</string>
<string name="stores_gamejolt_extract_failed">Nie można rozpakować pobranego pliku (kod %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Nie można połączyć się z Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt nie podał linku do pobrania</string>
<string name="stores_gamejolt_section_featured">Polecane</string>
<string name="stores_gamejolt_section_hot">Na czasie</string>
<string name="stores_gamejolt_section_best">Najlepsze</string>
<string name="stores_gamejolt_section_new">Nowe</string>
<string name="stores_gamejolt_price_under_30">30 $ lub mniej</string>
<string name="stores_gamejolt_os_other">Inne</string>
<string name="stores_gamejolt_maturity_everyone">Dla wszystkich</string>
<string name="stores_gamejolt_maturity_teen">Nastolatki</string>
<string name="stores_gamejolt_maturity_adult">Dla dorosłych</string>
<string name="stores_gamejolt_status_complete">Ukończone</string>
<string name="stores_gamejolt_status_early">Wczesny dostęp</string>
<string name="stores_gamejolt_partners">Gry partnerów</string>
<string name="stores_gamejolt_filter_browser">Przeglądarka</string>
<string name="stores_gamejolt_filter_maturity">Kategoria wiekowa</string>
<string name="stores_gamejolt_filter_status">Status</string>
<string name="stores_gamejolt_filter_partners">Partnerzy</string>
<string name="stores_gamejolt_followed">Obserwowane gry</string>
</resources>
@@ -3643,4 +3643,33 @@
<string name="gog_repair_action">Reparar ficheiros</string>
<string name="gog_refresh_action">Renovar instalação</string>
<string name="gog_select_patch">Selecionar</string>
<string name="stores_gamejolt_not_owned">Não está na sua biblioteca do Game Jolt</string>
<string name="stores_gamejolt_no_build">Sem transferência para Windows deste jogo</string>
<string name="stores_gamejolt_no_exe">Não foi encontrado nenhum jogo para Windows na transferência</string>
<string name="stores_gamejolt_no_game">Não foi possível encontrar este jogo no Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Não foi possível carregar os jogos do Game Jolt</string>
<string name="stores_gamejolt_download_failed">O Game Jolt respondeu HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Não foi possível carregar as transferências do Game Jolt</string>
<string name="stores_gamejolt_build_open">Abrir no Game Jolt</string>
<string name="stores_gamejolt_archive">Ficheiros %1$s não são suportados</string>
<string name="stores_gamejolt_extract_failed">Não foi possível extrair a transferência (código %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Não foi possível aceder ao Game Jolt</string>
<string name="stores_gamejolt_download_no_link">O Game Jolt não forneceu uma ligação de transferência</string>
<string name="stores_gamejolt_section_featured">Em destaque</string>
<string name="stores_gamejolt_section_hot">Em alta</string>
<string name="stores_gamejolt_section_best">Melhores</string>
<string name="stores_gamejolt_section_new">Novos</string>
<string name="stores_gamejolt_price_under_30">30 $ ou menos</string>
<string name="stores_gamejolt_os_other">Outros</string>
<string name="stores_gamejolt_maturity_everyone">Todas as idades</string>
<string name="stores_gamejolt_maturity_teen">Adolescentes</string>
<string name="stores_gamejolt_maturity_adult">Adulto</string>
<string name="stores_gamejolt_status_complete">Completo</string>
<string name="stores_gamejolt_status_early">Acesso antecipado</string>
<string name="stores_gamejolt_partners">Jogos de parceiros</string>
<string name="stores_gamejolt_filter_browser">Navegador</string>
<string name="stores_gamejolt_filter_maturity">Classificação</string>
<string name="stores_gamejolt_filter_status">Estado</string>
<string name="stores_gamejolt_filter_partners">Parceiros</string>
<string name="stores_gamejolt_followed">Jogos seguidos</string>
</resources>
+29
View File
@@ -3643,4 +3643,33 @@
<string name="gog_repair_action">Reparar arquivos</string>
<string name="gog_refresh_action">Renovar instalação</string>
<string name="gog_select_patch">Selecionar</string>
<string name="stores_gamejolt_not_owned">Não está na sua biblioteca do Game Jolt</string>
<string name="stores_gamejolt_no_build">Sem download para Windows deste jogo</string>
<string name="stores_gamejolt_no_exe">Nenhum jogo para Windows encontrado no download</string>
<string name="stores_gamejolt_no_game">Não foi possível encontrar este jogo no Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Não foi possível carregar os jogos do Game Jolt</string>
<string name="stores_gamejolt_download_failed">O Game Jolt respondeu HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Não foi possível carregar os downloads do Game Jolt</string>
<string name="stores_gamejolt_build_open">Abrir no Game Jolt</string>
<string name="stores_gamejolt_archive">Arquivos %1$s não são suportados</string>
<string name="stores_gamejolt_extract_failed">Não foi possível extrair o download (código %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Não foi possível acessar o Game Jolt</string>
<string name="stores_gamejolt_download_no_link">O Game Jolt não forneceu um link de download</string>
<string name="stores_gamejolt_section_featured">Em destaque</string>
<string name="stores_gamejolt_section_hot">Em alta</string>
<string name="stores_gamejolt_section_best">Melhores</string>
<string name="stores_gamejolt_section_new">Novos</string>
<string name="stores_gamejolt_price_under_30">US$ 30 ou menos</string>
<string name="stores_gamejolt_os_other">Outros</string>
<string name="stores_gamejolt_maturity_everyone">Todas as idades</string>
<string name="stores_gamejolt_maturity_teen">Adolescentes</string>
<string name="stores_gamejolt_maturity_adult">Adulto</string>
<string name="stores_gamejolt_status_complete">Completo</string>
<string name="stores_gamejolt_status_early">Acesso antecipado</string>
<string name="stores_gamejolt_partners">Jogos de parceiros</string>
<string name="stores_gamejolt_filter_browser">Navegador</string>
<string name="stores_gamejolt_filter_maturity">Classificação</string>
<string name="stores_gamejolt_filter_status">Status</string>
<string name="stores_gamejolt_filter_partners">Parceiros</string>
<string name="stores_gamejolt_followed">Jogos seguidos</string>
</resources>
+29
View File
@@ -3643,4 +3643,33 @@
<string name="gog_repair_action">Repară fișierele</string>
<string name="gog_refresh_action">Reîmprospătează instalarea</string>
<string name="gog_select_patch">Selectează</string>
<string name="stores_gamejolt_not_owned">Nu este în biblioteca ta Game Jolt</string>
<string name="stores_gamejolt_no_build">Nu există descărcare pentru Windows la acest joc</string>
<string name="stores_gamejolt_no_exe">Nu s-a găsit niciun joc Windows în descărcare</string>
<string name="stores_gamejolt_no_game">Jocul nu a fost găsit pe Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Nu s-au putut încărca jocurile de pe Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt a răspuns HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Descărcările de pe Game Jolt nu au putut fi încărcate</string>
<string name="stores_gamejolt_build_open">Deschide pe Game Jolt</string>
<string name="stores_gamejolt_archive">Arhivele %1$s nu sunt acceptate</string>
<string name="stores_gamejolt_extract_failed">Descărcarea nu a putut fi extrasă (cod %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Nu s-a putut contacta Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt nu a oferit un link de descărcare</string>
<string name="stores_gamejolt_section_featured">Recomandate</string>
<string name="stores_gamejolt_section_hot">În tendințe</string>
<string name="stores_gamejolt_section_best">Cele mai bune</string>
<string name="stores_gamejolt_section_new">Noi</string>
<string name="stores_gamejolt_price_under_30">30 $ sau mai puțin</string>
<string name="stores_gamejolt_os_other">Altele</string>
<string name="stores_gamejolt_maturity_everyone">Toate vârstele</string>
<string name="stores_gamejolt_maturity_teen">Adolescenți</string>
<string name="stores_gamejolt_maturity_adult">Adulți</string>
<string name="stores_gamejolt_status_complete">Finalizat</string>
<string name="stores_gamejolt_status_early">Acces anticipat</string>
<string name="stores_gamejolt_partners">Jocuri partenere</string>
<string name="stores_gamejolt_filter_browser">Browser</string>
<string name="stores_gamejolt_filter_maturity">Maturitate</string>
<string name="stores_gamejolt_filter_status">Stare</string>
<string name="stores_gamejolt_filter_partners">Parteneri</string>
<string name="stores_gamejolt_followed">Jocuri urmărite</string>
</resources>
+29
View File
@@ -3680,4 +3680,33 @@
<string name="gog_repair_action">Восстановить файлы</string>
<string name="gog_refresh_action">Обновить установку</string>
<string name="gog_select_patch">Выбрать</string>
<string name="stores_gamejolt_not_owned">Нет в вашей библиотеке Game Jolt</string>
<string name="stores_gamejolt_no_build">Для этой игры нет загрузки для Windows</string>
<string name="stores_gamejolt_no_exe">В загрузке не найдена игра для Windows</string>
<string name="stores_gamejolt_no_game">Не удалось найти эту игру на Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Не удалось загрузить игры с Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt ответил HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Не удалось загрузить список файлов с Game Jolt</string>
<string name="stores_gamejolt_build_open">Открыть на Game Jolt</string>
<string name="stores_gamejolt_archive">Архивы %1$s не поддерживаются</string>
<string name="stores_gamejolt_extract_failed">Не удалось распаковать загрузку (код %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Не удалось связаться с Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt не предоставил ссылку для скачивания</string>
<string name="stores_gamejolt_section_featured">Рекомендуемые</string>
<string name="stores_gamejolt_section_hot">Популярные</string>
<string name="stores_gamejolt_section_best">Лучшие</string>
<string name="stores_gamejolt_section_new">Новые</string>
<string name="stores_gamejolt_price_under_30">30 $ или дешевле</string>
<string name="stores_gamejolt_os_other">Другое</string>
<string name="stores_gamejolt_maturity_everyone">Для всех возрастов</string>
<string name="stores_gamejolt_maturity_teen">Подростки</string>
<string name="stores_gamejolt_maturity_adult">Для взрослых</string>
<string name="stores_gamejolt_status_complete">Завершена</string>
<string name="stores_gamejolt_status_early">Ранний доступ</string>
<string name="stores_gamejolt_partners">Игры партнёров</string>
<string name="stores_gamejolt_filter_browser">Браузер</string>
<string name="stores_gamejolt_filter_maturity">Возрастной рейтинг</string>
<string name="stores_gamejolt_filter_status">Статус</string>
<string name="stores_gamejolt_filter_partners">Партнёры</string>
<string name="stores_gamejolt_followed">Отслеживаемые игры</string>
</resources>
+29
View File
@@ -3606,4 +3606,33 @@
<string name="gog_repair_action">Reparera filer</string>
<string name="gog_refresh_action">Uppdatera installationen</string>
<string name="gog_select_patch">Välj</string>
<string name="stores_gamejolt_not_owned">Inte i ditt Game Jolt-bibliotek</string>
<string name="stores_gamejolt_no_build">Ingen Windows-nedladdning för det här spelet</string>
<string name="stores_gamejolt_no_exe">Inget Windows-spel hittades i nedladdningen</string>
<string name="stores_gamejolt_no_game">Spelet hittades inte på Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Det gick inte att läsa in spel från Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt svarade HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Det gick inte att läsa in nedladdningarna från Game Jolt</string>
<string name="stores_gamejolt_build_open">Öppna på Game Jolt</string>
<string name="stores_gamejolt_archive">%1$s-arkiv stöds inte</string>
<string name="stores_gamejolt_extract_failed">Det gick inte att packa upp nedladdningen (kod %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Det gick inte att nå Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt gav ingen nedladdningslänk</string>
<string name="stores_gamejolt_section_featured">Utvalda</string>
<string name="stores_gamejolt_section_hot">Populära</string>
<string name="stores_gamejolt_section_best">Bästa</string>
<string name="stores_gamejolt_section_new">Nya</string>
<string name="stores_gamejolt_price_under_30">$30 eller mindre</string>
<string name="stores_gamejolt_os_other">Övrigt</string>
<string name="stores_gamejolt_maturity_everyone">Alla åldrar</string>
<string name="stores_gamejolt_maturity_teen">Tonåringar</string>
<string name="stores_gamejolt_maturity_adult">Vuxna</string>
<string name="stores_gamejolt_status_complete">Färdigt</string>
<string name="stores_gamejolt_status_early">Tidig åtkomst</string>
<string name="stores_gamejolt_partners">Partnerspel</string>
<string name="stores_gamejolt_filter_browser">Webbläsare</string>
<string name="stores_gamejolt_filter_maturity">Åldersgräns</string>
<string name="stores_gamejolt_filter_status">Status</string>
<string name="stores_gamejolt_filter_partners">Partner</string>
<string name="stores_gamejolt_followed">Följda spel</string>
</resources>
+29
View File
@@ -3578,4 +3578,33 @@
<string name="gog_repair_action">ซ่อมแซมไฟล์</string>
<string name="gog_refresh_action">รีเฟรชการติดตั้ง</string>
<string name="gog_select_patch">เลือก</string>
<string name="stores_gamejolt_not_owned">ไม่มีในคลัง Game Jolt ของคุณ</string>
<string name="stores_gamejolt_no_build">เกมนี้ไม่มีการดาวน์โหลดสำหรับ Windows</string>
<string name="stores_gamejolt_no_exe">ไม่พบเกม Windows ในไฟล์ที่ดาวน์โหลด</string>
<string name="stores_gamejolt_no_game">ไม่พบเกมนี้บน Game Jolt</string>
<string name="stores_gamejolt_browse_failed">โหลดเกมจาก Game Jolt ไม่ได้</string>
<string name="stores_gamejolt_download_failed">Game Jolt ตอบกลับ HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">โหลดรายการดาวน์โหลดจาก Game Jolt ไม่ได้</string>
<string name="stores_gamejolt_build_open">เปิดบน Game Jolt</string>
<string name="stores_gamejolt_archive">ไม่รองรับไฟล์ %1$s</string>
<string name="stores_gamejolt_extract_failed">แตกไฟล์ที่ดาวน์โหลดไม่ได้ (รหัส %1$d)</string>
<string name="stores_gamejolt_download_unreachable">ไม่สามารถเชื่อมต่อ Game Jolt ได้</string>
<string name="stores_gamejolt_download_no_link">Game Jolt ไม่ได้ให้ลิงก์ดาวน์โหลด</string>
<string name="stores_gamejolt_section_featured">แนะนำ</string>
<string name="stores_gamejolt_section_hot">มาแรง</string>
<string name="stores_gamejolt_section_best">ยอดนิยมสูงสุด</string>
<string name="stores_gamejolt_section_new">ใหม่</string>
<string name="stores_gamejolt_price_under_30">$30 หรือต่ำกว่า</string>
<string name="stores_gamejolt_os_other">อื่น ๆ</string>
<string name="stores_gamejolt_maturity_everyone">ทุกวัย</string>
<string name="stores_gamejolt_maturity_teen">วัยรุ่น</string>
<string name="stores_gamejolt_maturity_adult">ผู้ใหญ่</string>
<string name="stores_gamejolt_status_complete">เสร็จสมบูรณ์</string>
<string name="stores_gamejolt_status_early">เข้าถึงก่อนใคร</string>
<string name="stores_gamejolt_partners">เกมของพาร์ตเนอร์</string>
<string name="stores_gamejolt_filter_browser">เบราว์เซอร์</string>
<string name="stores_gamejolt_filter_maturity">ระดับเนื้อหา</string>
<string name="stores_gamejolt_filter_status">สถานะ</string>
<string name="stores_gamejolt_filter_partners">พาร์ตเนอร์</string>
<string name="stores_gamejolt_followed">เกมที่ติดตาม</string>
</resources>
+29
View File
@@ -3606,4 +3606,33 @@
<string name="gog_repair_action">Dosyaları onar</string>
<string name="gog_refresh_action">Kurulumu yenile</string>
<string name="gog_select_patch">Seç</string>
<string name="stores_gamejolt_not_owned">Game Jolt kütüphanenizde yok</string>
<string name="stores_gamejolt_no_build">Bu oyunun Windows indirmesi yok</string>
<string name="stores_gamejolt_no_exe">İndirmede Windows oyunu bulunamadı</string>
<string name="stores_gamejolt_no_game">Bu oyun Game Jolt\'ta bulunamadı</string>
<string name="stores_gamejolt_browse_failed">Game Jolt oyunları yüklenemedi</string>
<string name="stores_gamejolt_download_failed">Game Jolt HTTP %1$d yanıtı verdi</string>
<string name="stores_gamejolt_pick_failed">İndirmeler Game Jolt\'tan yüklenemedi</string>
<string name="stores_gamejolt_build_open">Game Jolt\'ta aç</string>
<string name="stores_gamejolt_archive">%1$s arşivleri desteklenmiyor</string>
<string name="stores_gamejolt_extract_failed">İndirme ayıklanamadı (kod %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Game Jolt\'a ulaşılamadı</string>
<string name="stores_gamejolt_download_no_link">Game Jolt bir indirme bağlantısı vermedi</string>
<string name="stores_gamejolt_section_featured">Öne çıkanlar</string>
<string name="stores_gamejolt_section_hot">Popüler</string>
<string name="stores_gamejolt_section_best">En iyiler</string>
<string name="stores_gamejolt_section_new">Yeni</string>
<string name="stores_gamejolt_price_under_30">30 $ veya daha az</string>
<string name="stores_gamejolt_os_other">Diğer</string>
<string name="stores_gamejolt_maturity_everyone">Her yaş</string>
<string name="stores_gamejolt_maturity_teen">Gençler</string>
<string name="stores_gamejolt_maturity_adult">Yetişkin</string>
<string name="stores_gamejolt_status_complete">Tamamlandı</string>
<string name="stores_gamejolt_status_early">Erken erişim</string>
<string name="stores_gamejolt_partners">Ortak oyunlar</string>
<string name="stores_gamejolt_filter_browser">Tarayıcı</string>
<string name="stores_gamejolt_filter_maturity">Yaş sınırı</string>
<string name="stores_gamejolt_filter_status">Durum</string>
<string name="stores_gamejolt_filter_partners">Ortaklar</string>
<string name="stores_gamejolt_followed">Takip edilen oyunlar</string>
</resources>
+29
View File
@@ -3680,4 +3680,33 @@
<string name="gog_repair_action">Відновити файли</string>
<string name="gog_refresh_action">Оновити встановлення</string>
<string name="gog_select_patch">Вибрати</string>
<string name="stores_gamejolt_not_owned">Немає у вашій бібліотеці Game Jolt</string>
<string name="stores_gamejolt_no_build">Для цієї гри немає завантаження для Windows</string>
<string name="stores_gamejolt_no_exe">У завантаженні не знайдено гри для Windows</string>
<string name="stores_gamejolt_no_game">Не вдалося знайти цю гру на Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Не вдалося завантажити ігри з Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt відповів HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Не вдалося завантажити список файлів з Game Jolt</string>
<string name="stores_gamejolt_build_open">Відкрити на Game Jolt</string>
<string name="stores_gamejolt_archive">Архіви %1$s не підтримуються</string>
<string name="stores_gamejolt_extract_failed">Не вдалося розпакувати завантаження (код %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Не вдалося зв\'язатися з Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt не надав посилання для завантаження</string>
<string name="stores_gamejolt_section_featured">Рекомендовані</string>
<string name="stores_gamejolt_section_hot">Популярні</string>
<string name="stores_gamejolt_section_best">Найкращі</string>
<string name="stores_gamejolt_section_new">Нові</string>
<string name="stores_gamejolt_price_under_30">30 $ або менше</string>
<string name="stores_gamejolt_os_other">Інше</string>
<string name="stores_gamejolt_maturity_everyone">Для всіх віків</string>
<string name="stores_gamejolt_maturity_teen">Підлітки</string>
<string name="stores_gamejolt_maturity_adult">Для дорослих</string>
<string name="stores_gamejolt_status_complete">Завершена</string>
<string name="stores_gamejolt_status_early">Рання версія</string>
<string name="stores_gamejolt_partners">Ігри партнерів</string>
<string name="stores_gamejolt_filter_browser">Браузер</string>
<string name="stores_gamejolt_filter_maturity">Вікова категорія</string>
<string name="stores_gamejolt_filter_status">Статус</string>
<string name="stores_gamejolt_filter_partners">Партнери</string>
<string name="stores_gamejolt_followed">Ігри, за якими ви стежите</string>
</resources>
+29
View File
@@ -3578,4 +3578,33 @@
<string name="gog_repair_action">Sửa tệp</string>
<string name="gog_refresh_action">Làm mới bản cài</string>
<string name="gog_select_patch">Chọn</string>
<string name="stores_gamejolt_not_owned">Không có trong thư viện Game Jolt của bạn</string>
<string name="stores_gamejolt_no_build">Không có bản tải Windows cho game này</string>
<string name="stores_gamejolt_no_exe">Không tìm thấy trò chơi Windows trong bản tải xuống</string>
<string name="stores_gamejolt_no_game">Không tìm thấy trò chơi này trên Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Không tải được game từ Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt trả về HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Không thể tải danh sách tải xuống từ Game Jolt</string>
<string name="stores_gamejolt_build_open">Mở trên Game Jolt</string>
<string name="stores_gamejolt_archive">Không hỗ trợ tệp %1$s</string>
<string name="stores_gamejolt_extract_failed">Không thể giải nén bản tải xuống (mã %1$d)</string>
<string name="stores_gamejolt_download_unreachable">Không thể kết nối với Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt không cung cấp liên kết tải xuống</string>
<string name="stores_gamejolt_section_featured">Nổi bật</string>
<string name="stores_gamejolt_section_hot">Thịnh hành</string>
<string name="stores_gamejolt_section_best">Hay nhất</string>
<string name="stores_gamejolt_section_new">Mới</string>
<string name="stores_gamejolt_price_under_30">$30 trở xuống</string>
<string name="stores_gamejolt_os_other">Khác</string>
<string name="stores_gamejolt_maturity_everyone">Mọi lứa tuổi</string>
<string name="stores_gamejolt_maturity_teen">Thanh thiếu niên</string>
<string name="stores_gamejolt_maturity_adult">Người lớn</string>
<string name="stores_gamejolt_status_complete">Hoàn chỉnh</string>
<string name="stores_gamejolt_status_early">Truy cập sớm</string>
<string name="stores_gamejolt_partners">Game của đối tác</string>
<string name="stores_gamejolt_filter_browser">Trình duyệt</string>
<string name="stores_gamejolt_filter_maturity">Độ tuổi</string>
<string name="stores_gamejolt_filter_status">Trạng thái</string>
<string name="stores_gamejolt_filter_partners">Đối tác</string>
<string name="stores_gamejolt_followed">Game đang theo dõi</string>
</resources>
@@ -3578,4 +3578,33 @@
<string name="gog_repair_action">修复文件</string>
<string name="gog_refresh_action">刷新安装</string>
<string name="gog_select_patch">选择</string>
<string name="stores_gamejolt_not_owned">不在你的 Game Jolt 库中</string>
<string name="stores_gamejolt_no_build">这个游戏没有 Windows 下载</string>
<string name="stores_gamejolt_no_exe">下载内容中未找到 Windows 游戏</string>
<string name="stores_gamejolt_no_game">在 Game Jolt 上找不到这款游戏</string>
<string name="stores_gamejolt_browse_failed">无法从 Game Jolt 加载游戏</string>
<string name="stores_gamejolt_download_failed">Game Jolt 返回 HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">无法从 Game Jolt 加载下载内容</string>
<string name="stores_gamejolt_build_open">在 Game Jolt 上打开</string>
<string name="stores_gamejolt_archive">不支持 %1$s 压缩包</string>
<string name="stores_gamejolt_extract_failed">无法解压下载内容(代码 %1$d)</string>
<string name="stores_gamejolt_download_unreachable">无法连接到 Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt 未提供下载链接</string>
<string name="stores_gamejolt_section_featured">精选</string>
<string name="stores_gamejolt_section_hot">热门</string>
<string name="stores_gamejolt_section_best">最佳</string>
<string name="stores_gamejolt_section_new">最新</string>
<string name="stores_gamejolt_price_under_30">30 美元以下</string>
<string name="stores_gamejolt_os_other">其他</string>
<string name="stores_gamejolt_maturity_everyone">全年龄</string>
<string name="stores_gamejolt_maturity_teen">青少年</string>
<string name="stores_gamejolt_maturity_adult">成人</string>
<string name="stores_gamejolt_status_complete">已完成</string>
<string name="stores_gamejolt_status_early">抢先体验</string>
<string name="stores_gamejolt_partners">合作伙伴游戏</string>
<string name="stores_gamejolt_filter_browser">浏览器</string>
<string name="stores_gamejolt_filter_maturity">内容分级</string>
<string name="stores_gamejolt_filter_status">状态</string>
<string name="stores_gamejolt_filter_partners">合作伙伴</string>
<string name="stores_gamejolt_followed">已关注的游戏</string>
</resources>
@@ -3578,4 +3578,33 @@
<string name="gog_repair_action">修復檔案</string>
<string name="gog_refresh_action">重新整理安裝</string>
<string name="gog_select_patch">選擇</string>
<string name="stores_gamejolt_not_owned">不在你的 Game Jolt 收藏庫中</string>
<string name="stores_gamejolt_no_build">這個遊戲沒有 Windows 下載</string>
<string name="stores_gamejolt_no_exe">下載內容中找不到 Windows 遊戲</string>
<string name="stores_gamejolt_no_game">在 Game Jolt 找不到這款遊戲</string>
<string name="stores_gamejolt_browse_failed">無法從 Game Jolt 載入遊戲</string>
<string name="stores_gamejolt_download_failed">Game Jolt 回應 HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">無法從 Game Jolt 載入下載內容</string>
<string name="stores_gamejolt_build_open">在 Game Jolt 開啟</string>
<string name="stores_gamejolt_archive">不支援 %1$s 壓縮檔</string>
<string name="stores_gamejolt_extract_failed">無法解壓下載內容(代碼 %1$d)</string>
<string name="stores_gamejolt_download_unreachable">無法連線至 Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt 沒有提供下載連結</string>
<string name="stores_gamejolt_section_featured">精選</string>
<string name="stores_gamejolt_section_hot">熱門</string>
<string name="stores_gamejolt_section_best">最佳</string>
<string name="stores_gamejolt_section_new">最新</string>
<string name="stores_gamejolt_price_under_30">30 美元或以下</string>
<string name="stores_gamejolt_os_other">其他</string>
<string name="stores_gamejolt_maturity_everyone">全年齡</string>
<string name="stores_gamejolt_maturity_teen">青少年</string>
<string name="stores_gamejolt_maturity_adult">成人</string>
<string name="stores_gamejolt_status_complete">已完成</string>
<string name="stores_gamejolt_status_early">搶先體驗</string>
<string name="stores_gamejolt_partners">合作夥伴遊戲</string>
<string name="stores_gamejolt_filter_browser">瀏覽器</string>
<string name="stores_gamejolt_filter_maturity">內容分級</string>
<string name="stores_gamejolt_filter_status">狀態</string>
<string name="stores_gamejolt_filter_partners">合作夥伴</string>
<string name="stores_gamejolt_followed">已追蹤的遊戲</string>
</resources>
@@ -3578,4 +3578,33 @@
<string name="gog_repair_action">修復檔案</string>
<string name="gog_refresh_action">重新整理安裝</string>
<string name="gog_select_patch">選取</string>
<string name="stores_gamejolt_not_owned">不在你的 Game Jolt 收藏庫中</string>
<string name="stores_gamejolt_no_build">這個遊戲沒有 Windows 下載</string>
<string name="stores_gamejolt_no_exe">下載內容中找不到 Windows 遊戲</string>
<string name="stores_gamejolt_no_game">在 Game Jolt 找不到這款遊戲</string>
<string name="stores_gamejolt_browse_failed">無法從 Game Jolt 載入遊戲</string>
<string name="stores_gamejolt_download_failed">Game Jolt 回應 HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">無法從 Game Jolt 載入下載內容</string>
<string name="stores_gamejolt_build_open">在 Game Jolt 開啟</string>
<string name="stores_gamejolt_archive">不支援 %1$s 壓縮檔</string>
<string name="stores_gamejolt_extract_failed">無法解壓縮下載內容(代碼 %1$d)</string>
<string name="stores_gamejolt_download_unreachable">無法連線至 Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt 未提供下載連結</string>
<string name="stores_gamejolt_section_featured">精選</string>
<string name="stores_gamejolt_section_hot">熱門</string>
<string name="stores_gamejolt_section_best">最佳</string>
<string name="stores_gamejolt_section_new">最新</string>
<string name="stores_gamejolt_price_under_30">30 美元或以下</string>
<string name="stores_gamejolt_os_other">其他</string>
<string name="stores_gamejolt_maturity_everyone">全年齡</string>
<string name="stores_gamejolt_maturity_teen">青少年</string>
<string name="stores_gamejolt_maturity_adult">成人</string>
<string name="stores_gamejolt_status_complete">已完成</string>
<string name="stores_gamejolt_status_early">搶先體驗</string>
<string name="stores_gamejolt_partners">合作夥伴遊戲</string>
<string name="stores_gamejolt_filter_browser">瀏覽器</string>
<string name="stores_gamejolt_filter_maturity">內容分級</string>
<string name="stores_gamejolt_filter_status">狀態</string>
<string name="stores_gamejolt_filter_partners">合作夥伴</string>
<string name="stores_gamejolt_followed">已追蹤的遊戲</string>
</resources>
+29
View File
@@ -3683,4 +3683,33 @@
<string name="steam_import_names_more">%1$s and %2$d more</string>
<string name="steam_import_now">Restart now</string>
<string name="steam_import_later">Later</string>
<string name="stores_gamejolt_not_owned">Not in your Game Jolt library</string>
<string name="stores_gamejolt_no_build">No Windows download for this game</string>
<string name="stores_gamejolt_no_exe">No Windows game found in the download</string>
<string name="stores_gamejolt_no_game">Could not find this game on Game Jolt</string>
<string name="stores_gamejolt_browse_failed">Could not load games from Game Jolt</string>
<string name="stores_gamejolt_download_failed">Game Jolt answered HTTP %1$d</string>
<string name="stores_gamejolt_pick_failed">Could not load the downloads from Game Jolt</string>
<string name="stores_gamejolt_build_open">Open on Game Jolt</string>
<string name="stores_gamejolt_download_unreachable">Could not reach Game Jolt</string>
<string name="stores_gamejolt_download_no_link">Game Jolt did not give a download link</string>
<string name="stores_gamejolt_archive">%1$s archives are not supported</string>
<string name="stores_gamejolt_extract_failed">Could not extract the download (exit %1$d)</string>
<string name="stores_gamejolt_section_featured">Featured</string>
<string name="stores_gamejolt_section_hot">Hot</string>
<string name="stores_gamejolt_section_best">Best</string>
<string name="stores_gamejolt_section_new">New</string>
<string name="stores_gamejolt_price_under_30">$30 or less</string>
<string name="stores_gamejolt_os_other">Other</string>
<string name="stores_gamejolt_maturity_everyone">All ages</string>
<string name="stores_gamejolt_maturity_teen">Teen</string>
<string name="stores_gamejolt_maturity_adult">Mature</string>
<string name="stores_gamejolt_status_complete">Complete</string>
<string name="stores_gamejolt_status_early">Early access</string>
<string name="stores_gamejolt_partners">Partner games</string>
<string name="stores_gamejolt_filter_browser">Browser</string>
<string name="stores_gamejolt_filter_maturity">Maturity</string>
<string name="stores_gamejolt_filter_status">Status</string>
<string name="stores_gamejolt_filter_partners">Partners</string>
<string name="stores_gamejolt_followed">Followed games</string>
</resources>
@@ -298,4 +298,9 @@ class StoreInstallRootTest {
assertFalse(StoreInstallRoot.insufficientSpace(1L, 1L))
assertFalse(StoreInstallRoot.insufficientSpace(0L, 0L))
}
@Test fun itchKeepsTheFolderItsGamesWereInstalledInWhateverItsDisplayName() {
assertEquals("itch", StoreInstallRoot.storeDir(File("/games"), Store.ITCH).name)
assertEquals("Game Jolt", StoreInstallRoot.storeDir(File("/games"), Store.GAMEJOLT).name)
}
}
@@ -0,0 +1,36 @@
package com.droiddeck.launcher.stores.gamejolt
import org.junit.Assert.assertEquals
import org.junit.Test
class GameJoltBrowseTest {
private fun qs(query: GameJoltQuery = GameJoltQuery(), page: Int = 1) = GameJoltBrowse.queryString(query, page)
@Test fun theDefaultQueryAsksForTheFeaturedSectionByName() {
assertEquals("section=featured", qs())
}
@Test fun sectionsPriceAndPagesUseTheSiteNames() {
assertEquals("section=hot", qs(GameJoltQuery(section = GameJoltBrowse.SECTION_HOT)))
assertEquals("section=featured&f_price=5-less&page=3", qs(GameJoltQuery(price = GameJoltBrowse.PRICE_UNDER_5), 3))
assertEquals("section=featured&f_price=free", qs(GameJoltQuery(price = GameJoltBrowse.PRICE_FREE)))
}
@Test fun listFiltersKeepTheSiteOrderWhateverTheSelectionOrder() {
assertEquals("section=featured&f_os%5B%5D=windows&f_os%5B%5D=linux", qs(GameJoltQuery(os = setOf("linux", "windows"))))
assertEquals("section=featured&f_browser%5B%5D=html&f_maturity%5B%5D=everyone&f_status%5B%5D=complete&f_partners%5B%5D=partners",
qs(GameJoltQuery(browser = setOf("html"), maturity = setOf("everyone"), status = setOf("complete"), partners = true)))
}
@Test fun devlogGamesAreNeverAskedFor() {
assertEquals(setOf("complete", "wip"), GameJoltBrowse.effective(GameJoltQuery(), true).status)
assertEquals(setOf("complete", "wip"), GameJoltBrowse.effective(GameJoltQuery(status = setOf("devlog")), true).status)
assertEquals(setOf("wip"), GameJoltBrowse.effective(GameJoltQuery(status = setOf("wip", "devlog")), false).status)
assertEquals("section=featured&f_status%5B%5D=complete&f_status%5B%5D=wip", qs(GameJoltBrowse.effective(GameJoltQuery(), true).copy(maturity = emptySet())))
}
@Test fun tagsAreSluggedAndRepeatable() {
assertEquals("co-op", GameJoltBrowse.tagSlug(" Co-Op "))
assertEquals("section=featured&tag=action&tag=co-op", qs(GameJoltQuery(tags = listOf("Action", "co op"))))
}
}
@@ -0,0 +1,41 @@
package com.droiddeck.launcher.stores.gamejolt
import org.json.JSONArray
import org.json.JSONObject
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
@org.junit.runner.RunWith(org.robolectric.RobolectricTestRunner::class)
@org.robolectric.annotation.Config(sdk = [33], application = android.app.Application::class)
class GameJoltBuildsTest {
private fun build(id: Int, pkg: Int, release: Int, name: String, vararg flags: String) = JSONObject()
.put("id", id).put("game_package_id", pkg).put("game_release_id", release)
.put("primary_file", JSONObject().put("filename", name).put("filesize", 100))
.also { b -> flags.forEach { b.put(it, true) } }
private fun payload(vararg builds: JSONObject) = JSONObject()
.put("packages", JSONArray().put(JSONObject().put("id", 1).put("title", "Main")))
.put("releases", JSONArray().put(JSONObject().put("id", 10).put("published_on", 100).put("version_number", "1.0")).put(JSONObject().put("id", 11).put("published_on", 200).put("version_number", "1.1")))
.put("builds", JSONArray(builds.toList()))
.put("launchOptions", JSONArray())
@Test fun onlyTheNewestReleaseOfAPackageIsKept() {
val list = GameJoltBuilds.parse(payload(build(1, 1, 10, "old.zip", "os_windows"), build(2, 1, 11, "new.zip", "os_windows")))
assertEquals(listOf("2"), list.map { it.id })
assertEquals("1.1", list.first().version)
}
@Test fun windowsBuildsAreInstallableAndSortFirst() {
val list = GameJoltBuilds.parse(payload(build(1, 1, 11, "game-linux.zip", "os_linux"), build(2, 1, 11, "game-win.zip", "os_windows")))
assertEquals(listOf("2", "1"), list.map { it.id })
assertTrue(list[0].installable)
assertFalse(list[1].installable)
}
@Test fun aBuildWithoutAnOsFlagIsWeb() {
assertEquals(setOf("web"), GameJoltBuilds.platforms(JSONObject()))
assertEquals(setOf("windows", "osx"), GameJoltBuilds.platforms(JSONObject().put("os_windows", true).put("os_mac", true)))
}
}
@@ -0,0 +1,28 @@
package com.droiddeck.launcher.stores.gamejolt
import org.json.JSONArray
import org.json.JSONObject
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test
@org.junit.runner.RunWith(org.robolectric.RobolectricTestRunner::class)
@org.robolectric.annotation.Config(sdk = [33], application = android.app.Application::class)
class GameJoltCollectionsTest {
@Test fun playlistsBecomeCollectionsByIdAndName() {
val list = JSONArray()
.put(JSONObject().put("id", 7).put("name", "test list"))
.put(JSONObject().put("id", 0).put("name", "no id"))
.put(JSONObject().put("id", 9).put("name", ""))
val parsed = GameJoltCollections.parse(list)
assertEquals(listOf("playlist:7"), parsed.map { it.id })
assertEquals(listOf("test list"), parsed.map { it.title })
}
@Test fun eachCollectionHasItsOwnGameListEndpoint() {
assertEquals("/web/library/games/followed/@some+one", GameJoltCollections.path(GameJoltCollections.FOLLOWED, "some one"))
assertEquals("/web/library/games/playlist/7", GameJoltCollections.path("playlist:7", "x"))
assertNull(GameJoltCollections.path("playlist:abc", "x"))
assertNull(GameJoltCollections.path("other", "x"))
}
}
@@ -0,0 +1,52 @@
package com.droiddeck.launcher.stores.gamejolt
import org.json.JSONArray
import org.json.JSONObject
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test
@org.junit.runner.RunWith(org.robolectric.RobolectricTestRunner::class)
@org.robolectric.annotation.Config(sdk = [33], application = android.app.Application::class)
class GameJoltPricingTest {
private fun pricing(amount: Long, promotional: Boolean = false, currency: Any = JSONObject.NULL) =
JSONObject().put("amount", amount).put("promotional", promotional).put("currency_code", currency)
private fun sellable(vararg pricings: JSONObject) = JSONObject().put("type", "paid").put("pricings", JSONArray(pricings.toList()))
@Test fun aRegularPriceIsShownInDollars() {
val price = GameJoltPricing.of(sellable(pricing(99)))!!
assertEquals("$0.99", price.final)
assertEquals("", price.original)
assertEquals(0, price.discount)
}
@Test fun aPromotionalPriceBesideTheRegularOneIsASale() {
val price = GameJoltPricing.of(sellable(pricing(500), pricing(350, promotional = true)))!!
assertEquals("$3.50", price.final)
assertEquals("$5.00", price.original)
assertEquals(30, price.discount)
}
@Test fun aPromotionalPriceAloneShowsNoDiscount() {
val price = GameJoltPricing.of(sellable(pricing(350, promotional = true)))!!
assertEquals("$3.50", price.final)
assertEquals("", price.original)
assertEquals(0, price.discount)
}
@Test fun aPromotionalPriceNotBelowTheRegularOneIsNotASale() {
val price = GameJoltPricing.of(sellable(pricing(500), pricing(500, promotional = true)))!!
assertEquals("", price.original)
assertEquals(0, price.discount)
}
@Test fun aGameWithoutPricingsHasNoPrice() {
assertNull(GameJoltPricing.of(sellable()))
assertNull(GameJoltPricing.of(null))
}
@Test fun anotherCurrencyIsNamed() {
assertEquals("1.50 EUR", GameJoltPricing.of(sellable(pricing(150, currency = "EUR")))!!.final)
}
}
@@ -0,0 +1,63 @@
package com.droiddeck.launcher.stores.gamejolt
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Test
@org.junit.runner.RunWith(org.robolectric.RobolectricTestRunner::class)
@org.robolectric.annotation.Config(sdk = [33], application = android.app.Application::class)
class GameJoltUpdatesTest {
private fun build(id: String, pkg: String, stamp: String, windows: Boolean = true, name: String = "game.zip") =
GameJoltBuild(id, pkg, "Main", "1.0", name, 100L, stamp, if (windows) setOf("windows") else setOf("linux"), "", "")
@Test fun aNewerReleaseOfTheSamePackageIsAnUpdate() {
val update = GameJoltUpdates.evaluate(listOf(build("20", "1", "200", name = "new.zip")), "10", "1", "100")!!
assertEquals("20", update.buildId)
assertEquals("new.zip", update.filename)
assertFalse(update.replaced)
}
@Test fun theInstalledBuildIsNotAnUpdate() {
assertNull(GameJoltUpdates.evaluate(listOf(build("10", "1", "100")), "10", "1", "100"))
}
@Test fun anOlderBuildIsNotAnUpdate() {
assertNull(GameJoltUpdates.evaluate(listOf(build("5", "1", "50")), "10", "1", "100"))
}
@Test fun theSameReleaseTimeWithAHigherBuildIdIsAnUpdate() {
assertEquals("11", GameJoltUpdates.evaluate(listOf(build("11", "1", "100")), "10", "1", "100")?.buildId)
}
@Test fun otherPackagesDoNotCount() {
assertEquals("30", GameJoltUpdates.evaluate(listOf(build("40", "2", "900"), build("30", "1", "300")), "10", "1", "100")?.buildId)
}
@Test fun aRemovedPackageFallsBackToTheNewPreferredBuildAndSaysSo() {
val update = GameJoltUpdates.evaluate(listOf(build("40", "2", "900")), "10", "1", "100")!!
assertEquals("40", update.buildId)
assertTrue(update.replaced)
}
@Test fun nonWindowsBuildsAreNeverOffered() {
assertNull(GameJoltUpdates.evaluate(listOf(build("40", "1", "900", windows = false)), "10", "1", "100"))
}
@Test fun nothingToCompareMeansNoUpdate() {
assertNull(GameJoltUpdates.evaluate(null, "10", "1", "100"))
assertNull(GameJoltUpdates.evaluate(listOf(build("40", "1", "900")), "", "1", "100"))
}
@Test fun foundUpdatesSurviveEncodingAndDropEntriesWithoutABuild() {
val saved = GameJoltUpdates.encode(mapOf("gamejolt:1" to GameJoltUpdate("20", "200", "new.zip", true)))
val back = GameJoltUpdates.decode(saved).getValue("gamejolt:1")
assertEquals("20", back.buildId)
assertEquals("200", back.stamp)
assertEquals("new.zip", back.filename)
assertTrue(back.replaced)
assertEquals(emptyMap<String, GameJoltUpdate>(), GameJoltUpdates.decode("""{"gamejolt:1":{"stamp":"1"}}"""))
assertEquals(emptyMap<String, GameJoltUpdate>(), GameJoltUpdates.decode("not json"))
}
}
@@ -87,6 +87,11 @@ class LibraryEntriesTest {
assertEquals(listOf("epic", "gog", "battlenet"), librarySources(entries, listOf("missing", "epic", "epic", "amazon")))
}
@Test fun aSignedInStoreWithNoGamesKeepsItsPlaceInTheStoreOrder() {
val entries = listOf("steam", "xbox").map { LibraryEntry(it, it, it, null, null, true) }
assertEquals(listOf("steam", "xbox", "itch", "gamejolt"), librarySources(entries, listOf("xbox", "itch", "gamejolt"), setOf("itch", "gamejolt")))
}
@Test fun gameKeysNameEitherAnAppOrAStoreProduct() {
GameRef.parse("app:440").let { assertEquals(440, it.appId); assertNull(it.store) }
GameRef.parse("app:-12").let { assertEquals(-12, it.appId) }