Page 1 of 1

hints and a noob question answered please. about linking /embedding a file.

Posted: Wed Feb 19, 2025 6:43 am
by noxidderf
I want to add or embed or link a file with a purebasic program.
I do not know what I am doing. just looking for pointer to what i need to know.
I dont know enough to ask the right questions.
I have a javascript engine ( quickJS ) that I want to work with.
I have the project compiled from github.
I have a stand alone program. i have the headers files. I also have a libquickjs.a file.
I think that might be what I want to work with but I dont know.
some places tell me this is an archive.
it might also be a object file that can be used with the header.
like I said I just would like a couple of hints and maybe where to look.


I usually just make some simple script or command line thinks to make things easy on my pc.
Fred.



Purbasic 6.20
OS: Pop!_OS 22.04 LTS x86_64 (ubuntu)
Terminal: gnome-terminal
CPU: AMD Ryzen 7 8845HS w/ Radeon 780M Graphics (16) @ 5.137GHz
GPU: AMD ATI 66:00.0 Device 1900
Memory: 18174MiB / 61082M

Re: hints and a noob question answered please. about linking /embedding a file.

Posted: Wed Feb 19, 2025 7:00 am
by boddhi
noxidderf wrote: I want to add or embed or link a file with a purebasic program.
It's a topic that's been discussed many times, and you can find it with the search module.

You can use IncludeBinary.
An example among many published : https://www.purebasic.fr/english/viewto ... 55#p593755

Re: hints and a noob question answered please. about linking /embedding a file.

Posted: Wed Feb 19, 2025 7:05 am
by STARGĂ…TE
A couple of hints:

registry
file extension
MIME type
ProgramParameter()

Re: hints and a noob question answered please. about linking /embedding a file.

Posted: Wed Feb 19, 2025 1:19 pm
by AZJIO
noxidderf wrote: Wed Feb 19, 2025 6:43 am I want to add or embed or link a file with a purebasic program.
Use purebasic_gtk2
https://www.purebasic.fr/english/viewtopic.php?t=83762

Re: hints and a noob question answered please. about linking /embedding a file.

Posted: Wed Feb 19, 2025 6:18 pm
by noxidderf
boddhi wrote: Wed Feb 19, 2025 7:00 am
noxidderf wrote: I want to add or embed or link a file with a purebasic program.
It's a topic that's been discussed many times, and you can find it with the search module.

You can use IncludeBinary.
An example among many published : https://www.purebasic.fr/english/viewto ... 55#p593755


not whatI was trying to say.
the post linked has a file contained inside the executable.
I asked the question in a wrong way. I was not sure how to ask it.
This is an example of what I was talking about
https://www.purebasic.fr/english/viewtopic.php?t=67365
where lua and purebasic has access back and forth.
I was also trying to figure out if while compiling quickJS (the original) was also being compiled as a library to be call externally.

Re: hints and a noob question answered please. about linking /embedding a file.

Posted: Thu Feb 20, 2025 5:16 am
by noxidderf
after much research mostly because I dont know enough to ask the right questions.
I assumes some here might have worked with such a thing. after all someone did the thing with lua.
I am putting here what I found. it is a longish post from 'grok' about my question. posting the link not sure if posting all the text is ok or not so link:

https://x.com/i/grok/share/1fDpEf9pYBdTjxemLwGz7iml0
answers the question about linking the static compiled library (and that it is a library)

Fred.