Closed janmechtel closed 4 years ago
pip install pyinstaller
pyinstaller logger.pyw
installer.cfg
python -m nsist installer.cfg
Not working yet :-( The RocketType Start menu shortcut contains this:
C:\Users\JanMechtel\AppData\Local\Programs\RocketType\Python\pythonw.exe "C:\Users\JanMechtel\AppData\Local\Programs\RocketType\logger.pyw"
Which doesn't seem to work. I tricked myself into thinking it works by double clicking logger.pyw
running with python.exe instead C:\Projects\Keys\RocketType\build\nsis\Python\python.exe "C:\Projects\Keys\RocketType\build\nsis\logger.pyw"
six==...
to the .cfg fixed that.... the last one was tricky
"C:\Users\JanMechtel\AppData\Local\Programs\Python\Python38\lib\site-packages\nsist\wheels.py", line c. 40,
remove the m
from d = {'cp%sm' % py_version_nodot: 3, # Is the m reliable?
and turn it into d = {'cp%s' % py_version_nodot: 3, # Is the m reliable?
then it at least builds the installer but still fails :(
I've confirmed that there is a file pkgs/win32/win32api.pyd
.pyd is supposed to be a windows specific python module.
I can't import it.
I tried runnning only the nsist/python.exe and import there.
import pynput print(pynput)
works
also import sys and print(sys.path) shows the correct path
I'm a bit out of luck why the module can not be loaded I'll ask on StackOverflow maybe it's related to 32 vs. 64 bit (however import platform + platform.architecture shows 64bit both in the nsist and my normal local version.
Otherwise we could try:
Partial success the nsist\python.exe can import win32api
after:
sys.path.append('C:\\Projects\\Keys\\RocketType\\build\\nsis\\pkgs\\win32\\lib')
sys.path.append('C:\\Projects\\Keys\\RocketType\\build\\nsis\\pkgs\\win32')
import pywin32_bootstrap
import win32api
Now that I found the problem I fixed it and submitted a PR https://github.com/takluyver/pynsist/pull/204
@appins can you please try the installer from the homepage and report back?
@janmechtel I tried this, the program worked the first time and then stopped working. Running it from the command line yields no output. I suspect it might have trouble trying to capture the keyboard output the second time around. Could you see if you need to close access to any of the files/objects you're using in the code?
Also, you should consider cython, it might be nice to have a portable binary, as this would also solve #12
@janmechtel I tried this, the program worked the first time and then stopped working. Running it from the command line yields no output. I suspect it might have trouble trying to capture the keyboard output the second time around.
Can you:
I will:
I don't have any idea about objects we are blocking, even the listener is not exclusive. In fact i can start the installed app multiple times at once ...
I will:
I'm not really sure how this would work yet and believe this would also create one giant .exe not a real installer
https://stackoverflow.com/questions/2581784/can-cython-compile-to-an-exe
Yeah, I tried opening task manager and python and pythonw were both running. When I killed the tasks and reopened it, it continued to not work and the processes reappeared. I will try restarting my computer since maybe that has something to do with it and get back to you.
As for Cython, it would create a large executable, but maybe that wouldn't be too bad of a way to use the program. I feel like people might be more willing to have a keylogger be a portable program rather than an installer, but maybe that's a project for a later time.
After restarting my computer, this issue no longer occurs.
Would be really nice if one could download an .exe or .msi to install everything.
Installer candidates
Which installer should we use? Apparently we need something to included the Python stuff and then something to create an installer.
Combined Freeze and Installer:
Freeze Tools:
Actual Installers:
What to consider:
Signing
This will probably trigger Windows Smartscreen / Defender warnings when publishing unsigned / without and EV certificate. Even with the certificate there will be a warning for the first couple of downloads.
See https://pynsist.readthedocs.io/en/latest/faq.html#code-signing
One way around this would be to go through the Windows Store
Windows Store would also provide some basic stats?