diff options
author | Nathanaël Houn <contact@nathanaelhoun.fr> | 2022-04-22 11:51:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-22 09:51:48 +0000 |
commit | 81b4aae66515b6eec2ac98fda50b1a59bffd94e3 (patch) | |
tree | e61886514667101ff8169aa09daa375c9853eb35 /CONTRIBUTING.md | |
parent | Fix build for snapcraft: command not found (diff) | |
download | ferdium-app-81b4aae66515b6eec2ac98fda50b1a59bffd94e3.tar.gz ferdium-app-81b4aae66515b6eec2ac98fda50b1a59bffd94e3.tar.zst ferdium-app-81b4aae66515b6eec2ac98fda50b1a59bffd94e3.zip |
Added build scripts for linux, macos and windows to help new contributors get setup quickly (#21)
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Co-authored-by: André Oliveira <oliveira.andrerodrigues95@gmail.com>
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 116 |
1 files changed, 61 insertions, 55 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index abcbac9f2..78b9a36be 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md | |||
@@ -1,4 +1,4 @@ | |||
1 | # Contributing to Ferdium 5 | 1 | # Contributing to Ferdium 6 |
2 | 2 | ||
3 | :tada: First off, thanks for taking the time and your effort to make Ferdium better! :tada: | 3 | :tada: First off, thanks for taking the time and your effort to make Ferdium better! :tada: |
4 | 4 | ||
@@ -6,95 +6,99 @@ | |||
6 | 6 | ||
7 | <!-- TOC depthFrom:2 depthTo:2 withLinks:1 updateOnSave:1 orderedList:0 --> | 7 | <!-- TOC depthFrom:2 depthTo:2 withLinks:1 updateOnSave:1 orderedList:0 --> |
8 | 8 | ||
9 | - [Contributing to Ferdium 5](#contributing-to-ferdium-5) | 9 | - [Table of contents](#table-of-contents) |
10 | - [Table of contents](#table-of-contents) | 10 | - [Code of Conduct](#code-of-conduct) |
11 | - [Code of Conduct](#code-of-conduct) | 11 | - [What should I know before I get started?](#what-should-i-know-before-i-get-started) |
12 | - [What should I know before I get started?](#what-should-i-know-before-i-get-started) | 12 | - [How can I contribute?](#how-can-i-contribute) |
13 | - [How Can I Contribute?](#how-can-i-contribute) | 13 | - [Setting up your development machine](#setting-up-your-development-machine) |
14 | - [Setting up your Development machine](#setting-up-your-development-machine) | 14 | - [Install system-level dependencies](#install-system-level-dependencies) |
15 | - [Install System-level dependencies](#install-system-level-dependencies) | 15 | - [Node.js, npm, pnpm](#nodejs-npm-pnpm) |
16 | - [Node.js, npm, pnpm](#nodejs-npm-pnpm) | 16 | - [Git](#git) |
17 | - [Git](#git) | 17 | - [On Debian/Ubuntu](#on-debianubuntu) |
18 | - [Debian/Ubuntu](#debianubuntu) | 18 | - [On Fedora](#on-fedora) |
19 | - [Fedora](#fedora) | 19 | - [On Windows](#on-windows) |
20 | - [Windows](#windows) | 20 | - [Clone repository with submodule](#clone-repository-with-submodule) |
21 | - [Clone repository with submodule](#clone-repository-with-submodule) | 21 | - [Local caching of dependencies](#local-caching-of-dependencies) |
22 | - [Local caching of dependencies](#local-caching-of-dependencies) | 22 | - [Install dependencies](#install-dependencies) |
23 | - [Install dependencies](#install-dependencies) | 23 | - [Fix native modules to match current electron node version](#fix-native-modules-to-match-current-electron-node-version) |
24 | - [Fix native modules to match current electron node version](#fix-native-modules-to-match-current-electron-node-version) | 24 | - [Package recipe repository](#package-recipe-repository) |
25 | - [Package recipe repository](#package-recipe-repository) | 25 | - [Using Docker to build a linux-targetted packaged app](#using-docker-to-build-a-linux-targetted-packaged-app) |
26 | - [Using Docker to build a linux-targetted packaged app](#using-docker-to-build-a-linux-targetted-packaged-app) | 26 | - [Code Signing on a mac](#code-signing-on-a-mac) |
27 | - [Code Signing on a mac](#code-signing-on-a-mac) | 27 | - [Start development app](#start-development-app) |
28 | - [Start development app](#start-development-app) | 28 | - [Styleguide](#styleguide) |
29 | - [Styleguide](#styleguide) | 29 | - [Git Commit Messages format](#git-commit-messages-format) |
30 | - [Git Commit Messages format](#git-commit-messages-format) | 30 | - [Javascript Coding style-checker](#javascript-coding-style-checker) |
31 | - [Javascript Coding style-checker](#javascript-coding-style-checker) | 31 | - [Packaging](#packaging) |
32 | - [Packaging](#packaging) | 32 | - [Release](#release) |
33 | - [Release](#release) | 33 | - [Nightly releases](#nightly-releases) |
34 | - [Nightly releases](#nightly-releases) | 34 | - [Updating the code after a hiatus](#updating-the-code-after-a-hiatus) |
35 | - [Updating the code after a hiatus](#updating-the-code-after-a-hiatus) | ||
36 | 35 | ||
37 | <!-- /TOC --> | 36 | <!-- /TOC --> |
38 | 37 | ||
39 | ## Code of Conduct | 38 | ## Code of Conduct |
40 | 39 | ||
41 | This project and everyone participating in it is governed by the [Ferdium Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [hello@ferdium.org](mailto:hello@ferdium.org). | 40 | This project and everyone participating in it is governed by the [Ferdium Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. |
41 | Please report unacceptable behavior to [hello@ferdium.org](mailto:hello@ferdium.org). | ||
42 | 42 | ||
43 | ## What should I know before I get started? | 43 | ## What should I know before I get started? |
44 | 44 | ||
45 | For the moment, Ferdium's development is a bit slow but all contributions are highly appreciated. [Check this issue for discussion](https://github.com/ferdium/ferdium-app/issues/956). | 45 | For the moment, Ferdium's development is only starting, aiming at releasing a 6.0.0 version with the rebranded assets and tooling upgrade completed. |
46 | You can join the Discord official chat here : https://discord.com/invite/xpNTzgKmHM. | ||
46 | 47 | ||
47 | ## How Can I Contribute? | 48 | ## How can I contribute? |
48 | 49 | ||
49 | As a basic rule, before filing issues, feature requests or anything else. Take a look at the issues and check if this has not already been reported by another user. If so, engage in the already existing discussion. | 50 | As a basic rule, before filing issues, feature requests or anything else : take a look at the existing issues and check if this has not already been reported by another user. |
51 | If so, engage in the already existing discussion. | ||
50 | 52 | ||
51 | ## Setting up your Development machine | 53 | ## Setting up your development machine |
52 | 54 | ||
53 | ### Install System-level dependencies | 55 | ### Install system-level dependencies |
56 | |||
57 | _Note:_ This list can likely get outdated. If so, please refer to the specific version of the [electronuserland builder](https://hub.docker.com/r/electronuserland/builder) that we use in our [Dockerfile](./Dockerfile). | ||
54 | 58 | ||
55 | #### Node.js, npm, pnpm | 59 | #### Node.js, npm, pnpm |
56 | 60 | ||
57 | Please make sure you are conforming to the `engines` requirements used by the developers/contributors as specified in the [package.json file](./package.json#engines). | 61 | Please make sure you are conforming to the `engines` requirements used by the developers/contributors as specified in the [`package.json`](./package.json#engines) and [`recipes/package.json`](./recipes/package.json#engine) files. |
58 | 62 | ||
59 | Currently, these are the combinations of system dependencies that work for MacOS/Linux/Windows: | 63 | Currently, these are the combinations of system dependencies that work for MacOS/Linux/Windows: |
60 | 64 | ||
61 | ```bash | 65 | ```bash |
62 | node -v | 66 | $ jq --null-input '[inputs.engines] | add' < ./package.json < ./recipes/package.json |
63 | v18.0.0 | 67 | { |
64 | npm -v | 68 | "node": "18.0.0", |
65 | 8.7.0 | 69 | "npm": "8.7.0", |
66 | pnpm -v | 70 | "pnpm": "6.32.8" |
67 | 6.32.8 | 71 | } |
68 | python -v | 72 | |
69 | 3.10.4 | 73 | $ python --version |
74 | Python 3.10.4 | ||
70 | ``` | 75 | ``` |
71 | 76 | ||
72 | _Note:_ You can choose any package manager to manage multiple versions of `node` and `npm`. For eg, [nvm](https://github.com/nvm-sh/nvm) or [asdf](https://github.com/asdf-vm/asdf). | 77 | _Note:_ You can choose any version manager to manage multiple versions of `node` and `npm`. For eg, [nvm](https://github.com/nvm-sh/nvm) or [asdf](https://github.com/asdf-vm/asdf). |
73 | 78 | ||
74 | #### Git | 79 | #### Git |
75 | 80 | ||
76 | The version [2.23.0](https://github.com/git-for-windows/git/releases/tag/v2.23.0.windows.1) for Git is working fine for development. You can then use the console from Git to do the development procedure. | 81 | The version [2.23.0](https://github.com/git-for-windows/git/releases/tag/v2.23.0.windows.1) for Git is working fine for development. You can then use the console from Git to do the development procedure. |
77 | 82 | ||
78 | _Note:_ This list can likely get outdated. If so, please refer to the specific version of the [electronuserland builder](https://hub.docker.com/r/electronuserland/builder) that we use in our [Dockerfile](./Dockerfile). | 83 | #### On Debian/Ubuntu |
79 | |||
80 | #### Debian/Ubuntu | ||
81 | 84 | ||
82 | ```bash | 85 | ```bash |
83 | apt-get update -y && apt-get install --no-install-recommends -y rpm ruby gem && gem install fpm --no-ri --no-rdoc --no-document | 86 | apt-get update -y && apt-get install --no-install-recommends -y rpm ruby gem && gem install fpm --no-ri --no-rdoc --no-document |
84 | ``` | 87 | ``` |
85 | 88 | ||
86 | #### Fedora | 89 | #### On Fedora |
87 | 90 | ||
88 | ```bash | 91 | ```bash |
89 | dnf install libX11-devel libXext-devel libXScrnSaver-devel libxkbfile-devel rpm | 92 | dnf install libX11-devel libXext-devel libXScrnSaver-devel libxkbfile-devel rpm |
90 | ``` | 93 | ``` |
91 | 94 | ||
92 | #### Windows | 95 | #### On Windows |
93 | 96 | ||
94 | Please make sure you have the following installed: | 97 | Please make sure you have the following installed: |
95 | 98 | ||
96 | - Python 3 or higher (we recommend the latest version: [3.10.4](https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe)) | 99 | - Python 3 or higher (we recommend the latest version: [3.10.4](https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe)) |
97 | - Microsoft Visual Studio Build Tools (2019 or higher) - Only tested with 2019 so far. | 100 | - Microsoft Visual Studio Build Tools (2019 or higher) - Only tested with 2019 so far. |
101 | |||
98 | ### Clone repository with submodule | 102 | ### Clone repository with submodule |
99 | 103 | ||
100 | ```bash | 104 | ```bash |
@@ -103,20 +107,18 @@ cd ferdium | |||
103 | git submodule update --init --recursive --remote --rebase --force | 107 | git submodule update --init --recursive --remote --rebase --force |
104 | ``` | 108 | ``` |
105 | 109 | ||
106 | It is important you execute the last command to get the required submodules (recipes). | 110 | It is important you execute the last command to get the required submodule (ferdium-recipes). |
107 | 111 | ||
108 | ### Local caching of dependencies | 112 | ### Local caching of dependencies |
109 | 113 | ||
110 | Set these env vars into your profile (or if you use [direnv](https://direnv.net/), you can manage them via the respective `.envrc` file) | 114 | Set these env vars into your profile (or if you use [direnv](https://direnv.net/), you can manage them via the respective `.envrc` file) |
111 | 115 | ||
112 | ```bash | 116 | ```bash |
117 | # On bash or equivalent | ||
113 | export ELECTRON_CACHE=$HOME/.cache/electron | 118 | export ELECTRON_CACHE=$HOME/.cache/electron |
114 | export ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder | 119 | export ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder |
115 | ``` | ||
116 | 120 | ||
117 | #### If you are using Powershell: | 121 | # On Powershell |
118 | If you are using Powershell make sure you set the following env vars | ||
119 | ``` | ||
120 | $env:CI = $true | 122 | $env:CI = $true |
121 | $env:ELECTRON_CACHE = $HOME + '\.cache\electron' | 123 | $env:ELECTRON_CACHE = $HOME + '\.cache\electron' |
122 | $env:ELECTRON_BUILDER_CACHE = $HOME + '\.cache\electron-builder' | 124 | $env:ELECTRON_BUILDER_CACHE = $HOME + '\.cache\electron-builder' |
@@ -218,7 +220,11 @@ Note: please prefer [`debug()`](https://github.com/visionmedia/debug) over `cons | |||
218 | ## Packaging | 220 | ## Packaging |
219 | 221 | ||
220 | ```bash | 222 | ```bash |
221 | npm run build | 223 | # On Unix |
224 | ./scripts/build-unix.sh | ||
225 | |||
226 | # On Windows | ||
227 | .\scripts\build-windows.ps1 | ||
222 | ``` | 228 | ``` |
223 | 229 | ||
224 | Assets will be available in the `out` folder. | 230 | Assets will be available in the `out` folder. |