-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmac-installer
More file actions
49 lines (34 loc) · 1.33 KB
/
mac-installer
File metadata and controls
49 lines (34 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
echo '*****************************************************'
echo '* INSTALLING STARS...PLEASE WAIT *'
echo '*****************************************************'
echo [+] Installing pip...
python3 -m pip --disable-pip-version-check -q install pip
if [ $? -ne 0 ]; then
echo [*] FATAL ERROR: IT SEEMS THAT PYHTON IS NOT INSTALLED. INSTALL PYTHON AND RETRY...
else
echo [+] Installing venv...
python3 -m pip --disable-pip-version-check -q install virtualenv
echo [+] Creating a venv...
python3 -m venv venv
echo [+] Activating venv...
source venv/bin/activate
echo [+] Installing the required packages...
python3 -m pip --disable-pip-version-check install -q -r requirements.txt
echo [+] Creating the executable...
pyinstaller --onefile --windowed --log-level CRITICAL src/main.py
touch STARS
echo '#!/bin/bash' >> STARS
echo 'DIR=$(cd "$(dirname "$0")"; pwd)' >> STARS
echo 'open $DIR/main' >> STARS
mkdir -p STARS.app/Contents/MacOS
cp STARS dist/main STARS.app/Contents/MacOS/
chmod +x STARS.app/Contents/MacOS/STARS
echo [+] Cleaning up...
rm -r build
rm -r venv
rm main.spec
echo '**********************************************************************'
echo '* STARS WAS SUCCESSFULY INSTALLED. NOW YOU MAY CLOSE THIS WINDOW. *'
echo '**********************************************************************'
fi