Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45f56c63a0 | ||
|
|
89af4316d3 | ||
|
|
a9bfb857ae | ||
|
|
b9e411ac90 | ||
|
|
670de01938 | ||
|
|
ef064eba3d |
28
.github/workflows/winget-submission.yml
vendored
28
.github/workflows/winget-submission.yml
vendored
@@ -1,33 +1,17 @@
|
||||
# Based on Microsoft/DevHome Winget CI, modified for use in Vencord/Vesktop.
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation and Contributors
|
||||
# Licensed under the MIT license.
|
||||
|
||||
name: Submit to Winget Community Repo
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
winget:
|
||||
name: Publish winget package
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
WINGET_PAT: ${{ secrets.WINGET_PAT }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Submit package to Winget Community Repo
|
||||
run: |
|
||||
|
||||
$packageId = "Vencord.Vesktop"
|
||||
|
||||
# Fetching latest release from GitHub
|
||||
$github = Invoke-RestMethod -uri "https://api.github.com/repos/vencord/vesktop/releases"
|
||||
$targetRelease = $github | Select-Object -First 1
|
||||
$installerUrl = $targetRelease | Select-Object -ExpandProperty assets -First 1 | Where-Object -Property name -match 'Vesktop-Setup.*?exe' | Select-Object -ExpandProperty browser_download_url
|
||||
$packageVersion = $targetRelease.tag_name.Trim("v")
|
||||
|
||||
# Update package using wingetcreate
|
||||
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
|
||||
.\wingetcreate.exe update $packageId --version $packageVersion --urls "$installerUrl" --submit --token $env:WINGET_PAT
|
||||
uses: vedantmgoyal2009/winget-releaser@52ef3f3028ed79a9606d7678d0a88d295bc0c690 # v2
|
||||
with:
|
||||
identifier: Vencord.Vesktop
|
||||
token: ${{ secrets.WINGET_PAT }}
|
||||
installers-regex: '\.exe$'
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
dist
|
||||
node_modules
|
||||
.env
|
||||
.DS_Store
|
||||
.idea/
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "VencordDesktop",
|
||||
"version": "0.3.2",
|
||||
"version": "0.3.3",
|
||||
"private": true,
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
@@ -33,7 +33,7 @@
|
||||
"@typescript-eslint/parser": "^6.2.1",
|
||||
"@vencord/types": "^0.1.2",
|
||||
"dotenv": "^16.3.1",
|
||||
"electron": "^25.8.2",
|
||||
"electron": "^25.8.4",
|
||||
"electron-builder": "^24.6.3",
|
||||
"esbuild": "^0.18.17",
|
||||
"eslint": "^8.46.0",
|
||||
@@ -66,6 +66,7 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"linux": {
|
||||
"icon": "build/icon.icns",
|
||||
"category": "Network",
|
||||
"maintainer": "vendicated+vesktop@riseup.net",
|
||||
"target": [
|
||||
|
||||
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@@ -32,8 +32,8 @@ devDependencies:
|
||||
specifier: ^16.3.1
|
||||
version: 16.3.1
|
||||
electron:
|
||||
specifier: ^25.8.2
|
||||
version: 25.8.2
|
||||
specifier: ^25.8.4
|
||||
version: 25.8.4
|
||||
electron-builder:
|
||||
specifier: ^24.6.3
|
||||
version: 24.6.3
|
||||
@@ -1766,8 +1766,8 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/electron@25.8.2:
|
||||
resolution: {integrity: sha512-AM1ra6b16EQuO1bJtiA8ZiWqqFLLgVfxD56ykiy+EA5C63Hkx8OmIbe+5JAsLiTwRVvBZ4oCAj6wa2qT+iq8ww==}
|
||||
/electron@25.8.4:
|
||||
resolution: {integrity: sha512-hUYS3RGdaa6E1UWnzeGnsdsBYOggwMMg4WGxNGvAoWtmRrr6J1BsjFW/yRq4WsJHJce2HdzQXtz4OGXV6yUCLg==}
|
||||
engines: {node: '>= 12.20.55'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
* Copyright (c) 2023 Vendicated and Vencord contributors
|
||||
*/
|
||||
|
||||
import { app, dialog, session, shell } from "electron";
|
||||
import { execFile } from "child_process";
|
||||
import { app, dialog, RelaunchOptions, session, shell } from "electron";
|
||||
import { mkdirSync, readFileSync, watch } from "fs";
|
||||
import { open, readFile } from "fs/promises";
|
||||
import { release } from "os";
|
||||
@@ -45,7 +46,14 @@ handle(IpcEvents.SET_SETTINGS, (_, settings: typeof Settings.store, path?: strin
|
||||
});
|
||||
|
||||
handle(IpcEvents.RELAUNCH, () => {
|
||||
app.relaunch();
|
||||
const options: RelaunchOptions = {
|
||||
args: process.argv.slice(1).concat(["--relaunch"])
|
||||
};
|
||||
if (app.isPackaged && process.env.APPIMAGE) {
|
||||
execFile(process.env.APPIMAGE, options.args);
|
||||
} else {
|
||||
app.relaunch(options);
|
||||
}
|
||||
app.exit();
|
||||
});
|
||||
|
||||
|
||||
@@ -147,6 +147,8 @@ async function clearData(win: BrowserWindow) {
|
||||
app.quit();
|
||||
}
|
||||
|
||||
type MenuItemList = Array<MenuItemConstructorOptions | false>;
|
||||
|
||||
function initMenuBar(win: BrowserWindow) {
|
||||
const isWindows = process.platform === "win32";
|
||||
const isDarwin = process.platform === "darwin";
|
||||
@@ -181,14 +183,38 @@ function initMenuBar(win: BrowserWindow) {
|
||||
app.quit();
|
||||
}
|
||||
},
|
||||
isDarwin && {
|
||||
label: "Hide",
|
||||
role: "hide"
|
||||
},
|
||||
isDarwin && {
|
||||
label: "Hide others",
|
||||
role: "hideOthers"
|
||||
},
|
||||
...(!isDarwin
|
||||
? []
|
||||
: ([
|
||||
{
|
||||
type: "separator"
|
||||
},
|
||||
{
|
||||
label: "Settings",
|
||||
accelerator: "CmdOrCtrl+,",
|
||||
async click() {
|
||||
mainWin.webContents.executeJavaScript(
|
||||
"Vencord.Webpack.Common.SettingsRouter.open('My Account')"
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
type: "separator"
|
||||
},
|
||||
{
|
||||
label: "Hide Vesktop", // Should probably remove the label, but it says "Hide VencordDesktop" instead of "Hide Vesktop"
|
||||
role: "hide"
|
||||
},
|
||||
{
|
||||
role: "hideOthers"
|
||||
},
|
||||
{
|
||||
role: "unhide"
|
||||
},
|
||||
{
|
||||
type: "separator"
|
||||
}
|
||||
] satisfies MenuItemList)),
|
||||
{
|
||||
label: "Quit",
|
||||
accelerator: wantCtrlQ ? "CmdOrCtrl+Q" : void 0,
|
||||
@@ -213,7 +239,7 @@ function initMenuBar(win: BrowserWindow) {
|
||||
role: "zoomIn",
|
||||
visible: false
|
||||
}
|
||||
] satisfies Array<MenuItemConstructorOptions | false>;
|
||||
] satisfies MenuItemList;
|
||||
|
||||
const menu = Menu.buildFromTemplate([
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user