Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"--longpress",
"Accelo",
"achreimburse",
"actool",
"adbd",
"ADDCOMMENT",
"Addendums",
Expand Down
Binary file removed desktop/Assets-adhoc.car
Binary file not shown.
Binary file removed desktop/Assets-dev.car
Binary file not shown.
Binary file modified desktop/Assets.car
Binary file not shown.
Binary file added desktop/AssetsAdhoc.car
Binary file not shown.
Binary file added desktop/AssetsDev.car
Binary file not shown.
Binary file added desktop/AssetsStaging.car
Binary file not shown.
16 changes: 10 additions & 6 deletions desktop/afterPack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@ import type {AfterPackContext} from 'electron-builder';
import {promises as fs} from 'node:fs';
import path from 'node:path';

const getAssetSourceFilename = () => {
const getAssetSuffix = () => {
if (process.env.ELECTRON_ENV === 'adhoc') {
return 'Assets-adhoc.car';
return 'Adhoc';
}

if (process.env.ELECTRON_ENV === 'development') {
return 'Assets-dev.car';
return 'Dev';
}

return 'Assets.car';
};
if (process.env.ELECTRON_ENV === 'staging') {
return 'Staging';
}

const assetSource = path.resolve(__dirname, `../${getAssetSourceFilename()}`);
return '';
};

// This will copy Assets.car with MacOS Liquid Glass icon
// and will be removed after Electron builder supports this natively
Expand All @@ -27,5 +29,7 @@ export default function afterPack(context: AfterPackContext) {
const appRoot = path.join(context.appOutDir, `${appName}.app`, 'Contents');
const resourcesDir = path.join(appRoot, 'Resources');

const assetSource = path.resolve(__dirname, `../Assets${getAssetSuffix()}.car`);

return fs.mkdir(resourcesDir, {recursive: true}).then(() => fs.copyFile(assetSource, path.join(resourcesDir, 'Assets.car')));
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ios/AppIcon-staging.icon/Assets/App Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
159 changes: 159 additions & 0 deletions ios/AppIcon-staging.icon/icon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
{
"fill-specializations" : [
{
"value" : {
"solid" : "srgb:0.01176,0.83137,0.48627,1.00000"
}
},
{
"appearance" : "dark",
"value" : "automatic"
},
{
"appearance" : "tinted",
"value" : "automatic"
}
],
"groups" : [
{
"blend-mode-specializations" : [
{
"appearance" : "tinted",
"value" : "normal"
}
],
"blur-material-specializations" : [
{
"value" : null
},
{
"appearance" : "tinted",
"value" : null
}
],
"hidden" : false,
"layers" : [
{
"glass-specializations" : [
{
"value" : false
},
{
"appearance" : "tinted",
"value" : true
}
],
"hidden" : false,
"image-name" : "Adhoc-Icon-Tinted-1024x1024.png",
"name" : "Adhoc-Icon-Tinted-1024x1024"
},
{
"fill-specializations" : [
{
"value" : "automatic"
},
{
"appearance" : "dark",
"value" : {
"solid" : "srgb:0.01176,0.83137,0.48627,1.00000"
}
},
{
"appearance" : "tinted",
"value" : {
"linear-gradient" : [
"extended-gray:0.90169,1.00000",
"extended-gray:0.79783,1.00000"
]
}
}
],
"glass-specializations" : [
{
"value" : false
},
{
"appearance" : "tinted",
"value" : false
}
],
"hidden" : false,
"image-name" : "App Icon.png",
"name" : "App Icon",
"position" : {
"scale" : 1,
"translation-in-points" : [
0,
0
]
}
}
],
"lighting-specializations" : [
{
"appearance" : "tinted",
"value" : "individual"
}
],
"opacity-specializations" : [
{
"appearance" : "tinted",
"value" : 1
}
],
"shadow-specializations" : [
{
"value" : {
"kind" : "none",
"opacity" : 0.5
}
},
{
"appearance" : "tinted",
"value" : {
"kind" : "none",
"opacity" : 0.5
}
}
],
"specular-specializations" : [
{
"value" : false
},
{
"appearance" : "dark",
"value" : false
},
{
"appearance" : "tinted",
"value" : false
}
],
"translucency-specializations" : [
{
"value" : {
"enabled" : false,
"value" : 0.6
}
},
{
"appearance" : "dark",
"value" : {
"enabled" : false,
"value" : 0.5
}
},
{
"appearance" : "tinted",
"value" : {
"enabled" : false,
"value" : 0.5
}
}
]
}
],
"supported-platforms" : {
"squares" : "shared"
}
}
4 changes: 4 additions & 0 deletions ios/AppIcon.icon/icon.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
{
"appearance" : "dark",
"value" : "automatic"
},
{
"appearance" : "tinted",
"value" : "automatic"
}
],
"groups" : [
Expand Down
34 changes: 34 additions & 0 deletions scripts/generateElectronIconAssets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

for env in production staging dev adhoc
do
if [ "$env" = "staging" ]; then
suffix="Staging"
elif [ "$env" = "dev" ]; then
suffix="Dev"
elif [ "$env" = "adhoc" ]; then
suffix="Adhoc"
fi

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

mkdir -p "$SCRIPT_DIR/../Mobile-Expensify/iOS/icons"

/Applications/Xcode.app/Contents/Developer/usr/bin/actool \
"$SCRIPT_DIR/../Mobile-Expensify/iOS/AppIcon${suffix}.icon" \
--compile "$SCRIPT_DIR/../Mobile-Expensify/iOS/icons" \
--output-format human-readable-text --notices --warnings --errors \
--output-partial-info-plist "$SCRIPT_DIR/../Mobile-Expensify/iOS/Info.plist" \
--app-icon "AppIcon${suffix}" \
--include-all-app-icons \
--minimum-deployment-target 26.0 \
--enable-on-demand-resources NO \
--development-region en \
--target-device mac \
--platform macosx

cp "$SCRIPT_DIR/../Mobile-Expensify/iOS/icons/Assets.car" "$SCRIPT_DIR/../desktop/Assets${suffix}.car"
rm -rf "$SCRIPT_DIR/../Mobile-Expensify/iOS/icons"
done


Loading