Prettify macOS installation bundle
Signed-off-by: gnl <gnl@lipov.net>
This commit is contained in:
parent
c35a651f15
commit
d61b9031ad
|
@ -179,26 +179,27 @@ def compileMacOS() {
|
||||||
def bundleMacOS(type = 'nightly') {
|
def bundleMacOS(type = 'nightly') {
|
||||||
def pkg = common.pkgFilename(type, 'dmg')
|
def pkg = common.pkgFilename(type, 'dmg')
|
||||||
dir(packageFolder) {
|
dir(packageFolder) {
|
||||||
sh 'curl -L -O "https://github.com/gnl/StatusAppFiles/raw/master/StatusIm.app.zip"'
|
sh 'curl -L -O "https://github.com/status-im/StatusAppFiles/raw/PR5702/Status.app.zip"'
|
||||||
sh 'unzip StatusIm.app.zip'
|
sh 'unzip Status.app.zip'
|
||||||
sh 'cp -r assets/share/assets StatusIm.app/Contents/Resources'
|
sh 'cp -r assets/share/assets Status.app/Contents/Resources'
|
||||||
sh 'ln -sf ../Resources/assets ../Resources/ubuntu-server ../Resources/node_modules ' +
|
sh 'ln -sf ../Resources/assets ../Resources/ubuntu-server ../Resources/node_modules ' +
|
||||||
'StatusIm.app/Contents/MacOS'
|
'Status.app/Contents/MacOS'
|
||||||
sh 'chmod +x StatusIm.app/Contents/Resources/ubuntu-server'
|
sh 'chmod +x Status.app/Contents/Resources/ubuntu-server'
|
||||||
sh 'cp ../desktop/bin/StatusIm StatusIm.app/Contents/MacOS'
|
sh 'cp ../desktop/bin/StatusIm Status.app/Contents/MacOS/Status'
|
||||||
sh 'cp ../desktop/reportApp/reportApp StatusIm.app/Contents/MacOS'
|
sh 'cp ../desktop/reportApp/reportApp Status.app/Contents/MacOS'
|
||||||
sh 'cp -f ../deployment/macos/qt-reportApp.conf StatusIm.app/Contents/Resources'
|
sh 'cp -f ../deployment/macos/qt-reportApp.conf Status.app/Contents/Resources'
|
||||||
sh 'ln -sf ../Resources/qt-reportApp.conf StatusIm.app/Contents/MacOS/qt.conf'
|
sh 'ln -sf ../Resources/qt-reportApp.conf Status.app/Contents/MacOS/qt.conf'
|
||||||
sh 'install_name_tool -add_rpath "@executable_path/../Frameworks" ' +
|
sh 'install_name_tool -add_rpath "@executable_path/../Frameworks" ' +
|
||||||
'-delete_rpath "/Users/administrator/qt/5.9.1/clang_64/lib" ' +
|
'-delete_rpath "/Users/administrator/qt/5.9.1/clang_64/lib" ' +
|
||||||
'StatusIm.app/Contents/MacOS/reportApp'
|
'Status.app/Contents/MacOS/reportApp'
|
||||||
sh 'cp -f ../deployment/macos/Info.plist StatusIm.app/Contents'
|
sh 'cp -f ../deployment/macos/Info.plist Status.app/Contents'
|
||||||
|
sh 'cp -f ../deployment/macos/status-icon.icns Status.app/Contents/Resources'
|
||||||
sh """
|
sh """
|
||||||
macdeployqt StatusIm.app -verbose=1 -dmg \\
|
macdeployqt Status.app -verbose=1 \\
|
||||||
-qmldir='${workspace}/node_modules/react-native/ReactQt/runtime/src/qml/'
|
-qmldir='${workspace}/node_modules/react-native/ReactQt/runtime/src/qml/'
|
||||||
"""
|
"""
|
||||||
sh 'rm -f StatusIm.app.zip'
|
sh 'rm -f Status.app.zip'
|
||||||
sh "mv StatusIm.dmg ${pkg}"
|
sh "../node_modules/appdmg/bin/appdmg.js ../deployment/macos/status-dmg.json ${pkg}"
|
||||||
}
|
}
|
||||||
return "${packageFolder}/${pkg}".drop(2)
|
return "${packageFolder}/${pkg}".drop(2)
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>im.status.statusim</string>
|
<string>im.status.statusim</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>StatusIm</string>
|
<string>Status</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function make_icns {
|
||||||
|
local file="status-icon.png"
|
||||||
|
local iconset="$(mktemp -d)"
|
||||||
|
local output_icon="status-icon.icns"
|
||||||
|
|
||||||
|
for size in {16,32,64,128,256,512}; do
|
||||||
|
sips --resampleHeightWidth "${size}" "${size}" "${file}" --out "${iconset}/icon_${size}x${size}.png" &> /dev/null
|
||||||
|
sips --resampleHeightWidth "$((size * 2))" "$((size * 2))" "${file}" --out "${iconset}/icon_${size}x${size}@2x.png" &> /dev/null
|
||||||
|
done
|
||||||
|
|
||||||
|
mv "${iconset}" "${iconset}.iconset"
|
||||||
|
iconutil --convert icns "${iconset}.iconset" --output "${output_icon}"
|
||||||
|
|
||||||
|
echo "${output_icon}" # so its path is returned when the function ends
|
||||||
|
}
|
||||||
|
|
||||||
|
make_icns
|
Binary file not shown.
After Width: | Height: | Size: 9.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"title": "Status",
|
||||||
|
"background": "dmg-background.png",
|
||||||
|
"contents": [
|
||||||
|
{
|
||||||
|
"x": 385,
|
||||||
|
"y": 235,
|
||||||
|
"type": "link",
|
||||||
|
"path": "/Applications"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 170,
|
||||||
|
"y": 236,
|
||||||
|
"type": "file",
|
||||||
|
"path": "../../StatusImPackage/Status.app"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 121 KiB |
|
@ -0,0 +1,24 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="68" height="68" viewBox="0 0 68 68">
|
||||||
|
<defs>
|
||||||
|
<ellipse id="b" cx="31.969" cy="31.938" rx="31.969" ry="31.938"/>
|
||||||
|
<filter id="a" width="114.1%" height="114.1%" x="-7%" y="-3.9%" filterUnits="objectBoundingBox">
|
||||||
|
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1"/>
|
||||||
|
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation=".5"/>
|
||||||
|
<feColorMatrix in="shadowBlurOuter1" result="shadowMatrixOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.22 0"/>
|
||||||
|
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter2"/>
|
||||||
|
<feGaussianBlur in="shadowOffsetOuter2" result="shadowBlurOuter2" stdDeviation="1"/>
|
||||||
|
<feColorMatrix in="shadowBlurOuter2" result="shadowMatrixOuter2" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
||||||
|
<feMerge>
|
||||||
|
<feMergeNode in="shadowMatrixOuter1"/>
|
||||||
|
<feMergeNode in="shadowMatrixOuter2"/>
|
||||||
|
</feMerge>
|
||||||
|
</filter>
|
||||||
|
</defs>
|
||||||
|
<g fill="none" fill-rule="nonzero">
|
||||||
|
<g transform="translate(2 1)">
|
||||||
|
<use fill="#000" filter="url(#a)" xlink:href="#b"/>
|
||||||
|
<use fill="#FFF" xlink:href="#b"/>
|
||||||
|
</g>
|
||||||
|
<path fill="#4360DF" d="M34 1.062c-17.673 0-32 14.313-32 31.97C2 50.686 16.327 65 34 65c17.673 0 32-14.313 32-31.969 0-8.478-3.371-16.61-9.373-22.605A32.016 32.016 0 0 0 34 1.062zm-4.902 46.17c-4.013.225-8.023-2.192-8.243-6.118-.213-3.859 2.799-6.44 7.779-6.72 3.674-.207 5.97.628 9.65.421.911-.05 1.817-.18 2.706-.386-.543 6.633-5.352 12.435-11.892 12.803zm10.298-14.497c-3.834.222-6.238-.671-10.076-.45-.951.053-1.896.191-2.823.413.56-7.084 5.587-13.288 12.414-13.68 4.189-.243 8.376 2.342 8.604 6.536.224 4.124-2.922 6.883-8.119 7.18z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
|
@ -85,5 +85,8 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"patch-package": "^5.1.1"
|
"patch-package": "^5.1.1"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"appdmg": "^0.5.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue