update idk

This commit is contained in:
Егор 2024-11-10 10:27:09 +00:00
parent 2480b1a20b
commit a782cd37cd
8 changed files with 48 additions and 14 deletions

12
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,12 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "cmake",
"label": "CMake: настроить",
"command": "configure",
"problemMatcher": [],
"detail": "Задача шаблона CMake настроить"
}
]
}

View File

@ -9,7 +9,11 @@ project(
add_custom_target( add_custom_target(
Package Package
COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/install.sh ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postinst COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/install.sh ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postinst
COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN
COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/control
COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/prerm
COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postinst COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postinst
COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postrm
COMMAND dpkg-deb --build ${CMAKE_CURRENT_SOURCE_DIR}/package ${CMAKE_CURRENT_BINARY_DIR}/package.deb COMMAND dpkg-deb --build ${CMAKE_CURRENT_SOURCE_DIR}/package ${CMAKE_CURRENT_BINARY_DIR}/package.deb
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
) )

View File

@ -15,7 +15,7 @@
Некоторые команды требуют sudo Некоторые команды требуют sudo
Тулчейн устанавливается в папку `/home/autobuild/tools/win32` Тулчейн по умолчанию устанавливается в папку `/home/autobuild/tools/win32`, но скрипт вас спросит перед установкой
### Windows ### Windows

View File

@ -133,21 +133,34 @@ sudo ln -sf /usr/lib/libmpfr.so.6 /usr/lib/libmpfr.so.4
print_ok "Successfully!" print_ok "Successfully!"
sudo ln -sf $TOOLCHAIN_DIR $DEFAULT_TOOLCHAIN_DIR
if [ "$TOOLCHAIN_DIR" != "$DEFAULT_TOOLCHAIN_DIR" ]; then
sudo ln -sf $TOOLCHAIN_DIR $DEFAULT_TOOLCHAIN_DIR
fi
MESSAGE="PATH=\$PATH:$TOOLCHAIN_DIR/win32/bin"
EXPORT_MESSSAGE="export $MESSAGE"
if [ ! "$(id -u)" -ne 0 ] if [ ! "$(id -u)" -ne 0 ]
then then
print_msg "Add" print_msg "Add path to profile"
echo 'PATH=$PATH:/home/autobuild/tools/win32/bin' >> /etc/profile echo $MESSAGE >> /etc/profile
else else
if ! grep -q 'export PATH=$PATH:/home/autobuild/tools/win32/bin' ~/.bashrc; then if ! grep -q $EXPORT_MESSSAGE ~/.bashrc; then
export PATH=$PATH:/home/autobuild/tools/win32/bin
print_msg "Adding '$TOOLCHAIN_DIR/win32/bin' to '~/.bashrc'" print_msg "Adding '$TOOLCHAIN_DIR/win32/bin' to '~/.bashrc'"
echo 'export PATH=$PATH:/home/autobuild/tools/win32/bin' >> ~/.bashrc echo $EXPORT_MESSSAGE >> ~/.bashrc
fi fi
fi fi
# WTF?!
sudo /usr/bin/mkdir -p /etc/kos32-gcc
sudo echo $TOOLCHAIN_DIR >> /etc/kos32-gcc/install-path
export $MESSAGE
cd "$OLDPWD" cd "$OLDPWD"
print_ok "Installation was successful!" print_ok "Installation was successful!"

View File

@ -3,7 +3,7 @@ Version: 0.1.4
Architecture: all Architecture: all
Section: devel Section: devel
Depends: libc6-i386:amd64, libmpc3:amd64 Depends: libc6-i386:amd64, libmpc3:amd64
Pre-Depends: p7zip, wget Pre-Depends: p7zip-full, wget
Recommends: fasm Recommends: fasm
Priority: optional Priority: optional
Homepage: https://github.com/Egor00f/kolibrios-gcc-toolchain Homepage: https://github.com/Egor00f/kolibrios-gcc-toolchain

View File

@ -1 +0,0 @@
/home/autobuild/tools/

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
rm -R /home/autobuild/tools/win32 TOOLCHAIN_DIR=$(head -n 1 /etc/kos32-gcc/install-path)
if grep -q 'PATH=$PATH:/home/autobuild/tools/win32/bin' /etc/profile; then MESSAGE="PATH=\$PATH:$TOOLCHAIN_DIR"
val="PATH=\$PATH:/home/autobuild/tools/win32/bin"
sed -i '/$val/d' /etc/profile if grep -q $MESSAGE /etc/profile; then
sed -i '/$MESSAGE/d' /etc/profile
fi fi
rm /etc/kos32-gcc -R

5
package/DEBIAN/prerm Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
TOOLCHAIN_DIR=$(head -n 1 /etc/kos32-gcc/install-path)
rm -R $TOOLCHAIN_DIR