Skip to content

Commit

Permalink
update FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
cocomeow committed Nov 12, 2021
1 parent 69e3e56 commit efd76a0
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 27 deletions.
26 changes: 26 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,30 @@ Please check if there is a `config.json` file in the working directory, because

## Linux

### Wayland

> Plasma wayland + systemd boot + autostart unable to display icon on system tray
> > No such signal QPlatformNativeInterface::systemTrayWindowChanged("QScreen")
The system tray widget will be loaded asynchronously along with the panel, and the application will be opened before them. The following is an example user service of start after `5s` delay.

```ini
# ~/.config/systemd/user/across.service
[Unit]
Documentation=man:systemd-xdg-autostart-generator(8)
SourcePath=/usr/share/applications/org.arktoria.across.desktop
PartOf=graphical-session.target

Description=ACross
After=graphical-session.target

[Service]
Type=exec
ExecStartPre=:/usr/bin/sleep 5s
ExecStart=:/usr/bin/across "-qwindowicon" "org.arktoria.across"
Restart=no
TimeoutSec=5s
Slice=app.slice
```

## Windows
7 changes: 3 additions & 4 deletions Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
> https://github.com/arktoria/across/releases
### Git Version
> <div id="across-git-version">v</div>

- [Arch Linux](https://github.com/ArkToria/ACross/actions/workflows/arch-build.yaml)
- [Arch Linux](https://github.com/ArkToria/ACross/actions/workflows/arch-build.yaml) | <span id="across-git-archlinux"></span>

- [Nix / NixOS](https://github.com/ArkToria/ACross/actions/workflows/nix-build.yaml)

- [Windows x86_64 - MSVC](https://github.com/ArkToria/ACross/actions/workflows/msvc-build.yaml)
- [Windows x86_64 - MSVC](https://github.com/ArkToria/ACross/actions/workflows/msvc-build.yaml) | <span id="across-git-msvc"></span>

- [Windows x86_64 - MSYS2](https://github.com/ArkToria/ACross/actions/workflows/msys2-mingw64-build.yaml)
- [Windows x86_64 - MSYS2](https://github.com/ArkToria/ACross/actions/workflows/msys2-mingw64-build.yaml) | <span id="across-git-mingw-w64"></span>

## Build From Source

Expand Down
20 changes: 11 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import { request } from 'https://cdn.skypack.dev/@octokit/request';
import { semverRegex } from 'https://cdn.skypack.dev/semver-regex';
async function setACrossGitVersion() {
const content = await request('GET /repos/{owner}/{repo}/actions/artifacts', {
owner: 'Arktoria',
repo: 'ACross'
});
const pkgName = content.data.artifacts[0].name;
if (pkgName.length !== 0) {
const verDiv = document.getElementById('across-git-version');
const verElement = document.createElement('span');
const verStr = pkgName.match(semverRegex());
if (verStr !== null) {
verElement.textContent = verStr[0].toString();
verDiv === null || verDiv === void 0 ? void 0 : verDiv.appendChild(verElement);
const pkgMap = new Map();
for (const pkg of content.data.artifacts) {
for (const pkgType of ['msvc', 'mingw-w64', 'archlinux']) {
if (pkg.name !== '' && pkg.name.includes(pkgType) && !pkgMap.has(pkgType)) {
pkgMap.set(pkgType, true);
const verElement = document.getElementById(`across-git-${pkgType}`);
if (verElement != null) {
verElement.textContent = pkg.name;
}
break;
}
}
}
}
Expand Down
21 changes: 11 additions & 10 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import { request } from 'https://cdn.skypack.dev/@octokit/request'
import { semverRegex } from 'https://cdn.skypack.dev/semver-regex'

async function setACrossGitVersion () {
const content = await request('GET /repos/{owner}/{repo}/actions/artifacts', {
owner: 'Arktoria',
repo: 'ACross'
})

const pkgName = content.data.artifacts[0].name
const pkgMap = new Map<string, boolean>()

if (pkgName.length !== 0) {
const verDiv = document.getElementById('across-git-version')
const verElement = document.createElement('span')
const verStr = pkgName.match(semverRegex())

if (verStr !== null) {
verElement.textContent = verStr[0].toString()
verDiv?.appendChild(verElement)
for (const pkg of content.data.artifacts) {
for (const pkgType of ['msvc', 'mingw-w64', 'archlinux']) {
if (pkg.name !== '' && pkg.name.includes(pkgType) && !pkgMap.has(pkgType)) {
pkgMap.set(pkgType, true)
const verElement = document.getElementById(`across-git-${pkgType}`)
if (verElement != null) {
verElement.textContent = pkg.name
}
break
}
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions request.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
declare module 'https://cdn.skypack.dev/@octokit/request' {
export const request: import('@octokit/types').RequestInterface<object>
}

declare module 'https://cdn.skypack.dev/semver-regex' {
export const semverRegex: import('semver-regex').RequestInterface<object>
}

0 comments on commit efd76a0

Please sign in to comment.