Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tauri #439

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Tauri #439

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 33 additions & 21 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,47 @@ jobs:
- windows-latest
- ubuntu-latest
node-version:
- 17
- 20

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1

- name: setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Cache node_modules
uses: actions/cache@v2
with:
path: ./node_modules
key: ${{ matrix.os }}-${{ matrix.node-version }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
env:
cache-name: node-modules
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable

- run: sudo apt-get update -y && sudo apt-get install --no-install-recommends -y libopenjp2-tools rpm libarchive-tools
name: Install Linux Dependencies
if: (startsWith(matrix.os, 'ubuntu'))
- name: install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf

- run: yarn install --frozen-lockfile
- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: false

- run: yarn dist --publish onTagOrDraft
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Upload Build
uses: actions/[email protected]
- name: setup pnpm cache
uses: actions/cache@v3
with:
name: ${{ matrix.os }}-${{ matrix.node-version }}
path: ./dist
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: install node dependencies
run: pnpm install --frozen-lockfile

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52 changes: 33 additions & 19 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,47 @@ jobs:
- windows-latest
- ubuntu-latest
node-version:
- 17
- 20

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1

- name: setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Cache node_modules
uses: actions/cache@v2
with:
path: ./node_modules
key: ${{ matrix.os }}-${{ matrix.node-version }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
env:
cache-name: node-modules
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable

- run: sudo apt-get update -y && sudo apt-get install --no-install-recommends -y libopenjp2-tools rpm libarchive-tools
name: Install Linux Dependencies
if: (startsWith(matrix.os, 'ubuntu'))
- name: install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf

- run: yarn install --frozen-lockfile
- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: false

- run: yarn dist --publish never
- name: get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Upload Build
uses: actions/[email protected]
- name: setup pnpm cache
uses: actions/cache@v3
with:
name: ${{ matrix.os }}-${{ matrix.node-version }}
path: ./dist
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: install node dependencies
run: pnpm install --frozen-lockfile

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 21 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
node_modules/
.DS_Store
Thumbs.db
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

/dist

app/
node_modules
dist
dist-ssr
*.local

settings.json
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
}
44 changes: 4 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,7 @@
# Android Messages™ Desktop ![master status](https://github.com/OrangeDrangon/android-messages-desktop/actions/workflows/master.yml/badge.svg)
# Tauri + Vanilla TS

Run Android Messages as a desktop app, a la iMessage. For those of us that prefer not to have a browser tab always open for this sort of thing.
This template should help get you started developing with Tauri in vanilla HTML, CSS and Typescript.

**Not affiliated with Google in any way. Android is a trademark of Google LLC.**
## Recommended IDE Setup

Inspired by:

- [Google Play Music Desktop Player](https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-)
- [a Reddit post on r/Android](https://www.reddit.com/r/Android/comments/8shv6q/web_messages/e106a8r/)

**Important Note 1:** We currently have builds for Windows and macOS, and Linux. I test releases on Arch Linux and to a lesser degree Windows. I would love help testing in additional places.

**Important Note 2:** Neither the MacOS nor the Windows binaries are signed right now. I am willing to add this but I do not have the certificates required at this time.

# Install Anywhere

Download your build from the [releases](https://github.com/OrangeDrangon/android-messages-desktop/releases/latest) page.

# Install on Archlinux via AUR

`yay -S android-messages-desktop-bin` or the relevant command in your aur helper.

# Install on MacOS via Homebrew

`brew install --cask orangedrangon-android-messages`

# Install on Windows via Scoop

`scoop bucket add extras && scoop install android-messages`

# Contributions

The code is pretty ugly but getting better every day. Feel free to take a look.

Steps to contribute:

1. Fork
2. Clone
3. Edit
4. `yarn install` for dependencies
5. `yarn start` to build and run assuming you have electron installed.
6. Open a pull request when you think it is ready or for feedback during the dev process
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
Binary file removed assets/android_messages_desktop_icon.png
Binary file not shown.
33 changes: 0 additions & 33 deletions electron-builder.js

This file was deleted.

56 changes: 56 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="/src/styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri App</title>
<script type="module" src="/src/main.ts" defer></script>
<style>
.logo.vite:hover {
filter: drop-shadow(0 0 2em #747bff);
}

.logo.typescript:hover {
filter: drop-shadow(0 0 2em #2d79c7);
}
</style>
</head>

<body>
<div class="container">
<h1>Welcome to Tauri!</h1>

<div class="row">
<a href="https://vitejs.dev" target="_blank">
<img src="/src/assets/vite.svg" class="logo vite" alt="Vite logo" />
</a>
<a href="https://tauri.app" target="_blank">
<img
src="/src/assets/tauri.svg"
class="logo tauri"
alt="Tauri logo"
/>
</a>
<a href="https://www.typescriptlang.org/docs" target="_blank">
<img
src="/src/assets/typescript.svg"
class="logo typescript"
alt="typescript logo"
/>
</a>
</div>

<p>Click on the Tauri logo to learn more about the framework</p>

<div class="row">
<div>
<input id="greet-input" placeholder="Enter a name..." />
<button id="greet-button" type="button">Greet</button>
</div>
</div>

<p id="greet-msg"></p>
</div>
</body>
</html>
63 changes: 12 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,21 @@
{
"name": "android-messages-desktop",
"description": "Messages for web, as a desktop app",
"version": "5.4.2",
"author": {
"name": "Kyle Rosenberg",
"email": "[email protected]"
},
"license": "MIT",
"copyright": "Copyright 2020 Kyle Rosenberg",
"homepage": "https://github.com/OrangeDrangon/android-messages-desktop",
"repository": {
"type": "git",
"url": "git+https://github.com/OrangeDrangon/android-messages-desktop.git"
},
"bugs": {
"url": "https://github.com/OrangeDrangon/android-messages-desktop/issues"
},
"main": "app/background.js",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"start": "yarn build:dev && cross-env NODE_ENV=development electron ./app/background.js",
"dist": "yarn build && yarn package",
"build": "webpack --mode=production",
"build:dev": "webpack --mode=development",
"icons": "png2icons resources/icons/1024x1024.png resources/icon -all -i",
"lint": "eslint --fix --ext .ts,.js ./src",
"package": "yarn electron-builder --config electron-builder.js"
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"tauri": "tauri"
},
"dependencies": {
"about-window": "1.15.2",
"electron-updater": "5.2.1",
"fs-jetpack": "^4.3.1",
"rxjs": "^7.5.6",
"uuid": "^9.0.0"
"@tauri-apps/api": "^1.2.0"
},
"devDependencies": {
"@types/node": "18.7.18",
"@types/uuid": "^8.3.4",
"@types/webpack": "^5.28.0",
"@types/webpack-node-externals": "^2.5.3",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
"cross-env": "^7.0.2",
"electron": "20.1.4",
"electron-builder": "^23.3.3",
"eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"png2icons": "^2.0.1",
"prettier": "^2.7.1",
"source-map-support": "^0.5.21",
"ts-loader": "^9.3.1",
"ts-node": "^10.9.1",
"typescript": "^4.8.3",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-merge": "^5.8.0",
"webpack-node-externals": "^3.0.0"
"@tauri-apps/cli": "^1.2.2",
"@types/node": "^20.9.0",
"typescript": "^4.8.2",
"vite": "^4.0.0"
}
}
Loading