portable packages made with CDE

Moderator: Forum moderators

Post Reply
User avatar
Dingo
Posts: 244
Joined: Sat Aug 01, 2020 3:03 pm
Has thanked: 10 times
Been thanked: 17 times

portable packages made with CDE

Post by Dingo »

these are portabilized packages I made with CDE

  1. qcomicbook

https://www.dropbox.com/s/cvw4fsa4ytf3q ... ar.xz?dl=1

a light qt3 cbz/cbr comic viewer that I used in puppy 3.01

you need to go in

Code: Select all

cde-root/tmp/qcomicbook.cde

and click on .cde script. I don't have idea to avoid this every time, if you know how to make a shortcut to cde script, I'll be pleased

capture10787.png
capture10787.png (9.57 KiB) Viewed 1792 times
User avatar
fredx181
Posts: 3075
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 374 times
Been thanked: 1312 times
Contact:

Re: portable packages made with CDE

Post by fredx181 »

Dingo wrote:

you need to go in

Code: Select all

cde-root/tmp/qcomicbook.cde

and click on .cde script. I don't have idea to avoid this every time, if you know how to make a shortcut to cde script, I'll be pleased

I didn't test as I'm not on 32-bit atm, but I'd say it should work a script directly in cde-qcomicbook dir containing:

EDIT: Previous code didn't work, tested now and this works for me:

Code: Select all

#!/bin/sh

HERE="$(dirname "$(readlink -f "${0}")")"

cd "$HERE/cde-root" && "$HERE/cde-exec" "tmp/qcomicbook" "$@"

This way, when creating (somewhere) a symlink to this script , it should work too.

Fred

User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: portable packages made with CDE

Post by mikewalsh »

@Dingo :-

Heh. That's a surprise..!

I downloaded this to take a look. I take it this is normally installed manually, yes? (It's not a .pet or SFS.) Ah, no, of course; this is similar to other self-contained apps, isn't it.....everything running from within its own directory. Hmm...

In Fossapup64 - with the 32-bit_compat_libs SFS loaded - I just ran qcomicbook.cde from the terminal, out of curiosity, to see what happened. Damn me if it didn't fire straight up, without the need to install anything else....

Whether or not it will actually function, and do what it's supposed to, I don't know; I don't really know what you're supposed to do with it, TBH.

But that's not bad for backwards compatibility, is it? Something built for Puppy 3, running quite happily under Puppy 9...!

What DO you use this for?

Mike. ;)

Last edited by mikewalsh on Mon May 17, 2021 12:42 am, edited 1 time in total.
User avatar
Dingo
Posts: 244
Joined: Sat Aug 01, 2020 3:03 pm
Has thanked: 10 times
Been thanked: 17 times

Re: portable packages made with CDE

Post by Dingo »

@mikewalsh

I use this comic book viewer for images packages into a . zip or .far Archive with cbz and CBR extensions

I was in love with puppy 3.01 since 2007 to 2016, with same savefile and hypercustomized my puppy version compiling tons of terminal and GUI apps. There are many light apps I miss in modern puppies that I try to portabilize with CDE, since without all these tools I compiled for me in all these years, I'm feeling like a kid who lost his closer friends

CDE is no more downloadable on project page, but this is the 32 bit binary I had

download/file.php?id=2300

There are some oddities with CDE, like the fact that everything is "jailed" in CDE-root directory. For instance, if you make portable a graphic application with CDE, it's file-picker cannot open files outside the CDE-root directory. You need to copy, move or (maybe) symlink files you want open in CDE-root directory

User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: portable packages made with CDE

Post by mikewalsh »

@Dingo :-

A-ha. In other words, it's like a chroot.

I tried Fred's suggestion, above, y'see. Created a script called 'LAUNCH', inside 'qcomicbook', and alongside 'cde-root', then added Fred's code above.....and this is what I got:-

Code: Select all

root# ./LAUNCH
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
Error: cde-exec must be run within a cde-root/ directory
root#

Ignore the first part.....that's only because I'm running it in a 64-bit Pup with 32-bit compat libs loaded. It's that's last line we're interested in, of course:-

Code: Select all

Error: cde-exec must be run within a cde-root/ directory

.....which immediately makes no sense, because if that's the case, why does the cde-exec binary sit outside cde-root? Uh.....ah; I guess that means it has to be called from within cde-root. Hmm....o-kayyy.

So; you need something LIKE a chroot script to start it 'externally'......except a 'true' chroot script won't work. And interestingly, you can start this by directly clicking the script inside the cde-root 'jail'. You can't do this with a proper chroot 'jail'; that HAS to be started externally (from the 'host' Puppy).

I'm at a loss to understand quite how this does fire-up.....

@fredx181 :-

Any ideas here?

Mike. :?

Last edited by mikewalsh on Sun May 16, 2021 10:51 pm, edited 1 time in total.
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: portable packages made with CDE

Post by taersh »

Make it a RoxApp.

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: portable packages made with CDE

Post by mikewalsh »

taersh wrote: Sun May 16, 2021 10:49 pm

Make it a RoxApp.

Mm-hm. Yeah, that would make more sense; Fred's scripts will do that for you, as a by-product of creating an AppImage or self-extracting script.....

Mike. ;)

User avatar
fredx181
Posts: 3075
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 374 times
Been thanked: 1312 times
Contact:

Re: portable packages made with CDE

Post by fredx181 »

mikewalsh wrote:

I'm at a loss to understand quite how this does fire-up.....

@fredx181 :-

Any ideas here?

Hi Mike, I tested now and found after some tries that this works:

Code: Select all

#!/bin/sh

HERE="$(dirname "$(readlink -f "${0}")")"

cd "$HERE/cde-root" && "$HERE/cde-exec" "tmp/qcomicbook" "$@"

This way by cd'ing to cde-root first, cde-exec runs from within cde-root as it's apparently supposed to be.

Edited my previous post.

User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: portable packages made with CDE

Post by mikewalsh »

fredx181 wrote: Mon May 17, 2021 7:48 am
mikewalsh wrote:

I'm at a loss to understand quite how this does fire-up.....

@fredx181 :-

Any ideas here?

Hi Mike, I tested now and found after some tries that this works:

Code: Select all

#!/bin/sh

HERE="$(dirname "$(readlink -f "${0}")")"

cd "$HERE/cde-root" && "$HERE/cde-exec" "tmp/qcomicbook" "$@"

This way by cd'ing to cde-root first, cde-exec runs from within cde-root as it's apparently supposed to be.

Edited my previous post.

@fredx181 :-

Yah, that works nicely. Now, why didn't I think of that..? (D'oh.....!!) :roll:

Mike. ;)

User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: portable packages made with CDE

Post by mikewalsh »

@Dingo :-

There ya go. Fred's modified script, above, works nicely. I've used it in the following way, to make it a bit easier still....

  • 1) Create a new directory; call it "QComicBook-portable".

  • 2) Place the entire "cde-qcomicbook" directory inside that.

  • 3) Create a new script beside it. Call it "LAUNCH", and put the following inside it:-

Code: Select all

#!/bin/sh

HERE="$(dirname "$(readlink -f "${0}")")"

cd "$HERE/cde-qcomicbook/cde-root" && "$HERE/cde-qcomicbook/cde-exec" "tmp/qcomicbook" "$@"

Finally, tart it up by putting the attached PNG icon inside the "QComicBook-portable" directory, and re-naming it to ".DirIcon" (nothing else; lose the .png extension, as well). Don't worry about the size; ROX automatically re-sizes icons for the pinboard.

Mike. ;)

Attachments
PNG icon for .DirIcon....
PNG icon for .DirIcon....
comics.png (29.79 KiB) Viewed 1705 times
Last edited by mikewalsh on Mon May 17, 2021 12:11 pm, edited 1 time in total.
User avatar
fredx181
Posts: 3075
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 374 times
Been thanked: 1312 times
Contact:

Re: portable packages made with CDE

Post by fredx181 »

Dingo wrote:

There are some oddities with CDE, like the fact that everything is "jailed" in CDE-root directory. For instance, if you make portable a graphic application with CDE, it's file-picker cannot open files outside the CDE-root directory. You need to copy, move or (maybe) symlink files you want open in CDE-root directory

What I tried and works is creating a symlink to /mnt in cde-root, to be able to browse mounted partitions in /mnt.

User avatar
Dingo
Posts: 244
Joined: Sat Aug 01, 2020 3:03 pm
Has thanked: 10 times
Been thanked: 17 times

Re: portable packages made with CDE

Post by Dingo »

@fredx181 @mikewalsh wow! It seems very promising! I'll make other packages with CDE. There are many apps I miss in modern puppies that I'm unable to compile with newer gcc due to source code incompatibilities

User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: portable packages made with CDE

Post by taersh »

Hi.

In 2014 I was already experimenting with CDE packages.
At these days I created a RoxApp for the CDE packager to easily create CDE packages.

CDE-Packager.tar.gz
(371.33 KiB) Downloaded 102 times

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: portable packages made with CDE

Post by mikewalsh »

@Dingo :-

It's just a variation on how I package a lot of the portables. I got into the habit of using that clearly marked "LAUNCH" script some time ago; makes it easier - especially for beginners - to fire things up instead of digging around inside the main app directory to find a specific script to start 'em.

But the "readlink 'trick'":-

Code: Select all

HERE="$(dirname "$(readlink -f "$0")")"

....that's the bit of code that's basically made all my portables possible. And I have Fred to thank for that; either digging it out from somewhere, or coming up with it himself (though I'm pretty sure that's been floating around the web in one form or another for a long time, 'cos I think I've spotted it myself a few times.)

If you build any others, you ought to be able to "modify" the set-up for this one to work with others, too. It's not hard.....just needs a bit of careful editing, that's all.

Mike. ;)

Last edited by mikewalsh on Mon May 17, 2021 12:19 pm, edited 1 time in total.
User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1981 times

Re: portable packages made with CDE

Post by mikewalsh »

fredx181 wrote: Mon May 17, 2021 11:04 am
Dingo wrote:

There are some oddities with CDE, like the fact that everything is "jailed" in CDE-root directory. For instance, if you make portable a graphic application with CDE, it's file-picker cannot open files outside the CDE-root directory. You need to copy, move or (maybe) symlink files you want open in CDE-root directory

What I tried and works is creating a symlink to /mnt in cde-root, to be able to browse mounted partitions in /mnt.

@fredx181 :-

Fred:-

That's similar to what I do with the browsers and various other apps I run from my chroot Puppies. They have to download/upload from within the chroot, so I've created a directory in the chroot Puppy's /root called 'MEDIA', then created Downloads & Uploads inside that.

The chroot's 'MEDIA' directory is then simply sym-linked into the 'host' Puppy's /root directory, for easy access. And I use 'Copyfast' to just move stuff in there when I'm uploading stuff to the Drive, or for here on the forum, or image-hosting.....whatever. Works well.

Mike. ;)

User avatar
Dingo
Posts: 244
Joined: Sat Aug 01, 2020 3:03 pm
Has thanked: 10 times
Been thanked: 17 times

Re: portable packages made with CDE

Post by Dingo »

Hurrah! Yippee! I just packaged with cde several other applications I'll post in this thread in my first message

sodipodi 0.34 (the good old 32 bit sodipodi it is not possible compile with modern gcc) is now running on xenialpup64 very fine, alongside with epdfview and gsview

out.png
out.png (51.25 KiB) Viewed 1572 times
User avatar
fredx181
Posts: 3075
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 374 times
Been thanked: 1312 times
Contact:

Re: portable packages made with CDE

Post by fredx181 »

@Dingo
I think your cde version is rather old, I compared and had better results with a newer version, here it is, cde.tar.gz (32 bit):

https://dl.dropboxusercontent.com/s/3ez ... ar.gz?dl=1

Code: Select all

# ./cde
CDE: Code, Data, and Environment packaging for Linux
Copyright 2010-2011 Philip Guo (pg@cs.stanford.edu)
-----------------
# ls -l cde
-rwxrwxrwx 1 root root 909044 okt 22  2018 cde

Fred

User avatar
mikeslr
Posts: 2963
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 917 times

Re: portable packages made with CDE

Post by mikeslr »

Dingo wrote: Mon May 17, 2021 4:22 pm

Hurrah! Yippee! I just packaged with cde several other applications I'll post in this thread in my first message

Please Don't.
Don't get me wrong. I'm glad your back :D and contributing, indeed contributing both interesting ideas and packages. :thumbup: But I started "AppImages, Snaps and Flatpaks" as soon as I could when this became Puppy's principal meeting place. It started as a 'thread' and has since become a 'Sub-sub-Forum'. In my first post I wrote:
"Please ONLY add to this thread other repositories; general information about AppImages, Snaps and Flatpaks, techniques for working with them and corrections of any mistakes in this thread,
To assist anyone looking for a particular application or type of application, please discuss specific applications under the Software Section discussing that specific type of application.

I know others have not honored that plea. But there is method to my madness. Have you ever tried to find some application? Even one about which you posted? Unless there's some recognizable structure to the Forum, it's almost impossible. If you're looking for an application, the most likely place to find it will be in the Additional Software Sub-Forum which holds the treads of that specific type of application.

By the way, your initial post about CDE belongs here. It's another method of packaging, not mentioned in the title because I didn't know about it. And now that it's been 'rediscovered', should prove both interesting and useful. :thumbup:

Last edited by mikeslr on Mon May 17, 2021 11:05 pm, edited 1 time in total.
User avatar
Dingo
Posts: 244
Joined: Sat Aug 01, 2020 3:03 pm
Has thanked: 10 times
Been thanked: 17 times

Re: portable packages made with CDE

Post by Dingo »

Ok. Should I post the packages I made portable with CDE in separated software section, right?

User avatar
Dingo
Posts: 244
Joined: Sat Aug 01, 2020 3:03 pm
Has thanked: 10 times
Been thanked: 17 times

Re: portable packages made with CDE

Post by Dingo »

@fredx181 thanks. What do mean, exactly, with "better results"?

User avatar
fredx181
Posts: 3075
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 374 times
Been thanked: 1312 times
Contact:

Re: portable packages made with CDE

Post by fredx181 »

Dingo wrote: Mon May 17, 2021 11:38 pm

@fredx181 thanks. What do mean, exactly, with "better results"?

On second thought I must say that I don't really know, probably it depends on the program you make a cde-package from.
I was experimenting with making a cde-package for a Wine program and found that the newer version does accept at the command line e.g. env WINEPREFIX=... where the older version doesn't.

User avatar
mikeslr
Posts: 2963
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 917 times

Re: portable packages made with CDE

Post by mikeslr »

Dingo wrote: Mon May 17, 2021 10:20 pm

Ok. Should I post the packages I made portable with CDE in separated software section, right?

Right. Ordinarily, I would have suggested that sodipodi 0.34 be published here, viewforum.php?f=103 "Advanced Topics>Additional Software (PETs, n' stuff)> Graphics" with other graphics applications.
But your posts have been our re-introduction to CDE. Going into detail about employing CDE in order to run a specific application serves as a good way to explain the concept. And particularly valuable was your report that "sodipodi 0.34 (the good old 32 bit sodipodi it is not possible compile with modern gcc) is now running on xenialpup64 very fine." Emphasis supplied. That told us how useful CDE may can be in general which stimulates thinking about 'How can I put this to use?'

I made a note on my 'ToDo List' to explore CDE further. And today I see that fredx181 has already beaten me to exploring the particular area my initial thought about where CDE could be particularly valuable: Wine and the possibility of running it in a container. :D

User avatar
fredx181
Posts: 3075
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 374 times
Been thanked: 1312 times
Contact:

Re: portable packages made with CDE

Post by fredx181 »

--- removed ---

Post Reply

Return to “AppImages, Snaps and Flatpaks”