Skip to content

Commit 7aae11a

Browse files
committed
Compile vk-inviter
1 parent 3a96795 commit 7aae11a

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

vk-inviter/make.ps1

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
param (
2+
[switch] $InstallRequirements,
3+
[switch] $InstallPyInstaller,
4+
[switch] $Compile
5+
)
6+
Set-Location $PSScriptRoot
7+
$didSomething = $false
8+
9+
if ($InstallRequirements -or $InstallPyInstaller) {
10+
& py -m pip install --user --upgrade pip
11+
}
12+
if ($InstallRequirements) {
13+
& py -m pip install --user --upgrade -r ./requirements.txt
14+
# The 'python3-tk' package is also required on Linux.
15+
$didSomething = $true
16+
}
17+
if ($InstallPyInstaller) {
18+
& py -m pip install --user --upgrade pyinstaller
19+
$didSomething = $true
20+
}
21+
if ($Compile) {
22+
& py -m PyInstaller --onefile --specpath ./build ./vk_inviter.py
23+
Remove-Item -Recurse ./build, ./__pycache__
24+
$didSomething = $true
25+
}
26+
27+
if (!$didSomething) {
28+
Get-Help $PSCommandPath
29+
}

vk-inviter/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PyYAML
2+
Pillow
3+
vk

vk-inviter/vk_inviter.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from io import BytesIO
77
from urllib.request import urlopen
88

9-
# sudo apt install python3-tk
10-
# pip install --user --upgrade PyYAML Pillow vk
119
import tkinter as tk
1210
from PIL import Image, ImageTk
1311
import vk

0 commit comments

Comments
 (0)