Skip to content

Commit

Permalink
Update to version 1.1.0
Browse files Browse the repository at this point in the history
- Source code for libraries
- Decoder workaround for BPT messages
- Linux support
- GitHub Pipelines
- Improved error handling
  • Loading branch information
TGruett authored and adoebber committed Mar 13, 2024
1 parent 82035c3 commit f596899
Show file tree
Hide file tree
Showing 174 changed files with 392,243 additions and 744 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: dsV2Gshark Build

on:
workflow_dispatch:

jobs:
build-windows:

runs-on: windows-2022

steps:
- uses: actions/checkout@v4

- name: Install Dependencies
run: choco install wireshark

- name: Build All
run: Build_Installer.bat
shell: cmd
working-directory: ./Installer

- name: Upload Win64 Installer
uses: actions/upload-artifact@v4
with:
name: dsV2Gshark_Installer_Win_x64
path: |
./Installer/Output/*
- name: Prepare Artifact Directory
run: |
mkdir artifact_dir
cp ./V2G_Libraries/CertificateInfos/bin/* ./artifact_dir/
cp ./V2G_Libraries/V2GDecoder/bin/* ./artifact_dir/
mkdir artifact_dir/plugins
cp ./Wireshark/plugins/* ./artifact_dir/plugins/
echo "dSPACE V2Gshark Wireshark Plugin" > ./artifact_dir/README
echo "Please copy these files to your Wireshark installation." >> ./artifact_dir/README
- name: Upload Win64 Files
uses: actions/upload-artifact@v4
with:
name: dsV2Gshark_Files_Win_x64
path: artifact_dir/*

build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build Libraries
run: |
chmod +x ./build_all_linux.sh
./build_all_linux.sh
working-directory: ./V2G_Libraries/

- name: Prepare Artifact Directory
run: |
mkdir artifact_dir
cp ./V2G_Libraries/CertificateInfos/bin/* ./artifact_dir/
cp ./V2G_Libraries/V2GDecoder/bin/* ./artifact_dir/
mkdir artifact_dir/plugins
cp ./Wireshark/plugins/* ./artifact_dir/plugins/
echo "dSPACE V2Gshark Wireshark Plugin" > ./artifact_dir/README
echo "Please copy these files to your Wireshark installation." >> ./artifact_dir/README
- name: Upload Linux Files
uses: actions/upload-artifact@v4
with:
name: dsV2Gshark_Files_Linux_x86_64
path: artifact_dir/*
86 changes: 86 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build All",
"detail": "",
"type": "shell",
"command": "./Build_Installer.bat",
"problemMatcher": [],
"options": {
"cwd": "Installer",
"kind": "build",
},
},
{
"label": "Update Version (interactive)",
"detail": "",
"type": "shell",
"command": "./update_version.bat",
"problemMatcher": [],
"options": {
"cwd": ".",
"kind": "build",
},
},
{
"label": "Open Installer Dir",
"detail": "",
"type": "shell",
"command": "explorer .",
"problemMatcher": [],
"options": {
"cwd": "Installer/output",
},
},
{
"label": "WSL: Build Linux",
"detail": "",
"type": "shell",
"command": "wsl sh ./build_all_linux.sh",
"problemMatcher": [],
"options": {
"cwd": "V2G_Libraries",
"kind": "build",
},
},
{
"label": "Clean All",
"dependsOn": ["Clean Decoder", "Clean CertInfos"],
"group": {
"isDefault": true
}
},
{
"label": "Clean Decoder",
"detail": "",
"type": "shell",
"command": "make",
"args": ["clean"],
"options": {
"cwd": "V2G_Libraries/V2GDecoder",
},
},
{
"label": "Clean CertInfos",
"detail": "",
"type": "shell",
"command": "make",
"args": ["clean"],
"options": {
"cwd": "V2G_Libraries/CertificateInfos",
},
},
{
"label": "WSL: Install build-deps",
"detail": "",
"type": "shell",
"command": "wsl sudo apt-get install make gcc g++",
"problemMatcher": [],
"options": {
"cwd": "V2G_Libraries",
"kind": "build",
},
},
]
}
37 changes: 37 additions & 0 deletions Installer/Build_Installer.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
:: Script to build DLLs and create Installer. Should be run in MinGW Bash (e.g. git-bash)
:: note: Inno Setup must be installed and added to Path

@echo off
:: create DLLs
cd "%~dp0../V2G_Libraries/"
call build_all_win.bat
if %ERRORLEVEL% NEQ 0 goto :failed
copy "CertificateInfos\bin\v2gX509CertInfos.dll" "%~dp0..\Wireshark\"
if %ERRORLEVEL% NEQ 0 goto :failed
copy "V2GDecoder\bin\v2gLuaDecoder.dll" "%~dp0..\Wireshark\"
if %ERRORLEVEL% NEQ 0 goto :failed

:: prepare installer readme
cd "%~dp0"
set "README_REPO=..\README.md"
set "README_INSTALLER=dsV2Gshark_README.txt"
findstr /V /B /C:"![" /C:"[![" %README_REPO% > %README_INSTALLER%

:: create installer
cd "%~dp0"
call iscc.exe InstallerScript.iss
if %ERRORLEVEL% NEQ 0 goto :failed
move "%README_INSTALLER%" "%~dp0Output\%README_INSTALLER%"

goto :success

:failed
cd "%~dp0"
echo An error occured!
pause
exit /B 1

:success
echo SUCCESS
pause
cd "%~dp0"
Loading

0 comments on commit f596899

Please sign in to comment.