Skip to content

Commit

Permalink
build(mac): enable hardenedRuntime for dmg
Browse files Browse the repository at this point in the history
  • Loading branch information
ipy committed Oct 7, 2019
1 parent 1eebdc7 commit ce84303
Show file tree
Hide file tree
Showing 3 changed files with 247 additions and 5 deletions.
245 changes: 245 additions & 0 deletions electron-builder-mas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
{
"appId": "org.splayer.splayerx",
"productName": "SPlayer",
"publish": [
{
"provider": "github",
"owner": "chiflix",
"repo": "splayerx"
}
],
"afterPack": "scripts/after-pack.js",
"compression": "maximum",
"directories": {
"output": "build"
},
"electronVersion": "5.0.11",
"electronDist": "node_modules/@chiflix/electron/dist",
"electronDownload": {
"mirror": "https://github.com/chiflix/electron/releases/download/v",
"isVerifyChecksum": false,
"version": "5.0.11"
},
"files": [
"dist/electron/**/*"
],
"mac": {
"hardenedRuntime": false,
"asarUnpack": [
"node_modules/osx-mouse-cocoa"
],
"icon": "icons/icon.icns",
"fileAssociations": [
{
"name": "Video",
"ext": [
"3g2",
"3gp",
"3gp2",
"3gpp",
"amv",
"asf",
"bik",
"bin",
"crf",
"divx",
"drc",
"dv",
"dvr-ms",
"evo",
"gvi",
"gxf",
"m1v",
"m2v",
"m2t",
"m2ts",
"mp2",
"mp2v",
"mp4v",
"mpe",
"mpeg",
"mpeg1",
"mpeg2",
"mpeg4",
"mpv2",
"mts",
"mtv",
"mxf",
"mxg",
"nsv",
"nuv",
"ogg",
"ogm",
"ogv",
"ogx",
"ps",
"rec",
"rpl",
"thp",
"tod",
"tp",
"tts",
"txd",
"vro",
"wm",
"wtv",
"xesc"
],
"role": "Viewer",
"icon": "build/icons/others.icns"
},
{
"name": "DAT",
"ext": [
"dat"
],
"role": "Viewer",
"icon": "build/icons/dat.icns"
},
{
"name": "WEBM",
"ext": [
"webm"
],
"role": "Viewer",
"icon": "build/icons/webm.icns"
},
{
"name": "VOB",
"ext": [
"vob"
],
"role": "Viewer",
"icon": "build/icons/vob.icns"
},
{
"name": "TS",
"ext": [
"ts"
],
"role": "Viewer",
"icon": "build/icons/ts.icns"
},
{
"name": "RM",
"ext": [
"rm"
],
"role": "Viewer",
"icon": "build/icons/rm.icns"
},
{
"name": "MPG",
"ext": [
"mpg"
],
"role": "Viewer",
"icon": "build/icons/mpg.icns"
},
{
"name": "F4V",
"ext": [
"f4v"
],
"role": "Viewer",
"icon": "build/icons/f4v.icns"
},
{
"name": "AVI",
"ext": [
"avi"
],
"role": "Viewer",
"icon": "build/icons/avi.icns"
},
{
"name": "FLV",
"ext": [
"flv"
],
"role": "Viewer",
"icon": "build/icons/flv.icns"
},
{
"name": "M4V",
"ext": [
"m4v"
],
"role": "Viewer",
"icon": "build/icons/m4v.icns"
},
{
"name": "MKV",
"ext": [
"mkv"
],
"role": "Viewer",
"icon": "build/icons/mkv.icns"
},
{
"name": "MOV",
"ext": [
"mov"
],
"role": "Viewer",
"icon": "build/icons/mov.icns"
},
{
"name": "MP4",
"ext": [
"mp4"
],
"role": "Viewer",
"icon": "build/icons/mp4.icns"
},
{
"name": "RMVB",
"ext": [
"rmvb"
],
"role": "Viewer",
"icon": "build/icons/rmvb.icns"
},
{
"name": "WMV",
"ext": [
"wmv"
],
"role": "Viewer",
"icon": "build/icons/wmv.icns"
},
{
"name": "SRT",
"ext": [
"srt"
],
"role": "Viewer",
"icon": "build/icons/srt.icns"
},
{
"name": "ASS",
"ext": [
"ass"
],
"role": "Viewer",
"icon": "build/icons/ass.icns"
},
{
"name": "VTT",
"ext": [
"vtt"
],
"role": "Viewer",
"icon": "build/icons/vtt.icns"
},
{
"name": "SSA",
"ext": [
"ssa"
],
"role": "Viewer",
"icon": "build/icons/ssa.icns"
}
]
}
}
5 changes: 1 addition & 4 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@
]
},
"mac": {
"hardenedRuntime": false,
"asarUnpack": [
"node_modules/osx-mouse-cocoa"
],
"hardenedRuntime": true,
"icon": "icons/icon.icns",
"target": [
"dmg"
Expand Down
2 changes: 1 addition & 1 deletion scripts/mas-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ node .electron-vue/build.js
rev=`git rev-list --count HEAD`

electron-builder -p never -m $1 \
-c electron-builder.json \
-c electron-builder-mas.json \
-c.mac.provisioningProfile="build/$1.provisionprofile" \
-c.mac.bundleVersion="$rev" \
-c.mac.category="public.app-category.entertainment"

0 comments on commit ce84303

Please sign in to comment.