diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bed08f3..20d657d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,38 +1,47 @@ -# This is a basic workflow to help you get started with Actions - name: test -# Controls when the workflow will run on: - # Triggers the workflow on push or pull request events but only for the "main" branch push: branches: [ "main" ] pull_request: branches: [ "main" ] - - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on + linux-install: runs-on: ubuntu-latest - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - # Runs a single command using the runners shell - name: Run script - run: ${{ github.workspace }}/./install + run: ${{ github.workspace }}/./install.sh - - name: add to path + - name: Add toolchain to path run: echo "/home/autobuild/tools/win32/bin" >> $GITHUB_PATH - - name: Test + - name: Test run + run: | + kos32-gcc -v + kos32-g++ -v + + windows-install: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Install depends + run: | + choco install wget + choco install 7zip + + - name: Run script + run: ${{ github.workspace }}/install.bat + + - name: Add toolchain to path + run: echo "C:\MinGW\msys\1.0\home\autobuild\tools\win32\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: Test run run: | kos32-gcc -v kos32-g++ -v diff --git a/README.md b/README.md index 6cb1232..3435b1e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,26 @@ # Установщик gcc тулчейна для KolibriOS -Просто устанавливает тулчейн - -оригинальный скрипт взят из http://board.kolibrios.org/viewtopic.php?p=76227&hilit=%D1%82%D1%83%D0%BB%D1%87%D0%B5%D0%B9%D0%BD#p76227 +Просто устанавливает тулчейн. +оригинальный скрипт для linux взят из http://board.kolibrios.org/viewtopic.php?p=76227&hilit=%D1%82%D1%83%D0%BB%D1%87%D0%B5%D0%B9%D0%BD#p76227 (скрипт подправлен) + +## Установка + +Для установки требуются 7z и wget + +## Linux + +Просто запустите install.sh. + +Некоторые команды требуют sudo + +Тулчейн устанавливается в папку `/home/autobuild/tools/win32` + +## Windows + +Просто запустите install.bat. Рекомендуется запускать с повышенными правами + +wget для windows можно поискать в GnuWin32 например, 7z Нужно добавить в PATH. + +Тулчейн устанавливается в папку `C:/MinGW/msys/1.0/home/autobuild/tools/win32` diff --git a/install.bat b/install.bat new file mode 100644 index 0000000..b16a867 --- /dev/null +++ b/install.bat @@ -0,0 +1,75 @@ +@echo off +for /f %%a in ('echo prompt $E^| cmd') do set "ESC=%%a" + + +set TOOLCHAIN_DIR=C:\MinGW\msys\1.0\home\autobuild\tools + + + +Call :print_msg Create the C:/MinGW/msys/1.0/home/autobuild folder... + +mkdir %TOOLCHAIN_DIR% + +Call :print_ok Successfully! + + + +call :print_msg Download the kos32-gcc toolchain... + +cd %TOOLCHAIN_DIR% + +wget http://ftp.kolibrios.org/users/Serge/new/Toolchain/msys-kos32-5.4.0.7z -O %TOOLCHAIN_DIR%\kos32-toolchain.7z + +7z x -y %TOOLCHAIN_DIR%\kos32-toolchain.7z + +Call :print_ok Successfully! + + + +Call :print_msg Downloading libraries... + +cd %TOOLCHAIN_DIR%\win32\mingw32 + +wget http://ftp.kolibrios.org/users/Serge/new/Toolchain/sdk-28-10-16.7z -O %TOOLCHAIN_DIR%\win32\mingw32\sdk-28-10-16.7z + +7z x -y %TOOLCHAIN_DIR%\win32\mingw32\sdk-28-10-16.7z + +Call :print_ok Successfully! + + + +Call :print_msg Updating libraries + +cd %TOOLCHAIN_DIR%\win32\mingw32\lib + +wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libdll.a -O %TOOLCHAIN_DIR%\win32\mingw32\lib\libdll.a +wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libfreetype.a -O %TOOLCHAIN_DIR%\win32\mingw32\lib\libfreetype.a +wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libc.dll.a -O %TOOLCHAIN_DIR%\win32\mingw32\lib\libc.dll.a +wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libSDLn.a -O %TOOLCHAIN_DIR%\win32\mingw32\lib\libSDLn.a +wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libcurses.a -O %TOOLCHAIN_DIR%\win32\mingw32\lib\libcurses.a +wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libz.dll.a -O %TOOLCHAIN_DIR%\win32\mingw32\lib\libz.dll.a +wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libogg.a -O %TOOLCHAIN_DIR%\win32\mingw32\lib\libogg.a +wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libvorbis.a -O %TOOLCHAIN_DIR%\win32\mingw32\lib\libvorbis.a +wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libopenjpeg.a -O %TOOLCHAIN_DIR%\win32\mingw32\lib\libopenjpeg.a + +Call :print_ok Successfully! + + + +Call :print_msg Adding C:/MinGW/msys/1.0/home/autobuild/tools/win32/bin to PATH + +set PATH=%PATH%;%TOOLCHAIN_DIR%%\win32\bin + + + +Call :print_ok Installation was successful! + + + +:print_msg + echo %ESC%[92m%*%ESC%[%m +exit /b + +:print_ok + echo %ESC%[36m%*%ESC%[%m +exit /b diff --git a/install b/install.sh similarity index 100% rename from install rename to install.sh diff --git a/update-libs b/update-libs deleted file mode 100755 index 7f4170f..0000000 --- a/update-libs +++ /dev/null @@ -1,25 +0,0 @@ -print_msg(){ - echo -e "\e[34m$1\e[0m" -} - -print_ok(){ - echo -e "\e[32m$1\e[0m" -} - -print_msg "Updating libraries..." - - -cd ~/autobuild/tools/win32/mingw32/lib - -wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libdll.a -O libdll.a -wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libfreetype.a -O libfreetype.a -wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libc.dll.a -O libc.dll.a -wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libSDLn.a -O libSDLn.a -wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libcurses.a -O libcurses.a -wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libz.dll.a -O libz.dll.a -wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libogg.a -O libogg.a -wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libvorbis.a -O libvorbis.a -wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libopenjpeg.a -O libopenjpeg.a - - -print_ok "Successfully!"