Skip to content

Commit

Permalink
udpate installation
Browse files Browse the repository at this point in the history
  • Loading branch information
cocomeow committed Nov 5, 2021
1 parent fee5ee2 commit 8552081
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 698 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,6 @@ web_modules/
// *.css.map
// *.sass.map
// *.scss.map

# direnv
.envrc
48 changes: 41 additions & 7 deletions Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,36 @@

## Pre-built Package

### Arch Linux
### Releases
> https://github.com/arktoria/across/releases
- [Arch Linux Github Action](https://github.com/ArkToria/ACross/actions/workflows/arch-build.yaml)
### Git Version
> <div id="across-git-version">v</div>
- [Arch Linux](https://github.com/ArkToria/ACross/actions/workflows/arch-build.yaml)

- [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 - MSYS2](https://github.com/ArkToria/ACross/actions/workflows/msys2-mingw64-build.yaml)

## Build From Source

### Linux

#### Arch Linux
Please refer to Arch Linux [PKGBUILD](https://github.com/ArkToria/ACross/blob/master/pkgbuild/arch/across-dev-git/PKGBUILD) file for installation dependencies.

- [PKGBUILD](https://github.com/ArkToria/ACross/blob/master/pkgbuild/arch/across-dev-git/PKGBUILD)
```bash
$ cd <ACross Reposotiry>
$ mkdir -p build && cd build
$ cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-GNinja
$ cmake --build .
$ DESTDIR=<installation_directory> cmake --install .
```

### Windows

Expand All @@ -21,6 +40,19 @@
The minimum required version of Qt for building ACross project is `v6.2.0`. However, if you use the official Qt installer, you need at least version `v6.2.1` because of the missing `qt6-5compat` component.

#### MSYS2 + MINGW
**Recommended:**

Build the MSYS2 package from [ACross PKGBUILD](https://github.com/ArkToria/ACross/blob/master/pkgbuild/msys2/PKGBUILD) following to the official tutorial.

> https://www.msys2.org/wiki/Creating-Packages/
```bash
$ pacman -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-gcc
$ cd <ACross Reposotiry>/pkgbuild/msys2/
$ MINGW_ARCH=mingw64 makepkg-mingw -sCLfi
```

You can also follow the steps below to build manually:

##### 0. Install MSYS2

Expand All @@ -32,7 +64,7 @@ Download the installer from [Official Website](https://www.msys2.org/)

> The package manager called `pacman`, which Arch Linux users should be familiar with, is also the one for MSYS2. But to install packages you do not need root privilege.
```shell
```bash
$ pacman -S mingw-w64-x86_64-qt6-base \
mingw-w64-x86_64-qt6-translations \
mingw-w64-x86_64-qt6-imageformats \
Expand All @@ -51,8 +83,10 @@ $ pacman -S mingw-w64-x86_64-qt6-base \

Open your Mingw-w64 Terminal in Windows Launcher.

```shell
```bash
$ mkdir build && cd build
$ cmake ../ -GNinja -DCMAKE_BUILD_TYPE=Release
$ cmake --build .
```
```

The `ENABLE_DEPLOYMENT` option is `ON` by default, this will copy the required resources (including the `*.dll`) to the compiled directory.
14 changes: 11 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import { request } from 'https://cdn.skypack.dev/@octokit/request';
async function getActions(actionName) {
async function setACrossGitVersion() {
const content = await request('GET /repos/{owner}/{repo}/actions/artifacts', {
owner: 'Arktoria',
repo: 'ACross'
});
console.log(content.data.artifacts[0].name);
// TODO: match semver
const pkgNameStringArray = content.data.artifacts[0].name.split('-');
if (pkgNameStringArray.length !== 0) {
const verDiv = document.getElementById('across-git-version');
const verElement = document.createElement('span');
const verStr = pkgNameStringArray[pkgNameStringArray.length - 1];
verElement.textContent = verStr;
verDiv === null || verDiv === void 0 ? void 0 : verDiv.appendChild(verElement);
}
}
getActions('');
setACrossGitVersion();
15 changes: 12 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
import { request } from 'https://cdn.skypack.dev/@octokit/request'

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

console.log(content.data.artifacts[0].name)
// TODO: match semver
const pkgNameStringArray = content.data.artifacts[0].name.split('-')

if (pkgNameStringArray.length !== 0) {
const verDiv = document.getElementById('across-git-version')
const verElement = document.createElement('span')
const verStr = pkgNameStringArray[pkgNameStringArray.length - 1]
verElement.textContent = verStr
verDiv?.appendChild(verElement)
}
}

getActions('')
setACrossGitVersion()
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
"repository": "[email protected]:ArkToria/arktoria.github.io.git",
"author": "cocomeow <[email protected]>",
"license": "MIT",
"private": true
"private": true,
"scripts": {
"build-js": "tsc -p tsconfig.json"
}
}
Loading

0 comments on commit 8552081

Please sign in to comment.