From 4b407399182b1889d72a590baafff0d80625348c Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sat, 14 Nov 2020 12:37:22 -0800 Subject: [PATCH 1/5] Fix versioning for release builds. (cherry picked from commit 9019cbfd2b715c35da10ad7ed79d44ab81e57052) --- .github/workflows/release.yml | 4 ++++ game/version.py | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 21806ed4..5580f694 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,10 @@ jobs: # For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force + - name: Finalize version + run: | + New-Item -ItemType file final + - name: mypy game run: | ./venv/scripts/activate diff --git a/game/version.py b/game/version.py index b9b97187..bdcbdded 100644 --- a/game/version.py +++ b/game/version.py @@ -1,8 +1,17 @@ from pathlib import Path +def _build_version_string() -> str: + components = ["2.2.0"] + if Path("buildnumber").exists(): + with open("buildnumber", "r") as file: + components.append(file.readline()) + + if not Path("final").exists(): + components.append("preview") + + return "-".join(components) + + #: Current version of Liberation. -VERSION = "2.2.0" -if Path("buildnumber").exists(): - with open("buildnumber", "r") as file: - VERSION += f"-{file.readline()}" +VERSION = _build_version_string() From 2891649531d98d67f228f5f5fbf627e905e04ac6 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sat, 14 Nov 2020 13:01:11 -0800 Subject: [PATCH 2/5] Fix pyinstaller spec for release. final and buildnumber are optional files. Move them into resources to avoid naming them explicitly. (cherry picked from commit fae9650f56854bb3f3508ee5b2625bba8e7ad2f8) --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 2 +- game/version.py | 9 +++++---- pyinstaller.spec | 1 - 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 71d5cf3c..60cbf719 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: - name: update build number run: | - [IO.File]::WriteAllLines($pwd.path + "\buildnumber", $env:GITHUB_RUN_NUMBER) + [IO.File]::WriteAllLines($pwd.path + "\resources\buildnumber", $env:GITHUB_RUN_NUMBER) - name: Build binaries run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5580f694..ca8a238e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: - name: Finalize version run: | - New-Item -ItemType file final + New-Item -ItemType file resources\final - name: mypy game run: | diff --git a/game/version.py b/game/version.py index bdcbdded..f3b1d1f4 100644 --- a/game/version.py +++ b/game/version.py @@ -3,11 +3,12 @@ from pathlib import Path def _build_version_string() -> str: components = ["2.2.0"] - if Path("buildnumber").exists(): - with open("buildnumber", "r") as file: - components.append(file.readline()) + build_number_path = Path("resources/buildnumber") + if build_number_path.exists(): + with build_number_path.open("r") as build_number_file: + components.append(build_number_file.readline()) - if not Path("final").exists(): + if not Path("resources/final").exists(): components.append("preview") return "-".join(components) diff --git a/pyinstaller.spec b/pyinstaller.spec index e545d073..839c641f 100644 --- a/pyinstaller.spec +++ b/pyinstaller.spec @@ -11,7 +11,6 @@ analysis = Analysis( ('resources', 'resources'), ('resources/caucasus.p', 'dcs/terrain/'), ('resources/nevada.p', 'dcs/terrain/'), - ('buildnumber', './') ], hookspath=[], runtime_hooks=[], From fc11182bbed2935d8cee4a123f72d859de771723 Mon Sep 17 00:00:00 2001 From: Emanuele Garofalo Date: Sun, 13 Dec 2020 12:29:58 +0100 Subject: [PATCH 3/5] Update db.py added some plane missing from the db --- game/db.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/game/db.py b/game/db.py index c73f7dbf..7bbc9a81 100644 --- a/game/db.py +++ b/game/db.py @@ -46,6 +46,7 @@ from dcs.planes import ( F_117A, F_14A_135_GR, F_14B, + F_111F, F_15C, F_15E, F_16A, @@ -61,6 +62,7 @@ from dcs.planes import ( Ju_88A4, KC130, KC_135, + KC135MPRS, KJ_2000, L_39C, L_39ZA, @@ -250,7 +252,7 @@ PRICES = { FW_190A8: 14, A_20G: 22, Ju_88A4: 24, - + F_5E_3: 8, MiG_15bis: 4, MiG_19P: 6, @@ -311,7 +313,8 @@ PRICES = { Tu_160: 50, Tu_22M3: 40, Tu_95MS: 35, - + F_111F: 21, + # special IL_76MD: 30, An_26B: 25, @@ -321,6 +324,7 @@ PRICES = { IL_78M: 25, KC_135: 25, KC130: 25, + KC135MPRS: 25, A_50: 50, KJ_2000: 50, @@ -609,6 +613,7 @@ UNIT_BY_TASK = { A_10C_2, A_20G, B_17G, + F_111F, B_1B, B_52H, F_117A, @@ -660,8 +665,13 @@ UNIT_BY_TASK = { KC_135, KC130, S_3B_Tanker, + KC135MPRS, + ], + AWACS: [ + E_3A, + A_50, + KJ_2000 ], - AWACS: [E_3A, A_50, KJ_2000], PinpointStrike: [ Armor.APC_MTLB, Armor.APC_MTLB, @@ -999,6 +1009,7 @@ PLANE_PAYLOAD_OVERRIDES: Dict[Type[PlaneType], Dict[Type[Task], str]] = { F_14A_135_GR: COMMON_OVERRIDE, F_14B: COMMON_OVERRIDE, F_15C: COMMON_OVERRIDE, + F_111F: COMMON_OVERRIDE, F_16C_50: COMMON_OVERRIDE, JF_17: COMMON_OVERRIDE, M_2000C: COMMON_OVERRIDE, From 48d6b4cfa189e9782368acafc059554e7542ad6f Mon Sep 17 00:00:00 2001 From: Emanuele Garofalo Date: Sun, 13 Dec 2020 12:33:21 +0100 Subject: [PATCH 4/5] Add files via upload New faction NATO desert Storm --- resources/factions/NATO Desert Storm.json | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 resources/factions/NATO Desert Storm.json diff --git a/resources/factions/NATO Desert Storm.json b/resources/factions/NATO Desert Storm.json new file mode 100644 index 00000000..b339dba9 --- /dev/null +++ b/resources/factions/NATO Desert Storm.json @@ -0,0 +1,103 @@ +{ + "country": "Combined Joint Task Forces Blue", + "name": "NATO Desert Storm", + "authors": "Hawkmoon", + "description": "

A A faction to recreate the actual unit lineup during Desert Storm as closely as possible

", + "aircrafts": [ + "F_15C", + "F_14A", + "F_15E", + "F_16C_50", + "FA_18C_hornet", + "M_2000C", + "A_10A", + "AV8BNA", + "UH_1H", + "AH_64A", + "B_52H", + "B_1B", + "Tornado_IDS", + "F_111F", + "F_4E", + "F_117A", + "M_2000C", + "S_3B", + "SA342M", + "SA342L", + "SA342Mistral", + "OH_58D" + ], + "awacs": [ + "E_3A", + "E_2C", + ], + "tankers": [ + "KC_135", + "KC135MPRS" + ], + "frontline_units": [ + "MBT_M1A2_Abrams", + "ATGM_M1134_Stryker", + "IFV_M2A2_Bradley", + "APC_M1126_Stryker_ICV", + "IFV_LAV_25", + "APC_M1043_HMMWV_Armament", + "ATGM_M1045_HMMWV_TOW" + "TPz_Fuchs" + "IFV_MCV_80" + "MBT_Challenger_II" + "MBT_M60A3_Patton" + "SPG_M1128_Stryker_MGS" + ], + "artillery_units": [ + "MLRS_M270", + "SPH_M109_Paladin" + ], + "logistics_units": [ + "Transport_M818" + ], + "infantry_units": [ + "Infantry_M4", + "Soldier_M249" + ], + "shorads": [ + "AvengerGenerator", + "ChaparralGenerator", + "VulcanGenerator", + "RolandGenerator" + ], + "sams": [ + "HawkGenerator", + "PatriotGenerator", + "RapierGenerator" + "RolandGenerator" + ], + "ewrs": [ + "PatriotEwrGenerator" + ], + "aircraft_carrier": [ + "CVN_74_John_C__Stennis" + ], + "helicopter_carrier": [ + "LHA_1_Tarawa" + ], + "destroyers": [ + "OliverHazardPerryGroupGenerator" + ], + "cruisers": [ + "Ticonderoga_class" + ], + "requirements": {}, + "carrier_names": [ + "CVN-71 Theodore Roosevelt", + ], + "helicopter_carrier_names": [ + "LHA-1 Tarawa", + "LHA-4 Nassau", + ], + "navy_generators": [ + "OliverHazardPerryGroupGenerator" + ], + "has_jtac": true, + "jtac_unit": "MQ_9_Reaper" +} From 4b0fc637ebfb1b3d9623a4c42d5db2570633ac88 Mon Sep 17 00:00:00 2001 From: Emanuele Garofalo Date: Sun, 13 Dec 2020 12:43:47 +0100 Subject: [PATCH 5/5] Update NATO Desert Storm.json syntax error --- resources/factions/NATO Desert Storm.json | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/factions/NATO Desert Storm.json b/resources/factions/NATO Desert Storm.json index b339dba9..03542c58 100644 --- a/resources/factions/NATO Desert Storm.json +++ b/resources/factions/NATO Desert Storm.json @@ -9,7 +9,6 @@ "F_15E", "F_16C_50", "FA_18C_hornet", - "M_2000C", "A_10A", "AV8BNA", "UH_1H",