janmechtel / rockettype

A windows keylooger to track typing statistics like WPM
MIT License
3 stars 0 forks source link

latest installer not working because import stats fail? #18

Closed janmechtel closed 4 years ago

janmechtel commented 4 years ago

image

janmechtel commented 4 years ago

I achieved including it in the installer with files stats.py however, it still doesn't work in the installed version.

Can you:

Please find out how this can be fixed. Maybe we have to move it into a module/package folder?

appins commented 4 years ago

Not only is stats imported but so is logger_model and logger_view

janmechtel commented 4 years ago

So it works for you?

Can we do a screen share?

appins commented 4 years ago

I have not been able to try it yet, sorry. I was just noting that it needs those files too

Could you try changing files to be . so that it installs the whole folder?

appins commented 4 years ago

I can't build the installer. I keep getting an error like

Traceback (most recent call last):
  File "c:\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python38\Scripts\pynsist.exe\__main__.py", line 9, in <module>
  File "c:\python38\lib\site-packages\nsist\__init__.py", line 520, in main
    ec = InstallerBuilder(**args).run(makensis=(not options.no_makensis))
  File "c:\python38\lib\site-packages\nsist\__init__.py", line 473, in run
    self.prepare_packages()
  File "c:\python38\lib\site-packages\nsist\__init__.py", line 347, in prepare_packages
    wg.get_all()
  File "c:\python38\lib\site-packages\nsist\wheels.py", line 295, in get_all
    self.get_requirements()
  File "c:\python38\lib\site-packages\nsist\wheels.py", line 301, in get_requirements
    whl_file = wl.fetch()
  File "c:\python38\lib\site-packages\nsist\wheels.py", line 182, in fetch
    return self.get_from_pypi()
  File "c:\python38\lib\site-packages\nsist\wheels.py", line 147, in get_from_pypi
    raise NoWheelError('No compatible wheels found for {0.name} {0.version}'.format(self))
nsist.wheels.NoWheelError: No compatible wheels found for pywin32 228
janmechtel commented 4 years ago

There is two hacks/workarounds there:

  1. Modify the scoring for the wheels.py scorer

Go to c:\python38\lib\site-packages\nsist\wheels.py and remove the m from line 40 so it looks like this:

d = {'cp%s' % py_version_nodot: 3, # Is the m reliable?

  1. INclude this in your local pyapp.nsi ;I don't know how we can get this function to be included into the generated installer.nsi ;For now i copied it into the pyapp.nsi inside the module python38\lib\site-packages\nsist\pyapp.nsi ;Find out your path via pip show pynsist

;Function LaunchLink ; ExecShell "" "$SMPROGRAMS[[ib.appname]].lnk" ;FunctionEnd

On Thu, Sep 3, 2020 at 9:13 PM Alex Anderson notifications@github.com wrote:

I can't build the installer. I keep getting an error like

Traceback (most recent call last): File "c:\python38\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\python38\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Python38\Scripts\pynsist.exe__main.py", line 9, in File "c:\python38\lib\site-packages\nsist__init__.py", line 520, in main ec = InstallerBuilder(**args).run(makensis=(not options.no_makensis)) File "c:\python38\lib\site-packages\nsist__init__.py", line 473, in run self.prepare_packages() File "c:\python38\lib\site-packages\nsist\init__.py", line 347, in prepare_packages wg.get_all() File "c:\python38\lib\site-packages\nsist\wheels.py", line 295, in get_all self.get_requirements() File "c:\python38\lib\site-packages\nsist\wheels.py", line 301, in get_requirements whl_file = wl.fetch() File "c:\python38\lib\site-packages\nsist\wheels.py", line 182, in fetch return self.get_from_pypi() File "c:\python38\lib\site-packages\nsist\wheels.py", line 147, in get_from_pypi raise NoWheelError('No compatible wheels found for {0.name} {0.version}'.format(self)) nsist.wheels.NoWheelError: No compatible wheels found for pywin32 228

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/janmechtel/rockettype/issues/18#issuecomment-686703451, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHVGGVORCKCW26QG5LMN4DSD7TGHANCNFSM4QRK2VPQ .

appins commented 4 years ago

I will try this. What are we using pywin32 for?

janmechtel commented 4 years ago

it's a requirement of win10toast

On Thu, Sep 3, 2020 at 9:29 PM Alex Anderson notifications@github.com wrote:

I will try this. What are we using pywin32 for?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/janmechtel/rockettype/issues/18#issuecomment-686710558, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHVGGQQ6RKJ3475J7AVBU3SD7VAXANCNFSM4QRK2VPQ .

appins commented 4 years ago

I'm getting a new error:

Error: resolving install function "LaunchLink" in function "mui.FinishPage.Leave_43.5.19"
Note: uninstall functions must begin with "un.", and install functions must not
Error - aborting creation process
janmechtel commented 4 years ago

Did you see the second part:

"Include this in your local pyapp.nsi"

;I don't know how we can get this function to be included into the generated installer.nsi ;For now i copied it into the pyapp.nsi inside the module python38\lib\site-packages\nsist\pyapp.nsi ;Find out your path via pip show pynsist

Function LaunchLink
 ExecShell "" "$SMPROGRAMS\[[ib.appname]].lnk"
FunctionEnd
appins commented 4 years ago

I did, I found that commenting out ; !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink" fixed it. I tried moving that function around and it didn't solve anything