-
Notifications
You must be signed in to change notification settings - Fork 278
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
1 parent
ec5a477
commit ac1c4ef
Showing
9 changed files
with
112 additions
and
15 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Desktop Entry] | ||
Encoding=UTF-8 | ||
Terminal=false | ||
Name=BilibiliDown | ||
Type=Application | ||
Exec=java -Dfile.encoding=utf-8 -Dhttps.protocols=TLSv1.2 -jar /mnt/hgfs/workspace-java/BilibiliDown/release/INeedBiliAV.jar | ||
Icon=/mnt/hgfs/workspace-java/BilibiliDown/release/config/favicon.ico | ||
Categories=Application;Network; | ||
Comment=BilibiliDown from https://github.com/nICEnnnnnnnLee/BilibiliDown |
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,45 @@ | ||
#!/bin/bash | ||
|
||
# cd 到脚本所在目录 | ||
cd $(dirname $0) | ||
base_path=$(pwd) | ||
echo "当前路径为${base_path}" | ||
|
||
current_user=$(whoami) | ||
echo "当前用户为${current_user}" | ||
|
||
desktop_path="/home/${current_user}/desktop" | ||
if [ ! -d desktop_path ]; then | ||
desktop_path="/home/${current_user}/桌面" | ||
fi | ||
echo "当前桌面为${desktop_path}" | ||
|
||
echo "[Desktop Entry]" > BilibiliDown.desktop | ||
echo "Encoding=UTF-8" >> BilibiliDown.desktop | ||
echo "Terminal=false" >> BilibiliDown.desktop | ||
echo "Name=BilibiliDown" >> BilibiliDown.desktop | ||
echo "Type=Application" >> BilibiliDown.desktop | ||
echo "Exec=java -Dfile.encoding=utf-8 -Dhttps.protocols=TLSv1.2 -jar ${base_path}/INeedBiliAV.jar" >> BilibiliDown.desktop | ||
echo "Icon=${base_path}/config/favicon.ico" >> BilibiliDown.desktop | ||
echo "Categories=Application;Network; " >> BilibiliDown.desktop | ||
echo "Comment=BilibiliDown from https://github.com/nICEnnnnnnnLee/BilibiliDown" >> BilibiliDown.desktop | ||
|
||
# cat BilibiliDown.desktop | ||
# chmod +x BilibiliDown.desktop | ||
echo '在桌面上创建快捷方式' | ||
cp -f ${base_path}/BilibiliDown.desktop ${desktop_path}/BilibiliDown.desktop | ||
|
||
if test ! -x ${desktop_path}/BilibiliDown.desktop ; then | ||
echo '为桌面快捷方式添加可执行权限' | ||
sudo chmod +x ${desktop_path}/BilibiliDown.desktop | ||
fi | ||
|
||
|
||
echo '在启动栏创建快捷方式' | ||
sudo cp -f ${base_path}/BilibiliDown.desktop /usr/share/applications/BilibiliDown.desktop | ||
if test ! -x /usr/share/applications/BilibiliDown.desktop ; then | ||
echo '为启动栏快捷方式添加可执行权限' | ||
sudo chmod +x /usr/share/applications/BilibiliDown.desktop | ||
fi | ||
|
||
|
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,26 @@ | ||
#!/bin/bash | ||
|
||
# cd 到脚本所在目录 | ||
cd $(dirname $0) | ||
base_path=$(pwd) | ||
echo "当前路径为${base_path}" | ||
|
||
current_user=$(whoami) | ||
echo "当前用户为${current_user}" | ||
|
||
desktop_path="/Users/${current_user}/Desktop" | ||
if [ ! -d desktop_path ]; then | ||
desktop_path="/Users/${current_user}/桌面" | ||
fi | ||
echo "当前桌面路径为${desktop_path}" | ||
|
||
|
||
if test ! -x ${base_path}/Double-Click-to-Run-for-Mac.command ; then | ||
echo '为双击运行脚本添加可执行权限' | ||
sudo chmod +x ${base_path}/Double-Click-to-Run-for-Mac.command | ||
fi | ||
|
||
echo '在桌面上创建快捷方式软链接' | ||
ln -s ${base_path}/Double-Click-to-Run-for-Mac.command ${desktop_path}/BilibiliDown.link | ||
|
||
|
6 changes: 3 additions & 3 deletions
6
release/install.vbs → ...se/Create-Shortcut-on-Desktop-for-Win.vbs
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
Set WshShell = WScript.CreateObject("WScript.Shell") | ||
strCurFolder = createobject("Scripting.FileSystemObject").GetFolder(".").Path '当前路径 | ||
strDesktop = WshShell.SpecialFolders("Desktop") '特殊文件夹“桌面” | ||
'Rem 在桌面创建一个记事本快捷方式 | ||
'Rem 在桌面创建一个BilibiliDown快捷方式 | ||
set oShellLink = WshShell.CreateShortcut(strDesktop & "\Bili 下载器.lnk") | ||
oShellLink.TargetPath = strCurFolder & "\run-UI.bat" '可执行文件路径 | ||
oShellLink.TargetPath = strCurFolder & "\Double-Click-to-Run-for-Win.bat" '可执行文件路径 | ||
oShellLink.Arguments = "" '程序的参数 | ||
oShellLink.WindowStyle = 7 '参数1默认窗口激活,参数3最大化激活,参数7最小化 | ||
oShellLink.Hotkey = "" '快捷键 | ||
oShellLink.IconLocation = strCurFolder &"\config\favicon.ico" '图标 | ||
oShellLink.Description = "Bili 下载器. Nicelee.top提供" '备注 | ||
oShellLink.Description = "Bili 下载器." '备注 | ||
oShellLink.WorkingDirectory = strCurFolder '起始位置 | ||
oShellLink.Save '创建保存快捷方式 |
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,5 @@ | ||
#!/bin/bash | ||
|
||
# cd 到脚本所在目录 | ||
cd $(dirname $0) | ||
java -Dfile.encoding=utf-8 -Dhttps.protocols=TLSv1.2 -jar INeedBiliAV.jar |
2 changes: 0 additions & 2 deletions
2
release/run-UI-debug.bat → ...ase/Double-Click-to-Run-for-Win-debug.bat
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
File renamed without changes.
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