• 0

Composer/Vagrant like tools for C++/Java/.NET


Question

Hi,

 

I have been programming in couple of languages lately Java, C++, PHP, Python, and even .NET on Windows. Among them I noticed that Java and .NET applications are very close to being portable. The end user will just have to install Java or the .NET framework and run the executable and the application just works.

 

But when it come to deploying applications for Mac or Linux, things gets a little bit tricky with C++/PHP/Python. Ideally Java would be the way to go but it also has some limitations. Because a Control that is already done and available in .NET may have to be created from scratch on a Python/Java app. So, even though I love to program in Python, I end up choosing .NET because it is already done. But it leads to a situation where I leave out a great number of Mac/Linux users.

 

C++ is the ideal solution for making Cross Platform applications but static linking and library dependencies gets ugly real quick. And frankly end users don't like installing Qt or updating their environment variables, etc... because they just don't have the knowledge or perhaps the courage to do so. So, what I am after is a universal solution... that might achieve the following:

  • Cross Platform Solution
  • Depending on the User's OS it automatically installs the required libraries in one shot

Some of the solutions that really mimics this behavior are Vagrant or Composer for PHP. The script reads the dependency definitions and grabs everything so when you execute the application everything is already present.I don't see anything like that for desktop development. I would love to have a solution where upon executing a script it automatically installs Qt5, WxPython, Python, whatever my application needs.

 

InstallShield, etc... would be overkill... any open-source alternatives?

9 answers to this question

Recommended Posts

  • 0

Personally, I have never seen anything that simplifies this process (though, I think you probably could have guessed as much from our previous discussion on pyinstaller). I really don't think there is anything that will make cross-platformness uniform and easy, I think you will just have to continue to do the annoying leg work. I mean even something like cmake (cross platform make ;-) ) for a build system isn't great at being cross-platform -- you have to do the leg work to account for platform differences there also.

  • 0

Skimming through your post, it is hard to decide if you are more interested in Web Applications or Desktop Applications.  You are talking about a mixed developing tools for both and yet you want the compilation to be crossed platform.  Very confusing to me. :)

  • 0
  On 11/02/2014 at 01:41, Krome said:

Skimming through your post, it is hard to decide if you are more interested in Web Applications or Desktop Applications.  You are talking about a mixed developing tools for both and yet you want the compilation to be crossed platform.  Very confusing to me. :)

 

haha, for the most part I am looking for a solution for Desktop Applications. To give you an example, I will install Python on my computer, and install the WxPython module to develop my desktop gui app. Now the end user will download my compiled python app with a script that has all the dependencies listed (e.g. Python, WxPython). So, if the end user does not have Python or WxPython, running that script would install Python and WxPython for him. The catch is... the script that he will run has to be compatible to his particular OS (e.g. .sh/.bat, etc...).

 

I can create a script of my own to take care of that but I was wondering if such package manager already exists? Because it seems like it is a very common practice to include a script that takes care of all the dependencies. I was using Vagrant and PHP Composer as an example.

  • 0
  On 11/02/2014 at 17:14, snaphat (Myles Landwehr) said:

^This has dependency issues though (glibc versioning incompatibilities being the large one) so it doesn't work great in practice

 

See this is exactly what I am talking about. You'd think Pyinstaller or any other program of that nature would make deploying applications on the user's computer easier. But there is no way of knowing beforehand what libraries it may depend on, what version or even where to get them. But if we had a repository similar to Vagrant or PHP Composer, overtime developers could add a link to all the dependencies and package them together if needed.

 

I ran into couple of situations where some of my clients never even heard of Python, let alone their system will have them installed. Or they start shaking if you tell them to launch the Terminal/Command Prompt. I am not talking about exclusively about Python but I ran into this situation with C++ libraries, Ruby on Rails and PHP as well. But with a dependency manager you are only worried about configuring a single item and the dependency manager would grab rest of the libraries in one shot. But without a dependency manager you are on your own to configure glibs, c++ libraries, python, wxpython or whatever libraries the application uses.

 

Basically I want a solution where the guy who is installing or running my desktop application is a regular joe and not a computer wiz of any kind :p... think grandma!

  • Like 1
  • 0

^ And these are the types of clients that are liable to have the really old OSes where the glibc interfaces indeed change from the ones you are using on your own development systems  :wacko:

 

This is one example where Windows DLL hell can be somewhat better in practice than Linux for library dependencies (sadly). You can't reliably distribute glibc or the other system runtime libraries because of system call differences between different versions of the Linux kernel. So dropping glibc 2.6 on an older system using 2.4 system isn't going to work (at least, it didn't work when my twin tried it). This is one thing that I rather dislike about Linux.

  • 0
  On 11/02/2014 at 17:14, snaphat (Myles Landwehr) said:

^This has dependency issues though (glibc versioning incompatibilities being the large one) so it doesn't work great in practice

Why not bundle your version of glibc then? (perhaps dumb question)

  • 0
  On 12/02/2014 at 17:57, Andre S. said:

Why not bundle your version of glibc then? (perhaps dumb question)

See my last post: there are issues even with that because of syscall changes as one moves forward the Linux kernel revisions (because glib invokes syscalls directly): Here's a list of ABI changes between kernel revisions: http://man7.org/linux/man-pages/man2/syscalls.2.html. What's interesting is something else I didn't know, even if you compile the newer glib versions to target an older kernel, they aren't guaranteed to provide all functionality: https://gitlab.com/bminor/glibc/raw/e6ff5e32b8374ca1adb5f93b3ad81681d195ea55/README (they broke thread support with older kernels).

 

I neglected to mention in my previous post that glib itself also has other library dependencies you need to bundle with it so it's not as simple for bundling purposes as just tarring a single .so. That being said, I do imagine that bundling works fine in cases where you aren't moving between systems with large gaps in kernel revisions.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Yeah define not catching up then to see the next part of this then
    • RoboForm 9.7.7 by Razvan Serea RoboForm is the top-rated Password Manager and Web Form Filler that completely automates password entering and form filling. RoboForm makes logging into Web sites and filling forms faster, easier, and more secure. RoboForm memorizes and securely stores each user name and password the first time you log into a site, then automatically supplies them when you return. RoboForm's powerful Logins feature eliminates the manual steps of logging into any online account. With just one click RoboForm will navigate to a Web site, enter your username and password and click the submit button for you. Completing long registration or checkout forms is also a breeze. Simply click on your RoboForm Identity and RoboForm fills-in the entire form for you. You no longer need to remember all your passwords. You remember one Master Password, and RoboForm remembers the rest. This allows you to use stronger passwords, making your online experience more secure. RoboForm uses strong AES encryption for complete data security. The all new RoboForm comes with Chrome and Safari browser support, iPhone/iPad and Android support, as well a brand new RoboForm Everywhere license for use on unlimited computers and mobile devices. RoboForm 9.7.7 changelog: Show RF Desktop unlock UI when user selects "Unlock" in RF Desktop UI. Fixed blank icon appeared in the Windows taskbar for RF Editor. Miscellaneous bug fixes. Download: RoboForm 9.7.7 | 42.2 MB (Free, paid upgrade available) View: RoboForm Website Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • LG G5 was the last memorable phone I had. The Samsung and Pixels and have had since have been disappointing and boring.
    • Isn't the CPU used to calculate the parity for the RAID? If so, the combination of SSDs and 10GBe might make the CPU more important
    • yeah GSMA began working to enable end to end encryption between android and iphone last year and apparently a new standard was developed. apple has said that they would implement this in "future software updates" but i haven't heard anything since march, the time this was all reported on. shortly after, i read on forbes that the FBI suggests not sending texts between iphone and android because they're unencrypted. i use signal to chat with my wife but i'd rather just use messages tbh (she has an iphone), i'm not really a 3rd party guy haha
  • Recent Achievements

    • Reacting Well
      SteveJaye earned a badge
      Reacting Well
    • One Month Later
      MadMung0 earned a badge
      One Month Later
    • One Month Later
      Uranus_enjoyer earned a badge
      One Month Later
    • Week One Done
      Philsl earned a badge
      Week One Done
    • Week One Done
      Jaclidio hoy earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      438
    2. 2
      ATLien_0
      157
    3. 3
      +FloatingFatMan
      149
    4. 4
      Nick H.
      64
    5. 5
      +thexfile
      62
  • Tell a friend

    Love Neowin? Tell a friend!