Switch windows build process to nuitka
This commit is contained in:
1 parent
77b4ab8fc7
commit
5607fb0638
4 files changed
+20
-39
No files matched your search
@@ -1 +1,8 @@
|
|||||||
|
.idea/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
sudomemoDNS.build/
|
||||||
|
sudomemoDNS.dist/
|
||||||
|
sudomemoDNS.onefile-build/
|
||||||
|
|
||||||
|
sudomemoDNS.exe
|
||||||
|
|
||||||
@@ -50,12 +50,18 @@ Note: `python3` is assumed to be the name of your python binary, if it is not th
|
|||||||
|
|
||||||
## Building on Windows
|
## Building on Windows
|
||||||
|
|
||||||
- Install dnslib, requests, and pyinstaller via the following command as an administrator
|
- Install Python 3.6+ (preferably 3.9). Make sure to install the x86 version for 32 bit targets.
|
||||||
|
|
||||||
python -m pip install -r requirements.txt pyinstaller
|
- Install all requirements via the following command as an administrator
|
||||||
|
|
||||||
- Modify the paths in all caps in `sudomemoDNS_v1.2.1.spec` to where sudomemoDNS and the sudomemoDNS icon is stored.
|
```
|
||||||
|
python -m pip install -r requirements.txt nuitka zstandard
|
||||||
|
```
|
||||||
|
|
||||||
- Run the following as an administrator:
|
- Run the following (answer yes to any prompts):
|
||||||
|
|
||||||
pyinstaller sudomemoDNS_v1.2.1.spec
|
```shell
|
||||||
|
python -m nuitka --standalone --onefile --windows-icon-from-ico=sudomemoDNS_icon.ico -o sudomemoDNS.exe sudomemoDNS.py
|
||||||
|
```
|
||||||
|
|
||||||
|
- Run `sudomemoDNS.exe`
|
||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from json import loads
|
from json import loads
|
||||||
from socket import socket, AF_INET, SOCK_DGRAM
|
from socket import socket, AF_INET, SOCK_DGRAM, gethostbyname
|
||||||
from sys import platform
|
from sys import platform
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ for zone in zones:
|
|||||||
if zone["type"] == "a":
|
if zone["type"] == "a":
|
||||||
ZONES[zone["name"]] = [Record(A, zone["value"])]
|
ZONES[zone["name"]] = [Record(A, zone["value"])]
|
||||||
elif zone["type"] == "p":
|
elif zone["type"] == "p":
|
||||||
ZONES[zone["name"]] = [Record(A, socket.gethostbyname(zone["value"]))]
|
ZONES[zone["name"]] = [Record(A, gethostbyname(zone["value"]))]
|
||||||
|
|
||||||
print("[INFO] DNS information loaded successfully.")
|
print("[INFO] DNS information loaded successfully.")
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
# -*- mode: python -*-
|
|
||||||
|
|
||||||
block_cipher = None
|
|
||||||
|
|
||||||
|
|
||||||
a = Analysis(['sudomemoDNS.py'],
|
|
||||||
pathex=['C:\\PATH\\TO\\SUDOMEMODNS'],
|
|
||||||
binaries=[],
|
|
||||||
datas=[],
|
|
||||||
hiddenimports=[],
|
|
||||||
hookspath=[],
|
|
||||||
runtime_hooks=[],
|
|
||||||
excludes=[],
|
|
||||||
win_no_prefer_redirects=False,
|
|
||||||
win_private_assemblies=False,
|
|
||||||
cipher=block_cipher,
|
|
||||||
noarchive=False)
|
|
||||||
pyz = PYZ(a.pure, a.zipped_data,
|
|
||||||
cipher=block_cipher)
|
|
||||||
exe = EXE(pyz,
|
|
||||||
a.scripts,
|
|
||||||
a.binaries,
|
|
||||||
a.zipfiles,
|
|
||||||
a.datas,
|
|
||||||
[],
|
|
||||||
name='sudomemoDNS_v1.2.1',
|
|
||||||
debug=False,
|
|
||||||
bootloader_ignore_signals=False,
|
|
||||||
strip=False,
|
|
||||||
upx=True,
|
|
||||||
runtime_tmpdir=None,
|
|
||||||
console=True , icon='C:\\PATH\\TO\\SUDOMEMODNS\\ICON.ico')
|
|
||||||
Reference in new issue
Block a user
