Fix CI and Github action.

This commit is contained in:
Mikaël Capelle
2020-10-31 17:46:18 +01:00
parent 7c2cc5216e
commit 41ac867b08
8 changed files with 41 additions and 53 deletions
+8 -2
View File
@@ -230,7 +230,10 @@ class BasicGameMappings:
self.gameName = BasicGameMapping(game, "GameName", "gameName")
self.gameShortName = BasicGameMapping(game, "GameShortName", "gameShortName")
self.gameNexusName = BasicGameMapping(
game, "GameNexusName", "gameNexusName", default=lambda g: g.gameShortName(),
game,
"GameNexusName",
"gameNexusName",
default=lambda g: g.gameShortName(),
)
self.validShortNames = BasicGameMapping(
game,
@@ -246,7 +249,10 @@ class BasicGameMappings:
)
self.binaryName = BasicGameMapping(game, "GameBinary", "binaryName")
self.launcherName = BasicGameMapping(
game, "GameLauncher", "getLauncherName", default=lambda g: "",
game,
"GameLauncher",
"getLauncherName",
default=lambda g: "",
)
self.dataDirectory = BasicGameMapping(game, "GameDataPath", "dataDirectory")
self.documentsDirectory = BasicGameMapping(
+1 -1
View File
@@ -13,7 +13,7 @@ class BasicIniGame(BasicGame):
# Read the file:
config = configparser.ConfigParser()
config.optionxform = str
config.optionxform = str # type: ignore
config.read(path)
# Just fill the class with values:
-4
View File
@@ -1,9 +1,5 @@
# -*- encoding: utf-8 -*-
from PyQt5.QtCore import QDir, QFileInfo, QStandardPaths
import mobase
from ..basic_game import BasicGame
-5
View File
@@ -1,10 +1,6 @@
# -*- encoding: utf-8 -*-
import mobase
from ..basic_game import BasicGame
from ..basic_features import BasicGameSaveGameInfo
class MirrorsEdgeGame(BasicGame):
@@ -20,4 +16,3 @@ class MirrorsEdgeGame(BasicGame):
GameGogId = 1893001152
GameBinary = "Binaries/MirrorsEdge.exe"
GameDataPath = "TdGame"
+4 -2
View File
@@ -72,7 +72,8 @@ class MountAndBladeIIGame(BasicGame):
mobase.ExecutableInfo(
"Mount & Blade II: Bannerlord",
QFileInfo(
self.gameDirectory(), "bin/Win64_Shipping_Client/Bannerlord.exe",
self.gameDirectory(),
"bin/Win64_Shipping_Client/Bannerlord.exe",
),
),
mobase.ExecutableInfo(
@@ -85,7 +86,8 @@ class MountAndBladeIIGame(BasicGame):
mobase.ExecutableInfo(
"Mount & Blade II: Bannerlord (BE)",
QFileInfo(
self.gameDirectory(), "bin/Win64_Shipping_Client/Bannerlord_BE.exe",
self.gameDirectory(),
"bin/Win64_Shipping_Client/Bannerlord_BE.exe",
),
),
]
+22 -24
View File
@@ -8,10 +8,11 @@ import mobase
from ..basic_game import BasicGame
class StalkerAnomalyModDataChecker(mobase.ModDataChecker):
def __init__(self):
super().__init__()
def dataLooksValid(
self, tree: mobase.IFileTree
) -> mobase.ModDataChecker.CheckReturn:
@@ -20,6 +21,7 @@ class StalkerAnomalyModDataChecker(mobase.ModDataChecker):
else:
return mobase.ModDataChecker.INVALID
class StalkerAnomalyGame(BasicGame, mobase.IPluginFileMapper):
Name = "STALKER Anomaly"
Author = "Qudix"
@@ -30,14 +32,14 @@ class StalkerAnomalyGame(BasicGame, mobase.IPluginFileMapper):
GameShortName = "stalkeranomaly"
GameBinary = "AnomalyLauncher.exe"
GameDataPath = ""
GameSaveExtension = "scop"
GameSavesDirectory = "%GAME_PATH%/appdata/savedgames"
def __init__(self):
BasicGame.__init__(self)
mobase.IPluginFileMapper.__init__(self)
def init(self, organizer: mobase.IOrganizer):
BasicGame.init(self, organizer)
self._featureMap[mobase.ModDataChecker] = StalkerAnomalyModDataChecker()
@@ -46,49 +48,45 @@ class StalkerAnomalyGame(BasicGame, mobase.IPluginFileMapper):
def executables(self):
return [
mobase.ExecutableInfo(
"Anomaly Launcher",
QFileInfo(self.gameDirectory(), "AnomalyLauncher.exe")
"Anomaly Launcher",
QFileInfo(self.gameDirectory(), "AnomalyLauncher.exe"),
),
mobase.ExecutableInfo(
"Anomaly (DX11-AVX)",
QFileInfo(self.gameDirectory(), "bin/AnomalyDX11AVX.exe")
"Anomaly (DX11-AVX)",
QFileInfo(self.gameDirectory(), "bin/AnomalyDX11AVX.exe"),
),
mobase.ExecutableInfo(
"Anomaly (DX11)",
QFileInfo(self.gameDirectory(), "bin/AnomalyDX11.exe")
"Anomaly (DX11)", QFileInfo(self.gameDirectory(), "bin/AnomalyDX11.exe")
),
mobase.ExecutableInfo(
"Anomaly (DX10-AVX)",
QFileInfo(self.gameDirectory(), "bin/AnomalyDX10AVX.exe")
"Anomaly (DX10-AVX)",
QFileInfo(self.gameDirectory(), "bin/AnomalyDX10AVX.exe"),
),
mobase.ExecutableInfo(
"Anomaly (DX10)",
QFileInfo(self.gameDirectory(), "bin/AnomalyDX10.exe")
"Anomaly (DX10)", QFileInfo(self.gameDirectory(), "bin/AnomalyDX10.exe")
),
mobase.ExecutableInfo(
"Anomaly (DX9-AVX)",
QFileInfo(self.gameDirectory(), "bin/AnomalyDX9AVX.exe")
"Anomaly (DX9-AVX)",
QFileInfo(self.gameDirectory(), "bin/AnomalyDX9AVX.exe"),
),
mobase.ExecutableInfo(
"Anomaly (DX9)",
QFileInfo(self.gameDirectory(), "bin/AnomalyDX9.exe")
"Anomaly (DX9)", QFileInfo(self.gameDirectory(), "bin/AnomalyDX9.exe")
),
mobase.ExecutableInfo(
"Anomaly (DX8-AVX)",
QFileInfo(self.gameDirectory(), "bin/AnomalyDX8AVX.exe")
"Anomaly (DX8-AVX)",
QFileInfo(self.gameDirectory(), "bin/AnomalyDX8AVX.exe"),
),
mobase.ExecutableInfo(
"Anomaly (DX8)",
QFileInfo(self.gameDirectory(), "bin/AnomalyDX8.exe")
)
"Anomaly (DX8)", QFileInfo(self.gameDirectory(), "bin/AnomalyDX8.exe")
),
]
def mappings(self) -> List[mobase.Mapping]:
self.gameDirectory().mkdir("appdata")
m = mobase.Mapping()
m.createTarget = True
m.isDirectory = True
m.source = self.gameDirectory().filePath("appdata")
m.destination = self.gameDirectory().filePath("appdata")
return [m]
return [m]
+4 -13
View File
@@ -1,11 +1,5 @@
# -*- encoding: utf-8 -*-
from PyQt5.QtCore import QDir, QFileInfo, QStandardPaths
from pathlib import Path
import mobase
from ..basic_game import BasicGame
@@ -20,11 +14,8 @@ class TheBindingOfIsaacRebirthGame(BasicGame):
GameNexusId = 1293
GameSteamId = 250900
GameBinary = "isaac-ng.exe"
GameDocumentsDirectory = str(Path(QStandardPaths.writableLocation(QStandardPaths.HomeLocation)).joinpath("Documents", "My Games", "Binding of Isaac Afterbirth+"))
GameDataPath = str(Path(QStandardPaths.writableLocation(QStandardPaths.HomeLocation)).joinpath("Documents", "My Games", "Binding of Isaac Afterbirth+ Mods"))
GameDocumentsDirectory = "%DOCUMENTS%/My Games/Binding of Isaac Afterbirth+"
GameDataPath = "%DOCUMENTS%/My Games/Binding of Isaac Afterbirth+ Mods"
def iniFiles(self):
return [
"options.ini"
]
return ["options.ini"]
+2 -2
View File
@@ -20,5 +20,5 @@ deps =
flake8
flake8-black
commands =
black --check --diff setup.py deel tests
flake8 deel tests
black --check --diff .
flake8 .