3MFConsortium / lib3mf

lib3mf is an implementation of the 3D Manufacturing Format file standard
http://3mf.io
BSD 2-Clause "Simplified" License
236 stars 94 forks source link

lib3mf-2.3.2-source-with-submodules.zip extracts itself into the wrong folder #391

Open lvk88 opened 2 months ago

lvk88 commented 2 months ago

Issue

Downloading and extracting lib3mf-2.3.2-source-with-submodules.zip from the releases page will put all the contents of the zip file in the same folder as the zip file itself.

This is inconsistent with how the zip file for the source code is compressed. This file extracts itself into a subfolder, which, in my opinion is the correct behavior.

Steps to reproduce

wget https://github.com/3MFConsortium/lib3mf/releases/download/v2.3.2/lib3mf-2.3.2-source-with-submodules.zip
unzip lib3mf-2.3.2-source-with-submodules.zip
ls -l

The output of ls will be

total 43536
drwxrwxr-x 4 lvk88 lvk88     4096 Sep  6 20:14 Autogenerated
drwxrwxr-x 2 lvk88 lvk88     4096 Sep  6 20:14 AutomaticComponentToolkit
drwxrwxr-x 2 lvk88 lvk88     4096 Sep  6 20:14 CI
drwxrwxr-x 2 lvk88 lvk88     4096 Sep  6 20:14 cmake
-rw-r--r-- 1 lvk88 lvk88    11606 Jun 18 07:22 CMakeLists.txt
-rw-r--r-- 1 lvk88 lvk88     3672 Jun 18 07:22 CONTRIBUTING.md
drwxrwxr-x 4 lvk88 lvk88     4096 Sep  6 20:14 Documentation
drwxrwxr-x 6 lvk88 lvk88     4096 Sep  6 20:14 Include
-rw-rw-r-- 1 lvk88 lvk88 44490341 Jul  6 18:37 lib3mf-2.3.2-source-with-submodules.zip
-rw-r--r-- 1 lvk88 lvk88      311 Jun 18 07:22 lib3mf.pc.in
-rw-r--r-- 1 lvk88 lvk88     9499 Jun 18 07:22 lib3mf_version_update.py
drwxrwxr-x 8 lvk88 lvk88     4096 Sep  6 20:14 Libraries
-rw-r--r-- 1 lvk88 lvk88     1292 Jun 18 07:22 LICENSE
-rw-r--r-- 1 lvk88 lvk88     3236 Jun 18 07:22 README.md
drwxrwxr-x 4 lvk88 lvk88     4096 Sep  6 20:14 SDK 
drwxrwxr-x 5 lvk88 lvk88     4096 Sep  6 20:14 Source
drwxrwxr-x 8 lvk88 lvk88     4096 Sep  6 20:14 submodules
drwxrwxr-x 6 lvk88 lvk88     4096 Sep  6 20:14 Tests

Compare this to the standard source code zip:

total 37576
drwxrwxr-x 14 lvk88 lvk88     4096 Jul  3 14:14 lib3mf-2.3.2                                                                                                                                                       
-rw-rw-r--  1 lvk88 lvk88 38470801 Sep  6 20:15 v2.3.2.zip

Detected this issue while working on cnr-isti-vclab/meshlab/pull/1521

vijaiaeroastro commented 2 months ago

@lvk88 You can simply unzip with a directory name

unzip lib3mf-2.3.2-source-with-submodules.zip -d lib3mf-2.3.2

You can give any directory name with -d option

lvk88 commented 2 months ago

Thanks @vijaiaeroastro for the quick answer.

3MFConsortium could also zip the file in a way that is consistent with the other archives on the releases page. 😈

Edit:

but bad jokes aside, why I see this as an issue is that in the project where lib3mf 2.2.0 have been used so far, I recently tried to update to 2.3.2 by changing the name of the zip that is to be downloaded from the releases page. Sadly, this didn't work, because 2.2.0 was packed in a different way than lib3mf-2.3.2-source-with-submodules.zip . It's not a huge issue, though. I thought that it might be worth pointing out.

vijaiaeroastro commented 2 months ago

@vijaiaeroastro Already fixed. Check and see if it works as expected.

vijaiaeroastro commented 2 months ago

Thanks @vijaiaeroastro for the quick answer.

3MFConsortium could also zip the file in a way that is consistent with the other archives on the releases page. 😈

Edit:

but bad jokes aside, why I see this as an issue is that in the project where lib3mf 2.2.0 have been used so far, I recently tried to update to 2.3.2 by changing the name of the zip that is to be downloaded from the releases page. Sadly, this didn't work, because 2.2.0 was packed in a different way than lib3mf-2.3.2-source-with-submodules.zip . It's not a huge issue, though. I thought that it might be worth pointing out.

This artifact was created for internal purposes. I see that it is actually useful for lib3mf users too. So, we will be more consistent in future. Thanks for your report. Much appreciated :)

lvk88 commented 2 months ago

@vijaiaeroastro thanks a lot for the quick fix!

vijaiaeroastro commented 2 months ago

@lvk88 No issues. I use MeshLab quite a lot in my day-to-day work. I would be happy to assist in getting lib3mf working in MeshLab. Feel free to create any issues / queries.