3 Commits

9 changed files with 67 additions and 99 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
/*.zip
/pkg/
/src/
IFLOW.md

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"idf.pythonInstallPath": "/opt/homebrew/bin/python3"
}

36
1-get-all-alci-gits-v1.sh Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
#
##################################################################################################################
# Written to be used on 64 bits computers
# Author : Erik Dubois
# Website : http://www.erikdubois.be
##################################################################################################################
##################################################################################################################
#
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
#
##################################################################################################################
echo "This gets all the existing githubs at once"
echo "Fill the array with the original folders first"
# use ls -d */ > list to get the list of the created githubs and copy/paste in
directories=(
tms-calamares-config/
tms-grub-theme/
tms-arch-linux-calamares-installer/
tms-calamares/
)
count=0
for name in "${directories[@]}"; do
count=$[count+1]
tput setaf 1;echo "Github "$count;tput sgr0;
# if there is no folder then make one
git clone http://192.168.10.207:3000/zj/$name
echo "#################################################"
echo "################ "$(basename `pwd`)" done"
echo "#################################################"
done

View File

@@ -4,7 +4,7 @@
_pkgname="calamares"
pkgname="$_pkgname"
pkgver=3.4.2
pkgrel=5
pkgrel=1
pkgdesc="Distribution-independent installer framework"
url="https://codeberg.org/Calamares/calamares"
license=("GPL-3.0-or-later")
@@ -27,15 +27,8 @@ makedepends=(
_pkgsrc="$_pkgname"
_pkgext="tar.gz"
source=("calamares.zip"
"calamares_polkit"
"49-nopasswd-calamares.rules"
"calamares.desktop")
sha256sums=('d3c0e93e4103f602598eba446a1712f373c4feb83950aee4a283e7395232dc21'
'b7f932912d33cfa188c0d06a25fb144ae6e0c69636ce90ed0a04ed2df0ae6ef3'
'56d85ff6bf860b9559b8c9f997ad9b1002f3fccc782073760eca505e3bddd176'
'c9f38c31882f506306a771028ee70b5cc5b8c81eca3e252502151055a43a5e6c')
source=("calamares.zip")
sha256sums=('9d59a1e630f7ee99b9668b8356f8ab0fe152092ca2d4f01e4c86d79819b414b8')
build() {
local _skip_modules=(

View File

@@ -1,14 +0,0 @@
#!/bin/bash
# 保存为 add_empty_folders.sh
echo "正在查找并处理空文件夹..."
# 查找所有空文件夹并创建 .gitkeep
find . -type d -empty | while read dir; do
if [ ! -f "$dir/.gitkeep" ]; then
touch "$dir/.gitkeep"
echo "✅ 已创建: $dir/.gitkeep"
fi
done
echo "处理完成!"

View File

@@ -10,7 +10,7 @@ Comment[da]=Installer styresystemet på disk
Comment[de]=Manjaro Linux installieren
Exec=/usr/bin/calamares_polkit %f
Icon=calamares
Terminal=true
Terminal=false
StartupNotify=true
Type=Application
Categories=Qt;System;

View File

@@ -639,7 +639,12 @@ def run_grub_install(fw_type, partitions, efi_directory, install_hybrid_grub):
"--force"])
else:
if libcalamares.globalstorage.value("bootLoader") is None and install_hybrid_grub:
libcalamares.utils.debug("run_grub_install------else bios 1")
if efi_directory is not None and not install_hybrid_grub:
libcalamares.utils.warning(_("Cannot install BIOS bootloader on UEFI installation when install_hybrid_grub is 'False'!"))
if libcalamares.globalstorage.value("bootLoader") is None:
efi_install_path = libcalamares.globalstorage.value("efiSystemPartition")
if efi_install_path is None or efi_install_path == "":
efi_install_path = "/boot/efi"
@@ -650,6 +655,7 @@ def run_grub_install(fw_type, partitions, efi_directory, install_hybrid_grub):
return
boot_loader_install_path = "/dev/" + boot_loader_install_path.split("\n")[1]
else:
libcalamares.utils.debug("run_grub_install------else bios 1-1 ")
boot_loader = libcalamares.globalstorage.value("bootLoader")
boot_loader_install_path = boot_loader["installPath"]
libcalamares.utils.debug(f"boot_loader_install_path: {boot_loader_install_path}")
@@ -660,6 +666,7 @@ def run_grub_install(fw_type, partitions, efi_directory, install_hybrid_grub):
# boot_loader_install_path points to the physical disk to install GRUB
# to. It should start with "/dev/", and be at least as long as the
# string "/dev/sda".
libcalamares.utils.debug("run_grub_install------else bios 2")
if not boot_loader_install_path.startswith("/dev/") or len(boot_loader_install_path) < 8:
raise ValueError(f"boot_loader_install_path contains unexpected value '{boot_loader_install_path}'")

View File

@@ -124,10 +124,11 @@ GeneralRequirements::checkRequirements()
hasPower = checkHasPower();
}
if ( m_entriesToCheck.contains( "internet" ) )
{
hasInternet = checkHasInternet();
}
// if ( m_entriesToCheck.contains( "internet" ) )
// {
// hasInternet = checkHasInternet();
// }
hasInternet = true;
if ( m_entriesToCheck.contains( "root" ) )
{
@@ -186,14 +187,14 @@ GeneralRequirements::checkRequirements()
hasPower,
required } );
}
else if ( entry == "internet" )
{
checkEntries.append( { entry,
[] { return tr( "is connected to the Internet" ); },
[] { return tr( "The system is not connected to the Internet." ); },
hasInternet,
required } );
}
// else if ( entry == "internet" )
// {
// checkEntries.append( { entry,
// [] { return tr( "is connected to the Internet" ); },
// [] { return tr( "The system is not connected to the Internet." ); },
// hasInternet,
// required } );
// }
else if ( entry == "root" )
{
checkEntries.append( { entry,

View File

@@ -1,65 +1,6 @@
#!/bin/bash
# 函数:检查网络连接
# 尝试ping Google DNS-c 1 只发送一个包,-W 2 超时2秒
has_internet() {
ping -c 1 -W 2 8.8.8.8 > /dev/null 2>&1
return $? # 返回ping的退出状态码 (0表示成功)
}
echo "正在检查网络连接..."
NETWORK_STATUS="offline" # 初始状态为离线
if has_internet; then
NETWORK_STATUS="online"
echo "网络已连接。"
else
echo "未检测到网络连接将尝试等待最多30秒..."
for i in $(seq 1 30); do
echo "等待网络... ($i/30秒)"
if has_internet; then
NETWORK_STATUS="online"
echo "网络已连接。"
break # 成功连接,跳出循环
fi
sleep 1
done
if [ "$NETWORK_STATUS" == "offline" ]; then
echo "在30秒内未能检测到网络连接。"
fi
fi
# 如果网络在线,尝试更新 Calamares
if [ "$NETWORK_STATUS" == "online" ]; then
echo "网络在线,尝试更新 Calamares..."
# 检查 pacman 是否存在,虽然在 Arch 系系统中通常都有
if command -v pacman &> /dev/null; then
if sudo pacman -Sy --noconfirm tms-calamares-config; then
echo "Calamares 更新成功或已是最新版本。"
else
echo "Calamares 更新失败。可能会使用旧版本启动。"
fi
else
echo "未找到 pacman 包管理器,无法更新 Calamares。"
fi
else
echo "网络离线,跳过 Calamares 更新。"
fi
# 启动 Calamares
echo "启动 Calamares 安装程序..."
# 原始的 Calamares 启动逻辑
if [ $(which pkexec) ]; then
# 如果 pkexec 存在,通过 sudo 运行 calamares
# 注意:这里沿用您原脚本的写法,即检查 pkexec 但仍使用 sudo。
# 如果您希望通过 pkexec 提升权限,应改为 pkexec "/usr/bin/calamares" "$@" "-d"
sudo "/usr/bin/calamares" "$@" "-d"
sudo "/usr/bin/calamares" "$@" "-d"
else
# 否则,直接运行 calamares
/usr/bin/calamares "$@" "-d"
/usr/bin/calamares "$@" "-d"
fi
echo "Calamares 启动命令已执行。"