LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-25-2019, 06:47 AM   #1
babaliaris
LQ Newbie
 
Registered: Jul 2018
Location: Greece
Distribution: Arch Linux
Posts: 28

Rep: Reputation: Disabled
Cross plat GUI framework that the final build does not need dependencies?


So, as the title clearly says, is there a GUI framework (if it's possible cross platform) which after you build your project for a specific operating system, the user won't need to install any additional depedencies.

Just run's the executable file end all works.

I know about qt and electron but both have depedencies. For example the user must have installed qt or electron in order to run the application.

I want something that after compilation will only depend on the actuall operating system API which was build for.

Of course the framework should be in c/c++ because Languages like Java or Python already have depedencies. The user must have java or python for example.
 
Old 08-25-2019, 07:14 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,862

Rep: Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347
Guess Microsoft Win32 API can be considered as such. In Unix, GUI is not part to core system, so it does require 3rd party components.
 
Old 08-25-2019, 07:38 AM   #3
babaliaris
LQ Newbie
 
Registered: Jul 2018
Location: Greece
Distribution: Arch Linux
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NevemTeve View Post
In Unix, GUI is not part to core system, so it does require 3rd party components.
It doesn't even have an abstraction layer? I know that you need a 3rd party component, but those come along with the Linux distribution anyway. Unix by itself doe not provide any abstraction layer that the specific Linux distribution or the 3rd party component has to implement so other programs would be able to use system calls in order to implement GUI applications?

If not, then how do cross-platform GUI frameworks work in the first place? Are they designed to use a specific framework for example qt?
 
Old 08-25-2019, 07:46 AM   #4
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,045

Rep: Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332Reputation: 1332
It is theoretically possible, but you are unlikely to find it pre-built. You would have to code and compile the entire project for static compilation. the result would be HUGE, as it would incorporate all libraries into the executable file. It would also be a security issue, because you could not upgrade ANY of it without re-installing or recompiling ALL of it. Bit of a nightmare scenario, actually.


If you really do want such a thing, the sources are available. You would just have to pick one and tweak the code, the configuration, and makefiles to get a complete static compile.

Why would you want this?
 
Old 08-25-2019, 10:55 AM   #5
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 9,154

Rep: Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982
Quote:
Originally Posted by babaliaris View Post
I know about ...and electron but both have depedencies. For example the user must have installed ..or electron in order to run the application.
Uh, that's obviously not true. Do you have to install Electron before running Slack or Visual Studio Code? No.

Anyway...

Quote:
Of course the framework should be in c/c++ because Languages like Java or Python already have depedencies. The user must have java or python for example.
On Linux, you'd pick the C/C++ framework of your choice and then make an AppImage.

Last edited by dugan; 08-25-2019 at 07:18 PM.
 
Old 08-26-2019, 05:37 AM   #6
babaliaris
LQ Newbie
 
Registered: Jul 2018
Location: Greece
Distribution: Arch Linux
Posts: 28

Original Poster
Rep: Reputation: Disabled
Is there a way to distribute the shared libraries (of qt for example) with my app, so the client won't need to install qt??? Of course, the risk with it would be to install these shared libs on the user's computer because they might override existing files if for example he already has installed qt.

Well, I thought of a solution, so the user won't need to install them or even make changes to ld. Would it be an acceptable solution to make a script that will export all the necessary dir paths with the local .so files every time the user runs my app?

Lets say this is the structure of my app project:
--myapp(dir)
-run.sh
-app.out
-some other stuff...
--libs(dir)

and the run.sh might look something like that:
Code:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./libs/
./app.out
Do you think this is a fine solution? If the libs directory has all the necessary shared libraries ,doing it this way the user won't need to install anything else plus he won't have to mess with the ld directories.

Last edited by babaliaris; 08-26-2019 at 05:40 AM.
 
Old 08-26-2019, 09:00 AM   #7
Mill J
Member
 
Registered: Feb 2017
Location: 127.0.0.1 Sweet 127.0.0.1
Distribution: Void, MX, Haiku, Puppy and many others
Posts: 937
Blog Entries: 2

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
AppImage with LD_LIBRARY_PATH is the way to go.

I do it all the time with wxWidgets. Under Linux linking the wxWidgets library as static is relatively small and works great in an appimage.
 
Old 08-26-2019, 09:06 AM   #8
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 952

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
Quote:
Originally Posted by babaliaris View Post
Do you think this is a fine solution? If the libs directory has all the necessary shared libraries ,doing it this way the user won't need to install anything else plus he won't have to mess with the ld directories.
That's one of the things "containers" (linuxcontainers.org/): distributing an application with all of its needed libraries without disturbing the host O/S.
Haven't done this myself (yet), but there many more knowledgable people on this forum who can contribute to this.
 
Old 08-26-2019, 11:23 AM   #9
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 9,154

Rep: Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982Reputation: 3982
Quote:
Originally Posted by dugan View Post
On Linux, you'd pick the C/C++ framework of your choice and then make an AppImage.
Quote:
Originally Posted by babaliaris View Post
Is there a way to distribute the shared libraries (of qt for example) with my app, so the client won't need to install qt???
* cough
 
Old 08-26-2019, 01:37 PM   #10
babaliaris
LQ Newbie
 
Registered: Jul 2018
Location: Greece
Distribution: Arch Linux
Posts: 28

Original Poster
Rep: Reputation: Disabled
I will use AppImages. I just read about them and they sound incredible. Thanks for the help.
 
  


Reply

Tags
c++, framework, gui


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Final Phase GCC build fails for ARM cross compiler toolchain bencpeters Linux - Embedded & Single-board computer 1 11-13-2011 05:23 PM
Cross Plat form compiling sfx81 Linux - Newbie 1 02-21-2011 10:48 PM
Coding Dilemma: Build application with PHP framework or build all myself? socceroos Programming 2 05-10-2009 06:04 PM
Gui that convert AVI to AVI DivX, with telling final avi target final size ? frenchn00b Linux - General 5 03-02-2008 05:37 AM
SB Audigy Plat - Aux/Line Not Working! shiny_spoon Linux - Hardware 7 10-31-2003 04:11 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration