Distributing Contents for Linux like in Android & iOS?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distributing Contents for Linux like in Android & iOS?
I'm currently designing a Linux-based system. Users of the system will be allowed to download contents, i.e. programs, from the Internet. The contents will be distributed in zip packages given special extension names, e.g. .cpk instead of .zip, and with zero compression.
I want to give users the same experience found in iOS and Android, in which contents are distributed in contained packages and run from there.
My question is that can I make my Linux system to run programs from inside the packages without unzipping them? If not, then is there another approach to what I'm after in Linux?
Please note that I don't want to extract contents into a temp folder and delete them after execution because that might take longtime, specially for large contents. That will also double the storage space requirements for running the contents.
This could get really hairy, but the first thing that popped into my mind would be to use logical volume management (LVM); for each package you install, you create a new LVM partition specifically for that application and unpack the contents of the package to that partition. Should the user wish to uninstall the application package from the system, you just simply delete the LVM partition.
Most Linux applications are considerably larger than an Android .cpk (just as most Windows applications are considerably larger than that. Try squeezing Office 2010 into a .cpk ).
But there's nothing that says you can't package a trivially small app with Yum or Dpkg, and there's nothing that says you can't launch it as part of your initial install.
Actually I want to stay away from Windows and Linux methodology of download->installing->run and take the Mac OS X, iOS and Android approach of download->run. Just a single package that contains everything in one file.
Moreover, in Windows/Linux, the user needs to keep two inistances of the same program to be able to copy it to another system. One instance is the installed program and another instance is the installable package. I want the user of my system to keep only one instance and be able to copy it to other systems and run it immediately there. Just like .app in Mac OS X.
It sounds like what you may want to do is create static binaries. These compile your program and all libraries into one file, instead of having the libraries in separate files that are then dependencies of the executable.
Including things like icons, images, sounds etc in the static binary may be more complicated however, if indeed it's possible.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.