Skip to content

Commit

Permalink
Bump electron to 17.0.0
Browse files Browse the repository at this point in the history
Refactoring code and directories
Fix bugs
  • Loading branch information
oOtierryOo committed Jun 18, 2022
1 parent 4ed74ab commit d0c2f8e
Show file tree
Hide file tree
Showing 40 changed files with 5,700 additions and 7,332 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.idea/*
.DS_Store
Thumbs.db
dist
build/outputs
build/releases
build/dist
npm-debug.log
node_modules
electron-*
Expand Down
15 changes: 0 additions & 15 deletions .prepare-release.sh

This file was deleted.

91 changes: 0 additions & 91 deletions .travis.yml

This file was deleted.

50 changes: 23 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# WhatsApp Desktop

![screenshot](https://github.com/oOthkOo/whatsapp-desktop/blob/master/whatsapp-screen.png "Main Window")
![screenshot](https://github.com/oOthkOo/whatsapp-desktop/blob/master/screenshots/whatsapp-screen.png "Main Window")

Unofficial WhatsApp Desktop Client for OSX, Linux and Windows. Build with [Electron](http://electron.atom.io/).

Expand Down Expand Up @@ -36,10 +36,10 @@ Original versions of WhatsApp Desktop was written by:

## Download WhatsApp

* Windows 10 - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.1/WhatsApp-win32-x64.zip) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/WhatsApp-win32-x64.zip?style=flat-square)
* Mac OSX - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.1/WhatsApp-darwin-x64.zip) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/WhatsApp-darwin-x64.zip?style=flat-square)
* Ubuntu (32 bits) - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.1/whatsapp-desktop-x32.deb) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/whatsapp-desktop-x32.deb?style=flat-square)
* Ubuntu (64 bits) - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.1/whatsapp-desktop-x64.deb) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/whatsapp-desktop-x64.deb?style=flat-square)
* Windows 10 - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.2/WhatsApp-win32-x64.zip) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/WhatsApp-win32-x64.zip?style=flat-square)
* Mac OSX - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.2/WhatsApp-darwin-x64.zip) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/WhatsApp-darwin-x64.zip?style=flat-square)
* Ubuntu (32 bits) - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.2/whatsapp-desktop-x32.deb) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/whatsapp-desktop-x32.deb?style=flat-square)
* Ubuntu (64 bits) - [Download](https://github.com/oOthkOo/whatsapp-desktop/releases/download/v0.5.2/whatsapp-desktop-x64.deb) - ![Stats](https://img.shields.io/github/downloads/oOthkOo/whatsapp-desktop/latest/whatsapp-desktop-x64.deb?style=flat-square)

Donations
-----
Expand All @@ -62,55 +62,51 @@ You need NPM and Yarn to be installed on your system before building deb package
* NPM : https://nodejs.org/en/download/package-manager/
* Yarn : https://yarnpkg.com/lang/en/docs/install/

### Build 32/64bits packages
### Build Linux 32/64 bits packages

You can build `whatsapp-desktop-xxx.deb` package with:

```sh
git clone https://github.com/oOthkOo/whatsapp-desktop.git
cd whatsapp-desktop
./build-deb-x64.sh # or ./build-deb-x32.sh for 32 bits
./scripts/build-deb-x64.sh # or ./scripts/build-deb-x32.sh for 32 bits
```

You'll find debian packages into `build/releases` directory.

### Install WhatsApp on Debian, Ubuntu, Mint, ...

```sh
sudo dpkg -i ./build/whatsapp-desktop-x64.deb
sudo apt install ./build/releases/whatsapp-desktop-x64.deb
sudo apt install -f
```

## Repositories

Note that these repos are available only for `amd64` (deb+rpm) and `armhf/armv7l` (deb-only).

## Command line switches

--debug-log Switch file's log level to "debug" (default: "warn")

## Known issues

### Fonts rendering as rectangles after upgrade

Apparently it's caused by an issue of Electron with an older version of Pango. Upgrade Pango at least to `1.40.12` or downgrade to `1.40.5` should fix this. See https://github.com/Enrico204/Whatsapp-Desktop/issues/13

### Tray Icon is displayed wrong in KDE

This is due to some bugs between Electron and KDE on tray icons, see [this comment on issue #27](https://github.com/Enrico204/Whatsapp-Desktop/issues/27#issuecomment-338410450) and [vector-im/riot-web#3133](https://github.com/vector-im/riot-web/issues/3133). A workaround is to uninstall `libappindicator` and `libappindicator-gtk3` packages (this will change also the behavior of click on the tray icon).

## Contributions

Contributions are welcome! For feature requests and bug reports please submit an [issue](https://github.com/Enrico204/Whatsapp-Desktop/issues).
Contributions are welcome! For feature requests and bug reports please submit an [issue](https://github.com/oOthkOo/whatsapp-desktop/issues).

## Build from source

To build from the source, run the following commands:

yarn install
yarn run build:platform
```sh
yarn install
yarn run build:{platform}
```

where `build:platform` can be `build:linux` if you want to build for Linux (use `build:linux32` for 32-bit), `build:osx` for OSX only, `build:win` for Windows only, or simply `build` to build for all platforms.
Platform | OS
--- | ---
win | Windows only
osx | OSX only
linux | Linux 64 bits
linux32 | Linux 32 bits
linuxarmv7l | ARM Linux

You'll find artifacts into `dist/` directory.
You'll find artifacts into `build/dist/` directory.

## Run on-the-fly (for devs)

Expand Down
6 changes: 6 additions & 0 deletions app/agents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"userAgents": [
"Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0",
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
]
}
9 changes: 0 additions & 9 deletions app/js/injected.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(function () {

const {ipcRenderer} = require('electron');
const {remote} = require('electron');
var updatePhoneInfoInterval = null;

function updatePhoneInfo() {
Expand Down Expand Up @@ -40,14 +39,6 @@
// pass in the target node, as well as the observer options
var observer = new MutationObserver(function (mutations) {
console.log("Mutations occurred: ", mutations.length);
document.querySelector("div[data-asset-chat-background]").classList.add("pane-chat-tile");

if (remote.getGlobal("config").currentSettings.darkMode) {
var elements = document.getElementsByTagName("path");
for (var i = 0; i < elements.length; i++) {
elements[i].setAttribute('fill', 'white');
}
}

var inputSearch = document.querySelector("input.input-search");
if (inputSearch) {
Expand Down
Loading

0 comments on commit d0c2f8e

Please sign in to comment.