2
2
# Bu Program Python-Calcutator'u derlemek için oluşturulmuştur.
3
3
# This program was created to compile Python-Calcutator.
4
4
5
- import os
5
+ import platform , os
6
6
import time
7
7
8
- operating_sys = str ( input ( 'Operating System (Windows/Linux/MacOS): ' ) )
8
+ operating_sys = platform . system ( )
9
9
10
- if operating_sys == "Windows" :
10
+ if operating_sys == "Windows" or operating_sys == "windows" or operating_sys == "NT" or operating_sys == "nt " :
11
11
users_name = str (input ('Enter The Users Name: ' ))
12
12
ProgramPath_Ws = str (input ('Version (EN/TR): ' ))
13
13
debug = os .system ("cd {0}" . format (ProgramPath_Ws ))
14
14
debugfile = os .system ("pyinstaller --onefile calc.py" )
15
- elif operating_sys == "Linux" or operating_sys == "MacOS" :
15
+
16
+ elif operating_sys == "Linux" or operating_sys == "linux" or operating_sys == "MacOS" or operating_sys == "macOS" or operating_sys == "darwin" or operating_sys == "Darwin" :
16
17
users_nm = str (input ('Enter The Users Name: ' ))
17
18
ver_name = str (input ('Version (EN/TR): ' ))
18
19
ProgramPath = str ("/home/{0}/Desktop/Python-Calcutator-main/{1}/" . format (users_nm ,ver_name ))
19
20
debugPath = str (os .system ("cd /home/{0}/Desktop/Python-Calcutator-main/{1}" . format (users_nm ,ver_name )))
20
21
time .sleep (2 )
21
- print ("[DEBUGANDRUN]: Program Derlenmeye Hazırlanıyor ..." )
22
+ print ("[DEBUGANDRUN]: The Program is Preparing to Compile ..." )
22
23
time .sleep (2 )
23
- print ("[DEBUGANDRUN]: Program Bilgileri Kontrol Ediliyor ..." )
24
+ print ("[DEBUGANDRUN]: Checking Program Information ..." )
24
25
users_list = str (list (users_nm ))
25
26
ver_list = str (list (ver_name ))
26
27
ProgramPath_list = str (list (ProgramPath ))
27
28
debugPath_list = str (list (debugPath ))
28
29
time .sleep (2 )
29
- print ("[DEBUGANDRUN]: Program Bilgileri Listeleniyor ...\n {0}\n {1}\n {2}\n {3}" . format (users_list ,ver_list ,ProgramPath_list ,debugPath_list ))
30
+ print ("[DEBUGANDRUN]: Program Information Listed ...\n {0}\n {1}\n {2}\n {3}" . format (users_list ,ver_list ,ProgramPath_list ,debugPath_list ))
30
31
time .sleep (2 )
31
- print ("[DEBUGANDRUN] Program Derleyicisi Hazırlanıyor..." )
32
- global debugger ,debugger_opt ,debug_file
33
- debugger = str ('pyinstaller' )
34
- debugger_opt = str ('--onefile' )
35
- debug_file = str ("calc.py" )
32
+ print ("[DEBUGANDRUN] Program Compiler is Preparing..." )
36
33
time .sleep (2 )
37
- print ("[DEBUGANDRUN]: Program Derleniyor..." )
38
- dbg = os .system ("{0} {1} {2}" . format (debugger ,debugger_opt ,debug_file ))
34
+ print ("[DEBUGANDRUN]: Compiling the Program..." )
35
+ dbg = os .system ("pyinstaller --onefile calc.py" )
36
+ dbg
39
37
time .sleep (2 )
40
- print ("[DEBUGANDRUN]: Derleme İşlemi Bitmiştir..." )
38
+ print ("[DEBUGANDRUN]: Compilation Process is Completed..." )
39
+
41
40
else :
42
41
print ("Invalid Operating System...!" )
0 commit comments