-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use py2exe instead of pyinstaller on Windows because Windows Defender…
… antivirus shows a false positive warning Closes #1
- Loading branch information
Showing
8 changed files
with
85 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
*.trf | ||
*.app | ||
ffmpeg | ||
|
||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
build.sh → build-scripts/osx/build-pyinstaller.sh
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
#!/bin/bash | ||
|
||
cd ../../ | ||
|
||
# Install Pyinstaller | ||
pip3 install pyinstaller | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
cd ..\..\ | ||
|
||
# Install Py2exe | ||
pip3 install py2exe | ||
pip3 install --upgrade py2exe | ||
|
||
# Download ffmpeg | ||
Invoke-WebRequest -Uri https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip -OutFile .\ffmpeg-release-essentials.zip | ||
Expand-Archive .\ffmpeg-release-essentials.zip -DestinationPath . | ||
Invoke-WebRequest -Uri https://www.gyan.dev/ffmpeg/builds/release-version -OutFile .\version.txt | ||
$version = cat version.txt | ||
Remove-Item ffmpeg.exe | ||
Move-Item "ffmpeg-$version-essentials_build\bin\ffmpeg.exe" . | ||
Remove-Item "ffmpeg-$version-essentials_build" -Recurse | ||
Remove-Item ffmpeg-release-essentials.zip | ||
Remove-Item version.txt | ||
|
||
# Build Using Py2exe | ||
python .\build-scripts\win\setup.py install | ||
python .\build-scripts\win\setup.py py2exe | ||
|
||
# Remove unnecessary folders | ||
Remove-Item ffmpeg.exe | ||
|
||
# Create zip file | ||
$date = Get-Date -Format "yyyy-MM-dd" | ||
Remove-Item "vidstabgui-win-$date.zip" | ||
Compress-Archive -Path .\dist\* -DestinationPath "vidstabgui-win-$date.zip" | ||
|
||
explorer . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
|
||
cd ..\..\ | ||
|
||
# Install Pyinstaller | ||
pip3 install pyinstaller | ||
pip3 install --upgrade pyinstaller | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# http://www.py2exe.org/index.cgi/ListOfOptions | ||
|
||
from distutils.core import setup | ||
import py2exe | ||
|
||
setup( | ||
windows=[{ | ||
"script":"vidstabgui.py", | ||
"icon_resources": [(1, "icon/icon.ico")] | ||
}], | ||
data_files = [( | ||
'.', ['ffmpeg.exe'] | ||
)], | ||
options={ | ||
"py2exe":{ | ||
'bundle_files': 1, | ||
'compressed': True, | ||
"unbuffered": True, | ||
'dist_dir': './dist', | ||
"optimize": 2, | ||
'includes': [ | ||
'tkinter', | ||
'subprocess', | ||
'time', | ||
'os' | ||
] | ||
} | ||
} | ||
) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters