tingbot / tide-electron

📝   Simple IDE for developing Tingbot apps
Other
22 stars 7 forks source link

Bundling dependencies #12

Closed joerick closed 8 years ago

joerick commented 8 years ago

The ambition with Tide is that the user can just download and run the app and not have to faff around installing other software separately before a standard tingapp will run.

I think it's pretty crucial to the user experience (and a common stumbling block for programming) for sample code to just work. I also think it's good hygiene not to be installing anything system-wide, where we could get into version conflicts and other complications.

That means bundling everything with the app that might not be available on a system. On the Mac Tide, I've bundled (nested by dependencies):

The easiest way to bundle these is to find a wheel and unzip that and include. In cases where a wheel isn't available (pygame) I've been extracting a built version and dependencies from my machine and rewriting the lib paths so the linker can find them. Maybe there's an easier way to do this!

I'm relying on the system Python 2.7.10, and python-tingbot uses system SSH and rsync.

Linux

So on Linux we'll have to include the above list. Will we run into architecture problems with the compiled C bits? I'm guessing we can rely on system Python and SSH, perhaps also need to bundle rsync too, as that might not be installed on Linux by default.

Windows

On top of the above list, we'll also have to bundle Python, and use Plink and PSCP for the network things instead of ssh and rsync. Any architecture (maybe 32/64bit) concerns here?

Thoughts welcome.

Rob4001 commented 8 years ago

Currently the Linux packages will install python and pygame automatically when installing

joerick commented 8 years ago

How do the Linux dependencies work @Rob4001? Will the dependencies be installed system-wide by apt? How about the Python libraries?

For Mac/Windows at least, I think the easiest way is to bundle .whl files that have the dylibs/DLLs included - these are available for many packages. For Windows, WinPython might be worth looking at, and http://www.lfd.uci.edu/~gohlke/pythonlibs. Mac wheels with vendored dylibs can be made using the delocate tool.

These bundled libs should be unpacked somewhere, but preferably not in the system site-packages so we can control what version of everything is used by default.

joerick commented 8 years ago

I'm closing this in favour of the more specific issues #10 and #37