-
Notifications
You must be signed in to change notification settings - Fork 2.1k
How to compile
AlessandroZ edited this page Dec 21, 2016
·
10 revisions
memorpy will be soon embedded as package, however now it's not, so you should add it manually.
Download this project on https://github.com/n1nj4sec/memorpy and place the memorpy directory (https://github.com/n1nj4sec/memorpy/tree/master/memorpy) in the memory directory of lazagne (https://github.com/AlessandroZ/LaZagne/tree/master/Windows/lazagne/softwares/memory). On windows the structure of the directory will be as follow:
├── __init__.py
├── keepass.py
├── libkeepass
├── memorpy
├── memorydump.py
- Download pyinstaller: https://github.com/pyinstaller/pyinstaller
- Create the executable file:
python pyinstaller.py --onefile lazagne.py
-
To get a better compatibility between systems, msvcp100.dll and msvcr100.dll could be added. These files could be found in "C:\Windows\System32". Place it on the root folder of the pyinstaller directory.
-
Create a .spec file adding all options wanted. Mine is as follow:
# -*- mode: python -*-
import sys
a = Analysis(['..\LaZagne\Windows\laZagne.py'],
pathex=[''],
hiddenimports=[],
hookspath=None,
runtime_hooks=None)
for d in a.datas:
if 'pyconfig' in d[0]:
a.datas.remove(d)
break
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
a.binaries + [('msvcp100.dll', 'msvcp100.dll', 'BINARY'),
('msvcr100.dll', 'msvcr100.dll', 'BINARY')]
if sys.platform == 'win32' else a.binaries,
a.zipfiles,
a.datas,
name='laZagne.exe',
debug=False,
strip=None,
upx=True,
console=True )
- Generate your executable file:
python pyinstaller.py --onefile lazagne.spec