c-smile / sciter-sdk

Sciter is an embeddable HTML/CSS/scripting engine
http://sciter.com
Other
2.11k stars 223 forks source link

libsciter-gtk.so for Linux 32 bit #222

Open artenax opened 2 years ago

artenax commented 2 years ago

Rustdesk remote management program, which uses libsciter-gtk.so, is now gaining popularity. Unfortunately for Linux libsciter-gtk.so is only available 64-bit. Can you tell me whether it is realistic to compile 32 bit libsciter-gtk.so (for free, on a computer with 2 GB RAM)? And if yes, please give instructions how to compile. Discussion 61 says we need Scitter source code to compile, which is paid. Nothing has changed since 2017? Isn't there any Scitter source code in this github repository?

IsaacMvmv commented 2 years ago

Source code is here, and which distro do you use?

artenax commented 2 years ago

I have Ubuntu 16.04, but I have many updated programs (gcc10, gtk3.22, etc). But I can install in dualboot the latest stable Debian i386. So let's imagine I have Debian 11...

IsaacMvmv commented 2 years ago

I know how to compile it, but I dont know why it dowsnt compiles libsciter-gtk.so, It sciter-sqlite.so only, with the bin files

artenax commented 2 years ago

I'm sorry to hear that. Maybe there are some files missing. Maybe you can find a way to build it. In that case, please post the instructions. The prebuilt binaries are probably not very useful because of the old glibc.

IsaacMvmv commented 2 years ago

As far as I know, Im doing all correct, Idk why libsciter-gtk.so doesnt build

artenax commented 2 years ago

This is what I get:

aria2c https://codeload.github.com/c-smile/sciter-sdk/zip/refs/heads/master
unzip sciter-sdk-master.zip
cd sciter-sdk-master/build.linux/desktop
make
==== Building usciter (debug_x32) ====
Creating obj/x32/Debug/usciter
sciter-gtk-main.cpp
sciter-sqlite-db.cpp
sciter-sqlite-rs.cpp
sciter-sqlite.cpp
sqlite-wrap.c
usciter.cpp
Creating ../../bin.lnx/x32
Linking usciter
==== Building uminimal (debug_x32) ====
Creating obj/x32/Debug/uminimal
sciter-gtk-main.cpp
uminimal.cpp
Linking uminimal
==== Building ulayered (debug_x32) ====
Creating obj/x32/Debug/ulayered
sciter-gtk-main.cpp
ulayered.cpp
Linking ulayered
==== Building inspector (debug_x32) ====
Creating obj/x32/Debug/inspector
inspector.cpp
sciter-gtk-main.cpp
Linking inspector
==== Building notepad (debug_x32) ====
Creating obj/x32/Debug/notepad
html-notepad.cpp
sciter-gtk-main.cpp
Linking notepad
==== Building notes (debug_x32) ====
Creating obj/x32/Debug/notes
notes.cpp
sciter-gtk-main.cpp
Linking notes
==== Building sciter-sqlite (debug_x32) ====
make[1]: sciter-sqlite.make: No such file or directory
make[1]: *** No rule for building target «sciter-sqlite.make». Stopping.
Makefile:139: recipe execution error for target «sciter-sqlite»
make: *** [sciter-sqlite] Error 2

Sorry, I had to translate the error messages, it's not verbatim. There really is no sciter-sqlite.make file. What to do?

A small number of object files appear in the sciter-sdk-master/bin.lnx/x32 folder.

UPD: If I remove reference to sciter-sqlite.make from Makefile, the sciter-sdk-master/bin.lnx/x32lite folder appears. But libsciter-gtk.so is still not there.

artenax commented 2 years ago

I assume the source code is paid. Therefore, you have no right to disclose the build instructions. Only the scapp application is built on gitlab for linux 32. There seems to be a problem building the rest. Well, now I understand. But it turns out that rustdesk is not really opensource.

IsaacMvmv commented 2 years ago

You have to regen the code Download/install premake using this:

sudo apt install premake

Go to main folder and run:

rm -r build.linux
premake --device=DESKTOP gmake
cd build.linux
make -j$(nproc)
IsaacMvmv commented 2 years ago

Why do you think its paid?

artenax commented 2 years ago

Yes, indeed, the binaries appear and sciter-sqlite.so, but not libsciter-gtk.so. There are no errors. This is strange. Why do you think? Maybe some gtk3 dependency is missing.

I see that premake doesn't even create the libsciter-gtk.make file at the beginning. What does premake create the make files based on?

Why do you think its paid?

From the official site link.

artenax commented 2 years ago

Well, I see that premake creates make files based on premake5.lua. libsciter-gtk.make seems to be equal to usciter.make. I replaced /usr/lib32 with /usr/lib in the make files (lib32 doesn't exist), removed verbose SILENT = @, replaced debug with release. Of the pkg-config dependencies only gtk+-3.0 and fontconfig are needed (I also tried changing gtk+-3.0 to gtk+3.0, but this caused an error). It uses c++14, and only in glfw-opengl c++17. Nevertheless, the files compile, but libsciter-gtk.so is not created. Maybe the source code is incomplete and the full code is paid? I'll have to recompile on a 64 bit system someday (to make sure that 32 bit has nothing to do with it). Maybe libsciter-gtk.so won't show up there either.

UPD:

libsciter-gtk.make seems to be equal to usciter.make

Maybe libsciter-gtk.make (or sciter-gtk.make) is needed. When I try to run any of the compiled binaries, I get:

sciter-sdk-master/bin.lnx/x32/usciter
sciter-sdk-master/bin.lnx/x32/libsciter-gtk.so: unable to open the shared object file:
No such file or directory
Unable to load library: sciter-sdk-master/bin.lnx/x32/libsciter-gtk.so
[../../include/sciter-x-api.h] Unable to load library: libsciter-gtk.so:
unable to open the shared object file: No such file or directory
readelf -d sciter-sdk-master/bin.lnx/x32/usciter
(NEEDED) Shared library: [libc.so.6]
(NEEDED) Shared library: [libgtk-3.so.0]
(NEEDED) Shared library: [libgobject-2.0.so.0]
(NEEDED) Shared library: [libglib-2.0.so.0]
(NEEDED) Shared library: [libdl.so.2]
(NEEDED) Shared library: [libstdc++.so.6]
(NEEDED) Shared library: [libgcc_s.so.1]
(NEEDED) Shared library: [libpthread.so.0]
readelf -d sciter-sdk-master/bin.lnx/x32/sciter-sqlite.so
(NEEDED) Shared library: [libc.so.6]
(NEEDED) Shared library: [libstdc++.so.6]
(NEEDED) Shared library: [libgcc_s.so.1]
(NEEDED) Shared library: [libpthread.so.0]
(SONAME) Shared library: [sciter-sqlite.so]

readelf -a sciter-sdk-master/bin.lnx/x32/usciter

None of the binary according to readelf -a mentions libsciter-gtk.so. However, libsciter-gtk.so is mentioned in the binary code. For example in usciter: /proc/self/exe libsciter-gtk.so [%s] Unable to load library: %s ../../include/sciter-x-api.h SciterAPI [%s]

IsaacMvmv commented 2 years ago

Oh I see

cannondale0815 commented 1 year ago

I am also looking for the 32 bit version of libsciter-gtk.so for a Debian 11 32bit RustDesk scenario. Have any of you been able to find or build one? @artenax @IsaacMvmv

IsaacMvmv commented 1 year ago

It's closed source, you have to wait until they release it