-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
145 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,10 @@ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ | |
RUN npm set strict-ssl false && npm install -g pnpm | ||
|
||
# 安装 Tauri CLI | ||
RUN cargo install [email protected] | ||
# RUN cargo install [email protected] | ||
COPY ci/scripts/install-tauri-cli.sh /scripts/ | ||
RUN chmod +x /scripts/install-tauri-cli.sh && \ | ||
/scripts/install-tauri-cli.sh | ||
|
||
# 执行项目构建 | ||
CMD cargo dev vendor && \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# 使用 Ubuntu 20.04 ARM 版本作为基础镜像 | ||
FROM arm64v8/ubuntu:20.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# 更新系统并安装必要的软件包 | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
make \ | ||
curl \ | ||
wget \ | ||
file \ | ||
libssl-dev \ | ||
libgtk-3-dev \ | ||
libwebkit2gtk-4.0-dev \ | ||
libappindicator3-dev \ | ||
librsvg2-dev \ | ||
perl \ | ||
musl-tools | ||
|
||
# 安装 Rust(确保是适用于 ARM 的目标) | ||
COPY ci/scripts/install-rust.sh /scripts/ | ||
RUN chmod +x /scripts/install-rust.sh && \ | ||
/scripts/install-rust.sh | ||
ENV PATH=$PATH:/root/.cargo/bin | ||
|
||
RUN rustup target add aarch64-unknown-linux-musl | ||
ENV HOST_TRIPPLE aarch64-unknown-linux-musl | ||
|
||
# 安装 Node.js 18.x | ||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ | ||
apt-get install -y nodejs | ||
RUN npm set strict-ssl false && npm install -g pnpm | ||
|
||
# 安装 Tauri CLI | ||
# RUN cargo install [email protected] | ||
COPY ci/scripts/install-tauri-cli.sh /scripts/ | ||
RUN chmod +x /scripts/install-tauri-cli.sh && \ | ||
/scripts/install-tauri-cli.sh | ||
|
||
# 执行项目构建 | ||
CMD cargo dev vendor && \ | ||
cargo dev dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,10 @@ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ | |
RUN npm set strict-ssl false && npm install -g pnpm | ||
|
||
# 安装 Tauri CLI | ||
RUN cargo install [email protected] | ||
# RUN cargo install [email protected] | ||
COPY ci/scripts/install-tauri-cli.sh /scripts/ | ||
RUN chmod +x /scripts/install-tauri-cli.sh && \ | ||
/scripts/install-tauri-cli.sh | ||
|
||
# 执行项目构建 | ||
CMD cargo dev vendor && \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# 使用 Ubuntu 20.04 作为基础镜像 | ||
FROM ubuntu:20.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# 更新系统并安装必要的软件包 | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
make \ | ||
curl \ | ||
wget \ | ||
file \ | ||
libssl-dev \ | ||
libgtk-3-dev \ | ||
libwebkit2gtk-4.0-dev \ | ||
libappindicator3-dev \ | ||
librsvg2-dev \ | ||
perl \ | ||
musl-tools | ||
|
||
# 安装 Rust | ||
COPY ci/scripts/install-rust.sh /scripts/ | ||
RUN chmod +x /scripts/install-rust.sh && \ | ||
/scripts/install-rust.sh | ||
ENV PATH=$PATH:/root/.cargo/bin | ||
|
||
RUN rustup target add x86_64-unknown-linux-musl | ||
ENV HOST_TRIPPLE x86_64-unknown-linux-musl | ||
|
||
# 安装 Node.js 18.x | ||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ | ||
apt-get install -y nodejs | ||
RUN npm set strict-ssl false && npm install -g pnpm | ||
|
||
# 安装 Tauri CLI | ||
# RUN cargo install [email protected] | ||
COPY ci/scripts/install-tauri-cli.sh /scripts/ | ||
RUN chmod +x /scripts/install-tauri-cli.sh && \ | ||
/scripts/install-tauri-cli.sh | ||
|
||
# 执行项目构建 | ||
CMD cargo dev vendor && \ | ||
cargo dev dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
mkdir ./cargo_tauri | ||
|
||
if [ "$(uname -s)" = "Linux" ]; then | ||
if [ "$(uname -m)" = "x86_64" ]; then | ||
curl -OL https://github.com/LuuuXXX/tauri-mirror/releases/download/tauri-cli-v1.6.3/cargo-tauri-x86_64-unknown-linux-gnu.tgz | ||
tar -xf cargo-tauri-x86_64-unknown-linux-gnu.tgz -C ./cargo_tauri | ||
else | ||
curl -OL https://github.com/LuuuXXX/tauri-mirror/releases/download/tauri-cli-v1.6.3/cargo-tauri-aarch64-unknown-linux-gnu.tgz | ||
tar -xf cargo-tauri-aarch64-unknown-linux-gnu.tgz -C ./cargo_tauri | ||
fi | ||
mv ./cargo_tauri/cargo-tauri ~/.cargo/bin | ||
else | ||
curl -OL https://github.com/LuuuXXX/tauri-mirror/releases/download/tauri-cli-v1.6.3/cargo-tauri-x86_64-pc-windows-msvc.zip | ||
unzip cargo-tauri-x86_64-pc-windows-msvc.zip -d ./cargo_tauri | ||
mv ./cargo_tauri/cargo-tauri.exe ~/.cargo/bin | ||
fi | ||
|
||
rm -r ./cargo_tauri |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,8 @@ sh ci/scripts/install-nodejs.sh | |
npm set strict-ssl false && npm install -g pnpm | ||
|
||
# 安装 Tauri CLI | ||
cargo install [email protected] | ||
# cargo install [email protected] | ||
sh ci/scripts/install-tauri-cli.sh | ||
|
||
echo "Execiting cargo dev vendor" | ||
cargo dev vendor | ||
|