sbarex / SourceCodeSyntaxHighlight

Quick Look extension for highlight source code files on macOS 10.15 and later.
GNU General Public License v3.0
3.02k stars 72 forks source link

Where's the build from source instructions? #230

Open shammellee opened 1 year ago

shammellee commented 1 year ago

All I see in the readme is clone the repo then fetch submodules

sbarex commented 1 year ago

Is that correct, do you have problems compiling the code?

shammellee commented 1 year ago

I'm looking for instructions on compiling the code. I don't see them in the readme.

sbarex commented 1 year ago

You must open the Xcode project and build as usual.

acecilia commented 1 year ago

I tried the following:

git clone git@github.com:sbarex/SourceCodeSyntaxHighlight.git
cd SourceCodeSyntaxHighlight
git submodule init
git submodule update

It finishes with an error:

fatal: Fetched in submodule path 'highlight-wrapper/highlight', but it did not contain eada64373b185550f0eb86ec7fb15e52cd164acd. Direct fetching of that commit failed.
acecilia commented 1 year ago

If you checkout versio 4.5 (449cebc1a6269ccc1a5f22cd08a5172294742d11 ) of the highlight-wrapper/highlight submodule, when clicking play in Xcode there are other errors such as:

cp -R "highlight/build-Debug/share/highlight/" "/Users/.../Library/Developer/Xcode/DerivedData/SourceCodeSyntaxHighlight-gviwqigyaepngwdjutbmvbujzszu/Build/Products/Debug/highlight/share/"
cp: directory /Users/.../Library/Developer/Xcode/DerivedData/SourceCodeSyntaxHighlight-gviwqigyaepngwdjutbmvbujzszu/Build/Products/Debug/highlight/share does not exist
acecilia commented 1 year ago

After doing mkdir /Users/.../Library/Developer/Xcode/DerivedData/SourceCodeSyntaxHighlight-gviwqigyaepngwdjutbmvbujzszu/Build/Products/Debug/highlight/share you can work around that issue.

The build succeeds, but when running the preview, an error shows:

cat '/Users/.../strings.yml' | "/Users/.../Library/Developer/Xcode/DerivedData/SourceCodeSyntaxHighlight-gviwqigyaepngwdjutbmvbujzszu/Build/Products/Debug/Syntax Highlight.app/Contents/Resources/highlight/bin/highlight" -T '/Users/.../strings.yml' --syntax=txt --quiet --include-style --encoding=UTF-8 --replace-tabs=4 --font=.AppleSystemUIFontMonospaced --font-size=13.00 --out-format=rtf --page-color --char-styles --data-dir=/Users/.../Library/Developer/Xcode/DerivedData/SourceCodeSyntaxHighlight-gviwqigyaepngwdjutbmvbujzszu/Build/Products/Debug/Syntax Highlight.app/Contents/Resources/highlight/share --style=/Users/.../Library/Developer/Xcode/DerivedData/SourceCodeSyntaxHighlight-gviwqigyaepngwdjutbmvbujzszu/Build/Products/Debug/Syntax Highlight.app/Contents/Resources/highlight/share/themes/neon.theme --validate-input
cannot open filetypes.conf: No such file or directory
highlight: cannot open themes//Users/.../Library/Developer/Xcode/DerivedData/SourceCodeSyntaxHighlight-gviwqigyaepngwdjutbmvbujzszu/Build/Products/Debug/Syntax Highlight.app/Contents/Resources/highlight/share/themes/neon.theme.theme: No such file or directory
2023-06-06 22:39:12.000 Error 1!
2023-06-06 22:39:12.000 -------------------------------------------------
2023-06-06 22:39:12.000 Reached the end of the file. That should not happen.
2023-06-06 22:39:12.254 ERROR: colorize.sh failed with exit code 101: 
2023-06-06 22:39:12.254