Skip to content

Commit

Permalink
Merge pull request #173 from chucker/fixes/xcodegen-help
Browse files Browse the repository at this point in the history
xcodegen fixes for .help
  • Loading branch information
chucker authored Mar 13, 2024
2 parents 5930881 + ba79e5a commit d2811eb
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 39 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ xcuserdata/
*.generated.swift
userspecific.xcconfig
Mastonaut.xcodeproj
MastonautHelp/Info.plist
20 changes: 0 additions & 20 deletions MastonautHelp/Info.plist

This file was deleted.

11 changes: 7 additions & 4 deletions MastonautHelp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@ $(DESTINATION) : * **/*
[[ -s "$(HOME)/.rvm/environments/default" ]] && source "$(HOME)/.rvm/environments/default" ; \
(which -s jekyll || (echo "error: Jekyll not found - check setup requirements" ; false )) \
&& jekyll build

echo "Destination: $(HELP)"

# check for things like broken links
htmlproofer --allow-missing-href _site
cp -R _site "$(DESTINATION)"

cp -R _site/ "$(DESTINATION)"

for LPROJ in "$(DESTINATION)"/*.lproj ; do \
LOCALE=$$(basename "$$LPROJ" .lproj) ; \
echo "Indexing: $$LPROJ" ; \
hiutil -1 -vv --create --anchors --locale=$$LOCALE --file "$$LPROJ/search.helpindex" "$$LPROJ" 2>&1 | \
hiutil -I corespotlight -1 -vv --create --anchors --locale=$$LOCALE --file "$$LPROJ/search.cshelpindex" "$$LPROJ" 2>&1 | \
awk "{ if (/error:/) {printf \"error: \" ; err = 1} else {printf \"warning: \"} ; print} END {exit err}" ; \
done

# hack: this dir should not exist
rm -r "$(DESTINATION)/_English.lproj"
41 changes: 26 additions & 15 deletions project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ targets:
AUTH_URL_SCHEME: "mastonaut-auth"
preBuildScripts:
- script: |
BUNDLE_VERSION=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' $SRCROOT/Mastonaut/Supporting\ Files/Info.plist)
echo "#define BUNDLE_VERSION \"$MARKETING_VERSION\"" > $DERIVED_FILE_DIR/BundleVersions.h
BUNDLE_VERSION=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' $SRCROOT/Mastonaut/Supporting\ Files/Info.plist)
echo "#define BUNDLE_VERSION \"$MARKETING_VERSION\"" > $DERIVED_FILE_DIR/BundleVersions.h
inputFiles:
- "$(SRCROOT)/Mastonaut/Supporting Files/Info.plist"
outputFiles:
Expand Down Expand Up @@ -136,8 +136,8 @@ targets:
platform: macOS
preBuildScripts:
- script: |
"$PROJECT_DIR/Mastonaut/Supporting Files/BuildConfig.sh" \
> "${PROJECT_DIR}/CoreTootin/Supporting Files/BuildConfig.generated.swift"
"$PROJECT_DIR/Mastonaut/Supporting Files/BuildConfig.sh" \
> "${PROJECT_DIR}/CoreTootin/Supporting Files/BuildConfig.generated.swift"
outputFiles:
- "${PROJECT_DIR}/CoreTootin/Supporting Files/BuildConfig.generated.swift"
name: "Apply Build Config (Run Script)"
Expand Down Expand Up @@ -165,37 +165,48 @@ targets:
MastonautHelp:
type: bundle
platform: macOS
info:
path: MastonautHelp/Info.plist
properties:
CFBundleSignature: "hbwr"
HPDBookAccessPath: "index.html"
HPDBookCSIndexPath: "search.cshelpindex"
HPDBookIconPath: "book-icon.png"
HPDBookIndexPath: "search.helpindex"
HPDBookTitle: "$(PROJECT_NAME) Help"
HPDBookType: "3"
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: "$(MASTONAUT_BUNDLE_ID_BASE).mac.QuickToot"
PRODUCT_BUNDLE_IDENTIFIER: "$(MASTONAUT_BUNDLE_ID_BASE).MastonautHelp"
WRAPPER_EXTENSION: "help"
sources:
- path: MastonautHelp/book-icon.png
- path: MastonautHelp/Info.plist
- path: MastonautHelp/nav.js
- path: MastonautHelp/_English.lproj/InfoPlist.strings
postBuildScripts:
- script: |
cd MastonautHelp
cd MastonautHelp
# purge help cache
hiutil -P
# purge help cache
hiutil -P
source /opt/homebrew/opt/chruby/share/chruby/chruby.sh
source /opt/homebrew/opt/chruby/share/chruby/auto.sh
chruby ruby-3.1.3
source /opt/homebrew/opt/chruby/share/chruby/chruby.sh
source /opt/homebrew/opt/chruby/share/chruby/auto.sh
chruby ruby-3.1.3
/usr/bin/make
/usr/bin/make --always-make
name: "Build Help (Run Script)"
outputFiles:
- "_site/nav.js"
PullRefreshableScrollView:
type: framework
platform: macOS
settings:
base:
OTHER_LDFLAGS: "" # prevent framework autolink (Xcode 15A240d)
sources:
- path: Dependencies/PullRefreshableScrollView/PullRefreshableScrollView
group: Dependencies
- path: Dependencies/PullRefreshableScrollView/PullRefreshableScrollView
group: Dependencies

schemes:
Mastonaut:
Expand Down

0 comments on commit d2811eb

Please sign in to comment.