mirror of
https://github.com/Egor00f/kolibrios-gcc-toolchain.git
synced 2024-11-21 00:56:22 +01:00
update idk
This commit is contained in:
parent
2480b1a20b
commit
a782cd37cd
12
.vscode/tasks.json
vendored
Normal file
12
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "cmake",
|
||||
"label": "CMake: настроить",
|
||||
"command": "configure",
|
||||
"problemMatcher": [],
|
||||
"detail": "Задача шаблона CMake настроить"
|
||||
}
|
||||
]
|
||||
}
|
@ -9,7 +9,11 @@ project(
|
||||
add_custom_target(
|
||||
Package
|
||||
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/postrm
|
||||
COMMAND dpkg-deb --build ${CMAKE_CURRENT_SOURCE_DIR}/package ${CMAKE_CURRENT_BINARY_DIR}/package.deb
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
Некоторые команды требуют sudo
|
||||
|
||||
Тулчейн устанавливается в папку `/home/autobuild/tools/win32`
|
||||
Тулчейн по умолчанию устанавливается в папку `/home/autobuild/tools/win32`, но скрипт вас спросит перед установкой
|
||||
|
||||
### Windows
|
||||
|
||||
|
25
install.sh
25
install.sh
@ -133,21 +133,34 @@ sudo ln -sf /usr/lib/libmpfr.so.6 /usr/lib/libmpfr.so.4
|
||||
|
||||
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 ]
|
||||
then
|
||||
print_msg "Add"
|
||||
echo 'PATH=$PATH:/home/autobuild/tools/win32/bin' >> /etc/profile
|
||||
print_msg "Add path to profile"
|
||||
echo $MESSAGE >> /etc/profile
|
||||
else
|
||||
if ! grep -q 'export PATH=$PATH:/home/autobuild/tools/win32/bin' ~/.bashrc; then
|
||||
export PATH=$PATH:/home/autobuild/tools/win32/bin
|
||||
if ! grep -q $EXPORT_MESSSAGE ~/.bashrc; then
|
||||
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
|
||||
|
||||
# WTF?!
|
||||
sudo /usr/bin/mkdir -p /etc/kos32-gcc
|
||||
sudo echo $TOOLCHAIN_DIR >> /etc/kos32-gcc/install-path
|
||||
|
||||
|
||||
export $MESSAGE
|
||||
|
||||
cd "$OLDPWD"
|
||||
|
||||
print_ok "Installation was successful!"
|
||||
|
@ -3,7 +3,7 @@ Version: 0.1.4
|
||||
Architecture: all
|
||||
Section: devel
|
||||
Depends: libc6-i386:amd64, libmpc3:amd64
|
||||
Pre-Depends: p7zip, wget
|
||||
Pre-Depends: p7zip-full, wget
|
||||
Recommends: fasm
|
||||
Priority: optional
|
||||
Homepage: https://github.com/Egor00f/kolibrios-gcc-toolchain
|
||||
|
@ -1 +0,0 @@
|
||||
/home/autobuild/tools/
|
@ -1,11 +1,12 @@
|
||||
#!/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
|
||||
val="PATH=\$PATH:/home/autobuild/tools/win32/bin"
|
||||
sed -i '/$val/d' /etc/profile
|
||||
MESSAGE="PATH=\$PATH:$TOOLCHAIN_DIR"
|
||||
|
||||
if grep -q $MESSAGE /etc/profile; then
|
||||
sed -i '/$MESSAGE/d' /etc/profile
|
||||
fi
|
||||
|
||||
|
||||
rm /etc/kos32-gcc -R
|
||||
|
||||
|
5
package/DEBIAN/prerm
Executable file
5
package/DEBIAN/prerm
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
TOOLCHAIN_DIR=$(head -n 1 /etc/kos32-gcc/install-path)
|
||||
|
||||
rm -R $TOOLCHAIN_DIR
|
Loading…
Reference in New Issue
Block a user