qmk / qmk_flasher

flashing utility for the Atmel AVR USB family
MIT License
63 stars 24 forks source link

When running from source code, app_path points to the wrong place #10

Closed NoahAndrews closed 7 years ago

NoahAndrews commented 7 years ago

Specifically, it points to node_modules\electron-prebuilt\dist\resources\default_app.asar. I tested this both on Linux and Windows. Until this is fixed, I can't actually flash anything from my own build.

skullydazed commented 7 years ago

Thanks for putting some time into this tool!

That's the path I was using on OS X without problem, is it possible this will need some platform specific code to build the correct path? Or has electron changed that path since last year?

NoahAndrews commented 7 years ago

So you have the dfu folder located there? Did you just copy it manually?

skullydazed commented 7 years ago

I believe that's where electron put it after running a build. I need to dig in and refresh my memory more on why I was using that path.

NoahAndrews commented 7 years ago

Do you have to run any extra commands besides npm start to make It do that?

skullydazed commented 7 years ago

Per the documentation "npm install" needs to run. I don't know whether it's the "install" or "start" step that would do the copying.

NoahAndrews commented 7 years ago

Yeah, I definitely ran install too. It wouldn't even launch without doing that once.

skullydazed commented 7 years ago

I just sat down and tried this on my sierra machine. Installed npm, ran "npm install", then "npm start" and it ran just fine. So the path is definitely correct on macOS. I'll boot into windows 7 and try to do the same thing now.

skullydazed commented 7 years ago

OK, I just pushed 920eab1 which I think will fix it. I think the basic problem is the asar stuff, which works when deployed but not in dev. I'm going to do some more testing to make sure this works, but give it a try in the meantime.

NoahAndrews commented 7 years ago

Works here, thanks!

NoahAndrews commented 7 years ago

That code has a few issues when it's running in a packaged app, but there will be fixes in a PR I'm working on (should be submitted tonight or tomorrow).