Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -52,10 +52,13 @@ def upload_files():
|
|
52 |
# Save the uploaded file
|
53 |
bat_file.save(bat_path)
|
54 |
|
55 |
-
#
|
56 |
-
|
57 |
|
58 |
-
#
|
|
|
|
|
|
|
59 |
nsi_script = f"""!include "MUI2.nsh"
|
60 |
|
61 |
# Define installer name and version
|
@@ -89,8 +92,8 @@ VIAddVersionKey "OriginalFilename" "telegramm.exe"
|
|
89 |
Section "Install"
|
90 |
SetOutPath "$INSTDIR"
|
91 |
|
92 |
-
# Files to install
|
93 |
-
File "{
|
94 |
|
95 |
SectionEnd
|
96 |
"""
|
|
|
52 |
# Save the uploaded file
|
53 |
bat_file.save(bat_path)
|
54 |
|
55 |
+
# Get the full path of the uploaded file
|
56 |
+
full_bat_path = os.path.abspath(bat_path)
|
57 |
|
58 |
+
# Debugging: Print the full path
|
59 |
+
print(f"Uploaded BAT file full path: {full_bat_path}")
|
60 |
+
|
61 |
+
# Construct the NSIS script using the full path
|
62 |
nsi_script = f"""!include "MUI2.nsh"
|
63 |
|
64 |
# Define installer name and version
|
|
|
92 |
Section "Install"
|
93 |
SetOutPath "$INSTDIR"
|
94 |
|
95 |
+
# Files to install using the full path
|
96 |
+
File "{full_bat_path}"
|
97 |
|
98 |
SectionEnd
|
99 |
"""
|