diff --git a/.gitignore b/.gitignore index 7f15ef5..42631db 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,4 @@ xcuserdata/ *.generated.swift userspecific.xcconfig Mastonaut.xcodeproj +MastonautHelp/Info.plist diff --git a/MastonautHelp/Info.plist b/MastonautHelp/Info.plist deleted file mode 100644 index eb446d4..0000000 --- a/MastonautHelp/Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleSignature - hbwr - HPDBookAccessPath - index.html - HPDBookCSIndexPath - search.cshelpindex - HPDBookIconPath - book-icon.png - HPDBookIndexPath - search.helpindex - HPDBookTitle - $(PROJECT_NAME) Help - HPDBookType - 3 - - diff --git a/MastonautHelp/Makefile b/MastonautHelp/Makefile index acd7af6..802c3dc 100644 --- a/MastonautHelp/Makefile +++ b/MastonautHelp/Makefile @@ -10,14 +10,14 @@ $(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" ; \ @@ -25,3 +25,6 @@ $(DESTINATION) : * **/* 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" diff --git a/project.yml b/project.yml index c2a5749..3372bb2 100644 --- a/project.yml +++ b/project.yml @@ -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: @@ -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)" @@ -165,28 +165,39 @@ 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 @@ -194,8 +205,8 @@ targets: base: OTHER_LDFLAGS: "" # prevent framework autolink (Xcode 15A240d) sources: - - path: Dependencies/PullRefreshableScrollView/PullRefreshableScrollView - group: Dependencies + - path: Dependencies/PullRefreshableScrollView/PullRefreshableScrollView + group: Dependencies schemes: Mastonaut: