Skip to content

Commit 5b5bca9

Browse files
authored
Merge pull request #2 from GerryFerdinandus/main
update
2 parents c23afdb + 4c99819 commit 5b5bca9

29 files changed

+483
-571
lines changed

.github/workflows/cicd.yml

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
name: CI/CD with Lazarus IDE on multiple operating systems.
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
pull_request:
9+
workflow_dispatch:
10+
# Automatic cron build every 6 months to check if everything still works.
11+
schedule:
12+
- cron: "0 0 1 1/6 *"
13+
14+
jobs:
15+
build:
16+
runs-on: ${{ matrix.os }}
17+
18+
strategy:
19+
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
20+
fail-fast: false
21+
22+
# Set up an array to perform the following three build configurations.
23+
matrix:
24+
os: [ubuntu-latest, windows-latest, macos-latest]
25+
include:
26+
- os: windows-latest
27+
LAZBUILD_WITH_PATH: c:/lazarus/lazbuild
28+
RELEASE_ZIP_FILE: trackereditor_windows_amd64.zip
29+
LAZ_OPT:
30+
- os: ubuntu-latest
31+
LAZBUILD_WITH_PATH: lazbuild
32+
RELEASE_ZIP_FILE: trackereditor_linux_amd64.zip
33+
LAZ_OPT:
34+
- os: macos-latest
35+
LAZBUILD_WITH_PATH: /Applications/Lazarus/lazbuild
36+
RELEASE_ZIP_FILE: trackereditor_macOS_amd64.zip
37+
LAZ_OPT: --widgetset=cocoa
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- name: Install Lazarus IDE
43+
run: |
44+
if [ "$RUNNER_OS" == "Linux" ]; then
45+
sudo apt install -y lazarus zip xvfb
46+
elif [ "$RUNNER_OS" == "Windows" ]; then
47+
choco install lazarus zip
48+
# https://wiki.overbyte.eu/wiki/index.php/ICS_Download#Download_OpenSSL_Binaries
49+
curl -L -O --output-dir enduser https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/libssl-3-x64.dll
50+
curl -L -O --output-dir enduser https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/libcrypto-3-x64.dll
51+
elif [ "$RUNNER_OS" == "macOS" ]; then
52+
brew install --cask lazarus
53+
else
54+
echo "$RUNNER_OS not supported"
55+
exit 1
56+
fi
57+
shell: bash
58+
59+
- name: Build Release version
60+
# Build trackereditor project (Release mode)
61+
run: ${{ matrix.LAZBUILD_WITH_PATH }} --build-mode=Release ${{ matrix.LAZ_OPT }} source/project/tracker_editor/trackereditor.lpi
62+
shell: bash
63+
64+
- name: Build Unit Test on Windows
65+
if: matrix.os == 'windows-latest'
66+
# Build unit test project (Debug mode)
67+
run: ${{ matrix.LAZBUILD_WITH_PATH }} --build-mode=Debug ${{ matrix.LAZ_OPT }} source/project/unit_test/tracker_editor_test.lpi
68+
shell: bash
69+
70+
- name: Run Unit Test on Windows
71+
if: matrix.os == 'windows-latest'
72+
# Also remove all the extra file created by test.
73+
# We do not what it in the ZIP release files.
74+
# Undo all changes made by testing.
75+
run: |
76+
set -e
77+
enduser/test_trackereditor -a --format=plain
78+
set +e
79+
80+
# remove file created by unit test
81+
rm -f enduser/console_log.txt
82+
rm -f enduser/export_trackers.txt
83+
git reset --hard
84+
shell: bash
85+
86+
- name: Test OpenSSL works on Linux CI
87+
if: matrix.os == 'ubuntu-latest'
88+
run: xvfb-run --auto-servernum enduser/trackereditor -TEST_SSL
89+
90+
- name: Create a zip file for Linux release.
91+
if: matrix.os == 'ubuntu-latest'
92+
run: zip -j ${{ matrix.RELEASE_ZIP_FILE }} enduser/*.txt enduser/trackereditor
93+
shell: bash
94+
95+
- name: Create a zip file for Windows release.
96+
if: matrix.os == 'windows-latest'
97+
run: |
98+
zip -j ${{ matrix.RELEASE_ZIP_FILE }} enduser/*.txt enduser/trackereditor.exe enduser/*.dll
99+
shell: bash
100+
101+
- name: Move file into macOS .app
102+
if: matrix.os == 'macos-latest'
103+
run: |
104+
# copy everything into enduser/macos/app folder
105+
#
106+
# Move the executable to the application bundle
107+
mv enduser/trackereditor enduser/macos/app/trackereditor.app/Contents/MacOS
108+
109+
# Move the trackers list to application bundle
110+
mv enduser/add_trackers.txt enduser/macos/app/trackereditor.app/Contents/MacOS
111+
mv enduser/remove_trackers.txt enduser/macos/app/trackereditor.app/Contents/MacOS
112+
113+
# move all the *.txt file
114+
mv enduser/*.txt enduser/macos/app
115+
116+
# zip only the app folder with extra text file.
117+
# /usr/bin/ditto -c -k "enduser/macos/app" "${{ matrix.RELEASE_ZIP_FILE }}"
118+
shell: bash
119+
120+
- name: Codesign macOS app bundle
121+
# This macOS Codesign step is copied from:
122+
# https://federicoterzi.com/blog/automatic-code-signing-and-notarization-for-macos-apps-using-github-actions/
123+
# This is a bit different from the previous version for Travis-CI build system to build bittorrent tracker editor
124+
if: matrix.os == 'macos-latest'
125+
env:
126+
MACOS_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE }}
127+
MACOS_CERTIFICATE_PWD: ${{ secrets.PROD_MACOS_CERTIFICATE_PWD }}
128+
MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}
129+
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
130+
run: |
131+
# Turn our base64-encoded certificate back to a regular .p12 file
132+
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
133+
134+
# We need to create a new keychain, otherwise using the certificate will prompt
135+
# with a UI dialog asking for the certificate password, which we can't
136+
# use in a headless CI environment
137+
138+
security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
139+
security default-keychain -s build.keychain
140+
security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
141+
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
142+
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$MACOS_CI_KEYCHAIN_PWD" build.keychain
143+
144+
# We finally codesign our app bundle, specifying the Hardened runtime option.
145+
#/usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" --options runtime enduser/macos/app/trackereditor.app -v
146+
147+
# sign the app. -sign is the developer cetificate ID
148+
# entitlements does not work at this moment
149+
#codesign --timestamp --entitlements enduser/macos/entitlements.plist --force --options runtime --deep --sign $CERTIFICATE_ID $FILE_APP
150+
151+
# Please note: this is the same code version used in Travis-CI
152+
/usr/bin/codesign --timestamp --force --options runtime --deep --sign "$MACOS_CERTIFICATE_NAME" enduser/macos/app/trackereditor.app
153+
shell: bash
154+
155+
- name: Notarize macOS app bundle
156+
if: matrix.os == 'macos-latest'
157+
env:
158+
PROD_MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
159+
PROD_MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
160+
PROD_MACOS_NOTARIZATION_PWD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
161+
run: |
162+
# Store the notarization credentials so that we can prevent a UI password dialog
163+
# from blocking the CI
164+
165+
echo "Create keychain profile"
166+
xcrun notarytool store-credentials "notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD"
167+
168+
# We can't notarize an app bundle directly, but we need to compress it as an archive.
169+
# Therefore, we create a zip file containing our app bundle, so that we can send it to the
170+
# notarization service
171+
172+
echo "Creating temp notarization archive"
173+
ditto -c -k --keepParent "enduser/macos/app/trackereditor.app" "notarization.zip"
174+
175+
# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
176+
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
177+
# characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if
178+
# you're curious
179+
180+
echo "Notarize app"
181+
xcrun notarytool submit "notarization.zip" --keychain-profile "notarytool-profile" --wait
182+
183+
# Finally, we need to "attach the staple" to our executable, which will allow our app to be
184+
# validated by macOS even when an internet connection is not available.
185+
echo "Attach staple"
186+
xcrun stapler staple "enduser/macos/app/trackereditor.app"
187+
188+
# Remove notarization.zip, otherwise it will also be 'released' to the end user
189+
rm -f "notarization.zip"
190+
191+
# zip only the app folder with extra text file.
192+
echo "Zip macOS app file"
193+
/usr/bin/ditto -c -k "enduser/macos/app" "${{ matrix.RELEASE_ZIP_FILE }}"
194+
shell: bash
195+
196+
- name: Upload Artifact
197+
uses: actions/upload-artifact@v3
198+
with:
199+
path: ${{ matrix.RELEASE_ZIP_FILE }}
200+
if-no-files-found: error
201+
202+
- name: Zip file release to end user
203+
uses: softprops/action-gh-release@v1
204+
if: startsWith(github.ref, 'refs/tags/')
205+
with:
206+
files: |
207+
*.zip

.github/workflows/snap.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Test build Ubuntu snap on Linux amd64
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
# Automatic cron build every 6 months to check if everything still works.
8+
schedule:
9+
- cron: "0 0 1 1/6 *"
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: snapcore/action-build@v1

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 87 deletions
This file was deleted.

README.md

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
**bittorrent-tracker-editor** will add/remove bittorrent tracker from the torrent file(s).
2-
This software works on Windows XP SP3, Windows 7+, macOS and Linux.
2+
This software works on Windows 7+, macOS and Linux.
33

44
---
55

66
## Software latest release: ##
77
[![GitHub Latest release](https://img.shields.io/github/release/GerryFerdinandus/bittorrent-tracker-editor/all.svg)](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases)
8-
8+
[![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/gerryferdinandus/bittorrent-tracker-editor/latest)](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/commits/main)
99
---
1010

11-
## Code Status: ##
12-
Continuous integration|Status| Build operating system
13-
------------|---------|---------
14-
Travis-CI |[![Build Status](https://travis-ci.com/GerryFerdinandus/bittorrent-tracker-editor.svg?branch=master)](https://travis-ci.com/GerryFerdinandus/bittorrent-tracker-editor) |Linux, macOS and Windows
15-
Snapcraft-CI |[![Snap Status](https://build.snapcraft.io/badge/GerryFerdinandus/bittorrent-tracker-editor.svg)](https://build.snapcraft.io/user/GerryFerdinandus/bittorrent-tracker-editor)|Linux
11+
## Build Status: ##
12+
Continuous integration|Status| Generate an executable file for the operating system| Download link
13+
------------|---------|---------|----------
14+
GitHub Actions |[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/gerryferdinandus/bittorrent-tracker-editor/cicd.yml)](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/actions/workflows/cicd.yml)|Linux(amd64), macOS(Intel processors) and Windows|[![GitHub Latest release](https://img.shields.io/github/release/GerryFerdinandus/bittorrent-tracker-editor/all.svg)](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases)
15+
GitHub Actions (Ubuntu snap) |[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/gerryferdinandus/bittorrent-tracker-editor/snap.yml)](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/actions/workflows/snap.yml)|Linux (amd64 and arm64)|[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/bittorrent-tracker-editor)
16+
Flathub build server||Linux (amd64 and arm64)|<a href='https://flathub.org/apps/io.github.gerryferdinandus.bittorrent-tracker-editor'><img width='180' alt='Download on Flathub' src='https://flathub.org/assets/badges/flathub-badge-i-en.svg'/></a>
1617
---
1718

1819
## Warning: ##
@@ -48,28 +49,20 @@ There is no backup function in this software. Use it at your own risk. Bittorren
4849

4950
## Software history: ##
5051

51-
### 1.33.0.beta.6 ###
52+
### 1.33.0 ###
53+
* ADD: Support for OpenSSL 3
54+
* FIX: Handle dark theme on MacOS. ([Issue 49](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/issues/49))
5255
* ADD: Direct download support for ngosang via menu.
5356
* ADD: Extra tabpage 'private torrent'. For issue 31 and 34
5457
* ADD: Check box 'Skip Announce Check in the URL' ([Issue 31](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/issues/31))
5558
* ADD: Command parameter '-SAC' -> 'Skip Announce Check' in the URL ([Issue 31](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/issues/31))
5659
* ADD: Support 'Info Source' tag for private trackers ([Issue 34](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/issues/34))
5760
* ADD: Command parameter '-SOURCE' -> info Source tag for private trackers. See readme.txt file ([Issue 34](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/issues/34))
58-
59-
### 1.33.0.beta.5 ###
6061
* FiX: support for '/announce.php'([Issue 27](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/issues/27))
61-
62-
### 1.33.0.beta.4 ###
6362
* FIX: There was an issue with uploading tracker list to newTrackon.
64-
65-
### 1.33.0.beta.3 ###
6663
* FIX: WebTorrent do not have '/announce' ([Issue 24](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/issues/24))
67-
68-
### 1.33.0.beta.2 ###
6964
* ADD: Wrong tracker URL format from torrent files should be unselected by default ([Issue 22](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/issues/22))
7065
* ADD: Upload trackers to newTrackon ([Issue 23](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/issues/23))
71-
72-
### 1.33.0.beta.1 ###
7366
* ADD: Verify the working status of public trackers. (Data from newTrackon) ([Issue 21](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/issues/21))
7467

7568
### 1.32.0 ###
@@ -113,13 +106,13 @@ There is no backup function in this software. Use it at your own risk. Bittorren
113106

114107
---
115108

116-
![](pictures/trackereditor.png?raw=true "Trackers List")
109+
![](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/trackereditor_list_windows.png "Trackers List")
117110

118111
This screen shot show the program, after a folder is selected with torrent files inside. The normal procedure is to deselect the trackers that are no longer working. Optionally add your own trackers. And select the 'Update torrent' menu.
119112

120113
---
121114

122-
![](pictures/filestrackersinfo.png?raw=true "Files/Trackers/Info")
115+
![](https://github.com/GerryFerdinandus/bittorrent-tracker-editor/releases/download/V1.32.0/trackereditor_info_windows.png "Files/Trackers/Info")
123116

124117
---
125118

enduser/libeay32.dll

-1.31 MB
Binary file not shown.

enduser/ssleay32.dll

-330 KB
Binary file not shown.

0 commit comments

Comments
 (0)