Skip to content

Commit

Permalink
build fixes, bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
michalrentka committed Jul 15, 2024
1 parent d74ee67 commit eaba0e7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class HtmlEpubDocumentViewController: UIViewController {

func load() {
guard let readerUrl = Bundle.main.url(forResource: "view", withExtension: "html", subdirectory: "Bundled/reader") else {
DDLogError("HtmlEpubReaderViewController: can't load reader view.html")
DDLogError("HtmlEpubDocumentViewController: can't load reader view.html")
return
}
webViewHandler.load(fileUrl: readerUrl).subscribe().disposed(by: disposeBag)
Expand Down Expand Up @@ -138,7 +138,7 @@ class HtmlEpubDocumentViewController: UIViewController {
webViewHandler.call(javascript: "search({ term: \(WebViewEncoder.encodeForJavascript(term.data(using: .utf8))) });")
.observe(on: MainScheduler.instance)
.subscribe(onFailure: { error in
DDLogError("HtmlEpubReaderViewController: searching document failed - \(error)")
DDLogError("HtmlEpubDocumentViewController: searching document failed - \(error)")
})
.disposed(by: disposeBag)
}
Expand All @@ -147,7 +147,7 @@ class HtmlEpubDocumentViewController: UIViewController {
webViewHandler.call(javascript: "select({ key: '\(key)' });")
.observe(on: MainScheduler.instance)
.subscribe(onFailure: { error in
DDLogError("HtmlEpubReaderViewController: navigating to \(key) failed - \(error)")
DDLogError("HtmlEpubDocumentViewController: navigating to \(key) failed - \(error)")
})
.disposed(by: disposeBag)
}
Expand All @@ -159,7 +159,7 @@ class HtmlEpubDocumentViewController: UIViewController {
webViewHandler.call(javascript: "updateAnnotations({ deletions: \(encodedDeletions), insertions: \(encodedInsertions), modifications: \(encodedModifications)});")
.observe(on: MainScheduler.instance)
.subscribe(onFailure: { error in
DDLogError("HtmlEpubReaderViewController: updating document failed - \(error)")
DDLogError("HtmlEpubDocumentViewController: updating document failed - \(error)")
})
.disposed(by: disposeBag)
}
Expand All @@ -181,7 +181,7 @@ class HtmlEpubDocumentViewController: UIViewController {
webViewHandler.call(javascript: javascript)
.observe(on: MainScheduler.instance)
.subscribe(onFailure: { error in
DDLogError("HtmlEpubReaderViewController: loading document failed - \(error)")
DDLogError("HtmlEpubDocumentViewController: loading document failed - \(error)")
})
.disposed(by: disposeBag)
}
Expand Down
2 changes: 2 additions & 0 deletions ci_scripts/ci_pre_xcodebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ plist='<?xml version="1.0" encoding="UTF-8"?>
</plist>'
echo "$plist" > licenses/licenses.plist
rm -rf pdf-keys

brew install node
26 changes: 13 additions & 13 deletions scripts/bundle_reader.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/bash

realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}

SCRIPT_PATH=`realpath "$0"`
SCRIPT_DIR=`dirname "$SCRIPT_PATH"`
READER_DIR="$SCRIPT_DIR/../bundled/reader"
SCRIPT_PATH=`realpath "$0"`
SCRIPT_DIR=`dirname "$SCRIPT_PATH"`
READER_DIR="$SCRIPT_DIR/../bundled/reader"

if [ -d "$READER_DIR" ]; then
rm -rf "$READER_DIR"
fi
if [ -d "$READER_DIR" ]; then
rm -rf "$READER_DIR"
fi

cd "$SCRIPT_DIR/../reader"
npm ci
npm run build:ios
mv "$SCRIPT_DIR/../reader/build/ios" "$READER_DIR"
cd "$SCRIPT_DIR/../reader"
NODE_OPTIONS=--openssl-legacy-provider npm ci
NODE_OPTIONS=--openssl-legacy-provider npm run build:ios
mv "$SCRIPT_DIR/../reader/build/ios" "$READER_DIR"

0 comments on commit eaba0e7

Please sign in to comment.