Closed MTRNord closed 8 years ago
Apologies, there was an error in my docs, the "type" and "category" should be set to "software", rather than "program".
Thanks for pointing this out - I've now fixed the docs.
Still it doesn't want to import it. Same to all directories. I use Windows 7 as system and an completly fresh Version. Not even any Output about it in the Log (using the flag --enable-logging)
If I manually put it into "C:\Program Files (x86)\PiBakery\resources\app\pibakery-blocks" and add it to the "info.json" it works. Drag and Drop into Workspace does nothing
That's odd, I got it to work for me. If you do CTRL-SHIFT-I, you'll see the developer inspector, if you go into the "Console" tab, are there any errors?
And can you post the contents of your nginx.json
file?
Code of nginx.json
{
"name": "nginx",
"text": "Builds NGINX with http2, ssl and ipv6 support\\nRequires internet connection",
"script": "nginxBuild.sh",
"args": [],
"network": true,
"continue": true,
"type": "software",
"category":"software",
"shortDescription":"Install a web server on your Raspberry Pi. Requires internet connection.",
"longDescription":"NGINX is a web server for more experienced users to run their websites. This builds NGINX from source."
}
At the Dev Console I will have a look
Dev Console gives no special errors about the Drag and Drop action. Only the expected missing Configs on my USB Devices are in the Dev Console.
Just tried your nginx.json, and it did work for me (image attached). I'm going to reinstall my copy of PiBakery - just in case I'm using a different version than the one on the downloads page.
I think I got an trace. I added an "console.log(error) at Line 2381 in the pibakery.js file and got: "Error: ENOENT: no such file or directory, stat 'C:\Program Files (x86)\PiBakery\resources\app\nginx\C:\Program Files (x86)\PiBakery\resources\app\nginx.json'(…)" when dropping. Seems like it messes with the path somehow.
I try the same now from another directory location
I'll have to look into that a little bit later - as I'm on a Mac right now and therefore can't reproduce that error.
ok maybe I find an fix on myself (I also work with electron ^^). If I got an fix I will give you an pull request
Error seems like that win does use an backslash in it's paths. I write an exception for windows therefore
I think this issue can be closed because I added an pull request with the fix
Just tested it and that worked perfectly - thanks.
I'm building a new Windows version right now, and as soon as that's done I'll upload it. Uploading will take a while on my abysmal connection, but hopefully this can be released tonight.
Hmm, I've now tested on Windows 8 and it seems there's another bug, but this time it's actually in Windows. It seems that on some versions of Windows, drag-drop isn't allowed with programs that run as Administrator: https://blogs.msdn.microsoft.com/patricka/2010/01/28/q-why-doesnt-drag-and-drop-work-when-my-application-is-running-elevated-a-mandatory-integrity-control-and-uipi/
I may add a shortcut in that opens a selection pane for users to choose a folder.
I've now added a shortcut to open a dialog to choose a folder, which gets round the drag-drop not working on some version of Windows. PiBakery is being re-packaged and I'll upload it after that.
The latest version of PiBakery (0.2.4) fixes this issue. If you are finding that you are not able to drag-drop your block folder into PiBakery, the keybaord shortcut CTRL (CMD on Mac) + Shift + "+" (plus key) can be used to open a dialog to choose your block folder.
I already working on another optimation to better resolving of the path problem which came up here. :) I think path.join() could be better than path.normalize(). Also my fix is more like an workaround. I am testing it on windows just now. If my Idea works you get another pull request. And tanks for the fast and helpfull Help!!
I used as base the lamp dir for my NGINX Builder but when I try to drag and drop my folder into the pibakery program nothing appears. No Success and no error. Code is here: https://github.com/MTRNord/pibakery-blocks/tree/10f3cfcb089c7c24b544cd5d20ba5f6e113c1b2e/nginx