summaryrefslogtreecommitdiff
path: root/databases/compass/files/electron-packager.patch
blob: 5fb42ebbca78c4fe2f59037fe6eb0368c8a20adc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--- /dev/null	2023-01-11 00:11:02.154961000 +0000
+++ src/freebsd.js	2023-01-11 00:10:31.037935000 +0000
@@ -0,0 +1,25 @@
+'use strict'
+
+const App = require('./platform')
+const common = require('./common')
+
+class FreeBSDApp extends App {
+  get originalElectronName () {
+    return 'electron'
+  }
+
+  get newElectronName () {
+    return common.sanitizeAppName(this.executableName)
+  }
+
+  async create () {
+    await this.initialize()
+    await this.renameElectron()
+    await this.copyExtraResources()
+    return this.move()
+  }
+}
+
+module.exports = {
+  App: FreeBSDApp
+}
diff -Nur src.orig/targets.js src/targets.js
--- src.orig/targets.js	2023-01-10 16:23:47.997092000 +0000
+++ src/targets.js	2023-01-10 16:16:03.395991000 +0000
@@ -5,12 +5,13 @@
 const semver = require('semver')
 
 const officialArchs = ['ia32', 'x64', 'armv7l', 'arm64', 'mips64el', 'universal']
-const officialPlatforms = ['darwin', 'linux', 'mas', 'win32']
+const officialPlatforms = ['darwin', 'linux', 'mas', 'win32', 'freebsd']
 const officialPlatformArchCombos = {
   darwin: ['x64', 'arm64', 'universal'],
   linux: ['ia32', 'x64', 'armv7l', 'arm64', 'mips64el'],
   mas: ['x64', 'arm64', 'universal'],
-  win32: ['ia32', 'x64', 'arm64']
+  win32: ['ia32', 'x64', 'arm64'],
+  freebsd: ['x64', 'arm64'],
 }
 
 const buildVersions = {
@@ -36,7 +37,8 @@
   darwin: './mac',
   linux: './linux',
   mas: './mac', // map to darwin
-  win32: './win32'
+  win32: './win32',
+  freebsd: './freebsd',
 }
 
 const supported = {