1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Merge branch 'develop' into feature/nullkiller2

This commit is contained in:
Mircea TheHonestCTO
2025-09-07 17:35:33 +02:00
24 changed files with 448 additions and 56 deletions

View File

@@ -1,4 +1,4 @@
name: Cleanup GitHub runner caches on closed pull requests
name: Cleanup GitHub runner caches on closed PRs
on:
pull_request:
types:
@@ -16,8 +16,8 @@ jobs:
GH_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
# List caches whose key contains "-PR-<number>"
ids=$(gh cache list --limit 2000 --json id,key --jq ".[] | select(.key | contains(\"-PR-${PR_NUMBER}\")) | .id")
# List caches whose key contains "-PR-<number>-"
ids=$(gh cache list --limit 2000 --json id,key --jq ".[] | select(.key | test(\"-PR-${PR_NUMBER}-\")) | .id")
# Delete them (best effort)
set +e

View File

@@ -736,9 +736,7 @@ if(ANDROID)
if(ANDROID_STL MATCHES "_shared$")
set(stlLibName "${CMAKE_SHARED_LIBRARY_PREFIX}${ANDROID_STL}${CMAKE_SHARED_LIBRARY_SUFFIX}")
install(FILES "${CMAKE_SYSROOT}/usr/lib/${ANDROID_SYSROOT_LIB_SUBDIR}/${stlLibName}"
DESTINATION ${LIB_DIR}
)
vcmi_install_libs_symlink("${CMAKE_SYSROOT}/usr/lib/${ANDROID_SYSROOT_LIB_SUBDIR}/${stlLibName}")
endif()
else()
install(DIRECTORY config DESTINATION ${DATA_DIR})

View File

@@ -97,7 +97,12 @@
"vcmi.randomMap.description.monster.normal" : "normální",
"vcmi.randomMap.description.monster.strong" : "vysoká",
"vcmi.overlay.battery" : "Baterie",
"vcmi.overlay.charging" : "Nabíjení",
"vcmi.spellBook.search" : "Hledat",
"vcmi.spellBook.tab.hover" : "Kouzla: %s",
"vcmi.spellBook.tab.help" : "Otočit pro zobrazení %s kouzel",
"vcmi.spellResearch.canNotAfford" : "Nemáš dostatek prostředků na výměnu kouzla {%SPELL1} za {%SPELL2}. Můžeš ho však odstranit a pokračovat ve výzkumu.",
"vcmi.spellResearch.comeAgain" : "Výzkum už byl dnes proveden. Vrať se zítra.",
@@ -257,6 +262,276 @@
"vcmi.settingsMainWindow.adventureTab.hover" : "Mapa světa",
"vcmi.settingsMainWindow.adventureTab.help" : "Přepne na kartu nastavení mapy světa (mapa světa je sekce hry, ve které hráči mohou ovládat pohyb hrdinů).",
"vcmi.keyBindings.button.hover" : "Klávesové zkratky",
"vcmi.keyBindings.button.help" : "{Klávesové zkratky}\n\nOtevře nabídku pro zobrazení a úpravu klávesových zkratek",
"vcmi.keyBindings.editButton.help" : "Upravit klávesovou zkratku",
"vcmi.keyBindings.input" : "Změnit klávesovou zkratku pro {%s}.\n\nZadejte klávesu nebo jejich kombinaci. Klikněte mimo pro zrušení.",
"vcmi.keyBindings.inputSet" : "Klávesová zkratka pro {%s} bude změněna na {%s}.\n\nChcete ji přidat k existující, nebo nahradit?",
"vcmi.keyBindings.popup" : "Pro {%s} jsou nastaveny následující klávesy:\n\n",
"vcmi.keyBindings.reset" : "Obnovit",
"vcmi.keyBindings.reset.help" : "{Obnovit}\n\nObnoví výchozí klávesové zkratky",
"vcmi.keyBindings.resetConfirm" : "Chcete obnovit všechny klávesové zkratky na výchozí?",
"vcmi.keyBindings.group.keyboard" : "Klávesnice",
"vcmi.keyBindings.group.joystickAxes" : "Osy joysticku",
"vcmi.keyBindings.group.joystickButtons" : "Tlačítka joysticku",
"vcmi.keyBindings.keyBinding.adventureCastSpell" : "Mapa: seslat kouzlo",
"vcmi.keyBindings.keyBinding.adventureDigGrail" : "Mapa: kopat Grál",
"vcmi.keyBindings.keyBinding.adventureEndTurn" : "Mapa: ukončit tah",
"vcmi.keyBindings.keyBinding.adventureExitWorldView" : "Mapa: zavřít přehled království",
"vcmi.keyBindings.keyBinding.adventureFirstHero" : "Mapa: první hrdina",
"vcmi.keyBindings.keyBinding.adventureFirstTown" : "Mapa: první město",
"vcmi.keyBindings.keyBinding.adventureGameOptions" : "Mapa: nastavení hry",
"vcmi.keyBindings.keyBinding.adventureKingdomOverview" : "Mapa: přehled království",
"vcmi.keyBindings.keyBinding.adventureLoadGame" : "Mapa: načíst hru",
"vcmi.keyBindings.keyBinding.adventureMainMenu" : "Mapa: hlavní menu",
"vcmi.keyBindings.keyBinding.adventureMarketplace" : "Mapa: tržnice",
"vcmi.keyBindings.keyBinding.adventureMoveHero" : "Mapa: pohyb hrdiny",
"vcmi.keyBindings.keyBinding.adventureMoveHeroEE" : "Mapa: pohyb hrdiny VV",
"vcmi.keyBindings.keyBinding.adventureMoveHeroNE" : "Mapa: pohyb hrdiny SV",
"vcmi.keyBindings.keyBinding.adventureMoveHeroNN" : "Mapa: pohyb hrdiny SS",
"vcmi.keyBindings.keyBinding.adventureMoveHeroNW" : "Mapa: pohyb hrdiny SZ",
"vcmi.keyBindings.keyBinding.adventureMoveHeroSE" : "Mapa: pohyb hrdiny JV",
"vcmi.keyBindings.keyBinding.adventureMoveHeroSS" : "Mapa: pohyb hrdiny JJ",
"vcmi.keyBindings.keyBinding.adventureMoveHeroSW" : "Mapa: pohyb hrdiny JZ",
"vcmi.keyBindings.keyBinding.adventureMoveHeroWW" : "Mapa: pohyb hrdiny ZZ",
"vcmi.keyBindings.keyBinding.adventureNewGame" : "Mapa: nová hra",
"vcmi.keyBindings.keyBinding.adventureNextHero" : "Mapa: další hrdina",
"vcmi.keyBindings.keyBinding.adventureNextObject" : "Mapa: další objekt",
"vcmi.keyBindings.keyBinding.adventureNextTown" : "Mapa: další město",
"vcmi.keyBindings.keyBinding.adventureQuestLog" : "Mapa: seznam úkolů",
"vcmi.keyBindings.keyBinding.adventureQuitGame" : "Mapa: ukončit hru",
"vcmi.keyBindings.keyBinding.adventureReplayTurn" : "Mapa: přehrát tah",
"vcmi.keyBindings.keyBinding.adventureRestartGame" : "Mapa: restartovat hru",
"vcmi.keyBindings.keyBinding.adventureSaveGame" : "Mapa: uložit hru",
"vcmi.keyBindings.keyBinding.adventureSetHeroAsleep" : "Mapa: uspat hrdinu",
"vcmi.keyBindings.keyBinding.adventureSetHeroAwake" : "Mapa: probudit hrdinu",
"vcmi.keyBindings.keyBinding.adventureThievesGuild" : "Mapa: cech zlodějů",
"vcmi.keyBindings.keyBinding.adventureToggleGrid" : "Mapa: zapnout/vypnout mřížku",
"vcmi.keyBindings.keyBinding.adventureToggleVisitable" : "Mapa: zapnout/vypnout navštívitelné",
"vcmi.keyBindings.keyBinding.adventureToggleBlocked" : "Mapa: zapnout/vypnout blokované",
"vcmi.keyBindings.keyBinding.adventureToggleMapLevel" : "Mapa: přepnout úroveň mapy",
"vcmi.keyBindings.keyBinding.adventureToggleSleep" : "Mapa: přepnout spánek",
"vcmi.keyBindings.keyBinding.adventureTrackHero" : "Mapa: sledovat hrdinu",
"vcmi.keyBindings.keyBinding.adventureViewPuzzle" : "Mapa: zobrazit skládačku",
"vcmi.keyBindings.keyBinding.adventureViewScenario" : "Mapa: zobrazit scénář",
"vcmi.keyBindings.keyBinding.adventureViewSelected" : "Mapa: zobrazit vybraný objekt",
"vcmi.keyBindings.keyBinding.adventureViewWorld" : "Mapa: přehled světa",
"vcmi.keyBindings.keyBinding.adventureViewWorld1" : "Mapa: přehled světa 1",
"vcmi.keyBindings.keyBinding.adventureViewWorld2" : "Mapa: přehled světa 2",
"vcmi.keyBindings.keyBinding.adventureViewWorld4" : "Mapa: přehled světa 4",
"vcmi.keyBindings.keyBinding.adventureVisitObject" : "Mapa: navštívit objekt",
"vcmi.keyBindings.keyBinding.adventureZoomIn" : "Mapa: přiblížit",
"vcmi.keyBindings.keyBinding.adventureZoomOut" : "Mapa: oddálit",
"vcmi.keyBindings.keyBinding.adventureZoomReset" : "Mapa: resetovat přiblížení",
"vcmi.keyBindings.keyBinding.adventureSearch" : "Mapa: hledat",
"vcmi.keyBindings.keyBinding.adventureSearchContinue" : "Mapa: pokračovat v hledání",
"vcmi.keyBindings.keyBinding.battleAutocombat" : "Bitva: automatický boj",
"vcmi.keyBindings.keyBinding.battleAutocombatEnd" : "Bitva: ukončit automatický boj",
"vcmi.keyBindings.keyBinding.battleCastSpell" : "Bitva: seslat kouzlo",
"vcmi.keyBindings.keyBinding.battleConsoleDown" : "Bitva: konzole dolů",
"vcmi.keyBindings.keyBinding.battleConsoleUp" : "Bitva: konzole nahoru",
"vcmi.keyBindings.keyBinding.battleDefend" : "Bitva: bránit se",
"vcmi.keyBindings.keyBinding.battleOpenActiveUnit" : "Bitva: otevřít aktivní jednotku",
"vcmi.keyBindings.keyBinding.battleOpenHoveredUnit" : "Bitva: otevřít jednotku pod kurzorem",
"vcmi.keyBindings.keyBinding.battleRetreat" : "Bitva: útěk",
"vcmi.keyBindings.keyBinding.battleToggleQuickSpell" : "Bitva: přepnout rychlé kouzlo",
"vcmi.keyBindings.keyBinding.battleSpellShortcut0" : "Bitva: zkratka kouzla 0",
"vcmi.keyBindings.keyBinding.battleSpellShortcut1" : "Bitva: zkratka kouzla 1",
"vcmi.keyBindings.keyBinding.battleSpellShortcut2" : "Bitva: zkratka kouzla 2",
"vcmi.keyBindings.keyBinding.battleSpellShortcut3" : "Bitva: zkratka kouzla 3",
"vcmi.keyBindings.keyBinding.battleSpellShortcut4" : "Bitva: zkratka kouzla 4",
"vcmi.keyBindings.keyBinding.battleSpellShortcut5" : "Bitva: zkratka kouzla 5",
"vcmi.keyBindings.keyBinding.battleSpellShortcut6" : "Bitva: zkratka kouzla 6",
"vcmi.keyBindings.keyBinding.battleSpellShortcut7" : "Bitva: zkratka kouzla 7",
"vcmi.keyBindings.keyBinding.battleSpellShortcut8" : "Bitva: zkratka kouzla 8",
"vcmi.keyBindings.keyBinding.battleSpellShortcut9" : "Bitva: zkratka kouzla 9",
"vcmi.keyBindings.keyBinding.battleSpellShortcut10" : "Bitva: zkratka kouzla 10",
"vcmi.keyBindings.keyBinding.battleSpellShortcut11" : "Bitva: zkratka kouzla 11",
"vcmi.keyBindings.keyBinding.battleSurrender" : "Bitva: kapitulovat",
"vcmi.keyBindings.keyBinding.battleTacticsEnd" : "Bitva: konec taktiky",
"vcmi.keyBindings.keyBinding.battleTacticsNext" : "Bitva: další v taktice",
"vcmi.keyBindings.keyBinding.battleToggleHeroesStats" : "Bitva: přepnout statistiky hrdinů",
"vcmi.keyBindings.keyBinding.battleToggleQueue" : "Bitva: přepnout pořadí",
"vcmi.keyBindings.keyBinding.battleUseCreatureSpell" : "Bitva: použít schopnost jednotky",
"vcmi.keyBindings.keyBinding.battleWait" : "Bitva: čekat",
"vcmi.keyBindings.keyBinding.exchangeArmySwap" : "Výměna: prohodit armády",
"vcmi.keyBindings.keyBinding.exchangeArmyToLeft" : "Výměna: armáda doleva",
"vcmi.keyBindings.keyBinding.exchangeArmyToRight" : "Výměna: armáda doprava",
"vcmi.keyBindings.keyBinding.exchangeArtifactsSwap" : "Výměna: prohodit artefakty",
"vcmi.keyBindings.keyBinding.exchangeArtifactsToLeft" : "Výměna: artefakty doleva",
"vcmi.keyBindings.keyBinding.exchangeArtifactsToRight" : "Výměna: artefakty doprava",
"vcmi.keyBindings.keyBinding.exchangeBackpackLeft" : "Výměna: batoh doleva",
"vcmi.keyBindings.keyBinding.exchangeBackpackRight" : "Výměna: batoh doprava",
"vcmi.keyBindings.keyBinding.exchangeBackpackSwap" : "Výměna: prohodit batoh",
"vcmi.keyBindings.keyBinding.exchangeBackpackToLeft" : "Výměna: přesun batohu doleva",
"vcmi.keyBindings.keyBinding.exchangeBackpackToRight" : "Výměna: přesun batohu doprava",
"vcmi.keyBindings.keyBinding.exchangeEquippedSwap" : "Výměna: prohodit vybavení",
"vcmi.keyBindings.keyBinding.exchangeEquippedToLeft" : "Výměna: vybavení doleva",
"vcmi.keyBindings.keyBinding.exchangeEquippedToRight" : "Výměna: vybavení doprava",
"vcmi.keyBindings.keyBinding.gameActivateConsole" : "Hra: otevřít konzoli",
"vcmi.keyBindings.keyBinding.globalAccept" : "Obecné: potvrdit",
"vcmi.keyBindings.keyBinding.globalBackspace" : "Obecné: Backspace",
"vcmi.keyBindings.keyBinding.globalCancel" : "Obecné: zrušit",
"vcmi.keyBindings.keyBinding.globalFullscreen" : "Obecné: celá obrazovka",
"vcmi.keyBindings.keyBinding.globalMoveFocus" : "Obecné: přesunout zaměření",
"vcmi.keyBindings.keyBinding.globalOptions" : "Obecné: možnosti",
"vcmi.keyBindings.keyBinding.globalReturn" : "Obecné: Enter",
"vcmi.keyBindings.keyBinding.heroArmySplit" : "Hrdina: rozdělit armádu",
"vcmi.keyBindings.keyBinding.heroBackpack" : "Hrdina: batoh",
"vcmi.keyBindings.keyBinding.heroCommander" : "Hrdina: velitel",
"vcmi.keyBindings.keyBinding.heroCostumeLoad0" : "Hrdina: načíst předvolbu výbavy 0",
"vcmi.keyBindings.keyBinding.heroCostumeLoad1" : "Hrdina: načíst předvolbu výbavy 1",
"vcmi.keyBindings.keyBinding.heroCostumeLoad2" : "Hrdina: načíst předvolbu výbavy 2",
"vcmi.keyBindings.keyBinding.heroCostumeLoad3" : "Hrdina: načíst předvolbu výbavy 3",
"vcmi.keyBindings.keyBinding.heroCostumeLoad4" : "Hrdina: načíst předvolbu výbavy 4",
"vcmi.keyBindings.keyBinding.heroCostumeLoad5" : "Hrdina: načíst předvolbu výbavy 5",
"vcmi.keyBindings.keyBinding.heroCostumeLoad6" : "Hrdina: načíst předvolbu výbavy 6",
"vcmi.keyBindings.keyBinding.heroCostumeLoad7" : "Hrdina: načíst předvolbu výbavy 7",
"vcmi.keyBindings.keyBinding.heroCostumeLoad8" : "Hrdina: načíst předvolbu výbavy 8",
"vcmi.keyBindings.keyBinding.heroCostumeLoad9" : "Hrdina: načíst předvolbu výbavy 9",
"vcmi.keyBindings.keyBinding.heroCostumeSave0" : "Hrdina: uložit předvolbu výbavy 0",
"vcmi.keyBindings.keyBinding.heroCostumeSave1" : "Hrdina: uložit předvolbu výbavy 1",
"vcmi.keyBindings.keyBinding.heroCostumeSave2" : "Hrdina: uložit předvolbu výbavy 2",
"vcmi.keyBindings.keyBinding.heroCostumeSave3" : "Hrdina: uložit předvolbu výbavy 3",
"vcmi.keyBindings.keyBinding.heroCostumeSave4" : "Hrdina: uložit předvolbu výbavy 4",
"vcmi.keyBindings.keyBinding.heroCostumeSave5" : "Hrdina: uložit předvolbu výbavy 5",
"vcmi.keyBindings.keyBinding.heroCostumeSave6" : "Hrdina: uložit předvolbu výbavy 6",
"vcmi.keyBindings.keyBinding.heroCostumeSave7" : "Hrdina: uložit předvolbu výbavy 7",
"vcmi.keyBindings.keyBinding.heroCostumeSave8" : "Hrdina: uložit předvolbu výbavy 8",
"vcmi.keyBindings.keyBinding.heroCostumeSave9" : "Hrdina: uložit předvolbu výbavy 9",
"vcmi.keyBindings.keyBinding.heroDismiss" : "Hrdina: propustit",
"vcmi.keyBindings.keyBinding.heroLooseFormation" : "Hrdina: volná formace",
"vcmi.keyBindings.keyBinding.heroTightFormation" : "Hrdina: sevřená formace",
"vcmi.keyBindings.keyBinding.heroToggleTactics" : "Hrdina: přepnout taktiku",
"vcmi.keyBindings.keyBinding.highScoresCampaigns" : "Žebříčky: kampaně",
"vcmi.keyBindings.keyBinding.highScoresReset" : "Žebříčky: reset",
"vcmi.keyBindings.keyBinding.highScoresStatistics" : "Žebříčky: statistiky",
"vcmi.keyBindings.keyBinding.highScoresScenarios" : "Žebříčky: scénáře",
"vcmi.keyBindings.keyBinding.kingdomHeroesTab" : "Království: karta hrdinů",
"vcmi.keyBindings.keyBinding.kingdomTownsTab" : "Království: karta měst",
"vcmi.keyBindings.keyBinding.lobbyAdditionalOptions" : "Lobby: další volby",
"vcmi.keyBindings.keyBinding.lobbyBeginCampaign" : "Lobby: začít kampaň",
"vcmi.keyBindings.keyBinding.lobbyBeginStandardGame" : "Lobby: začít hru",
"vcmi.keyBindings.keyBinding.lobbyExtraOptions" : "Lobby: rozšířené volby",
"vcmi.keyBindings.keyBinding.lobbyFlipCoin" : "Lobby: hod mincí",
"vcmi.keyBindings.keyBinding.lobbyInvitePlayers" : "Lobby: pozvat hráče",
"vcmi.keyBindings.keyBinding.lobbyLoadGame" : "Lobby: načíst hru",
"vcmi.keyBindings.keyBinding.lobbyRandomMap" : "Lobby: náhodná mapa",
"vcmi.keyBindings.keyBinding.lobbyRandomTown" : "Lobby: náhodné město",
"vcmi.keyBindings.keyBinding.lobbyRandomTownVs" : "Lobby: náhodné město vs",
"vcmi.keyBindings.keyBinding.lobbyHandicap" : "Lobby: postih",
"vcmi.keyBindings.keyBinding.lobbyReplayVideo" : "Lobby: přehrát video",
"vcmi.keyBindings.keyBinding.lobbySaveGame" : "Lobby: uložit hru",
"vcmi.keyBindings.keyBinding.lobbySelectScenario" : "Lobby: vybrat scénář",
"vcmi.keyBindings.keyBinding.lobbyToggleChat" : "Lobby: přepnout chat",
"vcmi.keyBindings.keyBinding.lobbyTurnOptions" : "Lobby: volby tahu",
"vcmi.keyBindings.keyBinding.mainMenuBack" : "Hlavní menu: zpět",
"vcmi.keyBindings.keyBinding.mainMenuCampaign" : "Hlavní menu: kampaň",
"vcmi.keyBindings.keyBinding.mainMenuCampaignAb" : "Hlavní menu: kampaň AB",
"vcmi.keyBindings.keyBinding.mainMenuCampaignCustom" : "Hlavní menu: vlastní kampaň",
"vcmi.keyBindings.keyBinding.mainMenuCampaignRoe" : "Hlavní menu: kampaň RoE",
"vcmi.keyBindings.keyBinding.mainMenuCampaignSod" : "Hlavní menu: kampaň SoD",
"vcmi.keyBindings.keyBinding.mainMenuCampaignChr" : "Hlavní menu: kampaň Kroniky",
"vcmi.keyBindings.keyBinding.mainMenuCampaignHota" : "Hlavní menu: kampaň HotA",
"vcmi.keyBindings.keyBinding.mainMenuCampaignWog" : "Hlavní menu: kampaň WoG",
"vcmi.keyBindings.keyBinding.mainMenuCampaignVCMI" : "Hlavní menu: kampaň VCMI",
"vcmi.keyBindings.keyBinding.mainMenuCredits" : "Hlavní menu: autoři",
"vcmi.keyBindings.keyBinding.mainMenuHighScores" : "Hlavní menu: žebříčky",
"vcmi.keyBindings.keyBinding.mainMenuHostGame" : "Hlavní menu: hostovat hru",
"vcmi.keyBindings.keyBinding.mainMenuHotseat" : "Hlavní menu: horké křeslo",
"vcmi.keyBindings.keyBinding.mainMenuJoinGame" : "Hlavní menu: připojit se",
"vcmi.keyBindings.keyBinding.mainMenuLoadGame" : "Hlavní menu: načíst hru",
"vcmi.keyBindings.keyBinding.mainMenuLobby" : "Hlavní menu: lobby",
"vcmi.keyBindings.keyBinding.mainMenuMultiplayer" : "Hlavní menu: hra více hráčů",
"vcmi.keyBindings.keyBinding.mainMenuNewGame" : "Hlavní menu: nová hra",
"vcmi.keyBindings.keyBinding.mainMenuQuit" : "Hlavní menu: ukončit",
"vcmi.keyBindings.keyBinding.mainMenuSingleplayer" : "Hlavní menu: hra jednoho hráče",
"vcmi.keyBindings.keyBinding.mainMenuTutorial" : "Hlavní menu: výuka",
"vcmi.keyBindings.keyBinding.mapsSizeAll" : "Mapy: všechny velikosti",
"vcmi.keyBindings.keyBinding.mapsSizeL" : "Mapy: velikost L",
"vcmi.keyBindings.keyBinding.mapsSizeM" : "Mapy: velikost M",
"vcmi.keyBindings.keyBinding.mapsSizeS" : "Mapy: velikost S",
"vcmi.keyBindings.keyBinding.mapsSizeXl" : "Mapy: velikost XL",
"vcmi.keyBindings.keyBinding.mapsSortChangedate" : "Mapy: seřadit podle data změny",
"vcmi.keyBindings.keyBinding.mapsSortDefeat" : "Mapy: seřadit podle porážky",
"vcmi.keyBindings.keyBinding.mapsSortFormat" : "Mapy: seřadit podle formátu",
"vcmi.keyBindings.keyBinding.mapsSortMaps" : "Mapy: seřadit podle map",
"vcmi.keyBindings.keyBinding.mapsSortName" : "Mapy: seřadit podle názvu",
"vcmi.keyBindings.keyBinding.mapsSortPlayers" : "Mapy: seřadit podle hráčů",
"vcmi.keyBindings.keyBinding.mapsSortSize" : "Mapy: seřadit podle velikosti",
"vcmi.keyBindings.keyBinding.mapsSortVictory" : "Mapy: seřadit podle vítězství",
"vcmi.keyBindings.keyBinding.marketArtifactExperience" : "Trh: artefakty za zkušenosti",
"vcmi.keyBindings.keyBinding.marketArtifactResource" : "Trh: artefakty za suroviny",
"vcmi.keyBindings.keyBinding.marketCreatureExperience" : "Trh: jednotky za zkušenosti",
"vcmi.keyBindings.keyBinding.marketCreatureResource" : "Trh: jednotky za suroviny",
"vcmi.keyBindings.keyBinding.marketDeal" : "Trh: obchod",
"vcmi.keyBindings.keyBinding.marketMaxAmount" : "Trh: maximální množství",
"vcmi.keyBindings.keyBinding.marketResourceArtifact" : "Trh: suroviny za artefakty",
"vcmi.keyBindings.keyBinding.marketResourcePlayer" : "Trh: suroviny od hráče",
"vcmi.keyBindings.keyBinding.marketResourceResource" : "Trh: směna surovin",
"vcmi.keyBindings.keyBinding.marketSacrificeAll" : "Trh: obětovat vše",
"vcmi.keyBindings.keyBinding.marketSacrificeBackpack" : "Trh: obětovat batoh",
"vcmi.keyBindings.keyBinding.moveDown" : "Pohyb: dolů",
"vcmi.keyBindings.keyBinding.moveFirst" : "Pohyb: první",
"vcmi.keyBindings.keyBinding.moveLast" : "Pohyb: poslední",
"vcmi.keyBindings.keyBinding.moveLeft" : "Pohyb: doleva",
"vcmi.keyBindings.keyBinding.movePageDown" : "Pohyb: stránka dolů",
"vcmi.keyBindings.keyBinding.movePageUp" : "Pohyb: stránka nahoru",
"vcmi.keyBindings.keyBinding.moveRight" : "Pohyb: doprava",
"vcmi.keyBindings.keyBinding.moveUp" : "Pohyb: nahoru",
"vcmi.keyBindings.keyBinding.recruitmentMax" : "Nábor: maximum",
"vcmi.keyBindings.keyBinding.recruitmentMin" : "Nábor: minimum",
"vcmi.keyBindings.keyBinding.recruitmentSwitchLevel" : "Nábor: změnit úroveň",
"vcmi.keyBindings.keyBinding.recruitmentUpgrade" : "Nábor: vylepšit",
"vcmi.keyBindings.keyBinding.recruitmentUpgradeAll" : "Nábor: vylepšit vše",
"vcmi.keyBindings.keyBinding.selectIndex1" : "Výběr: index 1",
"vcmi.keyBindings.keyBinding.selectIndex2" : "Výběr: index 2",
"vcmi.keyBindings.keyBinding.selectIndex3" : "Výběr: index 3",
"vcmi.keyBindings.keyBinding.selectIndex4" : "Výběr: index 4",
"vcmi.keyBindings.keyBinding.selectIndex5" : "Výběr: index 5",
"vcmi.keyBindings.keyBinding.selectIndex6" : "Výběr: index 6",
"vcmi.keyBindings.keyBinding.selectIndex7" : "Výběr: index 7",
"vcmi.keyBindings.keyBinding.selectIndex8" : "Výběr: index 8",
"vcmi.keyBindings.keyBinding.settingsLoadGame" : "Nastavení: načíst hru",
"vcmi.keyBindings.keyBinding.settingsNewGame" : "Nastavení: nová hra",
"vcmi.keyBindings.keyBinding.settingsQuitGame" : "Nastavení: ukončit hru",
"vcmi.keyBindings.keyBinding.settingsRestartGame" : "Nastavení: restartovat hru",
"vcmi.keyBindings.keyBinding.settingsSaveGame" : "Nastavení: uložit hru",
"vcmi.keyBindings.keyBinding.settingsToMainMenu" : "Nastavení: do hlavního menu",
"vcmi.keyBindings.keyBinding.spectateSkipBattle" : "Divák: přeskočit bitvu",
"vcmi.keyBindings.keyBinding.spectateSkipBattleResult" : "Divák: přeskočit výsledek bitvy",
"vcmi.keyBindings.keyBinding.spectateTrackHero" : "Divák: sledovat hrdinu",
"vcmi.keyBindings.keyBinding.spellbookTabAdventure" : "Kniha kouzel: karta dobrodružství",
"vcmi.keyBindings.keyBinding.spellbookTabCombat" : "Kniha kouzel: karta boje",
"vcmi.keyBindings.keyBinding.spellbookSearchFocus" : "Kniha kouzel: hledání",
"vcmi.keyBindings.keyBinding.townOpenFort" : "Město: pevnost",
"vcmi.keyBindings.keyBinding.townOpenGarrisonedHero" : "Město: hrdina v posádce",
"vcmi.keyBindings.keyBinding.townOpenHall" : "Město: radnice",
"vcmi.keyBindings.keyBinding.townOpenHero" : "Město: hrdina",
"vcmi.keyBindings.keyBinding.townOpenHeroExchange" : "Město: výměna hrdinů",
"vcmi.keyBindings.keyBinding.townOpenMageGuild" : "Město: věž kouzel",
"vcmi.keyBindings.keyBinding.townOpenMarket" : "Město: tržnice",
"vcmi.keyBindings.keyBinding.townOpenRecruitment" : "Město: nábor",
"vcmi.keyBindings.keyBinding.townOpenTavern" : "Město: putyka",
"vcmi.keyBindings.keyBinding.townOpenThievesGuild" : "Město: cech zlodějů",
"vcmi.keyBindings.keyBinding.townOpenVisitingHero" : "Město: hrdina na návštěvě",
"vcmi.keyBindings.keyBinding.townSwapArmies" : "Město: prohodit armády",
"vcmi.keyBindings.keyBinding.listHeroUp" : "Seznam: hrdina nahoru",
"vcmi.keyBindings.keyBinding.listHeroDown" : "Seznam: hrdina dolů",
"vcmi.keyBindings.keyBinding.listHeroTop" : "Seznam: první hrdina",
"vcmi.keyBindings.keyBinding.listHeroBottom" : "Seznam: poslední hrdina",
"vcmi.keyBindings.keyBinding.listHeroDismiss" : "Seznam: propustit hrdinu",
"vcmi.keyBindings.keyBinding.listTownUp" : "Seznam: město nahoru",
"vcmi.keyBindings.keyBinding.listTownDown" : "Seznam: město dolů",
"vcmi.keyBindings.keyBinding.listTownTop" : "Seznam: první město",
"vcmi.keyBindings.keyBinding.listTownBottom" : "Seznam: poslední město",
"vcmi.keyBindings.keyBinding.mouseCursorX" : "Myš: kurzor X",
"vcmi.keyBindings.keyBinding.mouseCursorY" : "Myš: kurzor Y",
"vcmi.keyBindings.keyBinding.mouseSwipeX" : "Myš: gesto X",
"vcmi.keyBindings.keyBinding.mouseSwipeY" : "Myš: gesto Y",
"vcmi.keyBindings.keyBinding.mouseClickLeft" : "Myš: levé tlačítko",
"vcmi.keyBindings.keyBinding.mouseClickRight" : "Myš: pravé tlačítko",
"vcmi.systemOptions.videoGroup" : "Nastavení obrazu",
"vcmi.systemOptions.audioGroup" : "Nastavení zvuku",
"vcmi.systemOptions.otherGroup" : "Ostatní nastavení", // unused right now
@@ -311,6 +586,8 @@
"vcmi.systemOptions.longTouchMenu.hover" : "Vybrat dobu dlouhého podržení",
"vcmi.systemOptions.longTouchMenu.help" : "Změnit dobu dlouhého podržení.",
"vcmi.systemOptions.longTouchMenu.entry" : "%d milisekund",
"vcmi.systemOptions.performanceOverlayButton.hover" : "Zobrazit stavové okno",
"vcmi.systemOptions.performanceOverlayButton.help" : "{Zobrazit stavové okno}\n\nPřepíná zobrazení stavového okna s údaji, jako jsou snímky za sekundu, čas a stav baterie (pokud je dostupný) v rohu herního okna.",
"vcmi.systemOptions.hapticFeedbackButton.hover" : "Vibrace",
"vcmi.systemOptions.hapticFeedbackButton.help" : "{Vibrace}\n\nPřepnout stav vibrací při dotykovém ovládání.",
"vcmi.systemOptions.enableUiEnhancementsButton.hover" : "Vylepšení rozhraní",
@@ -380,8 +657,8 @@
"vcmi.battleOptions.endWithAutocombat.help" : "{Přeskočit bitvu}\n\nAutomatický boj okamžitě dohraje bitvu do konce.",
"vcmi.battleOptions.showQuickSpell.hover" : "Zobrazit rychlý panel kouzel",
"vcmi.battleOptions.showQuickSpell.help" : "{Zobrazit rychlý panel kouzel}\n\nZobrazí panel pro rychlý výběr kouzel.",
"vcmi.battleOptions.showHealthBar.hover": "Zobrazit ukazatel zdraví",
"vcmi.battleOptions.showHealthBar.help": "{Zobrazit ukazatel zdraví}\n\nZobrazí ukazatel, který znázorňuje, kolik zdraví zbývá, než jednotka zemře.",
"vcmi.battleOptions.showHealthBar.hover" : "Zobrazit ukazatel zdraví",
"vcmi.battleOptions.showHealthBar.help" : "{Zobrazit ukazatel zdraví}\n\nZobrazí ukazatel, který znázorňuje, kolik zdraví zbývá, než jednotka zemře.",
"vcmi.adventureMap.revisitObject.hover" : "Znovu navštívit objekt",
"vcmi.adventureMap.revisitObject.help" : "{Znovu navštívit objekt}\n\nPokud hrdina právě stojí na objektu na mapě, může toto místo znovu navštívit.",
@@ -415,6 +692,36 @@
"vcmi.battleResultsWindow.spellDurationRemaining.1" : "Zbývající trvání: %d kolo boje",
"vcmi.battleResultsWindow.spellDurationRemaining.2" : "Zbývající trvání: %d kola boje",
"vcmi.credits.website" : "Internetové stránky",
"vcmi.credits.vcmi" : "VCMI",
"vcmi.credits.heroes" : "Heroes III",
"vcmi.credits.idea" : "Nápad",
"vcmi.credits.developing" : "Vývoj",
"vcmi.credits.testing" : "Testování",
"core.credits.createdBy" : "Vytvořili",
"core.credits.executiveProducer" : "Výkonný producent",
"core.credits.producer" : "Producent",
"core.credits.director" : "Režisér",
"core.credits.designers" : "Designéři",
"core.credits.leadProgrammers" : "Vedoucí programátoři",
"core.credits.programmers" : "Programátoři",
"core.credits.installerProgrammer" : "Programátor instalátoru",
"core.credits.leadArtists" : "Vedoucí výtvarníci",
"core.credits.artists" : "Výtvarníci",
"core.credits.assetCoordinator" : "Koordinátor prostředků",
"core.credits.levelDesigners" : "Návrháři úrovní",
"core.credits.musicProducer" : "Hudební producent",
"core.credits.townThemes" : "Motivy měst",
"core.credits.music" : "Hudba",
"core.credits.soundDesign" : "Zvukový design",
"core.credits.voiceProduction" : "Produkce dabingu",
"core.credits.voiceTalent" : "Hlasy",
"core.credits.leadTester" : "Vedoucí tester",
"core.credits.seniorTester" : "Hlavní tester",
"core.credits.testers" : "Testeři",
"core.credits.specialThanks" : "Zvláštní poděkování",
"core.credits.visitUsOnTheWeb" : "Navštivte nás na internetu",
"vcmi.tutorialWindow.title" : "Úvod ovládání dotykem",
"vcmi.tutorialWindow.decription.RightClick" : "Klepněte a držte prvek, na který byste chtěli použít pravé tlačítko myši. Klepněte na volnou oblast pro zavření.",
"vcmi.tutorialWindow.decription.MapPanning" : "Klepněte a držte jedním prstem pro posouvání mapy.",
@@ -458,6 +765,7 @@
"vcmi.heroWindow.sortBackpackByClass.hover" : "Seřadit podle třídy",
"vcmi.heroWindow.sortBackpackByClass.help" : "{Seřadit podle třídy}\n\nSeřadí artefakty v batohu podle třídy artefaktu. Poklad, Menší, Větší, Relikvie.",
"vcmi.heroWindow.fusingArtifact.fusing" : "Máte všechny potřebné části k vytvoření %s. Chcete provést sloučení? {Při sloučení budou použity všechny části.}",
"vcmi.heroWindow.lockedartifact.hover" : "Obsazeno artefaktem %s",
"vcmi.tavernWindow.inviteHero" : "Pozvat hrdinu",
@@ -644,6 +952,11 @@
"creatures.core.marksman.bonus.extraAttack" : "{Střílí dvakrát}\nTato jednotka může vystřelit dvakrát za kolo",
"creatures.core.azureDragon.bonus.fearful" : "{Strach}\nVyvolává strach u nepřátelské jednotky",
"creatures.core.azureDragon.bonus.fearless" : "{Nebojácnost}\nImunní vůči schopnosti Strach",
"creatures.core.halfling.bonus.lucky" : "{Štěstí}\nŠtěstí hobita nemůže být sníženo pod +1",
"creatures.core.nomad.bonus.sandWalker" : "{Chodec po písku}\nHrdina ignoruje postih za pohyb v písku",
"creatures.core.rogue.bonus.visionsMonsters" : "{Vize jednotek}\nHrdina vidí podrobné informace o neutrálních jednotkách",
"creatures.core.rogue.bonus.visionsHeroes" : "{Vize hrdinů}\nHrdina vidí podrobné informace o nepřátelských hrdinech",
"creatures.core.rogue.bonus.visionsTowns" : "{Vize měst}\nHrdina vidí podrobné informace o nepřátelských městech",
"core.bonus.ADDITIONAL_ATTACK.description" : "{Dvojitý útok}\nÚtočí dvakrát", // TODO: alternative descriptions for melee/ranged effect range
"core.bonus.ADDITIONAL_RETALIATION.description" : "{Další odvetné útoky}\nMůže odvetně zaútočit ${val} krát navíc",
@@ -728,6 +1041,7 @@
"core.bonus.SUMMON_GUARDIANS.description" : "{Přivolání ochránců}\nNa začátku bitvy přivolá ${subtype.creature} (${val}%)",
"core.bonus.THREE_HEADED_ATTACK.description" : "{Tříhlavý útok}\nÚtočí na tři sousední jednotky",
"core.bonus.TRANSMUTATION.description" : "{Transmutace}\n${val}% šance na přeměnu napadené jednotky na jiný typ",
"core.bonus.TRANSMUTATION_IMMUNITY.description" : "{Transmutační imunita}\nTato jednotka nemůže být přeměněna na jiný typ nepřátelským útokem",
"core.bonus.TWO_HEX_ATTACK_BREATH.description" : "{Dech}\nÚtok dechem (dosah 2 polí)",
"core.bonus.UNDEAD.description" : "{Nemrtvý}\nJednotka je nemrtvá",
"core.bonus.UNLIMITED_RETALIATIONS.description" : "{Neomezené odvetné útoky}\nMůže provést neomezený počet odvetných útoků",
@@ -764,5 +1078,10 @@
"spell.core.deathCloud.description.none" : "{Smrtící mrak}\n\nKromě cílového pole zasáhne smrtící mrak i všech 6 sousedních polí a způsobí poškození všem živým jednotkám v dosahu.",
"spell.core.thunderbolt.description.none" : "{Úder blesku}\n\nPři útoku má jednotka 20% šanci vyvolat blesk ještě před nepřátelským protiútokem. Blesk způsobí poškození rovnající se desetinásobku počtu útočících hromových ptáků.",
"spell.core.dispelHelpful.description.none" : "{Ruší kladná kouzla}\n\nOdstraní všechny pozitivní kouzelné efekty z cílové jednotky.",
"spell.core.acidBreath.description.none" : "{Kyselina}\n\nDech sníží obranu cílové jednotky o 3 body a má 20% šanci způsobit dodatečné poškození ve výši 25 bodů za každou útočící jednotku."
"spell.core.acidBreath.description.none" : "{Kyselina}\n\nDech sníží obranu cílové jednotky o 3 body a má 20% šanci způsobit dodatečné poškození ve výši 25 bodů za každou útočící jednotku.",
"spellSchool.core.air.name" : "Vdušných",
"spellSchool.core.earth.name" : "Zemských",
"spellSchool.core.fire.name" : "Ohnivých",
"spellSchool.core.water.name" : "Vodních"
}

View File

@@ -31,7 +31,9 @@
android:label="${applicationLabel}"
android:testOnly="false"
android:supportsRtl="true"
android:usesCleartextTraffic="false">
android:usesCleartextTraffic="false"
android:theme="@style/AppTheme"
>
<activity
android:name=".ActivityLauncher"
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
@@ -42,7 +44,7 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts${applicationVariant}" />
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
<meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
<meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>

View File

@@ -3,9 +3,13 @@ buildscript {
repositories {
google()
mavenCentral()
maven {
url 'https://www.jitpack.io'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:8.11.0'
classpath 'com.github.zellius:android-shortcut-gradle-plugin:0.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View File

@@ -7,7 +7,6 @@
android:shortcutLongLabel="@string/shortcut_play">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="is.xyz.vcmi"
android:targetClass="eu.vcmi.vcmi.VcmiSDLActivity" />
</shortcut>
</shortcuts>

View File

@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'com.github.zellius.shortcut-helper'
android {
/*******************************************************
@@ -36,8 +37,6 @@ android {
versionCode 1700
versionName "1.7.0"
setProperty("archivesBaseName", "vcmi")
}
sourceSets {
@@ -102,6 +101,9 @@ android {
}
}
base.archivesName = "vcmi"
shortcutHelper.filePath = "../shortcuts.xml"
def SigningPropertiesPath(final basePath, final signingConfigKey) {
return file("${basePath}/${signingConfigKey}.properties")
}
@@ -147,6 +149,9 @@ def LoadSigningConfig(final signingConfigKey) {
dependencies {
implementation fileTree(dir: '../libs', include: ['*.jar', '*.aar'])
implementation 'androidx.annotation:annotation:1.7.1'
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation('androidx.annotation:annotation:1.9.1')
// later versions require API level 21
implementation('androidx.appcompat:appcompat:1.6.1')
implementation('androidx.documentfile:documentfile:1.0.1')
}

View File

@@ -6,6 +6,8 @@ import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.view.Window;
import android.view.WindowManager;
import androidx.annotation.Nullable;
@@ -55,6 +57,14 @@ public class ActivityLauncher extends org.qtproject.qt5.android.bindings.QtActiv
startActivityForResult(intent, PICK_EXTERNAL_VCMI_DATA_TO_COPY);
}
public void keepScreenOn(boolean isEnabled)
{
if(isEnabled)
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
else
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
public void onLaunchGameBtnPressed()
{
startActivity(new Intent(ActivityLauncher.this, VcmiSDLActivity.class));

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="@style/Theme.AppCompat.DayNight.NoActionBar">
<!-- for Android 15 + SDK 35 -->
<item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
</style>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="@style/Theme.AppCompat.NoActionBar" />
</resources>

View File

@@ -1,13 +0,0 @@
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="play"
android:enabled="true"
android:icon="@mipmap/ic_launcher"
android:shortcutShortLabel="@string/shortcut_play"
android:shortcutLongLabel="@string/shortcut_play">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="is.xyz.vcmi.daily"
android:targetClass="eu.vcmi.vcmi.VcmiSDLActivity" />
</shortcut>
</shortcuts>

View File

@@ -1,13 +0,0 @@
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="play"
android:enabled="true"
android:icon="@mipmap/ic_launcher"
android:shortcutShortLabel="@string/shortcut_play"
android:shortcutLongLabel="@string/shortcut_play">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="is.xyz.vcmi.debug"
android:targetClass="eu.vcmi.vcmi.VcmiSDLActivity" />
</shortcut>
</shortcuts>

View File

@@ -335,7 +335,13 @@ CMainMenu::CMainMenu()
menu = std::make_shared<CMenuScreen>(CMainMenuConfig::get().getConfig()["window"]);
OBJECT_CONSTRUCTION;
backgroundAroundMenu = std::make_shared<CFilledTexture>(ImagePath::builtin("DIBOXBCK"), pos);
const auto& bgConfig = CMainMenuConfig::get().getConfig()["backgroundAround"];
if (bgConfig.isString())
backgroundAroundMenu = std::make_shared<CFilledTexture>(ImagePath::fromJson(bgConfig), pos);
else
backgroundAroundMenu = std::make_shared<CFilledTexture>(ImagePath::builtin("DIBOXBCK"), pos);
}
CMainMenu::~CMainMenu() = default;

View File

@@ -1854,7 +1854,7 @@ std::string CBuildWindow::getTextForState(EBuildingState state)
case EBuildingState::ALREADY_PRESENT:
case EBuildingState::CANT_BUILD_TODAY:
case EBuildingState::NO_RESOURCES:
ret.replace(ret.find_first_of("%s"), 2, building->getNameTranslated());
boost::algorithm::replace_first(ret, "%s", building->getNameTranslated());
break;
case EBuildingState::ALLOWED:
return LIBRARY->generaltexth->allTexts[219]; //all prereq. are met

View File

@@ -118,6 +118,18 @@ function(vcmi_print_git_commit_hash)
endfunction()
# install(FILES) of shared libs but using symlink instead of copying
function(vcmi_install_libs_symlink libs)
install(CODE "
foreach(lib ${libs})
cmake_path(GET lib FILENAME filename)
file(CREATE_LINK \${lib} \"\${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/\${filename}\"
COPY_ON_ERROR SYMBOLIC
)
endforeach()
")
endfunction()
# install dependencies from Conan, CONAN_RUNTIME_LIBS_FILE is set in conanfile.py
function(vcmi_install_conan_deps)
if(NOT USING_CONAN)
@@ -125,7 +137,11 @@ function(vcmi_install_conan_deps)
endif()
file(STRINGS "${CONAN_RUNTIME_LIBS_FILE}" runtimeLibs)
install(FILES ${runtimeLibs} DESTINATION ${LIB_DIR})
if(ANDROID)
vcmi_install_libs_symlink("${runtimeLibs}")
else()
install(FILES ${runtimeLibs} DESTINATION ${LIB_DIR})
endif()
endfunction()
function(vcmi_deploy_qt deployQtToolName deployQtOptions)

View File

@@ -1,5 +1,8 @@
{
//images used in game selection screen
// Image around main menu
"backgroundAround" : "diboxbck",
// Images used in game selection screen
"scenario-selection" :
{
"background" : ["gamselb0", "gamselb1"],
@@ -35,17 +38,17 @@
},
//Multiplayer selection image
// Multiplayer selection image
"multiplayer" : ["mumap"],
//Main menu window, consists of several sub-menus aka items
// Main menu window, consists of several sub-menus aka items
"window":
{
//"scalable" : true, //background will be scaled to screen size
//"scalable" : true, // Background will be scaled to screen size
"background" : ["gamselbk"],
//"video" : {"x": 8, "y": 105, "name":"CREDITS.SMK" },//Floating WoG logo. Disabled due to different position in various versions of H3.
//"video" : {"x": 8, "y": 105, "name":"CREDITS.SMK" }, // Floating WoG logo. Disabled due to different position in various versions of H3.
// Additional images
//"images":

View File

@@ -4,6 +4,7 @@ add_library(iOS_utils SHARED
)
target_link_libraries(iOS_utils PRIVATE
"-framework Foundation"
"-framework UIKit"
)
target_include_directories(iOS_utils PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@@ -27,5 +27,6 @@ const char *frameworksPath();
const char *bundleIdentifier();
bool isOsVersionAtLeast(unsigned int osMajorVersion);
void keepScreenOn(bool isEnabled);
}
#pragma GCC visibility pop

View File

@@ -11,6 +11,7 @@
#include "iOS_utils.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
namespace
{
@@ -51,4 +52,9 @@ bool isOsVersionAtLeast(unsigned int osMajorVersion)
{
return NSProcessInfo.processInfo.operatingSystemVersion.majorVersion >= osMajorVersion;
}
void keepScreenOn(bool isEnabled)
{
UIApplication.sharedApplication.idleTimerDisabled = isEnabled ? YES : NO;
}
}

View File

@@ -445,10 +445,12 @@ void FirstLaunchView::extractGogDataAsync(QString filePathBin, QString filePathE
if(errorText.isEmpty())
{
logGlobal->info("Performing extraction using innoextract...");
Helper::keepScreenOn(true);
errorText = Innoextract::extract(tmpFileExe, tempDir.path(), [this](float progress) {
ui->progressBarGog->setValue(progress * 100);
qApp->processEvents();
});
Helper::keepScreenOn(false);
logGlobal->info("Extraction done!");
}

View File

@@ -26,6 +26,7 @@
#ifdef VCMI_IOS
#include "ios/revealdirectoryinfiles.h"
#include "iOS_utils.h"
#endif
#ifdef VCMI_MOBILE
@@ -89,8 +90,19 @@ QString getRealPath(QString path)
void performNativeCopy(QString src, QString dst)
{
#ifdef VCMI_ANDROID
auto srcStr = QAndroidJniObject::fromString(src);
auto dstStr = QAndroidJniObject::fromString(dst);
// %-encode unencoded parts of string.
// This is needed because Qt returns a mixed content url with %-encoded and unencoded parts. On Android >= 13 this causes problems reading these files, when using spaces and unicode characters in folder or filename.
// Only these should be encoded (other typically %-encoded chars should not be encoded because this leads to errors).
// Related, but seems not completly fixed (at least in our setup): https://bugreports.qt.io/browse/QTBUG-114435
auto safeEncode = [&](QString uri) -> QString
{
if(!uri.startsWith("content://", Qt::CaseInsensitive))
return uri;
return QString::fromUtf8(QUrl::toPercentEncoding(uri, "!#$&'()*+,/:;=?@[]<>{}\"`^~%"));
};
auto srcStr = QAndroidJniObject::fromString(safeEncode(src));
auto dstStr = QAndroidJniObject::fromString(safeEncode(dst));
QAndroidJniObject::callStaticObjectMethod("eu/vcmi/vcmi/util/FileUtil", "copyFileFromUri", "(Ljava/lang/String;Ljava/lang/String;Landroid/content/Context;)V", srcStr.object<jstring>(), dstStr.object<jstring>(), QtAndroid::androidContext().object());
#else
QFile::copy(src, dst);
@@ -114,4 +126,17 @@ MainWindow * getMainWindow()
return mainWin;
return nullptr;
}
void keepScreenOn(bool isEnabled)
{
#if defined(VCMI_ANDROID)
QtAndroid::runOnAndroidThread([isEnabled]
{
QtAndroid::androidActivity().callMethod<void>("keepScreenOn", "(Z)V", isEnabled);
});
#elif defined(VCMI_IOS)
iOS_utils::keepScreenOn(isEnabled);
#endif
}
}

View File

@@ -23,4 +23,5 @@ QString getRealPath(QString path);
void performNativeCopy(QString src, QString dst);
void revealDirectoryInFileBrowser(QString path);
MainWindow * getMainWindow();
void keepScreenOn(bool isEnabled);
}

View File

@@ -793,6 +793,7 @@ void CModListView::downloadFile(QString file, QUrl url, QString description, qin
ui->progressBar->setFormat(progressBarFormat);
}
Helper::keepScreenOn(true);
dlManager->downloadFile(url, file, sizeBytes);
}
@@ -852,6 +853,7 @@ void CModListView::downloadFinished(QStringList savedFiles, QStringList failedFi
if(doInstallFiles)
installFiles(savedFiles);
Helper::keepScreenOn(false);
hideProgressBar();
}
@@ -980,6 +982,8 @@ void CModListView::installFiles(QStringList files)
float prog = 0.0;
Helper::keepScreenOn(true);
auto futureExtract = std::async(std::launch::async, [this, exe, &prog]()
{
ChroniclesExtractor ce(this, [&prog](float progress) { prog = progress; });
@@ -995,6 +999,7 @@ void CModListView::installFiles(QStringList files)
if(futureExtract.get())
{
Helper::keepScreenOn(false);
hideProgressBar();
ui->abortButton->setEnabled(true);
ui->progressWidget->setVisible(false);
@@ -1233,6 +1238,7 @@ void CModListView::on_abortButton_clicked()
{
delete dlManager;
dlManager = nullptr;
Helper::keepScreenOn(false);
hideProgressBar();
}

View File

@@ -419,18 +419,20 @@ void CVCMIServer::clientConnected(std::shared_ptr<GameConnection> c, std::vector
si->mode = mode;
}
logNetwork->info("Connection with client %d established. UUID: %s", static_cast<int>(c->connectionID), c->uuid);
auto connID = static_cast<int>(c->connectionID);
logNetwork->info("Connection with client %d established. UUID: %s", connID, c->uuid);
PlayerConnectionID id = currentPlayerId;
for(auto & name : names)
{
logNetwork->info("Client %d player: %s", static_cast<int>(c->connectionID), name);
PlayerConnectionID id = vstd::next(currentPlayerId, 1);
logNetwork->info("Client %d player: %s", connID, name);
ClientPlayer cp;
cp.connection = c->connectionID;
cp.name = name;
playerNames.try_emplace(id, cp);
announceTxt(boost::str(boost::format("%s (pid %d cid %d) joins the game") % name % static_cast<int>(id) % static_cast<int>(c->connectionID)));
announceTxt(boost::str(boost::format("%s (pid %d cid %d) joins the game") % name % static_cast<int>(id) % connID));
//put new player in first slot with AI
for(auto & elem : si->playerInfos)
@@ -441,6 +443,7 @@ void CVCMIServer::clientConnected(std::shared_ptr<GameConnection> c, std::vector
break;
}
}
id = vstd::next(id, 1);
}
}