Skip to content

Commit

Permalink
Add elm327-emulator.exe in the Release folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Ircama committed Aug 13, 2024
1 parent 4375853 commit 6a808f8
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build Workflow for elm327-emulator.exe/zip

on:
push:
tags:
- "v*.*.*"

jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'

- name: Install Python Requirements
run: |
python -m pip install --upgrade pip
#pip install git+https://github.com/pyinstaller/pyinstaller@develop
pip install pyinstaller
pip install .
- name: Create wrapper
run: |
echo "import sys
from elm import main
sys.exit(main())" > elm327-emulator.py
shell: pwsh

- name: Run PyInstaller to produce the exe file
run: |
python -m PyInstaller --onefile elm327-emulator.py --name elm327-emulator --collect-all elm
- name: Zip the elm327-emulator.exe asset to elm327-emulator.zip
run: |
Compress-Archive dist/elm327-emulator.exe dist/elm327-emulator.zip
shell: pwsh

- name: Generate Changelog
run: >
echo "The *elm327-emulator.exe* executable file in the
*elm327-emulator.zip* archive within the assets below is
auto-generated by a [GitHub Action](.github/workflows/build.yml)."
> ${{ github.workspace }}-CHANGELOG.txt
- name: Create Release, uploading the elm327-emulator.zip asset
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: ${{ github.workspace }}-CHANGELOG.txt
files: dist/elm327-emulator.zip
append_body: true
generate_release_notes: true
2 changes: 1 addition & 1 deletion .github/workflows/python-syntax-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
# version range and latest minor release (possibly 3.9.1)
python-version: [3.6, 3.7, 3.8, '3.x']
python-version: [3.7, 3.8, '3.x']

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ python3 -m elm -n 35000

All subsequent information is not needed for basic usage of the tool and allows mastering *ELM327-emulator*, exploiting it to test specific features including the simulation of communication exceptions, which are not always easy to be reproduced with a real link.

# Running the pre-built executable program

The *elm327-emulator.zip* archive in the [Releases](https://github.com/Ircama/elm327-emulator/releases/latest) folder incudes the *elm327-emulator.exe* executable asset; the ZIP archive is auto-generated by a [GitHub Action](.github/workflows/build.yml). *elm327-emulator.exe* is a Windows application that can be directly executed.

# Compatibility

*ELM327-emulator* has been tested with Python 3.6, 3.7, 3.8, 3.9. Previous Python versions are not supported.
Expand Down
2 changes: 2 additions & 0 deletions elm/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,11 @@ def print_topics(self, header, cmds, cmdlen, maxcol):
if self.args.batch_mode:
return
self.stdout.write(

"Available commands include the following list (type help <topic>"
"\nfor more information on each command). Besides, any Python"
"\ncommand is accepted. Autocompletion is fully allowed."
"\nVisit https://github.com/Ircama/ELM327-emulator for additional info."
"\n=============================================================="
"==\n")
self.columnize(cmds, maxcol-1)
Expand Down

0 comments on commit 6a808f8

Please sign in to comment.