mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Merge pull request #96 from parithon/develop
Add a Github Action and Installer
This commit is contained in:
commit
1d0c0ac19c
107
.github/workflows/release.yml
vendored
Normal file
107
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
name: Release Pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: [ '*' ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Set up Python 3.8
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.8
|
||||||
|
|
||||||
|
- name: Install environment
|
||||||
|
run: |
|
||||||
|
py -m venv ./venv
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
./venv/scripts/activate
|
||||||
|
pip install -r requirements.txt
|
||||||
|
# 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: Build binaries
|
||||||
|
run: |
|
||||||
|
./venv/scripts/activate
|
||||||
|
$env:PYTHONPATH=".;./pydcs"
|
||||||
|
pyinstaller pyinstaller.spec
|
||||||
|
|
||||||
|
- name: Create Installer
|
||||||
|
env:
|
||||||
|
TAG_NAME: ${{ github.ref }}
|
||||||
|
run: |
|
||||||
|
$version = ($env:TAG_NAME -split "/") | Select-Object -Last 1
|
||||||
|
(Get-Content .\installer\dcs_liberation.iss) -replace "{{version}}",$version | Out-File .\build\installer.iss
|
||||||
|
cd .\installer
|
||||||
|
iscc.exe ..\build\installer.iss
|
||||||
|
cd ..
|
||||||
|
Copy-Item .\changelog.md .\dist
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: dcs_liberation
|
||||||
|
path: dist/
|
||||||
|
|
||||||
|
release:
|
||||||
|
needs: [ build ]
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: dcs_liberation
|
||||||
|
|
||||||
|
- name: "Get Version"
|
||||||
|
id: version
|
||||||
|
env:
|
||||||
|
TAG_NAME: ${{ github.ref }}
|
||||||
|
run: |
|
||||||
|
Get-ChildItem -Recurse -Depth 1
|
||||||
|
$version = ($env:TAG_NAME -split "/") | Select-Object -Last 1
|
||||||
|
$prerelease = ("2.1.1-alpha3" -match '[^\.\d]').ToString().ToLower()
|
||||||
|
Write-Host $version
|
||||||
|
Write-Host $prerelease
|
||||||
|
Write-Output "::set-output name=number::$version"
|
||||||
|
Write-Output "::set-output name=prerelease::$prerelease"
|
||||||
|
$changelog = Get-Content .\changelog.md
|
||||||
|
$last_change = ($changelog | Select-String -Pattern "^#\s" | Select-Object -Skip 1 -First 1).LineNumber - 2
|
||||||
|
($changelog | Select-Object -First $last_change) -join "`n" | Out-File .\releasenotes.md
|
||||||
|
Compress-Archive -Path .\dcs_liberation -DestinationPath "dcs_liberation.$version.zip" -Compression Optimal
|
||||||
|
|
||||||
|
- uses: actions/create-release@v1
|
||||||
|
id: create_release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: ${{ github.ref }}
|
||||||
|
body_path: releasenotes.md
|
||||||
|
draft: false
|
||||||
|
prerelease: ${{ steps.version.outputs.prerelease }}
|
||||||
|
|
||||||
|
- uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./dcs_liberation.exe
|
||||||
|
asset_name: dcs_liberation.${{ steps.version.outputs.number }}.exe
|
||||||
|
asset_content_type: application/exe
|
||||||
|
|
||||||
|
- uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./dcs_liberation.${{ steps.version.outputs.number }}.zip
|
||||||
|
asset_name: dcs_liberation.${{ steps.version.outputs.number }}.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
||||||
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[submodule "pydcs"]
|
||||||
|
path = pydcs
|
||||||
|
url = https://github.com/pydcs/dcs
|
||||||
|
branch = master
|
||||||
@ -1,12 +1,11 @@
|
|||||||
# 2.1.1
|
# 2.1.1
|
||||||
|
|
||||||
## Features/Improvements :
|
## Features/Improvements :
|
||||||
|
* **[Other]** Added an installer option (thanks to contributor parithon)
|
||||||
* **[Units/Factions]** Added F-16C to USA 1990
|
* **[Units/Factions]** Added F-16C to USA 1990
|
||||||
* **[Units/Factions]** Added MQ-9 Reaper as CAS unit for USA 2005
|
* **[Units/Factions]** Added MQ-9 Reaper as CAS unit for USA 2005
|
||||||
* **[Units/Factions]** Added Mig-21, Mig-23, SA-342L to Syria 2011
|
* **[Units/Factions]** Added Mig-21, Mig-23, SA-342L to Syria 2011
|
||||||
|
|
||||||
|
|
||||||
## Fixed issues :
|
## Fixed issues :
|
||||||
* **[UI/UX]** Spelling issues (Thanks to Github contributor steveveepee)
|
* **[UI/UX]** Spelling issues (Thanks to Github contributor steveveepee)
|
||||||
* **[Campaign Generator]** LHA was placed on land in Syrian Civil War campaign
|
* **[Campaign Generator]** LHA was placed on land in Syrian Civil War campaign
|
||||||
@ -16,7 +15,6 @@
|
|||||||
* **[Mission Generator]** Fixed F-16C targeting pod not being added to payload
|
* **[Mission Generator]** Fixed F-16C targeting pod not being added to payload
|
||||||
* **[Mission Generator]** AH-64A and AH-64D payloads fix.
|
* **[Mission Generator]** AH-64A and AH-64D payloads fix.
|
||||||
|
|
||||||
|
|
||||||
# 2.1.0
|
# 2.1.0
|
||||||
|
|
||||||
## Features/Improvements :
|
## Features/Improvements :
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import inspect
|
import inspect
|
||||||
import dcs
|
from pydcs import dcs
|
||||||
|
|
||||||
DEFAULT_AVAILABLE_BUILDINGS = ['fuel', 'ammo', 'comms', 'oil', 'ware', 'farp', 'fob', 'power', 'factory', 'derrick', 'aa']
|
DEFAULT_AVAILABLE_BUILDINGS = ['fuel', 'ammo', 'comms', 'oil', 'ware', 'farp', 'fob', 'power', 'factory', 'derrick', 'aa']
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import logging
|
import logging
|
||||||
import typing
|
import typing
|
||||||
import pdb
|
import pdb
|
||||||
import dcs
|
from pydcs import dcs
|
||||||
|
|
||||||
from random import randint
|
from random import randint
|
||||||
from dcs import Mission
|
from dcs import Mission
|
||||||
|
|||||||
BIN
installer/ISCC.exe
Normal file
BIN
installer/ISCC.exe
Normal file
Binary file not shown.
51
installer/dcs_liberation.iss
Normal file
51
installer/dcs_liberation.iss
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
; Script generated by the Inno Setup Script Wizard.
|
||||||
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||||
|
|
||||||
|
#define MyAppName "DCS Liberation"
|
||||||
|
#define MyAppVersion "{{version}}"
|
||||||
|
#define MyAppPublisher "Khopa"
|
||||||
|
#define MyAppURL "https://github.com/Khopa/dcs_liberation/wiki"
|
||||||
|
#define MyAppExeName "liberation_main.exe"
|
||||||
|
|
||||||
|
[Setup]
|
||||||
|
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
|
||||||
|
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||||
|
AppId={{6753B352-D281-42CB-9AFA-5E93EB90AA5A}
|
||||||
|
AppName={#MyAppName}
|
||||||
|
AppVersion={#MyAppVersion}
|
||||||
|
;AppVerName={#MyAppName} {#MyAppVersion}
|
||||||
|
AppPublisher={#MyAppPublisher}
|
||||||
|
AppPublisherURL={#MyAppURL}
|
||||||
|
AppSupportURL={#MyAppURL}
|
||||||
|
AppUpdatesURL={#MyAppURL}
|
||||||
|
DefaultDirName={autopf}\{#MyAppName}
|
||||||
|
DefaultGroupName={#MyAppName}
|
||||||
|
AllowNoIcons=yes
|
||||||
|
; Remove the following line to run in administrative install mode (install for all users.)
|
||||||
|
PrivilegesRequired=lowest
|
||||||
|
PrivilegesRequiredOverridesAllowed=dialog
|
||||||
|
OutputDir=..\dist
|
||||||
|
OutputBaseFilename=dcs_liberation
|
||||||
|
SetupIconFile=..\resources\icon.ico
|
||||||
|
UninstallDisplayIcon={app}\liberation_main.exe
|
||||||
|
Compression=lzma
|
||||||
|
SolidCompression=yes
|
||||||
|
WizardStyle=modern
|
||||||
|
|
||||||
|
[Languages]
|
||||||
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
|
[Tasks]
|
||||||
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
Source: "..\dist\dcs_liberation\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||||
|
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||||
|
|
||||||
|
[Run]
|
||||||
|
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||||
|
|
||||||
1
pydcs
Submodule
1
pydcs
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit dcc3d846316af2925c93ae09840c3ab4a1150e59
|
||||||
@ -4,7 +4,7 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import dcs
|
from pydcs import dcs
|
||||||
from PySide2 import QtWidgets
|
from PySide2 import QtWidgets
|
||||||
from PySide2.QtGui import QPixmap
|
from PySide2.QtGui import QPixmap
|
||||||
from PySide2.QtWidgets import QApplication, QSplashScreen
|
from PySide2.QtWidgets import QApplication, QSplashScreen
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
pydcs>=0.9.10
|
#pydcs>=0.9.10
|
||||||
Pyside2>=5.13.0
|
Pyside2>=5.13.0
|
||||||
pyinstaller==3.6
|
pyinstaller==3.6
|
||||||
pyproj==2.6.1.post1
|
pyproj==2.6.1.post1
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import dcs
|
from pydcs import dcs
|
||||||
|
|
||||||
from game import db
|
from game import db
|
||||||
from gen.aircraft import AircraftConflictGenerator
|
from gen.aircraft import AircraftConflictGenerator
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import typing
|
import typing
|
||||||
|
|
||||||
import dcs
|
from pydcs import dcs
|
||||||
from dcs.mapping import Point
|
from dcs.mapping import Point
|
||||||
|
|
||||||
from .controlpoint import ControlPoint
|
from .controlpoint import ControlPoint
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
|
|
||||||
import dcs
|
from pydcs import dcs
|
||||||
|
|
||||||
from userdata import persistency
|
from userdata import persistency
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user