Skip to content

Commit

Permalink
fix(bundler): linux aarch64 build
Browse files Browse the repository at this point in the history
fix(bundler): linux aarch64 build
  • Loading branch information
greenhat616 committed Sep 10, 2024
1 parent a44f875 commit 7f73d51
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 63 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/target-dev-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ jobs:
tag: "pre-release"
secrets: inherit

# linux_aarch64_build:
# name: Linux aarch64 Build
# uses: ./.github/workflows/deps-build-linux.yaml
# needs: [delete_current_releases]
# with:
# nightly: true
# tag: "pre-release"
# aarch64: true
# secrets: inherit
linux_aarch64_build:
name: Linux aarch64 Build
uses: ./.github/workflows/deps-build-linux.yaml
needs: [delete_current_releases]
with:
nightly: true
tag: "pre-release"
aarch64: true
secrets: inherit

macos_amd64_build:
name: macOS amd64 Build
Expand All @@ -68,10 +68,11 @@ jobs:

update_tag:
name: Update tag
needs: [
needs:
[
windows_build,
linux_amd64_build,
# linux_aarch64_build,
linux_aarch64_build,
macos_amd64_build,
macos_aarch64_build,
]
Expand Down
38 changes: 19 additions & 19 deletions backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 24 additions & 15 deletions backend/Cross.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
[target.aarch64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:edge"
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"""apt-get update && apt-get -y install \
libwebkit2gtk-4.1-dev:$CROSS_DEB_ARCH \
libxdo-dev:$CROSS_DEB_ARCH \
libayatana-appindicator3-dev:$CROSS_DEB_ARCH \
librsvg2-dev:$CROSS_DEB_ARCH \
libpango1.0-dev:$CROSS_DEB_ARCH \
libcairo2-dev:$CROSS_DEB_ARCH \
libatk1.0-dev:$CROSS_DEB_ARCH \
libsoup2.4-dev:$CROSS_DEB_ARCH \
libssl-dev:$CROSS_DEB_ARCH
""",
]
# dockerfile = "./manifest/docker/ubuntu-22.04-aarch64/Dockerfile"
image = "ghcr.io/libnyanpasu/builder-ubuntu-22.04-aarch64:latest"
# pre-build = [
# "dpkg --add-architecture $CROSS_DEB_ARCH",
# """echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe multiverse" | tee /etc/apt/sources.list && \
# echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list && \
# echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list && \
# echo "deb [arch=i386,amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" | tee -a /etc/apt/sources.list && \
# echo "deb [arch=i386,amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse" | tee -a /etc/apt/sources.list && \
# echo "deb [arch=i386,amd64] http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse" | tee -a /etc/apt/sources.list && \
# apt-get update && apt-get -y install \
# build-essential \
# libgtk-3-dev:$CROSS_DEB_ARCH \
# libwebkit2gtk-4.1-dev:$CROSS_DEB_ARCH \
# libxdo-dev:$CROSS_DEB_ARCH \
# libayatana-appindicator3-dev:$CROSS_DEB_ARCH \
# librsvg2-dev:$CROSS_DEB_ARCH \
# libpango1.0-dev:$CROSS_DEB_ARCH \
# libcairo2-dev:$CROSS_DEB_ARCH \
# libatk1.0-dev:$CROSS_DEB_ARCH \
# libsoup2.4-dev:$CROSS_DEB_ARCH \
# libssl-dev:$CROSS_DEB_ARCH \
# """,
# ]
9 changes: 2 additions & 7 deletions backend/tauri/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ struct PackageJson {
version: String, // we only need the version
}

#[derive(Deserialize)]
struct TauriJson {
package: PackageJson,
}

#[derive(Deserialize)]
struct GitInfo {
hash: String,
Expand All @@ -30,8 +25,8 @@ fn main() {
pkg_json.version
} else {
let mut raw = read("./tauri.conf.json").unwrap(); // TODO: fix it when windows arm64 need it
let tauri_json: TauriJson = simd_json::from_slice(&mut raw).unwrap();
tauri_json.package.version
let tauri_json: PackageJson = simd_json::from_slice(&mut raw).unwrap();
tauri_json.version
};
let version = semver::Version::parse(&version).unwrap();
let is_prerelase = !version.pre.is_empty();
Expand Down
20 changes: 9 additions & 11 deletions frontend/nyanpasu/src/router.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Generouted, changes to this file will be overriden
/* eslint-disable */

import { components, hooks, utils } from "@generouted/react-router/client";
import { components, hooks, utils } from '@generouted/react-router/client'

export type Path =
| `/`
Expand All @@ -12,16 +12,14 @@ export type Path =
| `/providers`
| `/proxies`
| `/rules`
| `/settings`;
| `/settings`

export type Params = {};
export type Params = {

}

export type ModalPath = never;
export type ModalPath = never

export const { Link, Navigate } = components<Path, Params>();
export const { useModals, useNavigate, useParams } = hooks<
Path,
Params,
ModalPath
>();
export const { redirect } = utils<Path, Params>();
export const { Link, Navigate } = components<Path, Params>()
export const { useModals, useNavigate, useParams } = hooks<Path, Params, ModalPath>()
export const { redirect } = utils<Path, Params>()

0 comments on commit 7f73d51

Please sign in to comment.