Skip to content

Commit

Permalink
Compile vk-inviter
Browse files Browse the repository at this point in the history
  • Loading branch information
Himura2la committed Sep 16, 2021
1 parent 3a96795 commit 7aae11a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
29 changes: 29 additions & 0 deletions vk-inviter/make.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
param (
[switch] $InstallRequirements,
[switch] $InstallPyInstaller,
[switch] $Compile
)
Set-Location $PSScriptRoot
$didSomething = $false

if ($InstallRequirements -or $InstallPyInstaller) {
& py -m pip install --user --upgrade pip
}
if ($InstallRequirements) {
& py -m pip install --user --upgrade -r ./requirements.txt
# The 'python3-tk' package is also required on Linux.
$didSomething = $true
}
if ($InstallPyInstaller) {
& py -m pip install --user --upgrade pyinstaller
$didSomething = $true
}
if ($Compile) {
& py -m PyInstaller --onefile --specpath ./build ./vk_inviter.py
Remove-Item -Recurse ./build, ./__pycache__
$didSomething = $true
}

if (!$didSomething) {
Get-Help $PSCommandPath
}
3 changes: 3 additions & 0 deletions vk-inviter/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PyYAML
Pillow
vk
2 changes: 0 additions & 2 deletions vk-inviter/vk_inviter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
from io import BytesIO
from urllib.request import urlopen

# sudo apt install python3-tk
# pip install --user --upgrade PyYAML Pillow vk
import tkinter as tk
from PIL import Image, ImageTk
import vk
Expand Down

0 comments on commit 7aae11a

Please sign in to comment.