probonopd / Filer

A clean rewrite of the Filer file manager for helloSystem, inspired by John Siracusa's descriptions of "Spatial Orientation"
BSD 2-Clause "Simplified" License
13 stars 1 forks source link

update libsqsh to v1.0.0 #4

Closed Gottox closed 1 year ago

Gottox commented 1 year ago

I wasn't able to test Filer itself as a few tools were missing, but could you try if this fixes the issue?

image

probonopd commented 1 year ago

Will do. In the meantime, sudo touch /usr/local/bin/open ; sudo chmod +x /usr/local/bin/open should get it past that error.

Gottox commented 1 year ago

image

probonopd commented 1 year ago

Oh, right. My test there is more thorough than I remembered. You can get the proper one from https://github.com/helloSystem/launch/releases/tag/continuous. Sorry for the hassle.

Gottox commented 1 year ago

Okay, from my tests, it seems to work.

probonopd commented 1 year ago

Hmmm....

I am still getting

CustomFileIconProvider::icon:  "/home/user/Desktop/appimagetool-730-x86_64.AppImage"
offset: 594264 for file "/home/user/Desktop/appimagetool-730-x86_64.AppImage"
Extracting AppImage icon for file "/home/user/Desktop/appimagetool-730-x86_64.AppImage"
Assertion failed: (acc == 0), function cx_rc_map_cleanup, file ../subprojects/cextras-887bee6835d5fa8213a8f9ffbdf3a26f119983a3/lib/collection/rc_map.c, line 222.

This is what I did:

git clone https://github.com/Gottox/libsqsh
cd libsqsh
git checkout v1.0.0
meson setup build -Dwerror=false -Dexamples=false -Dcurl=disabled -Dzlib=enabled -Dlz4=disabled -Dlzma=disabled -Dzstd=enabled -Dthreads=enabled -Ddoc=false\n
cd build
meson compile
sudo meson install
cd /tmp
git clone https://github.com/Gottox/Filer
cd Filer
git checkout libsqsh-1.0.0
mkdir build
cd build
cmake ..
make -j8
launch ./Filer.app
Gottox commented 1 year ago

Looking into it tomorrow.

Gottox commented 1 year ago

The System is Ubuntu or FreeBSD?

probonopd commented 1 year ago

I am using FreeBSD: https://github.com/helloSystem/ISO/releases/tag/experimental-13.2

Gottox commented 1 year ago

I can't reproduce it on Linux, okay, let me setup fbsd then.

probonopd commented 1 year ago

Sorry for the extra hassle. In case you want to use helloSystem, don't forget to also install the Developer Tools from developer.img after you installed the helloSystem Live ISO. Thanks for your patience and support.

probonopd commented 1 year ago

To kill the (old) Filer:

  1. Run killall daemon (otherwise the Filer automatically restarts when it gets killed)
  2. Press Ctrl-Alt-Esc, then click on the desktop background
  3. Now you can run the new Filer (the one under development)
Gottox commented 1 year ago

Can reproduce. Let's find out what's wrong.

Gottox commented 1 year ago

*sigh*

diff --git a/src/SqshArchiveReader.cpp b/src/SqshArchiveReader.cpp
index b665a01..f7389a6 100644
--- a/src/SqshArchiveReader.cpp
+++ b/src/SqshArchiveReader.cpp
@@ -73,7 +73,6 @@ QByteArray SqshArchiveReader::readFileFromArchive(const QString& sqsh_file, cons
     QByteArray file_path_bytes = file_path.toUtf8();
     const char* file_path_cstr = file_path_bytes.constData();

-    struct SqshFile* file = NULL;
     uint8_t *file_data = NULL;
     size_t file_size = 0;
     QByteArray data; // Declare the 'data' variable here
@@ -87,11 +86,6 @@ QByteArray SqshArchiveReader::readFileFromArchive(const QString& sqsh_file, cons
         goto out;
     }

-    file = sqsh_open(archive, file_path_cstr, &error_code); // Use 'file_path_cstr' here
-    if (error_code != 0) {
-        sqsh_perror(error_code, "sqsh_open");
-        goto out;
-    }
     file_size = sqsh_easy_file_size(archive, file_path_cstr, &error_code);
     if (error_code != 0) {
         sqsh_perror(error_code, "sqsh_easy_file_size");
Gottox commented 1 year ago

Okay, I fixed the issue. It was suprisingly easy and hiding in plain sight.

The issue why it wasn't caught on Linux was, that I compiled libsqsh with -DNDEBUG on that system, which disables those leak-checks.

probonopd commented 1 year ago

Thank you very much for your help @Gottox, this is tremendous. It is working great now! :+1: