Skip to content

Commit d39c5cf

Browse files
committed
first commit
0 parents  commit d39c5cf

File tree

390 files changed

+14574
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

390 files changed

+14574
-0
lines changed

.github/FUNDING.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: tamnvvn # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: tamnv
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: screenvivid # Replace with a single Polar username
13+
buy_me_a_coffee: tamnv # Replace with a single Buy Me a Coffee username
14+
thanks_dev: # Replace with a single thanks.dev username
15+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve ScreenVivid
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## General information:
11+
12+
* OS name: _(e.g., Windows 10, macOS Monterey, Ubuntu)_
13+
* OS version: _(e.g., 21H2, 12.3, 22.04 LTS)_
14+
* OS architecture: _(e.g., 64-bit, ARM)_
15+
* Resolutions:
16+
* Monitor 1: _(e.g., 1920x1080)_
17+
* Monitor 2: _(if applicable)_
18+
* Python version: _(e.g., 3.9.19)_
19+
* ScreenVivid version: _(e.g., 1.2.3)_
20+
21+
## For GNU/Linux users:
22+
23+
* Display server protocol and version, if known: _(e.g., X11, Wayland)_
24+
* Desktop Environment: _(e.g., GNOME, KDE, XFCE)_
25+
* Composite Window Manager name and version: _(if applicable)_
26+
27+
## Description of the issue
28+
29+
A clear and concise description of the issue, including steps to reproduce if applicable.
30+
31+
## Expected behavior
32+
33+
A clear and concise description of what you expected to happen.
34+
35+
## Actual behavior
36+
37+
A clear and concise description of what actually happened.
38+
39+
## Full error message
40+
41+
```
42+
Copy and paste the entire error message here, if applicable.
43+
```
44+
45+
## Screenshots
46+
47+
If applicable, add screenshots to help explain your problem.
48+
49+
## Additional context
50+
51+
Add any other context about the problem here, such as specific settings in ScreenVivid, any recent changes to your system, or any other information you think might be relevant.
52+
53+
## Logs
54+
55+
Please attach any relevant log files if available.

.github/workflows/deb-build.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Build and Package for Debian
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*'
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0 # Fetch all history and tags
14+
- name: Read Changelog
15+
id: changelog
16+
run: |
17+
CHANGELOG=$(cat CHANGELOG.md)
18+
echo "changelog<<EOF" >> $GITHUB_ENV
19+
echo "$CHANGELOG" >> $GITHUB_ENV
20+
echo "EOF" >> $GITHUB_ENV
21+
- name: Get Previous Tag
22+
id: get_previous_tag
23+
run: |
24+
# Get the current tag
25+
CURRENT_TAG="${{ github.ref_name }}"
26+
# Get all tags sorted by version number
27+
PREVIOUS_TAG=$(git tag --sort=-version:refname | grep -A 1 "^${CURRENT_TAG}$" | tail -n 1 || echo "none")
28+
echo "previous_tag=$PREVIOUS_TAG" >> $GITHUB_ENV
29+
- name: Get Commit Messages
30+
id: commits
31+
run: |
32+
if [[ "${{ env.previous_tag }}" == "none" ]]; then
33+
echo "commits=No previous tags found." >> $GITHUB_ENV
34+
else
35+
COMMIT_MESSAGES=$(git log --pretty=format:"- %s (#%b)" "${{ env.previous_tag }}"..HEAD)
36+
echo "commits<<EOF" >> $GITHUB_ENV
37+
echo "$COMMIT_MESSAGES" >> $GITHUB_ENV
38+
echo "EOF" >> $GITHUB_ENV
39+
fi
40+
- name: Set up Docker Buildx
41+
uses: docker/setup-buildx-action@v1
42+
- name: Build Docker image
43+
run: docker build -t screenvivid-deb-build -f dockerfiles/Dockerfile.deb .
44+
- name: Package as .deb
45+
run: |
46+
docker run --rm -v ${PWD}:/app screenvivid-deb-build bash -c "
47+
cd screenvivid && python3 compile_resources.py && cd .. &&
48+
cd packaging/linux &&
49+
chmod +x build-deb.sh &&
50+
./build-deb.sh '${GITHUB_REF_NAME}' &&
51+
mv screenvivid*.deb /app/
52+
"
53+
- name: Upload Debian package as artifact
54+
uses: actions/upload-artifact@v3
55+
with:
56+
name: screenvivid-${{ github.ref_name }}.deb
57+
path: ./screenvivid*.deb
58+
- name: Create GitHub Release
59+
uses: softprops/action-gh-release@v1
60+
with:
61+
body: |
62+
# ScreenVivid ${{ github.ref_name }} is out! 🎉
63+
${{ env.changelog }}
64+
# What's Changed
65+
${{ env.commits }}
66+
67+
Full Changelog: [${{ env.previous_tag }}...${{ github.ref_name }}](https://github.com/tamnguyenvan/screenvivid/compare/${{ env.previous_tag }}...${{ github.ref_name }})
68+
files: screenvivid*.deb
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Build and Package for MacOS Apple Silicon
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*'
6+
jobs:
7+
build:
8+
runs-on: macos-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: '3.9'
17+
18+
- name: Download FFmpeg
19+
run: |
20+
curl -L https://evermeet.cx/ffmpeg/ffmpeg-7.1.zip -o ffmpeg.zip
21+
unzip ffmpeg.zip
22+
mv ffmpeg packaging/macos/
23+
rm ffmpeg.zip
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m venv venv
28+
source venv/bin/activate
29+
python -m pip install --upgrade pip
30+
pip install pyinstaller
31+
pip install "pyobjc-framework-Quartz>=10.3.1,<10.4"
32+
pip install "pyobjc-framework-UniformTypeIdentifiers>=10.3.1,<10.4"
33+
pip install "pyobjc-framework-AVFoundation>=10.3.1,<10.4"
34+
pip install -r requirements.txt
35+
36+
- name: Compile resources
37+
run: |
38+
source venv/bin/activate
39+
cd screenvivid
40+
python compile_resources.py
41+
42+
- name: Build with PyInstaller
43+
run: |
44+
source venv/bin/activate
45+
cd packaging/macos
46+
pyinstaller --clean --noconfirm screenvivid.spec
47+
48+
- name: Install create-dmg
49+
run: |
50+
brew install create-dmg
51+
52+
- name: Create DMG
53+
run: |
54+
cd packaging/macos
55+
create-dmg \
56+
--volname "ScreenVivid" \
57+
--volicon "../../screenvivid/resources/icons/screenvivid.icns" \
58+
--window-pos 0 0 \
59+
--icon-size 100 \
60+
--icon "ScreenVivid.app" 175 120 \
61+
--hide-extension "ScreenVivid.app" \
62+
--app-drop-link 425 120 \
63+
"ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg" \
64+
"dist/ScreenVivid.app"
65+
mv ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg ../..
66+
67+
- name: Upload DMG
68+
uses: actions/upload-artifact@v3
69+
with:
70+
name: ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg
71+
path: ./ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg
72+
73+
- name: Create GitHub Release
74+
uses: softprops/action-gh-release@v1
75+
with:
76+
files: ScreenVivid-${{ github.ref_name }}-apple-silicon.dmg
77+
env:
78+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build and Package for Windows
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*'
6+
jobs:
7+
build:
8+
runs-on: windows-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.9'
17+
18+
- name: Download FFmpeg
19+
run: |
20+
$ProgressPreference = 'SilentlyContinue'
21+
Invoke-WebRequest -Uri "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n7.1-latest-win64-gpl-7.1.zip" -OutFile "ffmpeg.zip"
22+
Expand-Archive -Path "ffmpeg.zip" -DestinationPath "ffmpeg_temp"
23+
Copy-Item "ffmpeg_temp\ffmpeg-n7.1-latest-win64-gpl-7.1\bin\ffmpeg.exe" -Destination "packaging\windows\"
24+
Remove-Item -Path "ffmpeg_temp" -Recurse -Force
25+
Remove-Item -Path "ffmpeg.zip"
26+
shell: pwsh
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m venv venv
31+
venv\Scripts\activate
32+
python -m pip install --upgrade pip
33+
pip install pyinstaller
34+
pip install "pywin32>=306,<308"
35+
pip install -r requirements.txt
36+
shell: pwsh
37+
38+
- name: Compile resources
39+
run: |
40+
venv\Scripts\activate
41+
cd screenvivid
42+
python compile_resources.py
43+
44+
- name: Build with PyInstaller
45+
run: |
46+
venv\Scripts\activate
47+
cd packaging/windows
48+
pyinstaller --clean --noconfirm screenvivid.spec
49+
shell: pwsh
50+
51+
- name: Update version in Inno Setup script
52+
run: |
53+
$version = "${{ github.ref_name }}"
54+
$content = Get-Content -Path packaging/windows/screenvivid.iss -Raw
55+
$newContent = $content -replace '#define MyAppVersion ".*"', "#define MyAppVersion `"$version`""
56+
$newContent | Set-Content -Path packaging/windows/screenvivid.iss
57+
shell: pwsh
58+
59+
- name: Build installer with Inno Setup
60+
uses: Minionguyjpro/[email protected]
61+
with:
62+
path: packaging/windows/screenvivid.iss
63+
options: /O+ /F"ScreenVivid-${{ github.ref_name }}-Setup"
64+
65+
- name: Upload artifact
66+
uses: actions/upload-artifact@v3
67+
with:
68+
name: ScreenVivid-${{ github.ref_name }}-Setup.exe
69+
path: D:\a\screenvivid\screenvivid\packaging\windows\Output\ScreenVivid-${{ github.ref_name }}-Setup.exe
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
73+
- name: Create GitHub Release
74+
id: create_release
75+
uses: softprops/action-gh-release@v1
76+
with:
77+
files: "**/Output/ScreenVivid-${{ github.ref_name }}-Setup.exe"
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)