Can I make a single executable file from multiple shared objects binary files ? #309
Replies: 7 comments 7 replies
-
|
Yes, that's probably something you could do with Makeself as all the files can be in a single archive and they will be unpacked in the same location. You'll have to make sure the dynamic linker is able to find your |
Beta Was this translation helpful? Give feedback.
-
|
If you just want to run the binary and it is able to load the dynamic libraries from its directory, then your startup script should just be "./MyExecutableBinaryFile" (it's just any command run from inside the directory after extraction) |
Beta Was this translation helpful? Give feedback.
-
|
If you really do need that script to set up the environment prior to starting the binary, then sure, put it in the archive and then use |
Beta Was this translation helpful? Give feedback.
-
|
Yeah, it will make a .run file with the contents of your directory. You can run the binary this way and you can also skip the last empty argument if you don't need it. |
Beta Was this translation helpful? Give feedback.
-
|
Out of curiosity one more question please: I mean makeself.sh option should receive a passphrase from command line and store it on the output file. Now a days code security is very important, that's why I don't use PyInstaller. Is this something closer to what I talk ? |
Beta Was this translation helpful? Give feedback.
-
|
Not directly, Makeself archives are basically just compressed tar archives with a stub of shell script to handle the extraction. Yes there are additional options to handle encryption via GPG if that's something you feel like you need. It is not a substitute for code signatures though, once your files are extracted it's really pretty much the same situation as you still need to be able to load and run the code. I don't think any current Linux kernel has this kind of capability just now. |
Beta Was this translation helpful? Give feedback.
-
|
@megastep I see the MyExecutableBinaryFile.run file is mere a text file (sh script) Is there any solution which should produce a native binary file as a C or C++ binary. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was looking for similar solution and finaly found this today.
But I have some questions.
I have 1 execuable binary file 30MB
And 5 shared object files as show below.
MyExecutableLinuxBinaryFile
MySharedObject1.so
MySharedObject2.so
MySharedObject3.so
MySharedObject4.so
MySharedObject5.so
I need to make a single self extracted file (NewFile).
When user run that NewFile, it should extract all the above 5 files on a subfolder and run my MyExecutableLinuxBinaryFile file.
Is it possble ?
Can some one help me how to do this ?
My System:
Raspberry Pi -4
Linux 32 bit Buster OS
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions