Skip to content

Commit

Permalink
build: adjust to comply with apple's review policy
Browse files Browse the repository at this point in the history
  • Loading branch information
josStorer committed Mar 25, 2023
1 parent 727ff2f commit 41ebe47
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
with:
node-version: 18
- run: npm ci
- run: npm run build

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 14.2
- run: sed -i '' "s/0.0.0/${{ env.VERSION }}/g" safari/project.pre.patch
- run: sed -i '' "s/0.0.0/${{ env.VERSION }}/g" safari/project.patch
- run: npm run build:safari

Expand Down
4 changes: 2 additions & 2 deletions safari/appdmg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "ChatGPTBox",
"title": "Fission - ChatBox",
"icon": "../src/logo.png",
"contents": [
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
{ "x": 192, "y": 344, "type": "file", "path": "../build/chatGPTBox.app" }
{ "x": 192, "y": 344, "type": "file", "path": "../build/Fission - ChatBox.app" }
]
}
10 changes: 6 additions & 4 deletions safari/build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
git apply safari/project.pre.patch
npm run build
xcrun safari-web-extension-converter ./build/firefox \
--project-location ./build/safari --app-name chatGPTBox \
--project-location ./build/safari --app-name "Fission - ChatBox" \
--bundle-identifier dev.josStorer.chatGPTBox --force --no-prompt --no-open
git apply safari/project.patch
xcodebuild archive -project ./build/safari/chatGPTBox/chatGPTBox.xcodeproj \
-scheme "chatGPTBox (macOS)" -configuration Release -archivePath ./build/safari/chatGPTBox.xcarchive
xcodebuild -exportArchive -archivePath ./build/safari/chatGPTBox.xcarchive \
xcodebuild archive -project "./build/safari/Fission - ChatBox/Fission - ChatBox.xcodeproj" \
-scheme "Fission - ChatBox (macOS)" -configuration Release -archivePath "./build/safari/Fission - ChatBox.xcarchive"
xcodebuild -exportArchive -archivePath "./build/safari/Fission - ChatBox.xcarchive" \
-exportOptionsPlist ./safari/export-options.plist -exportPath ./build
npm install -D appdmg
rm ./build/safari.dmg
Expand Down
8 changes: 4 additions & 4 deletions safari/project.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/build/safari/chatGPTBox/chatGPTBox.xcodeproj/project.pbxproj
+++ b/build/safari/chatGPTBox/chatGPTBox.xcodeproj/project.pbxproj
--- a/build/safari/Fission - ChatBox/Fission - ChatBox.xcodeproj/project.pbxproj
+++ b/build/safari/Fission - ChatBox/Fission - ChatBox.xcodeproj/project.pbxproj
@@ -825,7 +825,7 @@
"@executable_path/../../../../Frameworks",
);
Expand All @@ -19,11 +19,11 @@
+ );
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "macOS (App)/chatGPTBox.entitlements";
CODE_SIGN_ENTITLEMENTS = "macOS (App)/Fission - ChatBox.entitlements";
@@ -887,6 +891,7 @@
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "macOS (App)/Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "chatGPTBox";
INFOPLIST_KEY_CFBundleDisplayName = "Fission - ChatBox";
+ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSMainStoryboardFile = Main;
INFOPLIST_KEY_NSPrincipalClass = NSApplication;
Expand Down
19 changes: 19 additions & 0 deletions safari/project.pre.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- a/src/manifest.v2.json
+++ b/src/manifest.v2.json
@@ -1,5 +1,5 @@
{
- "name": "ChatGPTBox",
+ "name": "Fission - ChatBox",
"description": "Integrating ChatGPT into your browser deeply, everything you need is here",
"version": "0.0.0",
"manifest_version": 2,
@@ -17,7 +17,8 @@
"background": {
"scripts": [
"background.js"
- ]
+ ],
+ "persistent": false
},
"browser_action": {
"default_popup": "popup.html"

0 comments on commit 41ebe47

Please sign in to comment.