Skip to content

Commit

Permalink
v0.3.2
Browse files Browse the repository at this point in the history
  * [enhancement] Support for *volume* icons, at least in principle; **caveat**: as of macOS 13.1, this often fails in practice; see https://apple.stackexchange.com/q/451965/28668 for an example.
  • Loading branch information
mklement0 committed Dec 29, 2022
1 parent c529d33 commit bb22977
Show file tree
Hide file tree
Showing 9 changed files with 2,214 additions and 7,564 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Versioning complies with [semantic versioning (semver)](http://semver.org/).

<!-- NOTE: An entry template for a new version is automatically added each time `make version` is called. Fill in changes afterwards. -->

* **[v0.3.2](https://github.com/mklement0/fileicon/compare/v0.3.1...v0.3.2)** (2022-12-29):
* [enhancement] Support for *volume* icons, at least in principle; **caveat**: as of macOS 13.1, this often fails in practice; see https://apple.stackexchange.com/q/451965/28668 for an example.

* **[v0.3.1](https://github.com/mklement0/fileicon/compare/v0.3.0...v0.3.1)** (2022-04-07):
* [compatibility] Removed dependency on Python in favor of AppleScript with its ObjC bridge, courtesy of [@scriptingosx](https://github.com/scriptingosx)

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ifeq ($(NOTEST),1)
@echo Note: Skipping tests, as requested. >&2
else
@exists() { [ -e "$$1" ]; }; exists ./test/* || { echo "(No tests defined.)" >&2; exit 0; }; \
if [[ -n $$(json -f package.json main) ]]; then tap ./test; else urchin ./test && [[ -x /usr/bin/python ]] && { printf '\n=== Re-running tests with Python3... ====\n'; __FILEICON_USEPY3=1 urchin ./test; } fi
if [[ -n $$(json -f package.json main) ]]; then tap ./test; else urchin ./test; fi
endif

# Commits (with prompt for message) and pushes to the branch of the same name in remote repo 'origin',
Expand Down
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,24 @@ a programmatic alternative to interactively using Finder.
`fileicon` allows assigning a custom icon to any file or folder,
using [any image file whose format is recognized by the system](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Images/Images.html#//apple_ref/doc/uid/TP40003290-CH208-BCIIFBJG).

_Caveat_: Custom icons rely on [extended attributes](https://en.wikipedia.org/wiki/Extended_file_attributes#OS_X) of the macOS filesystems,
_Caveats_:
* Custom icons rely on [extended attributes](https://en.wikipedia.org/wiki/Extended_file_attributes#OS_X) of the macOS filesystems,
[HFS+](https://en.wikipedia.org/wiki/HFS_Plus) and [APFS](https://en.wikipedia.org/wiki/Apple_File_System).
Therefore, custom icons are lost when copying files or folders to filesystems that don't
support these attributes; for instance, custom icons cannot be stored in a Git repository.

* v0.3.2+ supports custom icons for _volumes_ (folders that act as volume mountpoints) _in principle_, but, as of macOS 13.1 (Ventura), this often fails in practice, for reasons unknown to me; see [this Ask Different question](https://apple.stackexchange.com/q/451965/28668), for instance.

When assigning an image file with `fileicon set`, a set of icons in several
resolutions is created and stored in the resource fork of the target file itself
/ of a hidden `Icon\r` file inside the target folder.
/ of a hidden `Icon\r` file inside the target folder / as the content of a hidden `.VolumeIcon.icns` file for folders that are _volume mountpoints_. Addtionally, a `com.apple.FinderInfo` extended attribute with the custom-icon attribute (flag) is set on the target file or folder itself.

The icon with the highest resolution measures 512 x 512 pixels, and the input
image is scaled accordingly.
Note that input images that aren't square can result in distorted icons;
for best results, provide square images.

Note that if you supply an input path to a _symlink_, it is invariably its
If you supply an input path to a _symlink_, it is invariably its
_target_ that is used for the operation; symlinks themselves cannot have
icons associated with them.

Expand Down Expand Up @@ -152,14 +155,13 @@ This project gratefully depends on the following open-source components, accordi

## npm dependencies

* [doctoc (D)](https://github.com/thlorenz/doctoc)
* [json (D)](https://github.com/trentm/json#readme)
* [marked (D)](https://github.com/chjj/marked)
* [marked-man (D)](https://github.com/kapouer/marked-man#readme)
* [replace (D)](https://github.com/ALMaclaine/replace)
* [semver (D)](https://github.com/npm/node-semver#readme)
* [tap (D)](http://node-tap.org/)
* [urchin (D)](https://git.sdf.org/tlevine/urchin)
* [doctoc (D)]()
* [json (D)]()
* [marked (D)](https://marked.js.org)
* [marked-man (D)]()
* [replace (D)]()
* [semver (D)]()
* [urchin (D)]()

<!-- DO NOT EDIT THE NEXT CHAPTER and RETAIN THIS COMMENT: The next chapter is updated by `make update-readme/release` with the contents of 'CHANGELOG.md'. ALSO, LEAVE AT LEAST 1 BLANK LINE AFTER THIS COMMENT. -->

Expand All @@ -169,6 +171,9 @@ Versioning complies with [semantic versioning (semver)](http://semver.org/).

<!-- NOTE: An entry template for a new version is automatically added each time `make version` is called. Fill in changes afterwards. -->

* **[v0.3.2](https://github.com/mklement0/fileicon/compare/v0.3.1...v0.3.2)** (2022-12-29):
* [enhancement] Support for *volume* icons, at least in principle; **caveat**: as of macOS 13.1, this often fails in practice; see https://apple.stackexchange.com/q/451965/28668 for an example.

* **[v0.3.1](https://github.com/mklement0/fileicon/compare/v0.3.0...v0.3.1)** (2022-04-07):
* [compatibility] Removed dependency on Python in favor of AppleScript with its ObjC bridge, courtesy of [@scriptingosx](https://github.com/scriptingosx)

Expand Down
Loading

0 comments on commit bb22977

Please sign in to comment.