mirror of
https://github.com/yaobiao131/downkyicore.git
synced 2025-08-10 00:52:31 +00:00
feat: 完善构建
This commit is contained in:
30
script/aria2.sh
Executable file
30
script/aria2.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
download_dir="./downloads"
|
||||
save_path="../DownKyi.Core/Binary"
|
||||
|
||||
if [ ! -d "$download_dir" ]; then
|
||||
mkdir "$download_dir"
|
||||
fi
|
||||
|
||||
create_dir() {
|
||||
if [ ! -d "$1" ]; then
|
||||
mkdir -p "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
download_aria2() {
|
||||
local download_url
|
||||
local save
|
||||
case $1 in
|
||||
linux-x64)
|
||||
save="$save_path/$1/aria2"
|
||||
download_url="https://github.com/abcfy2/aria2-static-build/releases/download/1.37.0/aria2-x86_64-linux-musl_static.zip"
|
||||
;;
|
||||
esac
|
||||
|
||||
curl -kL "$download_url" -o "$download_dir/aria2.zip"
|
||||
create_dir "$save"
|
||||
unzip -d "$save" "$download_dir/aria2.zip"
|
||||
}
|
||||
|
||||
download_aria2 "$@"
|
||||
50
script/ffmpeg.sh
Executable file
50
script/ffmpeg.sh
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
os=$1
|
||||
arch=$2
|
||||
|
||||
ffmpeg_save_path="../DownKyi.Core/Binary"
|
||||
download_dir="./downloads"
|
||||
|
||||
create_dir() {
|
||||
if [ ! -d "$1" ]; then
|
||||
mkdir -p "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
download_ffmpeg_macos() {
|
||||
local url="https://github.com/eugeneware/ffmpeg-static/releases/download/b4.4.1/darwin-$arch"
|
||||
create_dir "$ffmpeg_save_path/osx-$arch/ffmpeg"
|
||||
curl -kL "$url" -o "$ffmpeg_save_path/osx-$arch/ffmpeg/ffmpeg"
|
||||
chmod +x "$ffmpeg_save_path/osx-$arch/ffmpeg/ffmpeg"
|
||||
}
|
||||
|
||||
download_ffmpeg_linux() {
|
||||
local realArch=""
|
||||
case $arch in
|
||||
x64)
|
||||
realArch="amd64"
|
||||
;;
|
||||
arm64)
|
||||
realArch="arm64"
|
||||
;;
|
||||
esac
|
||||
output=$ffmpeg_save_path/linux-x64/ffmpeg
|
||||
local url="https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-4.4.1-${realArch}-static.tar.xz"
|
||||
if [ ! -f "ffmpeg.tar.xz" ]; then
|
||||
curl -kL $url -o "${download_dir}/ffmpeg.tar.xz"
|
||||
fi
|
||||
|
||||
if [ ! -d "$output" ]; then
|
||||
mkdir -p "$output"
|
||||
fi
|
||||
tar -xf "${download_dir}/ffmpeg.tar.xz" --strip-components 1 -C "$output" '*/ffmpeg'
|
||||
chmod +x "$output/ffmpeg"
|
||||
}
|
||||
|
||||
if [ "$os" == "mac" ]; then
|
||||
download_ffmpeg_macos
|
||||
elif [ "$os" == "linux" ]; then
|
||||
download_ffmpeg_linux
|
||||
else
|
||||
echo "不支持的操作系统"
|
||||
fi
|
||||
@@ -1,14 +1,13 @@
|
||||
#!/bin/bash
|
||||
arch=$1
|
||||
APP_NAME="./哔哩下载姬.app"
|
||||
DMG_NAME="./DownKyi.dmg"
|
||||
PUBLISH_OUTPUT_DIRECTORY="../../DownKyi/bin/Release/net6.0/osx-x64/publish/."
|
||||
PUBLISH_OUTPUT_DIRECTORY="../../DownKyi/bin/Release/net6.0/osx-$arch/publish/."
|
||||
|
||||
INFO_PLIST="./Info.plist"
|
||||
ICON_FILE="./logo.icns"
|
||||
|
||||
if [ -d "$APP_NAME" ]
|
||||
then
|
||||
rm -rf "$APP_NAME"
|
||||
if [ -d "$APP_NAME" ]; then
|
||||
rm -rf "$APP_NAME"
|
||||
fi
|
||||
|
||||
mkdir "$APP_NAME"
|
||||
@@ -20,5 +19,3 @@ mkdir "$APP_NAME/Contents/Resources"
|
||||
cp "$INFO_PLIST" "$APP_NAME/Contents/Info.plist"
|
||||
cp "$ICON_FILE" "$APP_NAME/Contents/Resources/$ICON_FILE"
|
||||
cp -a "$PUBLISH_OUTPUT_DIRECTORY" "$APP_NAME/Contents/MacOS"
|
||||
|
||||
create-dmg --hdiutil-quiet --icon "哔哩下载姬.app" 165 175 --icon-size 120 --app-drop-link 495 175 --window-size 660 400 $DMG_NAME $APP_NAME
|
||||
@@ -6,11 +6,11 @@ AppShortSummary = Cross-platform deployment utility which packages your .NET pro
|
||||
|
||||
AppLicenseId = GPL-3.0-or-later
|
||||
AppLicenseFile = ../../LICENSE
|
||||
OutputDirectory = output/
|
||||
|
||||
IconFiles = """
|
||||
../../DownKyi/Resources/favicon.ico
|
||||
"""
|
||||
|
||||
DesktopFile = app.desktop
|
||||
# PUBLISHER
|
||||
PublisherName = yaobiao131
|
||||
PublisherCopyright = Copyright (C) yaobiao131 2023
|
||||
@@ -19,17 +19,24 @@ PublisherLinkUrl = https://github.com/yaobiao131/downkyicore
|
||||
PublisherEmail = contact@kuiper.zone
|
||||
DotnetProjectPath = ../../
|
||||
|
||||
# Package Out
|
||||
OutputDirectory = output/
|
||||
PackageName = DownKyi
|
||||
|
||||
# AppImage
|
||||
AppImageVersionOutput = true
|
||||
|
||||
# FLATPAK OPTIONS
|
||||
FlatpakPlatformRuntime = org.freedesktop.Platform
|
||||
FlatpakPlatformSdk = org.freedesktop.Sdk
|
||||
FlatpakPlatformVersion = 22.08
|
||||
FlatpakFinishArgs = """
|
||||
--socket=wayland
|
||||
--socket=x11
|
||||
--filesystem=host
|
||||
--share=network
|
||||
"""
|
||||
FlatpakBuilderArgs =
|
||||
; FlatpakFinishArgs = """
|
||||
; --socket=wayland
|
||||
; --socket=x11
|
||||
; --filesystem=host
|
||||
; --share=network
|
||||
; """
|
||||
; FlatpakBuilderArgs =
|
||||
|
||||
DotnetPublishArgs = -p:Version=${APP_VERSION} --self-contained true -p:DebugType=None -p:DebugSymbols=false
|
||||
|
||||
|
||||
13
script/pupnet/app.desktop
Normal file
13
script/pupnet/app.desktop
Normal file
@@ -0,0 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=${APP_FRIENDLY_NAME}
|
||||
Icon=${APP_ID}
|
||||
Comment=${APP_SHORT_SUMMARY}
|
||||
Exec=env LANG=en_US.UTF-8 ${INSTALL_EXEC}
|
||||
TryExec=${INSTALL_EXEC}
|
||||
NoDisplay=${DESKTOP_NODISPLAY}
|
||||
X-AppImage-Integrate=${DESKTOP_INTEGRATE}
|
||||
Terminal=${DESKTOP_TERMINAL}
|
||||
Categories=${PRIME_CATEGORY}
|
||||
MimeType=
|
||||
Keywords=
|
||||
Reference in New Issue
Block a user