|
1 | | -## Prerequisites |
2 | | - |
3 | | -### Windows |
4 | | -- NodeJS version >= 18.16.0 |
5 | | -- Microsoft Visual Studio 2017 Community or Paid (C++ and .NET/C# development tools) |
6 | | -- Python >= 2.7.1 |
7 | | -- Dot Net 3.5 SP1 or later |
8 | | - |
9 | | -#### Notes |
10 | | -- C++ tools are required to recompile node modules |
11 | | -- Dot NET/C# tools required to compile screen-snippet module |
12 | | -- Open 'Developer Command Prompt for VS2017'. This sets paths to visual studio build tools. |
13 | | - |
14 | | -### Mac |
15 | | -- Xcode command line tools. Or better, Xcode latest version |
16 | | -- NodeJS version >= 18.16.0 |
17 | | -- [Sudre Packages](http://s.sudre.free.fr/Software/Packages/about.html) |
18 | | - |
19 | | -#### Notes |
20 | | -- Ensure you have accepted the XCode license agreement |
21 | | -- We use Sudre packages to create a .pkg installer file |
22 | | - |
23 | | -## Running SDA |
24 | | - |
25 | | -- Set this.origin to '*' in `app-bridge.ts` when running the demo. |
26 | | -- Search for `// DEMO-APP:` and comment that line back in. |
27 | | -- Make sure to comment it out again before you commit. |
28 | | - |
29 | | - |
30 | | -``` |
31 | | -# Install dependencies |
32 | | -npm install |
33 | | -
|
34 | | -# Build SDA |
35 | | -npm run prebuild |
36 | | -
|
37 | | -# Run against a POD |
38 | | -npm run dev -- --url=https://corporate.symphony.com |
39 | | -
|
40 | | -# Run the demo app |
41 | | -npm run demo |
42 | | -``` |
43 | | - |
44 | | -## Tests |
45 | | - |
46 | | -``` |
47 | | -# Run all the tests |
48 | | -npm run compile:spec |
49 | | -npm run test |
50 | | -
|
51 | | -# Specific Tests |
52 | | -npm run test -- --match=spell* |
53 | | -
|
54 | | -# Run Unit tests only |
55 | | -npm run test:unit |
56 | | -
|
57 | | -# Specific Unit tests |
58 | | -npm run test:unit -- --match=spell* |
59 | | -``` |
60 | | - |
61 | | -### Code Coverage |
62 | | -- We capture the Code coverage reports under [coverage](out/coverage) |
63 | | -- To check the test run report, see the [out](out/) directory |
64 | | -- See the [tests](spec/) directory to find all the unit tests |
65 | | - |
66 | | -## Packaging: |
67 | | - |
68 | | -- Add Artifactory credentials to your home directory `.npmrc` file |
69 | | - |
70 | | -1. Login to https://repo.symphony.com/ in your browser |
71 | | -2. Open https://repo.symphony.com/artifactory/webapp/#/profile |
72 | | -3. Click generate token |
73 | | -4. Execute `curl --location --request GET 'https://repo.symphony.com/artifactory/api/npm/auth' --header 'X-JFrog-Art-Api: <token from #3>'` |
74 | | -5. Update ~/.npmrc with: |
75 | | - |
76 | | -``` |
77 | | -registry = https://repo.symphony.com/artifactory/api/npm/npm-virtual-dev/ |
78 | | -//repo.symphony.com/artifactory/api/npm/npm-virtual-dev/:_auth = <auth value from #4> |
79 | | -always-auth = true |
80 | | -``` |
81 | | - |
82 | | -### Mac 🖥 |
83 | | -- npm install |
84 | | -- npm run dev (to run locally) |
85 | | -- To build the macOS app: |
86 | | - * Run the command `npm run unpacked-mac` |
87 | | - * The distributable is created in the `dist/mac` directory |
88 | | -- To build mac package (installer): |
89 | | - * Run the command `npm run packed-mac` |
90 | | - * The .pkg file will be generated in the `installer/mac/build` directory |
91 | | - |
92 | | -### Windows 💻 |
93 | | -- npm install |
94 | | -- npm run dev (to run locally) |
95 | | -- To build windows unpacked exe: |
96 | | - * Run the command `npm run unpacked-win` |
97 | | - * The distributable is created in the `dist/win-unpacked` directory |
98 | | -- To build windows 64-bit unpacked exe: |
99 | | - * Run the command `npm run unpacked-win` |
100 | | - * The distributable is created in the `dist/win-unpacked` directory |
101 | | -- To create msi (installer): |
102 | | - * Run the advanced installer script located in `installer/win` directory |
103 | | - |
104 | | -#### MSI command line options: |
105 | | -- To install for all users (admin required): msiexec.exe /i Symphony-x64.msi ALLUSERS=1 |
106 | | -- To install per user: msiexec.exe /i Symphony-x64.msi ALLUSERS="" |
107 | | -- To change default pod url: msiexe.exe /i Symphony-x64.msi POD_URL=my.symphony.com |
108 | | -- To change auto start: msiexe.exe /i Symphony-x64.msi AUTO_LAUNCH=true (or false) - if not specified default it true. |
109 | | -- To change minimize on close: msiexe.exe /i Symphony-x64.msi MINIMIZE_ON_CLOSE=true (or false) - if not specified default is true. |
110 | | -- Any of the above options can be chained together, for example: msiexe.exe /i Symphony-x64.msi MINIMIZE_ON_CLOSE=true AUTO_START=false POD_URL=my.symphony.com |
111 | | -- The available values for various settings in the installer is listed below |
112 | | - * POD_URL (String) |
113 | | - * ALWAYS_ON_TOP (Boolean) |
114 | | - * AUTO_LAUNCH (Boolean) |
115 | | - * MINIMIZE_ON_CLOSE (Boolean) |
116 | | - * BRING_TO_FRONT (Boolean) |
117 | | - * MEDIA (Boolean) |
118 | | - * LOCATION (Boolean) |
119 | | - * NOTIFICATIONS (Boolean) |
120 | | - * MIDI_SYSEX (Boolean) |
121 | | - * FULL_SCREEN (Boolean) |
122 | | - * POINTER_LOCK (Boolean) |
123 | | - * OPEN_EXTERNAL (Boolean) |
124 | | - |
125 | | -### Linux 🐳 |
126 | | -- Download and install Docker daemon [here](https://www.docker.com/products/docker-desktop) |
127 | | -- Run the below docker commands under the project directory |
128 | | -- To generate and tag the container |
129 | | -`docker build -t linux:6.0.0 --build-arg REPO=https://github.com/symphonyoss/SymphonyElectron --build-arg BRANCH=linux .` |
130 | | -- To make sure the image is created and tagged correctly |
131 | | -`docker images` |
132 | | -- To run the docker image and generate the linux builds 🎉 |
133 | | -`docker run --name linux linux:6.0.0` |
134 | | -- To copy the builds |
135 | | -`docker cp linux:/SymphonyElectron/dist/symphony-6.1.0.x86_64.rpm ~/Desktop` |
136 | | -`docker cp linux:/SymphonyElectron/dist/symphony_6.1.0_amd64.deb ~/Desktop` |
137 | | - |
138 | | -##### Other useful docker commands |
139 | | -- To connect to the interactive bash |
140 | | -`docker run -i -t linux:6.0.0 /bin/bash` |
141 | | -- To delete all stopper containers |
142 | | -`docker system prune -a` |
143 | | -- To delete the container/image |
144 | | -`docker rmi -f linux:6.0.0` |
145 | | - |
146 | | -### Change POD URL |
147 | | -- To change the start url (i.e., pod url), edit config/Symphony.config and change 'url' variable. if no protocol provided, then https will be added. |
148 | | -- The installer will include file config/Symphony.config next to executable. Changes in this file will affect all |
149 | | - users. |
150 | | -- Alternatively, to run against a specific pod, launch Symphony (SDA) with the command line parameter `--url=pod_url |
151 | | -`. With this, you don't have to change the config/Symphony.config file every time. |
152 | | - |
153 | | -## Troubleshooting |
154 | | -### Logging |
155 | | -- We enable local logging for dev environments using the module [electron-log](https://www.npmjs.com/package |
156 | | -/electron-log) |
157 | | -- On macOS, we store the logs under `~/Library/Logs/Electron/app_<timestamp>.log` |
158 | | -- On Windows, we store the logs under `%USERPROFILE%\AppData\Roaming\Electron\app_<timestamp>.log` |
159 | | -- On Linux, we store the logs under `~/.config/Electron/logs/app_<timestamp>.log` |
160 | | - |
161 | | -### Customisation |
162 | | -- If you need to run against a POD without proper cert use cmd line option: --ignore-certificate-errors |
163 | | -- To start an additional instance with custom data directory (if you want seperate user) use cmd line options |
164 | | -: --multiInstance --userDataPath=`<path to data dir>` |
165 | | -- If directory doesn't exist, it will be created |
| 1 | +## Prerequisites |
| 2 | + |
| 3 | +### Windows |
| 4 | +- NodeJS version >= 18.16.0 |
| 5 | +- Microsoft Visual Studio 2017 Community or Paid (C++ and .NET/C# development tools) |
| 6 | +- Python >= 2.7.1 |
| 7 | +- Dot Net 3.5 SP1 or later |
| 8 | + |
| 9 | +#### Notes |
| 10 | +- C++ tools are required to recompile node modules |
| 11 | +- Dot NET/C# tools required to compile screen-snippet module |
| 12 | +- Open 'Developer Command Prompt for VS2017'. This sets paths to visual studio build tools. |
| 13 | + |
| 14 | +### Mac |
| 15 | +- Xcode command line tools. Or better, Xcode latest version |
| 16 | +- NodeJS version >= 18.16.0 |
| 17 | +- [Sudre Packages](http://s.sudre.free.fr/Software/Packages/about.html) |
| 18 | + |
| 19 | +#### Notes |
| 20 | +- Ensure you have accepted the XCode license agreement |
| 21 | +- We use Sudre packages to create a .pkg installer file |
| 22 | + |
| 23 | +## Running SDA |
| 24 | + |
| 25 | +- Set this.origin to '*' in `app-bridge.ts` when running the demo. |
| 26 | +- Search for `// DEMO-APP:` and comment that line back in. |
| 27 | +- Make sure to comment it out again before you commit. |
| 28 | + |
| 29 | + |
| 30 | +``` |
| 31 | +# Install dependencies |
| 32 | +npm install |
| 33 | +
|
| 34 | +# Build SDA |
| 35 | +npm run prebuild |
| 36 | +
|
| 37 | +# Run against a POD |
| 38 | +npm run dev -- --url=https://corporate.symphony.com |
| 39 | +
|
| 40 | +# Run the demo app |
| 41 | +npm run demo |
| 42 | +``` |
| 43 | + |
| 44 | +## Tests |
| 45 | + |
| 46 | +``` |
| 47 | +# Run all the tests |
| 48 | +npm run compile:spec |
| 49 | +npm run test |
| 50 | +
|
| 51 | +# Specific Tests |
| 52 | +npm run test -- --match=spell* |
| 53 | +
|
| 54 | +# Run Unit tests only |
| 55 | +npm run test:unit |
| 56 | +
|
| 57 | +# Specific Unit tests |
| 58 | +npm run test:unit -- --match=spell* |
| 59 | +``` |
| 60 | + |
| 61 | +### Code Coverage |
| 62 | +- We capture the Code coverage reports under [coverage](out/coverage) |
| 63 | +- To check the test run report, see the [out](out/) directory |
| 64 | +- See the [tests](spec/) directory to find all the unit tests |
| 65 | + |
| 66 | +## Packaging: |
| 67 | + |
| 68 | +- Add Artifactory credentials to your home directory `.npmrc` file |
| 69 | + |
| 70 | +1. Login to https://repo.symphony.com/ in your browser |
| 71 | +2. Open https://repo.symphony.com/artifactory/webapp/#/profile |
| 72 | +3. Click generate token |
| 73 | +4. Execute `curl --location --request GET 'https://repo.symphony.com/artifactory/api/npm/auth' --header 'X-JFrog-Art-Api: <token from #3>'` |
| 74 | +5. Update ~/.npmrc with: |
| 75 | + |
| 76 | +``` |
| 77 | +registry = https://repo.symphony.com/artifactory/api/npm/npm-virtual-dev/ |
| 78 | +//repo.symphony.com/artifactory/api/npm/npm-virtual-dev/:_auth = <auth value from #4> |
| 79 | +always-auth = true |
| 80 | +``` |
| 81 | + |
| 82 | +### Mac 🖥 |
| 83 | +- npm install |
| 84 | +- npm run dev (to run locally) |
| 85 | +- To build the macOS app: |
| 86 | + * Run the command `npm run unpacked-mac` |
| 87 | + * The distributable is created in the `dist/mac` directory |
| 88 | +- To build mac package (installer): |
| 89 | + * Run the command `npm run packed-mac` |
| 90 | + * The .pkg file will be generated in the `installer/mac/build` directory |
| 91 | + |
| 92 | +### Windows 💻 |
| 93 | +- npm install |
| 94 | +- npm run dev (to run locally) |
| 95 | +- To build windows unpacked exe: |
| 96 | + * Run the command `npm run unpacked-win` |
| 97 | + * The distributable is created in the `dist/win-unpacked` directory |
| 98 | +- To build windows 64-bit unpacked exe: |
| 99 | + * Run the command `npm run unpacked-win` |
| 100 | + * The distributable is created in the `dist/win-unpacked` directory |
| 101 | +- To create msi (installer): |
| 102 | + * Run the advanced installer script located in `installer/win` directory |
| 103 | + |
| 104 | +#### MSI command line options: |
| 105 | +- To install for all users (admin required): msiexec.exe /i Symphony-x64.msi ALLUSERS=1 |
| 106 | +- To install per user: msiexec.exe /i Symphony-x64.msi ALLUSERS="" |
| 107 | +- To change default pod url: msiexe.exe /i Symphony-x64.msi POD_URL=my.symphony.com |
| 108 | +- To change auto start: msiexe.exe /i Symphony-x64.msi AUTO_LAUNCH=true (or false) - if not specified default it true. |
| 109 | +- To change minimize on close: msiexe.exe /i Symphony-x64.msi MINIMIZE_ON_CLOSE=true (or false) - if not specified default is true. |
| 110 | +- Any of the above options can be chained together, for example: msiexe.exe /i Symphony-x64.msi MINIMIZE_ON_CLOSE=true AUTO_START=false POD_URL=my.symphony.com |
| 111 | +- The available values for various settings in the installer is listed below |
| 112 | + * POD_URL (String) |
| 113 | + * ALWAYS_ON_TOP (Boolean) |
| 114 | + * AUTO_LAUNCH (Boolean) |
| 115 | + * MINIMIZE_ON_CLOSE (Boolean) |
| 116 | + * BRING_TO_FRONT (Boolean) |
| 117 | + * MEDIA (Boolean) |
| 118 | + * LOCATION (Boolean) |
| 119 | + * NOTIFICATIONS (Boolean) |
| 120 | + * MIDI_SYSEX (Boolean) |
| 121 | + * FULL_SCREEN (Boolean) |
| 122 | + * POINTER_LOCK (Boolean) |
| 123 | + * OPEN_EXTERNAL (Boolean) |
| 124 | + |
| 125 | +### Linux 🐳 |
| 126 | +- Download and install Docker daemon [here](https://www.docker.com/products/docker-desktop) |
| 127 | +- Run the below docker commands under the project directory |
| 128 | +- To generate and tag the container |
| 129 | +`docker build -t linux:6.0.0 --build-arg REPO=https://github.com/symphonyoss/SymphonyElectron --build-arg BRANCH=linux .` |
| 130 | +- To make sure the image is created and tagged correctly |
| 131 | +`docker images` |
| 132 | +- To run the docker image and generate the linux builds 🎉 |
| 133 | +`docker run --name linux linux:6.0.0` |
| 134 | +- To copy the builds |
| 135 | +`docker cp linux:/SymphonyElectron/dist/symphony-6.1.0.x86_64.rpm ~/Desktop` |
| 136 | +`docker cp linux:/SymphonyElectron/dist/symphony_6.1.0_amd64.deb ~/Desktop` |
| 137 | + |
| 138 | +##### Other useful docker commands |
| 139 | +- To connect to the interactive bash |
| 140 | +`docker run -i -t linux:6.0.0 /bin/bash` |
| 141 | +- To delete all stopper containers |
| 142 | +`docker system prune -a` |
| 143 | +- To delete the container/image |
| 144 | +`docker rmi -f linux:6.0.0` |
| 145 | + |
| 146 | +### Change POD URL |
| 147 | +- To change the start url (i.e., pod url), edit config/Symphony.config and change 'url' variable. if no protocol provided, then https will be added. |
| 148 | +- The installer will include file config/Symphony.config next to executable. Changes in this file will affect all |
| 149 | + users. |
| 150 | +- Alternatively, to run against a specific pod, launch Symphony (SDA) with the command line parameter `--url=pod_url |
| 151 | +`. With this, you don't have to change the config/Symphony.config file every time. |
| 152 | + |
| 153 | +## Troubleshooting |
| 154 | +### Logging |
| 155 | +- We enable local logging for dev environments using the module [electron-log](https://www.npmjs.com/package |
| 156 | +/electron-log) |
| 157 | +- On macOS, we store the logs under `~/Library/Logs/Electron/app_<timestamp>.log` |
| 158 | +- On Windows, we store the logs under `%USERPROFILE%\AppData\Roaming\Electron\app_<timestamp>.log` |
| 159 | +- On Linux, we store the logs under `~/.config/Electron/logs/app_<timestamp>.log` |
| 160 | + |
| 161 | +### Customisation |
| 162 | +- If you need to run against a POD without proper cert use cmd line option: --ignore-certificate-errors |
| 163 | +- To start an additional instance with custom data directory (if you want seperate user) use cmd line options |
| 164 | +: --multiInstance --userDataPath=`<path to data dir>` |
| 165 | +- If directory doesn't exist, it will be created |
0 commit comments