Skip to content

Commit 29a653b

Browse files
committed
Merge branch 'viewer'
* viewer: Implement BUILD_WIN_STANDALONE option for Windows standalone builds Install library dependencies for Windows builds Add placeholder input and checkbox tooltips for emv-viewer Add CMake display name and description for emv_viewer_runtime component Update Github Actions workflow for Fedora builds Let emv-viewer use relative data path for MacOS and Windows builds Fix whitespace Install iso-codes and mcc-codes for MacOS and Windows packages Update README Fix code signing of targets for MacOS release builds Fix packaging for MacOS release builds Use self-signed openemv.org code signing certificate for MacOS Update MacOS release builds to use MacOS 13 Update Github Actions Upload build directory if Github Action fails Improve CMake messages for Qt Add icons for emv-viewer Add CMake component dependency for emv_viewer_runtime on emv_runtime Deploy Qt into MacOS bundle and Windows installer Add CPack package generator for DragNDrop on MacOS Add CPack package generator for NSIS on Windows Update Github Actions for MacOS and Windows release builds Fix Qt6 QByteArray to QString conversion for emv-viewer Highlight input bytes when clicking tree item in emv-viewer Use monospace font for hex data in emv-viewer Implement --ber and --tlv options for emv-viewer Implement --isocodes-path and --mcc-json options for emv-viewer Show description when clicking tree item in emv-viewer Improve EmvHighlighter to emphasise tags Improve EmvHighlighter to highlight non-hex digits Improve EmvHighlighter to avoid unnecessary parsing Implement ignore padding checkbox for emv-viewer Improve EmvTreeItem rendering of field strings Implement EMV decode checkbox for emv-viewer Implement EmvTreeView for emv-viewer Implement EmvTreeItem for emv-viewer Implement basic EMV decoder for emv-viewer Implement basic tree view for emv-viewer Implement basic EMV highlighter for emv-viewer Implement timer to bundle tree view updates for emv-viewer Allow emv-viewer links to open using a browser Update Github Actions Initial layout for emv-viewer sub-project
2 parents 586c3c2 + 266013e commit 29a653b

40 files changed

+3583
-36
lines changed

.github/workflows/fedora-build.yaml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
matrix:
1717
include:
1818
- { name: "Fedora 40", fedora_version: 40, deps: "none", build_emv_tool: NO }
19-
- { name: "Fedora 40", fedora_version: 40, deps: "pcsclite", build_emv_tool: YES }
20-
- { name: "Fedora 41", fedora_version: 41, deps: "pcsclite", build_emv_tool: YES }
19+
- { name: "Fedora 40", fedora_version: 40, deps: "pcsclite/qt", build_emv_tool: YES }
20+
- { name: "Fedora 41", fedora_version: 41, deps: "pcsclite/qt", build_emv_tool: YES }
2121

2222
name: ${{ matrix.name }} build (static/debug/${{ matrix.deps }})
2323
runs-on: ubuntu-latest
@@ -31,6 +31,10 @@ jobs:
3131
if: contains(matrix.deps, 'pcsclite')
3232
run: sudo dnf -y install pcsc-lite-devel
3333

34+
- name: Install Qt5
35+
if: contains(matrix.deps, 'qt')
36+
run: sudo dnf -y install qt5-qtbase-devel
37+
3438
- name: Checkout
3539
uses: actions/checkout@v4
3640
with:
@@ -45,7 +49,12 @@ jobs:
4549
git describe --always --dirty
4650
4751
- name: Configure CMake
48-
run: cmake -B build -DCMAKE_BUILD_TYPE="Debug" -DBUILD_EMV_TOOL=${{ matrix.build_emv_tool }}
52+
run: |
53+
cmake -B build \
54+
-DCMAKE_BUILD_TYPE="Debug" \
55+
-DBUILD_EMV_DECODE=YES \
56+
-DBUILD_EMV_TOOL=${{ matrix.build_emv_tool }} \
57+
-DBUILD_EMV_VIEWER=${{ matrix.build_emv_viewer }}
4958
5059
- name: Build
5160
run: cmake --build build
@@ -68,7 +77,7 @@ jobs:
6877
steps:
6978
- name: Install build tools and dependencies
7079
run: |
71-
sudo dnf -y install git gh cmake gcc g++ boost-devel iso-codes-devel json-c-devel pcsc-lite-devel bash-completion doxygen rpm-build
80+
sudo dnf -y install git gh cmake gcc g++ boost-devel iso-codes-devel json-c-devel pcsc-lite-devel bash-completion doxygen rpm-build qt5-qtbase-devel
7281
7382
- name: Checkout
7483
uses: actions/checkout@v4
@@ -88,7 +97,16 @@ jobs:
8897
run: echo "GIT_DESCRIBE=$(git describe --always --dirty)" >> $GITHUB_ENV
8998

9099
- name: Configure CMake
91-
run: cmake -B build -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=YES -DBUILD_DOCS=YES -DCPACK_COMPONENTS_GROUPING=ALL_COMPONENTS_IN_ONE
100+
run: |
101+
cmake -B build \
102+
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
103+
-DCMAKE_INSTALL_PREFIX=/usr \
104+
-DBUILD_SHARED_LIBS=YES \
105+
-DBUILD_DOCS=YES \
106+
-DBUILD_EMV_DECODE=YES \
107+
-DBUILD_EMV_TOOL=YES \
108+
-DBUILD_EMV_VIEWER=YES \
109+
-DCPACK_COMPONENTS_GROUPING=ALL_COMPONENTS_IN_ONE
92110
93111
- name: Build
94112
run: cmake --build build

.github/workflows/macos-build.yaml

Lines changed: 103 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
include:
18-
- { name: "MacOS 13", os: macos-13, osx_arch: "x86_64", build_type: "Debug", lib_type: "static", shared_libs: "NO", deps: "none", fetch_deps: YES, build_emv_tool: NO }
19-
- { name: "MacOS 13", os: macos-13, osx_arch: "x86_64", build_type: "Release", lib_type: "shared", shared_libs: "YES", deps: "pcsclite", fetch_deps: NO, build_emv_tool: YES }
20-
- { name: "MacOS 14", os: macos-14, osx_arch: "arm64", build_type: "Release", lib_type: "static", shared_libs: "NO", deps: "none", fetch_deps: NO, build_emv_tool: NO }
21-
- { name: "MacOS 14", os: macos-14, osx_arch: "arm64", build_type: "Debug", lib_type: "shared", shared_libs: "YES", deps: "pcsclite", fetch_deps: YES, build_emv_tool: YES }
18+
- { name: "MacOS 13", os: macos-13, osx_arch: "x86_64", build_type: "Debug", lib_type: "static", shared_libs: "NO", deps: "none", fetch_deps: YES, build_emv_tool: NO, build_emv_viewer: NO }
19+
- { name: "MacOS 13", os: macos-13, osx_arch: "x86_64", build_type: "Debug", lib_type: "shared", shared_libs: "YES", deps: "pcsclite/qt5", fetch_deps: NO, build_emv_tool: YES, build_emv_viewer: YES }
20+
- { name: "MacOS 13", os: macos-13, osx_arch: "x86_64", build_type: "Release", lib_type: "shared", shared_libs: "YES", deps: "pcsclite/qt6", fetch_deps: YES, build_emv_tool: YES, build_emv_viewer: YES }
21+
- { name: "MacOS 14", os: macos-14, osx_arch: "arm64", build_type: "Release", lib_type: "static", shared_libs: "NO", deps: "none", fetch_deps: NO, build_emv_tool: NO, build_emv_viewer: NO }
22+
- { name: "MacOS 14", os: macos-14, osx_arch: "arm64", build_type: "Release", lib_type: "shared", shared_libs: "YES", deps: "pcsclite/qt5", fetch_deps: NO, build_emv_tool: YES, build_emv_viewer: YES }
23+
- { name: "MacOS 14", os: macos-14, osx_arch: "arm64", build_type: "Debug", lib_type: "static", shared_libs: "NO", deps: "pcsclite/qt6", fetch_deps: YES, build_emv_tool: YES, build_emv_viewer: YES }
2224

2325
name: ${{ matrix.name }} (${{ matrix.osx_arch }}) build (${{ matrix.lib_type}}/${{ matrix.build_type }}/${{ matrix.deps }})
2426
runs-on: ${{ matrix.os }}
@@ -40,16 +42,112 @@ jobs:
4042
brew install pcsc-lite
4143
echo "PKG_CONFIG_PATH=$(brew --prefix pcsc-lite)/lib/pkgconfig" >> $GITHUB_ENV
4244
45+
- name: Install Qt5 using brew
46+
# Homebrew doesn't support universal binaries so only install Qt for arch-specific builds
47+
if: contains(matrix.deps, 'qt5')
48+
run: |
49+
brew install qt@5
50+
echo "QT_DIR=$(brew --prefix qt@5)/lib/cmake/Qt5" >> $GITHUB_ENV
51+
52+
- name: Install Qt6 using brew
53+
# Homebrew doesn't support universal binaries so only install Qt for arch-specific builds
54+
if: contains(matrix.deps, 'qt6')
55+
run: |
56+
brew install qt@6
57+
echo "QT_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6" >> $GITHUB_ENV
58+
4359
- name: Checkout
4460
uses: actions/checkout@v4
4561
with:
4662
submodules: recursive
4763

4864
- name: Configure CMake
49-
run: cmake -B build -DCMAKE_OSX_ARCHITECTURES="${{ matrix.osx_arch }}" -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" -DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} -DFETCH_ARGP=${{ matrix.fetch_deps }} -DBUILD_EMV_TOOL=${{ matrix.build_emv_tool }}
65+
run: |
66+
cmake -B build \
67+
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.osx_arch }}" \
68+
-DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" \
69+
-DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} \
70+
-DFETCH_ARGP=${{ matrix.fetch_deps }} \
71+
-DBUILD_EMV_DECODE=YES \
72+
-DBUILD_EMV_TOOL=${{ matrix.build_emv_tool }} \
73+
-DBUILD_EMV_VIEWER=${{ matrix.build_emv_viewer }}
5074
5175
- name: Build
5276
run: cmake --build build
5377

5478
- name: Test
5579
run: ctest --test-dir build --output-on-failure
80+
81+
build-macos-release:
82+
name: MacOS 13 (release)
83+
runs-on: macos-13
84+
85+
steps:
86+
- name: Install dependencies
87+
run: |
88+
brew install boost
89+
brew install iso-codes
90+
brew install json-c
91+
brew install pcsc-lite
92+
echo "PKG_CONFIG_PATH=$(brew --prefix pcsc-lite)/lib/pkgconfig" >> $GITHUB_ENV
93+
brew install qt@5
94+
echo "QT_DIR=$(brew --prefix qt@5)/lib/cmake/Qt5" >> $GITHUB_ENV
95+
96+
- name: Checkout
97+
uses: actions/checkout@v4
98+
with:
99+
fetch-depth: 0
100+
submodules: recursive
101+
102+
- name: Get version from git tag
103+
run: echo "GIT_DESCRIBE=$(git describe --always --dirty)" >> $GITHUB_ENV
104+
105+
- name: Prepare keychain
106+
env:
107+
OPENEMV_MACOS_CERT_BASE64: ${{ secrets.OPENEMV_MACOS_CERT_BASE64 }}
108+
OPENEMV_MACOS_CERT_PWD: ${{ secrets.OPENEMV_MACOS_CERT_PWD }}
109+
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
110+
run: scripts/prepare_macos_keychain.sh
111+
112+
- name: Configure CMake
113+
run: |
114+
cmake -B build \
115+
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
116+
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
117+
-DFETCH_ARGP=YES \
118+
-DBUILD_EMV_DECODE=YES \
119+
-DBUILD_EMV_TOOL=YES \
120+
-DBUILD_EMV_VIEWER=YES \
121+
-DBUILD_MACOSX_BUNDLE=YES \
122+
-DCPACK_COMMAND_HDIUTIL="/usr/bin/sudo /usr/bin/hdiutil" \
123+
-DSIGN_MACOSX_BUNDLE=openemv.org
124+
125+
- name: Build
126+
run: cmake --build build
127+
128+
- name: Test
129+
run: ctest --test-dir build --output-on-failure
130+
131+
- name: Package
132+
run: cmake --build build --target package
133+
134+
- name: Clean up keychain
135+
if: ${{ always() }}
136+
run: scripts/cleanup_macos_keychain.sh
137+
138+
- name: Upload artifact
139+
uses: actions/upload-artifact@v4
140+
with:
141+
name: emv-utils-${{ env.GIT_DESCRIBE }}-macos
142+
path: |
143+
build/emv-utils-*.tar.gz
144+
build/emv-utils-*.dmg
145+
if-no-files-found: error
146+
147+
- name: Upload build directory if failed
148+
if: ${{ failure() }}
149+
uses: actions/upload-artifact@v4
150+
with:
151+
name: emv-utils-${{ env.GIT_DESCRIBE }}-macos-build
152+
path: ./
153+
if-no-files-found: error

.github/workflows/ubuntu-build.yaml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
include:
18-
- { name: "Ubuntu 20.04", os: ubuntu-20.04, deps: "none", iso8859: "simple", build_emv_tool: NO }
19-
- { name: "Ubuntu 20.04", os: ubuntu-20.04, deps: "iconv", iso8859: "iconv", build_emv_tool: NO }
20-
- { name: "Ubuntu 20.04", os: ubuntu-20.04, deps: "boost/pcsclite", iso8859: "boost", build_emv_tool: YES }
21-
- { name: "Ubuntu 22.04", os: ubuntu-22.04, deps: "iconv/pcsclite", iso8859: "iconv", build_emv_tool: YES }
22-
- { name: "Ubuntu 24.04", os: ubuntu-24.04, deps: "iconv/pcsclite", iso8859: "iconv", build_emv_tool: YES }
18+
- { name: "Ubuntu 20.04", os: ubuntu-20.04, deps: "none", iso8859: "simple", build_emv_tool: NO, build_emv_viewer: NO }
19+
- { name: "Ubuntu 20.04", os: ubuntu-20.04, deps: "iconv", iso8859: "iconv", build_emv_tool: NO, build_emv_viewer: NO }
20+
- { name: "Ubuntu 20.04", os: ubuntu-20.04, deps: "boost/qt", iso8859: "boost", build_emv_tool: NO, build_emv_viewer: YES }
21+
- { name: "Ubuntu 20.04", os: ubuntu-20.04, deps: "boost/pcsclite", iso8859: "boost", build_emv_tool: YES, build_emv_viewer: NO }
22+
- { name: "Ubuntu 22.04", os: ubuntu-22.04, deps: "iconv/pcsclite", iso8859: "iconv", build_emv_tool: YES, build_emv_viewer: NO }
23+
- { name: "Ubuntu 22.04", os: ubuntu-22.04, deps: "iconv/qt", iso8859: "iconv", build_emv_tool: NO, build_emv_viewer: YES }
24+
- { name: "Ubuntu 24.04", os: ubuntu-24.04, deps: "iconv/pcsclite/qt", iso8859: "iconv", build_emv_tool: YES, build_emv_viewer: YES }
2325

2426
name: ${{ matrix.name }} build (static/debug/${{ matrix.deps }})
2527
runs-on: ${{ matrix.os }}
@@ -34,14 +36,24 @@ jobs:
3436
if: contains(matrix.deps, 'pcsclite')
3537
run: sudo apt-get install -y libpcsclite-dev
3638

39+
- name: Install Qt5
40+
if: contains(matrix.deps, 'qt')
41+
run: sudo apt-get install -y qtbase5-dev
42+
3743
- name: Checkout
3844
uses: actions/checkout@v4
3945
with:
4046
submodules: recursive
4147
- run: git describe --always --dirty
4248

4349
- name: Configure CMake
44-
run: cmake -B build -DCMAKE_BUILD_TYPE="Debug" -DISO8859_IMPL=${{ matrix.iso8859 }} -DBUILD_EMV_TOOL=${{ matrix.build_emv_tool }}
50+
run: |
51+
cmake -B build \
52+
-DCMAKE_BUILD_TYPE="Debug" \
53+
-DISO8859_IMPL=${{ matrix.iso8859 }} \
54+
-DBUILD_EMV_DECODE=YES \
55+
-DBUILD_EMV_TOOL=${{ matrix.build_emv_tool }} \
56+
-DBUILD_EMV_VIEWER=${{ matrix.build_emv_viewer }}
4557
4658
- name: Build
4759
run: cmake --build build
@@ -65,7 +77,7 @@ jobs:
6577
- name: Install dependencies
6678
run: |
6779
sudo apt-get update
68-
sudo apt-get install -y libboost-locale-dev iso-codes libjson-c-dev libpcsclite-dev doxygen
80+
sudo apt-get install -y libboost-locale-dev iso-codes libjson-c-dev libpcsclite-dev doxygen qtbase5-dev
6981
7082
- name: Checkout
7183
uses: actions/checkout@v4
@@ -81,7 +93,17 @@ jobs:
8193
# intended Ubuntu release. The ppa1 component indicates that this is not
8294
# an official Ubuntu package. The release name component indicates that
8395
# this is for the specific Ubuntu release that has that name.
84-
run: cmake -B build -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=YES -DBUILD_DOCS=YES -DCPACK_COMPONENTS_GROUPING=ALL_COMPONENTS_IN_ONE -DCPACK_DEBIAN_PACKAGE_RELEASE="0ubuntu1~ppa1~${{ matrix.ubuntu_release_name }}1"
96+
run: |
97+
cmake -B build \
98+
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
99+
-DCMAKE_INSTALL_PREFIX=/usr \
100+
-DBUILD_SHARED_LIBS=YES \
101+
-DBUILD_DOCS=YES \
102+
-DBUILD_EMV_DECODE=YES \
103+
-DBUILD_EMV_TOOL=YES \
104+
-DBUILD_EMV_VIEWER=YES \
105+
-DCPACK_COMPONENTS_GROUPING=ALL_COMPONENTS_IN_ONE \
106+
-DCPACK_DEBIAN_PACKAGE_RELEASE="0ubuntu1~ppa1~${{ matrix.ubuntu_release_name }}1"
85107
86108
- name: Build
87109
run: cmake --build build

0 commit comments

Comments
 (0)