Skip to content

Commit

Permalink
- update color scheme based on pull request #2
Browse files Browse the repository at this point in the history
- update to libarchive 3.7.7
  • Loading branch information
srirangav committed Nov 27, 2024
1 parent e8f51d8 commit 3d6d8d3
Show file tree
Hide file tree
Showing 60 changed files with 2,700 additions and 1,362 deletions.
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
qlZipInfo Licenses
------------------

Portions Copyright (c) 2015-2022 Sriranga Veeraraghavan <ranga@calalum.org>.
All rights reserved.
Portions Copyright (c) 2015-2022, 2024 Sriranga Veeraraghavan
<ranga@calalum.org>. All rights reserved.

For those portions Copyright (c) Sriranga Veeraraghavan, the following license
applies:
Expand Down
31 changes: 19 additions & 12 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Overview:

A folder icon is shown for folders / directories, a file
icon is shown for regular files, and a lock icon is shown
for encypted files. In addition, for BinHex 4.0 archives,
for encrypted files. In addition, for Binhex 4.0 archives,
a package icon is shown if the file stored in the archive
is a Stuffit archive and an application icon is shown if
the file stored in the archive is an application.
Expand All @@ -36,7 +36,7 @@ Overview:
archive, the archive's total uncompressed size, the
archive's total compressed size and the % compression.

For BinHex 4.0 files, the date modified and the summary
For Binhex 4.0 files, the date modified and the summary
row are omitted. Instead the MacOS type and creator are
shown.

Expand All @@ -60,37 +60,44 @@ Install:

Supported MacOSX versions:

v. 1.2.0 and onwards - 10.13+
v. 1.0.9 - 1.1.11 - 10.9+
v. 1.0.8 and earlier - 10.6+
v. 1.2.0 and onwards - MacOSX 10.13 through MacOSX 14
v. 1.0.9 - 1.1.11 - MacOSX 10.9+
v. 1.0.8 and earlier - MacOSX 10.6+

Known Issues:

1. If WinZip is installed (for example, as part of Roxio
Toast), this quicklook generator will not produce a
Toast), this Quicklook generator will not produce a
preview for zip files because Quicklook always prefers
generators that are included in an application and
there is no way to override this behavior without
editing WinZip. Similarly, if Suspicious Package is
installed, this quicklook generator will not produce a
installed, this Quicklook generator will not produce a
preview for .pkg files. See:

https://stackoverflow.com/questions/11705425

2. Unix Compress'ed tar files with the extension .tz or
.tZ cannot be reliabily detected and previewed
.tZ cannot be reliably detected and previewed

3. InstallSheild CAB files are not currently supported

4. Only BinHex 4.0 files are supported
4. Only Binhex 4.0 files are supported

5. Stuffit 5 files are not currently supported

6. MacOS X Sequoia (15.x) and newer are not supported
because they no longer support the Quicklook generator
framework. See:

https://eclecticlight.co/2024/10/31/how-sequoia-has-changed-quicklook-and-its-thumbnails/

History:

v1.2.7 - update to libarchive 3.7.4
v1.2.7 - update color scheme based on pull request #2;
update to libarchive 3.7.7
v1.2.6 - update to Google Toolbox for Mac v.4.0.0 and
libarchive 3.7.2; add support for some ipsw
libarchive 3.7.2; add support for some IPSW
files
v1.2.5 - add support for some CrossOvers archives
v1.2.4 - update to libarchive v.3.7.1 and update lzma
Expand All @@ -107,7 +114,7 @@ History:
v1.1.9 - add support for (some?) CD/DVD images created by
Roxio Toast
v1.1.8 - upgrade to libarchive v.3.6.0
v1.1.7 - add support for BinHex 4.0 files
v1.1.7 - add support for Binhex 4.0 files
v1.1.6 - fix to detect .tgz files as tar-gzip'ed archives and
.tbz files as tar-bzip2'ed archives, disable preview
of 1Password backups
Expand Down
Binary file added Sources/libarchive-3.7.7.tar.gz
Binary file not shown.
14 changes: 14 additions & 0 deletions Sources/libarchive-3.7.7.tar.gz.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEE2yx88bTCZfrvVuP8WEihi48UGEsFAmcLg/sACgkQWEihi48U
GEvcPAv/VFDcvOuRifDWwPS+ct3f9LwDdrpSfhrdcnig99R6Kom1bZgY9TCmIIv2
1qGwkLev7ZVQvAGtrzh1J87F4FzGZh50RhvbwurvBXtoiMspYKiHMuu9kbRPUJ8o
vqa1rsQADKXe8uFyhd37LhxDLDEzl+gYfpI2XP2tMZAaRkdte0zc42MzFVJ5bKCg
V/Q2tbyAiOnK8GZAQBjACb5UAB/KBCXPH+eyZKZ8Qbcp3cqRZfCbb49/q0lipv4N
dmzekZmlPD8HGyaIFJmnb4Xq25ZX/AyLo5+TAOPIQyxHv23Zv8kjlhDvnK9s/CI8
tb89wacyrBVZRdkME2TM64kax+g93508R1H3pp/j2pQHq4TId95tCdDwW3yrNlWk
wwgHEwikC8ER1a11mpkqJFa1QeXTikqsumuXujP5GHiup+FICbctWWgeeyvd5Yh/
sT3ZLRUV1CWmTPQEDYIOPM1Dqd6fYxLB+6veQEnDwIWdjHJUABZ5U9kqoronLd7N
LgMqIziV
=OYQf
-----END PGP SIGNATURE-----
71 changes: 39 additions & 32 deletions qlZipInfo/GeneratePreviewForURL.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
v. 0.1.0 (07/22/2021) - initial release
v. 0.2.0 (11/13/2021) - add binhex support
v. 0.3.0 (08/01/2022) - add stuffit support
Copyright (c) 2015-2022 Sriranga R. Veeraraghavan <ranga@calalum.org>
v. 0.4.0 (10/13/2024) - update color scheme based on PR#2
Copyright (c) 2015-2022, 2024 Sriranga R. Veeraraghavan <ranga@calalum.org>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -50,54 +51,55 @@ enum

enum
{
gBorder = 1,
gFontSize = 2,
gIconHeight = 16,
gIconWidth = 16,
gColPadding = 8,
gColFileSize = 72,
gColFileCompress = 46,
gColFileModDate = 58,
gColFileModTime = 56,
gColFileType = 24,
gColFileName = 288,
gColFileMacType = 58,
gColFileMacCreator = 58,
gBorder = 1,
//gFontSize = 2,
gIconHeight = 16,
gIconWidth = 16,
gColPadding = 8,
gColFileSize = 72,
gColFileCompress = 46,
gColFileModDate = 58,
gColFileModTime = 56,
gColFileType = 24,
gColFileName = 288,
gColFileMacType = 58,
gColFileMacCreator = 58,
gColFileMacFileName = 356,
};

/* table headings */

static const NSString *gTableHeaderName = @"Name";
static const NSString *gTableHeaderSize = @"Size";
static const NSString *gTableHeaderMode = @"Perms.";
static const NSString *gTableHeaderDate = @"Modified";
static const NSString *gTableHeaderType = @"Type";
static const NSString *gTableHeaderCreator = @"Creator";

/* darkmode styles */

static const NSString *gDarkModeBackground = @"#232323";
static const NSString *gDarkModeForeground = @"lightgrey";
static const NSString *gDarkModeBackground = @"#231D2D";
static const NSString *gDarkModeForeground = @"#DDDDDD";
static const NSString *gDarkModeTableRowEvenBackgroundColor
= @"#313131";
= @"#2F2A39";
static const NSString *gDarkModeTableRowEvenForegroundColor
= @"white";
= @"DEDEDE";
static const NSString *gDarkModeTableBorderColor
= @"#232323";
= @"#231D2D";
static const NSString *gDarkModeTableHeaderBorderColor
= @"#555555";
= @"#403B47";
/* light mode styles */

static const NSString *gLightModeBackground = @"white";
static const NSString *gLightModeForeground = @"black";
static const NSString *gLightModeForeground = @"6e6b6d";
static const NSString *gLightModeTableRowEvenBackgroundColor
= @"#F5F5F5";
= @"#F4F5F5";
static const NSString *gLightModeTableRowEvenForegroundColor
= @"black";
= @"6e6b6d";
static const NSString *gLightModeTableBorderColor
= @"white";
static const NSString *gLightModeTableHeaderBorderColor
= @"#E7E7E7";
= @"#DDDDDD";

/* icons */

Expand All @@ -116,9 +118,14 @@ static const char *gFileNameUnavilable = "[Unavailable]";
static const NSString *gFileNameUnavilableStr =
@"[Unavailable]";

/* default font style - sans serif */
/*
font style
see: https://stackoverflow.com/questions/32660748
*/

static const NSString *gFontFace = @"sans-serif";
static const NSString *gFontFace =
@"-apple-system, system-ui, 'Helvetica Neue', 'Lucida Grande', sans-serif";
static const NSString *gFontSize = @"small";

/* filesize abbreviations */

Expand All @@ -129,15 +136,15 @@ static const char *gFileSizeGigaBytes = "G";
static const char *gFileSizeTeraBytes = "T";

static const char *gMacFileTypeApplication = "APPL";
static const char *gMacFileTypeSIT = "SITD";
static const char *gMacFileTypeSIT5 = "SIT5";
static const char *gMacFileTypeSIT = "SITD";
static const char *gMacFileTypeSIT5 = "SIT5";

/* UTIs for files that may require special handling */

static const CFStringRef gUTIGZip = CFSTR("org.gnu.gnu-zip-archive");
static const CFStringRef gUTIGZip = CFSTR("org.gnu.gnu-zip-archive");
static const CFStringRef gUTIBinHex = CFSTR("com.apple.binhex-archive");
static const CFStringRef gUTISIT1 = CFSTR("com.stuffit.archive.sit");
static const CFStringRef gUTISIT2 = CFSTR("com.allume.stuffit-archive");
static const CFStringRef gUTISIT1 = CFSTR("com.stuffit.archive.sit");
static const CFStringRef gUTISIT2 = CFSTR("com.allume.stuffit-archive");

/* structs */

Expand Down
15 changes: 13 additions & 2 deletions qlZipInfo/GeneratePreviewForURL.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
v. 0.2.5 (10/26/2021) - add support for uu encoded archives and rpms
v. 0.3.0 (11/13/2021) - add support for binhex archives
v. 0.4.0 (08/01/2022) - add support for stuffit archives
v. 0.5.0 (10/13/2024) - update color scheme based on PR#2
Copyright (c) 2015-2022 Sriranga R. Veeraraghavan <ranga@calalum.org>
Copyright (c) 2015-2022, 2024 Sriranga R. Veeraraghavan <ranga@calalum.org>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -1440,6 +1441,17 @@ static bool formatOutputHeader(NSMutableString *qlHtml)

[qlHtml appendString: @"<style>\n"];

/*
set the font for all items
see: https://stackoverflow.com/a/42928750
*/

[qlHtml appendFormat:
@"*{ font-family: %@; font-size: %@; }",
gFontFace,
gFontSize];

/* darkmode styles */

[qlHtml appendString: @"@media (prefers-color-scheme: dark) { "];
Expand Down Expand Up @@ -1588,7 +1600,6 @@ static bool startOutputBody(NSMutableString *qlHtml)
}

[qlHtml appendFormat: @"<body>\n"];
[qlHtml appendFormat: @"<font face=\"%@\">\n", gFontFace];

return true;
}
Expand Down
1 change: 1 addition & 0 deletions qlZipInfo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<string>org.idpf.epub-container</string>
<string>dyn.ah62d4rv4ge80g8dbsmv0u4p0qy</string>
<string>com.apple.itunes.ipsw</string>
<string>dyn.ah62d4rv4ge80k3pc</string>
</array>
</dict>
</array>
Expand Down
4 changes: 2 additions & 2 deletions qlZipInfo/libarchive/archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* assert that ARCHIVE_VERSION_NUMBER >= 2012108.
*/
/* Note: Compiler will complain if this does not match archive_entry.h! */
#define ARCHIVE_VERSION_NUMBER 3007004
#define ARCHIVE_VERSION_NUMBER 3007007

#include <sys/stat.h>
#include <stddef.h> /* for wchar_t */
Expand Down Expand Up @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void);
/*
* Textual name/version of the library, useful for version displays.
*/
#define ARCHIVE_VERSION_ONLY_STRING "3.7.4"
#define ARCHIVE_VERSION_ONLY_STRING "3.7.7"
#define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
__LA_DECL const char * archive_version_string(void);

Expand Down
Loading

0 comments on commit 3d6d8d3

Please sign in to comment.