Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Contrib Build instructions for Safari Extensions and added make's phny-pipeline for MacOS #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

duraki
Copy link

@duraki duraki commented Apr 19, 2023

This PR describes build process for MacOS Mojave, specifically the Safari, with a small changes occurring on Makefile. The placeholder for BUNDLE_ID can be switched, as this is a forked PR, it sat as a notation.

Let me know what you think and if any changes are necessary 🙌

unmasked prj build files.

The top-level README is extended with CONTRIB describing Safari build pipeline
and conversion and the docs/safari.md contains documentation on how to
build Shiori extension for Safari, and promptly install/setup the Safari
for such experience.

Also added images to contain safari(md)

The biggest change is in Makefile, and this change incldues:

  * Setting up default Bundle Identifier for the App (required by the
    MacOS)
  * Otherwise use the provided (argumented) ENV string via CLI
  * Added new phony handler 'run-safari' which uses Apple conversion
    toolkit to convert and prepare XCode project dir
  * Outputs completion message and report back to user

Additionally, I've added a 'clean' handler that will cleanup the Safari
build pipeline directives and leftovers.

Signed-off by: H. Duraki <[email protected]>
Copy link
Member

@fmartingr fmartingr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @duraki, thanks a lot for this contribution! I've only suggested the changes on the BUNDLE_ID on the documentation and the Makefile, as it would be confusing to have another reference in Shiori's documentation and the markdown links that I think should be relative to the file.

Apart from that this seems very detailed and good to go. :)

(Please re-request my review once I can check this again!)

@@ -1,3 +1,9 @@
SHIORI_BUNDLE_IDENTIFIER ?= "com.durakiconsulting.shiori"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SHIORI_BUNDLE_IDENTIFIER ?= "com.durakiconsulting.shiori"
SHIORI_BUNDLE_IDENTIFIER ?= "com.go-shiori.shiori"

$ cat Makefile | grep Safari -C 2
# ...
# run-safari:
# xcrun safari-web-extension-converter . --project-location xcprj/ --app-name Shiori --bundle-identifier com.durakiconsulting.shiori --macos-only --force
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# xcrun safari-web-extension-converter . --project-location xcprj/ --app-name Shiori --bundle-identifier com.durakiconsulting.shiori --macos-only --force
# xcrun safari-web-extension-converter . --project-location xcprj/ --app-name Shiori --bundle-identifier com.go-shiori.shiori --macos-only --force

# xcrun safari-web-extension-converter . --project-location xcprj/ --app-name Shiori --bundle-identifier com.durakiconsulting.shiori --macos-only --force
```

You need to set `ENV` variable `SHIORI_BUNDLE_IDENTIFIER` to your bundle identifier, using classical bundle identifier naming convention, such is `ext.yourcompanyname.shiori`. This identifier can be passed during make (defaults to `'com.durakiconsulting.shiori'`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You need to set `ENV` variable `SHIORI_BUNDLE_IDENTIFIER` to your bundle identifier, using classical bundle identifier naming convention, such is `ext.yourcompanyname.shiori`. This identifier can be passed during make (defaults to `'com.durakiconsulting.shiori'`).
You need to set `ENV` variable `SHIORI_BUNDLE_IDENTIFIER` to your bundle identifier, using classical bundle identifier naming convention, such is `ext.yourcompanyname.shiori`. This identifier can be passed during make (defaults to `'com.go-shiori.shiori'`).

Once in XCode, run `Shift + Cmd + R` (`Product => Build For => Running` via Menu) to build release version and generate application product.
Once the above finished, click `Product => Show Build folder in Finder` and enter `Product/Debug/` directory from inside the Finder and you should see `Shiori.app`.

![](/docs/safari-product-extbuild.png)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be?

Suggested change
![](/docs/safari-product-extbuild.png)
![](safari-product-extbuild.png)


Open the built Shiori application and follow the screen instructions.

![](/docs/safari-enable-shiori-ext.png)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be?

Suggested change
![](/docs/safari-enable-shiori-ext.png)
![](safari-enable-shiori-ext.png)


Once enabled, you can click `Settings` button for Shiori, or right-click on Shiori toolbar icon, and click `Manage Extension`. This will open Shiori Session settings where you will enter your server URL and username and password combo.

![](/docs/safari-ext-usage-settings.png)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be?

Suggested change
![](/docs/safari-ext-usage-settings.png)
![](safari-ext-usage-settings.png)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants