sigyllly commited on
Commit
57cc0db
·
verified ·
1 Parent(s): a68ccee

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -5
main.py CHANGED
@@ -52,10 +52,13 @@ def upload_files():
52
  # Save the uploaded file
53
  bat_file.save(bat_path)
54
 
55
- # Debugging: Print the saved file path
56
- print(f"Uploaded BAT file saved to: {bat_path}")
57
 
58
- # Construct the NSIS script using the provided path
 
 
 
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 "{bat_path}"
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
  """