Rank: Member Groups: Registered
Joined: 17/05/2021(UTC) Posts: 19 Was thanked: 5 time(s) in 4 post(s)
|
Would it be possible to build and distribute an appimage-build of SMath for Linux? AppImage is an package format that IMO is really nice for distributing applications on Linux. See more information here https://appimage.org/The appimage is built with the software and all dependencys inside and is executed just by double clicking on the file. When executed the appimage runs entirely in memory through a squash-fs filesystem. Since all dependencys are included no libs need to be installed on the host machine, this is good when you dont have root access to the machine. There seems to exist a way to generate appimage-packages directly with dotnet publish, see https://github.com/AppIm...pps#using-dotnet-publishQuote:dotnet publish -r linux-x64 -p:PublishSingleFile=true -c Release EDIT: I have also created an appimage of SMath Studio that runs on Ubuntu 18.04 and newer systems (Other Linux dists: GLIBC 2.27 minimum) Direct link to the latest AppImage -> SMathStudioDesktop.0_99_7822.x86_64.glibc2.27-PreRelease4.AppImageSee also https://github.com/gntech/smath-appimageEdited by user 06 June 2021 21:22:34(UTC)
| Reason: Not specified
|
1 user thanked gntech for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,173 Was thanked: 534 time(s) in 358 post(s)
|
|
3 users thanked overlord for this useful post.
|
on 01/06/2021(UTC), on 01/06/2021(UTC), on 01/06/2021(UTC)
|
|
Rank: Member Groups: Registered
Joined: 17/05/2021(UTC) Posts: 19 Was thanked: 5 time(s) in 4 post(s)
|
Wow, thanks for the quick response Overlord! It works beautifully! Some things to consider: * There is no need to put the appimage in a tar.gz since it is already a compressed file format. It is uncompressed to memory on-the-fly when executed * Please consider to add mono to the appimage since it is one of the main features of the appimage to be able to run it on a base system without requiring any dependencies or package installs. (It is quite uncommon to have mono installed on a base system.) Appimage Motivation: https://docs.appimage.or...oduction/motivation.htmlAppimage Advantages: https://docs.appimage.or...oduction/advantages.htmlRegarding file size: OpenRA (www.openra.net) is a mono-based application that is distributed for linux as appimage. The file size is 19.5 Mb including all the required mono libraries. To install the mono libraries standalone on my system required 250 Mb. Here is a database of applications that are distributed as AppImages https://appimage.github.io/apps/
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,173 Was thanked: 534 time(s) in 358 post(s)
|
While I use appimages, I wasn't made one myself before. This is the first time. Smath forum don't accept all filetypes, this is why it is in a tar.gz. I just wanted to see if it is working. I will add mono libraries and try to add fonts to make a proper smath appimage.
Regards
|
1 user thanked overlord for this useful post.
|
|
|
Rank: Member Groups: Registered
Joined: 17/05/2021(UTC) Posts: 19 Was thanked: 5 time(s) in 4 post(s)
|
Okay, nice work to be the first time I noticed that the System Requirements text for SMath Studio particulary mentions this Mono-library: Quote:libmono-winforms-2.0-cil Perhaps that is the only part of mono that is required?
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 22/06/2016(UTC) Posts: 5 Location: Bochum
|
Providing smath as an appimage with mono included seems very promising to me. Over the recent years I experienced trouble with smath using mono on linux many times. Today I came across this post since mono crashes every time I try to start smath. The appimage provided above doesn't start as well on my system. Please carry on!
|
|
|
|
Rank: Member Groups: Registered
Joined: 17/05/2021(UTC) Posts: 19 Was thanked: 5 time(s) in 4 post(s)
|
Originally Posted by: bromptonaut Today I came across this post since mono crashes every time I try to start smath. The appimage provided above doesn't start as well on my system. If you are using Ubuntu 20.04 it might be a problem with the mono-libraries from the Ubuntu repos. I noticed a similiar error earlier and found a workaround by installing the latest versions directly from the Mono project website. https://www.mono-project...oad/stable/#download-linQuote:sudo apt install gnupg ca-certificates sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list sudo apt update sudo apt upgrade That solved the problem for me on Ubuntu 20.04 (both with official tar.gz-release and appimage version of SMath) but I agree that an appimage with a working mono-library included would be a much better solution
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,173 Was thanked: 534 time(s) in 358 post(s)
|
Originally Posted by: gntech Okay, nice work to be the first time I noticed that the System Requirements text for SMath Studio particulary mentions this Mono-library: Quote:libmono-winforms-2.0-cil Perhaps that is the only part of mono that is required? Not even close, more library files needed. I have made the appimage with mono included. Tried with a non-mono livecd, look like it works. For some reason plugin download is not working. Also account login not working too, damn. Couldn't figure out so added some necessary plugins. With plugins installed file size is now near 90mb. Without plugins file size was 15mb with font included. Link is in the second post. Regards Edited by user 28 November 2021 15:33:54(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member Groups: Registered
Joined: 17/05/2021(UTC) Posts: 19 Was thanked: 5 time(s) in 4 post(s)
|
I extracted your AppImage to a local folder by running Quote:./SMath_Studio-x86_64.AppImage --appimage-extract I then downloaded and extracted the content of OpenRA appimage for comparison which is also Mono-based appimage and noticed that it had a lot less files especially in /usr/lib/mono So I guess that a lot of unneccassary mono-files are included automatically in the SMath build. I experimented with stripping out the extensions and a lot of what I assume is unneccassary mono-files then built a new AppImage from the SMath folder using appimagetoolQuote:./appimagetool-x86_64.AppImage squashfs-root/ smath.appimage The resulting smath.appimage was now 12 Mb and did start and run fine. The stripped appimage is attached for reference but more research and experimentation is needed The problem that you found with the extension manager and account login I have no idea for unfortunately. Perhaps some mono-lib is still missing? One more thing, I noticed the appimage is built on a system with glibc 2.32. It is recommended that the appimage is built on the oldest supported Ubuntu LTS version (Xenial 16.04). This is to ensure compatibility with as many systems as possible. Your appimage requires a very new linux distribution to run. It is a thing to consider. (glibc is regarded by appimage as something that exist on all systems but the version is only backwards compatible not forwards. So it is good build on as old system as possible) Ref: OpenRA: https://github.com/OpenRA/OpenRA...ed-Alert-x86_64.AppImageappimagetool: https://github.com/AppImage/AppI...magetool-x86_64.AppImage SMath_stripped.AppImage.tar.gz (12,330kb) downloaded 12 time(s).Edited by user 02 June 2021 15:21:10(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member Groups: Registered
Joined: 17/05/2021(UTC) Posts: 19 Was thanked: 5 time(s) in 4 post(s)
|
There exist a tool called monodis that can analyze a mono-based executable to see what dependencies it have. Quote:monodis --assemblyref SMathStudio_Desktop.exe | grep Name Gives the following output Quote: Name=mscorlib Name=System.Windows.Forms Name=SMath.Manager Name=SMath.Controls Name=System Name=SMath.UI Name=System.Drawing Name=SMath.Drawing Name=System.Xml Name=SMath.Environment Name=SMath.Math.Symbolic Name=SMath.Math.Numeric
I have also found the following script that uses monodis to automatically build an appimage including only the necceassary libraries. It need to be adapted for SMath of course but it is a nice starting point. https://gist.github.com/darealsh...6f61c4fc7aa8ec0459779ddcEdited by user 02 June 2021 15:21:32(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,173 Was thanked: 534 time(s) in 358 post(s)
|
glibc is new on my pc because I use a rolling release voidlinux. All my livecds are mine own creation based on void. I will try to download an old livecd and try on it. I have also build stripped versions with manually removing everything unnecessary. As I have said, appimage file without plugins are 20mb more or less. 12mb vs 20mb is not a problem if you ask me. Real issue is web connection, I couldn't figure how to fix it. This problem is what it makes appimage larger. I had to manually install some plugins.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,173 Was thanked: 534 time(s) in 358 post(s)
|
Originally Posted by: gntech There exist a tool called monodis that can analyze a mono-based executable to see what dependencies it have. Quote:monodis --assemblyref SMathStudio_Desktop.exe | grep Name Gives the following output Quote: Name=mscorlib Name=System.Windows.Forms Name=SMath.Manager Name=SMath.Controls Name=System Name=SMath.UI Name=System.Drawing Name=SMath.Drawing Name=System.Xml Name=SMath.Environment Name=SMath.Math.Symbolic Name=SMath.Math.Numeric
I have also found the following script that uses monodis to automatically build an appimage including only the necceassary libraries. It need to be adapted for SMath of course but it is a nice starting point. https://gist.github.com/darealsh...6f61c4fc7aa8ec0459779ddc I have already previously tried to build with both monodis and that script on github. That script actually an automation process for monodis and it creates jumbled directories. Those didn't work for me so I have traced all files on my /opt/smath/smath.exe reach and logged them. Those are the mono-related files appeared on log file so I manually imported them. The appimage file is not auto created. I personally placed everything myself. Code:/usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll
/usr/lib/mono/gac/System.Windows.Forms/4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
/usr/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
/usr/lib/mono/gac/Accessibility/4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
/usr/lib/mono/gac/Microsoft.CSharp/4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
/usr/lib/mono/gac/I18N/4.0.0.0__0738eb9f132ed756/I18N.dll
/usr/lib/mono/gac/I18N.West/4.0.0.0__0738eb9f132ed756/I18N.West.dll
/usr/lib/mono/gac/System.Design/4.0.0.0__b03f5f7f11d50a3a/System.Design.dll
/usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll
/usr/lib/mono/gac/System.Numerics/4.0.0.0__b77a5c561934e089/System.Numerics.dll
/usr/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
/usr/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll
/usr/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll
/usr/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll
/usr/lib/libmono-btls-shared.so
/usr/lib/libmono-native.so.0.0.0
/usr/lib/libMonoPosixHelper.so
/usr/lib/libMonoSupportW.so
/usr/lib64/libmono-native.so
/usr/lib64/libMonoPosixHelper.so
/usr/lib64/libmono-btls-shared.so
I will try to remove some files one by one and see the result. I will also include glibc into appimage and try it with an old linux. Edited by user 02 June 2021 22:19:07(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,173 Was thanked: 534 time(s) in 358 post(s)
|
I have fixed the plugin download issue. Shall release the final appimage soon. Final size is 15mb with 3mb Courier font.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,173 Was thanked: 534 time(s) in 358 post(s)
|
Download issue fixed versions are here. Now everything as it should have been. They have courier fonts bundled. An extra headache is resolved too. I have also updated my first post on this subject. Apps are packed with MONO 6.12.0.122. Because this is what I have on my system. You will need glibc 2.32 for them to work. Next step is to reduce mono version. I will try to make it work on an old distro, like Ubuntu 16.04. Regards SMath_Studio-x86_64-Mono.AppImage <--- With Mono IncludedSMath_Studio-x86_64-Mono-Plugins.AppImage <--- With Mono and plugins IncludedPS: For updated links see the second post of this topic Edited by user 28 November 2021 15:35:53(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member Groups: Registered
Joined: 17/05/2021(UTC) Posts: 19 Was thanked: 5 time(s) in 4 post(s)
|
Awesome work overlord! I noticed just one minor thing, libgdiplus seems to be missing from the appimage Quote:Unhandled Exception: System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: libgdiplus.so.0 assembly:<unknown assembly> type:<unknown type> member null) If I installed libgdiplus through the package manager the program started fine. It should probably be added to the appimage
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,173 Was thanked: 534 time(s) in 358 post(s)
|
Updated both with libgdiplus.so
|
|
|
|
Rank: Member Groups: Registered
Joined: 17/05/2021(UTC) Posts: 19 Was thanked: 5 time(s) in 4 post(s)
|
I can confirm that the appimage now works without libgdiplus or mono installed! I am thinking about the Courier font though, is it really necessary to include it? On most Linux systems it is not distributed or installed by default due to licensing issues and SMath seems to work good without it. I guess SMath has a mechanism to use some similar font if Courier is not available. Just a thought Edit: Perhaps Liberation Mono is a suitable alternative https://en.wikipedia.org/wiki/Liberation_fontsEdited by user 03 June 2021 14:18:45(UTC)
| Reason: Not specified
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 22/06/2016(UTC) Posts: 5 Location: Bochum
|
I downloaded both appimage files with mono included and made them executeable, but none of them started on my system (Ubuntu 20.04). Is there anything else to be done to run the app?
|
|
|
|
Rank: Member Groups: Registered
Joined: 17/05/2021(UTC) Posts: 19 Was thanked: 5 time(s) in 4 post(s)
|
Originally Posted by: bromptonaut I downloaded both appimage files with mono included and made them executeable, but none of them started on my system (Ubuntu 20.04). Is there anything else to be done to run the app? It is probably because the appimage is built from a system that has a newer glibc-version than what is available on Ubuntu 20.04. Start the appimage from a terminal and see if you get an error message regarding glibc-version. overlord said in a previous post that he will next try to create the appimage on an older system (This will make it compatible with a broader range of linux dists including Ubuntu).
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 22/06/2016(UTC) Posts: 5 Location: Bochum
|
I read that post but I didn't consider that my system might be concerned. I apologize. Ubuntu 20.04 indeed complains about missing GLIBC_2.32. Now I tried to start the appimage on Ubuntu 21.04 and got this error: Quote:[xcb] Too much data requested from _XRead [xcb] This is most likely caused by a broken X extension library Interpreting this exceeds my competences. I attach the full output from the terminal, just in case it could help. 2021-06-03_SMATH_appimage_error_Ubuntu21.04.txt (25kb) downloaded 28 time(s).
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.