Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add windows installer #1

Merged
merged 10 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`
75 changes: 75 additions & 0 deletions install.bat
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
25 changes: 0 additions & 25 deletions update-libs

This file was deleted.

Loading