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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
--- ts/models/messages.ts.orig 2023-02-02 21:51:07.000000000 +0100
+++ ts/models/messages.ts 2023-02-03 18:17:14.799327000 +0100
@@ -908,7 +908,7 @@ export class MessageModel extends window.Backbone.Mode
});
}
- if (!window.Signal.OS.isLinux()) {
+ if (!(window.Signal.OS.isLinux() || window.Signal.OS.isFreeBSD())) {
return attributes.storyReaction.emoji;
}
@@ -927,7 +927,7 @@ export class MessageModel extends window.Backbone.Mode
// Linux emoji support is mixed, so we disable it. (Note that this doesn't touch
// the `text`, which can contain emoji.)
- const shouldIncludeEmoji = Boolean(emoji) && !window.Signal.OS.isLinux();
+ const shouldIncludeEmoji = Boolean(emoji) && !(window.Signal.OS.isLinux() || window.Signal.OS.isFreeBSD());
if (shouldIncludeEmoji) {
return window.i18n('message--getNotificationText--text-with-emoji', {
text: modifiedText,
--- ts/util/getUserAgent.ts 2022-02-12 02:48:01.000000000 +0100
+++ ts/util/getUserAgent.ts 2022-02-18 20:43:07.232944000 +0100
@@ -7,6 +7,7 @@ const PLATFORM_STRINGS: { [platform: string]: string }
win32: 'Windows',
darwin: 'macOS',
linux: 'Linux',
+ freebsd: 'FreeBSD',
};
export function getUserAgent(appVersion: string): string {
--- ts/types/Settings.ts.orig 2022-02-16 16:11:39.000000000 +0100
+++ ts/types/Settings.ts 2022-02-19 22:18:16.945135000 +0100
@@ -60,7 +60,7 @@ export const getTitleBarVisibility = (): TitleBarVisib
*/
export const isSystemTraySupported = (appVersion: string): boolean =>
// We eventually want to support Linux in production.
- OS.isWindows() || (OS.isLinux() && !isProduction(appVersion));
+ OS.isWindows() || (OS.isLinux() && !isProduction(appVersion)) || (OS.isFreeBSD() && !isProduction(appVersion));
export const isAutoDownloadUpdatesSupported = (): boolean =>
OS.isWindows() || OS.isMacOS();
--- app/main.ts.orig 2022-02-24 15:35:11.986213000 +0100
+++ app/main.ts 2022-02-24 15:34:26.610207000 +0100
@@ -451,7 +451,7 @@ let windowIcon: string;
if (OS.isWindows()) {
windowIcon = join(__dirname, '../build/icons/win/icon.ico');
-} else if (OS.isLinux()) {
+} else if (OS.isLinux() || OS.isFreeBSD()) {
windowIcon = join(__dirname, '../images/signal-logo-desktop-linux.png');
} else {
windowIcon = join(__dirname, '../build/icons/png/512x512.png');
--- ts/state/getInitialState.ts.orig 2023-02-05 14:58:42.686190000 +0100
+++ ts/state/getInitialState.ts 2023-02-05 14:59:18.608061000 +0100
@@ -69,7 +69,7 @@ export function getInitialState({
const theme = getThemeType();
- let osName: 'windows' | 'macos' | 'linux' | undefined;
+ let osName: 'windows' | 'macos' | 'linux' | 'freebsd' | undefined;
if (OS.isWindows()) {
osName = 'windows';
@@ -77,6 +77,8 @@ export function getInitialState({
osName = 'macos';
} else if (OS.isLinux()) {
osName = 'linux';
+ } else if (OS.isFreeBSD()) {
+ osName = 'freebsd';
}
return {
--- ts/scripts/fuse-electron.ts.orig 2023-02-05 15:01:26.625383000 +0100
+++ ts/scripts/fuse-electron.ts 2023-02-05 15:02:05.602959000 +0100
@@ -17,7 +17,7 @@ export async function afterPack({
target = `${productFilename}.app`;
} else if (electronPlatformName === 'win32') {
target = `${productFilename}.exe`;
- } else if (electronPlatformName === 'linux') {
+ } else if (electronPlatformName === 'linux' || electronPlatformName === 'freebsd') {
// Sadly, `LinuxPackager` type is not exported by electron-builder so we
// have to improvise
target = (packager as unknown as { executableName: string }).executableName;
--- ts/state/ducks/user.ts.orig 2023-09-06 22:21:55.000000000 +0200
+++ ts/state/ducks/user.ts 2023-09-07 19:44:10.838670000 +0200
@@ -23,7 +23,7 @@ export type UserStateType = Readonly<{
isMainWindowMaximized: boolean;
localeMessages: LocaleMessagesType;
menuOptions: MenuOptionsType;
- osName: 'linux' | 'macos' | 'windows' | undefined;
+ osName: 'linux' | 'macos' | 'windows' | 'freebsd' | undefined;
ourAci: AciString | undefined;
ourConversationId: string | undefined;
ourDeviceId: number | undefined;
@@ -114,7 +114,7 @@ export function getEmptyState(): UserStateType {
// Reducer
export function getEmptyState(): UserStateType {
- let osName: 'windows' | 'macos' | 'linux' | undefined;
+ let osName: 'windows' | 'macos' | 'linux' | 'freebsd' | undefined;
if (OS.isWindows()) {
osName = 'windows';
@@ -122,6 +122,8 @@ export function getEmptyState(): UserStateType {
osName = 'macos';
} else if (OS.isLinux()) {
osName = 'linux';
+ } else if (OS.isFreeBSD()) {
+ osName = 'freebsd';
}
return {
--- ts/util/os/shared.ts.orig 2023-05-11 11:10:27.504955000 +0200
+++ ts/util/os/shared.ts 2023-05-11 11:11:17.326542000 +0200
@@ -32,6 +32,7 @@ export function getOSFunctions(osRelease: string): OST
const isMacOS = createIsPlatform('darwin', osRelease);
const isLinux = createIsPlatform('linux', osRelease);
const isWindows = createIsPlatform('win32', osRelease);
+ const isFreeBSD = createIsPlatform('freebsd', osRelease);
// Windows 10 and above
const hasCustomTitleBar = (): boolean =>
@@ -44,6 +45,9 @@ export function getOSFunctions(osRelease: string): OST
if (isWindows()) {
return 'Windows';
}
+ if (isFreeBSD()) {
+ return 'FreeBSD';
+ }
return 'Linux';
};
@@ -54,6 +58,9 @@ export function getOSFunctions(osRelease: string): OST
if (isWindows()) {
return 'os-windows';
}
+ if (isFreeBSD()) {
+ return 'os-freebsd';
+ }
return 'os-linux';
};
@@ -64,5 +71,6 @@ export function getOSFunctions(osRelease: string): OST
isLinux,
isMacOS,
isWindows,
+ isFreeBSD,
};
}
|