SourceCodeSyntaxHighlight icon indicating copy to clipboard operation
SourceCodeSyntaxHighlight copied to clipboard

Where's the build from source instructions?

Open shammellee opened this issue 2 years ago • 6 comments

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

shammellee avatar Feb 21 '23 21:02 shammellee

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

sbarex avatar Feb 25 '23 15:02 sbarex

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

shammellee avatar Feb 26 '23 22:02 shammellee

You must open the Xcode project and build as usual.

sbarex avatar Feb 28 '23 07:02 sbarex

I tried the following:

git clone [email protected]: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 avatar Jun 06 '23 19:06 acecilia

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 avatar Jun 06 '23 20:06 acecilia

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 

acecilia avatar Jun 06 '23 21:06 acecilia