81 Commits
v0.1 ... v0.1.7

Author SHA1 Message Date
79af1f9411 fix windows installer 2025-01-08 15:54:39 +05:00
Егор
3fe69b35df fix downloading all sdk dir from kolibrios build && toolchain for x86_64 -> deb package for amd64 only && update install.bat && add more colors to install.sh 2025-01-08 09:17:21 +00:00
Егор
9f5b23a586 hide 7z output in deb package 2024-12-28 13:53:35 +00:00
adf0f3a62a fix Permisiion deined for lds scripts 2024-12-28 17:46:12 +05:00
Егор
3812696d61 Create CONTRIBUTING.md 2024-12-07 00:26:48 +05:00
Егор
4a24012df0 Update install.sh
fix error access to includes files in github codespace
2024-11-23 18:49:53 +05:00
Егор
99c4dce943 Merge pull request #9 from Egor00f/add-chocolatey-package
Add chocolatey package
2024-11-19 21:34:49 +05:00
9cd3a05980 fix choco package install
choco package installing, but cant delete toolchain
2024-11-19 21:33:11 +05:00
Егор
b8a7e18e21 Update install.sh
Sudo sudo sudo...
2024-11-19 14:38:37 +05:00
Егор
05244d556f fix update libraries install.sh 2024-11-19 14:03:44 +05:00
Егор
0374af72f6 Update install.sh
+ Use tabs instad spaces
+ Updating all libraries
2024-11-19 13:46:18 +05:00
Егор
1a05d66976 Update test.yml
+ Test compiler working in install.ps1 test
+ choco package test oj windows instead ubuntu
2024-11-17 20:42:28 +05:00
Егор
fe4d4bc277 Update test.yml 2024-11-17 16:58:05 +05:00
743ad5a0cd fix downloading libraries && add remove package && fix powershell script depends in tests 2024-11-17 16:28:13 +05:00
Егор
80198a0692 Update test.yml
Separation of package build tests, packages and installation script
2024-11-16 20:23:38 +05:00
Егор
0a93ba45c2 Update test.yml
+ Fix names of targets
+ Add install/remove tests for chocolatey package
2024-11-16 19:56:36 +05:00
Егор
e81277efc3 fix param in install.ps1 2024-11-16 19:45:39 +05:00
81ede577a3 Update kos32-gcc.nuspec 2024-11-16 16:21:43 +05:00
c8dfcc7e13 try fix install.ps1 && other 2024-11-16 16:21:10 +05:00
a64723dec2 update .gitignore
add chocolatey package build to .gitignore
2024-11-16 11:24:51 +05:00
2bfe470796 use powershell features for install toolchain && use powershell script in installer
Additions:
+ modules for download and unpacking package
+ use Write-Progress for show progress
+ update libs in for loop
+ use ps1 installer in setup installer, because it not need pre-installed depends
+ Add test for PowerShell install script

Script not tested.
2024-11-15 16:45:10 +00:00
dfde28f76f add chocolatey & add test for chocolatey package 2024-11-14 21:26:34 +05:00
Егор
7e88c422d4 Update README.md
Some checks failed
test / windows-install (push) Has been cancelled
test / build-Installer (push) Has been cancelled
test / linux-install (push) Waiting to run
test / package (push) Has been cancelled
Точки и пробелы, там поставлены...
Ссылки подправленны...
И всякое такое
2024-11-13 00:02:05 +05:00
Егор
7250a0cc50 fix access to include problem 2024-11-12 23:55:12 +05:00
ca0898f7f5 update Readme.md 2024-11-12 07:20:21 +00:00
41474060b3 fix installator and windows install script 2024-11-11 16:09:41 +05:00
23d7d8064d add install path select to windows install script 2024-11-11 10:01:49 +00:00
Егор
876c00a66a Update install.sh 2024-11-11 14:00:19 +05:00
Егор
fd5c312c33 fix access error & use / instead \ in postrm 2024-11-11 08:29:28 +00:00
Егор
e07c12dacc fix adding link to toolchain dir and remove & add copyright to package 2024-11-11 07:47:00 +00:00
Егор
376ae0fa91 fix test.yml 2024-11-10 16:27:46 +05:00
Егор
e08878da61 fix install.sh 2024-11-10 16:23:36 +05:00
Егор
93acd0f1dd Update package test 2024-11-10 16:21:02 +05:00
Егор
d73b2827b1 update install.sh 2024-11-10 11:15:06 +00:00
Егор
5968d5a12b Update install.sh 2024-11-10 15:46:47 +05:00
Егор
a782cd37cd update idk 2024-11-10 10:27:09 +00:00
Егор
2480b1a20b Update install.sh 2024-11-09 23:18:02 +05:00
Егор
f4e741746f Update test.yml 2024-11-09 23:02:36 +05:00
Егор
d7a97891f7 fix upload artifact 2024-11-09 23:01:24 +05:00
Егор
f2ee70e825 Merge pull request #4 from Egor00f/add-installation-path-selection
Add installation path selection
2024-11-09 22:36:59 +05:00
Егор
99f3639668 fix test build 2024-11-09 17:35:08 +00:00
Егор
3dc15f3597 fix upload package 2024-11-09 17:27:22 +00:00
Егор
87c29daf9e add upload artifacts of packages && add github actions extension 2024-11-09 17:21:40 +00:00
Егор
0e3f85c0e3 add installation path selection 2024-11-09 17:16:13 +00:00
Егор
0baa7b470d fix build in github codespaces 2024-11-09 16:44:24 +00:00
Егор
537356d5fe fix devcontainer.json 2024-11-09 16:24:18 +00:00
Егор
6f3187dea8 Create devcontainer.json 2024-11-09 21:09:56 +05:00
Егор
22256e92c9 Update README.md 2024-11-09 19:08:01 +05:00
194e9de3e2 package is working! now this is new version 2024-11-09 13:56:04 +00:00
4dc4393c52 fix 2024-11-09 13:51:19 +00:00
003780f587 try fix postrm 2024-11-09 13:46:44 +00:00
c0136c680d try fix postrm 2024-11-09 12:49:46 +00:00
5886611082 fix install and prerm 2024-11-09 12:38:41 +00:00
a882106a25 fix postrm && add comments to test.yml 2024-11-09 12:24:35 +00:00
6cd179035c update test.yml 2024-11-09 12:16:41 +00:00
b0e92ef197 update version 2024-11-08 18:12:10 +00:00
81135f0c3a update version 2024-11-08 18:11:28 +00:00
8505ca3a4e use just profile 2024-11-08 18:04:47 +00:00
9262ee0fa4 fix of fix 2024-11-08 17:45:32 +00:00
eb61d5f483 fix install.sh 2024-11-08 17:45:07 +00:00
e63568bc9c try fix 2024-11-08 17:34:25 +00:00
6d994d865c fix 2024-11-08 17:23:56 +00:00
d2c3ae7904 update install.sh 2024-11-08 17:21:51 +00:00
53343866d9 update 2024-11-08 17:18:44 +00:00
Егор
048965ba75 Update test.yml
fix runner name
2024-11-08 21:57:58 +05:00
Егор
9b3be45832 Update install.sh 2024-11-08 21:55:46 +05:00
Егор
fb37fd61a8 Update install.sh 2024-11-08 21:55:09 +05:00
Егор
2346cbda4a Merge pull request #3 from Egor00f/add-deb-package
create deb package
2024-11-08 21:05:45 +05:00
dcbf7a3e1f update.test.yml 2024-11-08 16:03:05 +00:00
f470a40d30 update control 2024-11-08 16:01:57 +00:00
51ad12be50 add description & use dpkg instead apt in package test 2024-11-08 15:53:33 +00:00
2ff32eb06a use sudo 2024-11-08 15:38:24 +00:00
ad3261d332 fix install.sh 2024-11-08 15:36:00 +00:00
83b9582c31 use cmake for build package 2024-11-08 15:33:38 +00:00
Егор
45d8910f84 fix package test in test.yml 2024-11-08 17:02:51 +05:00
5deba53689 add test package & set version to 0.1.1 2024-11-08 11:50:40 +00:00
205962bf75 create deb package 2024-11-08 11:31:31 +00:00
0b4ac08d48 update README.md && add .vscode 2024-11-08 10:50:00 +00:00
Егор
71859b700b Update install.bat 2024-11-08 12:55:18 +05:00
Егор
cee23fd147 Update test.yml 2024-11-08 12:45:07 +05:00
Егор
323727cd74 Update install.bat 2024-11-08 12:00:19 +05:00
23 changed files with 550 additions and 89 deletions

View File

@@ -0,0 +1,19 @@
{
"image": "mcr.microsoft.com/devcontainers/cpp:debian-12",
"features": {
},
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cmake-tools",
"usernamehw.errorlens",
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-russian",
"ibm.output-colorizer",
"chouzz.vscode-innosetup",
"github.vscode-github-actions"
]
}
}
}

View File

@@ -1,4 +1,4 @@
name: test
name: Test
on:
push:
@@ -8,14 +8,15 @@ on:
workflow_dispatch:
jobs:
#Test linux install script
linux-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run script
run: ${{ github.workspace }}/./install.sh
run: echo '/home/autobuild/tools' | ${{ github.workspace }}/./install.sh
- name: Add toolchain to path
run: echo "/home/autobuild/tools/win32/bin" >> $GITHUB_PATH
@@ -25,7 +26,8 @@ jobs:
kos32-gcc -v
kos32-g++ -v
windows-install:
#Test Batch install script
batch-install:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
@@ -36,14 +38,139 @@ jobs:
choco install 7zip
- name: Run script
run: ${{ github.workspace }}/install.bat
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
#Test PowerShell install script
PowerShell-install:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Test run
- name: Install modules
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module -Name 7Zip4PowerShell
- name: Run script
run: ${{ github.workspace }}\install.ps1
- name: Test
run: |
kos32-gcc -v
kos32-g++ -v
#Test Windows Installer
build-Installer:
runs-on: windows-latest
needs: PowerShell-install
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B ${{ github.workspace }}/build
cmake --build ${{ github.workspace }}/build --target Installer
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: windows-installer
# Upload entire repository
path: './build/installer.exe'
# Test deb package build
deb-package-build:
runs-on: ubuntu-latest
needs: linux-install
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B ${{ github.workspace }}/build
cmake --build ${{ github.workspace }}/build --target deb
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: deb-package
# Upload entire repository
path: './build/package.deb'
# Test deb package install/remove
deb-package-test:
runs-on: ubuntu-latest
needs: deb-package-build
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B ${{ github.workspace }}/build
cmake --build ${{ github.workspace }}/build --target deb
- name: Install package
run: echo '/kolibrios-toolchain' | sudo apt install ${{ github.workspace }}/build/package.deb -y
- name: Add toolchain to path
run: echo "/kolibrios-toolchain/win32/bin" >> $GITHUB_PATH
- name: Test run
run: |
kos32-g++ -v
kos32-gcc -v
/home/autobuild/tools/win32/bin/kos32-gcc -v
/home/autobuild/tools/win32/bin/kos32-g++ -v
/kolibrios-toolchain/win32/bin/kos32-gcc -v
/kolibrios-toolchain/win32/bin/kos32-g++ -v
- name: Remove package
run: sudo apt remove kos32-gcc
#Test chocolatey package build
chocolatey-package-build:
runs-on: windows-latest
needs: PowerShell-install
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B ${{ github.workspace }}/build
cmake --build ${{ github.workspace }}/build --target choco
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: choco-package
# Upload entire repository
path: './build/choco-package.nupkg'
# Test chocolatey package install/remove
chocolatey-package-test:
runs-on: windows-latest
needs: chocolatey-package-build
steps:
- uses: actions/checkout@v4
- name: Install modules
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module -Name 7Zip4PowerShell
- name: Build
run: |
cmake -B ${{ github.workspace }}/build
cmake --build ${{ github.workspace }}/build --target choco
- name: Install package
run: choco install ${{ github.workspace }}\build\choco-package.nupkg
- name: Test
run: |
kos32-gcc -v
kos32-g++ -v
- name: Remove package
run: choco uninstall kos32-gcc

10
.gitignore vendored
View File

@@ -1 +1,9 @@
Output/
Output/
package/DEBIAN/postinst
package/DEBIAN/copyright
package.deb
build/
chocolatey/kos32-gcc*.nupkg
chocolatey/install.ps1
chocolatey/tools/install.ps1
bat/builds.kolibrios.org

9
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,9 @@
{
"recommendations": [
"chouzz.vscode-innosetup",
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-russian",
"ms-vscode.cmake-tools",
"github.vscode-github-actions"
]
}

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

@@ -0,0 +1,10 @@
{
"cSpell.words": [
"autobuild",
"тулчейн",
"тулчейна",
"msys",
"kolibrios",
"Egor"
]
}

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 настроить"
}
]
}

36
CMakeLists.txt Normal file
View File

@@ -0,0 +1,36 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
project(
KolibriOS-gcc-Toolchain-installer
DESCRIPTION "Installer of gcc toolchain for KolibriOS"
)
add_custom_target(
deb
COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/install.sh ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postinst
COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/copyright
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 chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/copyright
COMMAND dpkg-deb --build ${CMAKE_CURRENT_SOURCE_DIR}/package ${CMAKE_CURRENT_BINARY_DIR}/package.deb
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Build deb package"
)
add_custom_target(
Installer
COMMAND iscc /O"${CMAKE_CURRENT_BINARY_DIR}" ${CMAKE_CURRENT_SOURCE_DIR}/installator.iss
COMMENT "Build windows installer"
)
add_custom_target(
choco
COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/install.ps1 ${CMAKE_CURRENT_SOURCE_DIR}/chocolatey/tools
COMMAND choco pack
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/chocolatey
COMMENT "Build chocolatey package"
)

3
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,3 @@
# Как законтрибьютить?
просто форкаешь репозиторий, делаешь нужные изменения, делаешь запрос на слияние, ждёшь принятия запроса

View File

@@ -1,26 +1,49 @@
# Установщик gcc тулчейна для KolibriOS
Просто устанавливает тулчейн.
Просто устанавливает тулчейн C/C++ компилятора для KolinriOS от Serge.
оригинальный скрипт для 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
(скрипт подправлен)
Оригинальный скрипт для 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
Для установки требуются `7z` и `wget`. При выборе своего пути в любом случае будет создана папка win32 в выбранной папке.
## Linux
### Linux
Просто запустите install.sh.
Просто запустите `install.sh`.
Некоторые команды требуют sudo
Некоторые команды требуют sudo.
Тулчейн устанавливается в папку `/home/autobuild/tools/win32`
Или установите пакет. [Ссылка на пакет](https://git.kolibrios.org/Egor00f/-/packages/debian/kos32-gcc/) или в релизах.
## Windows
Тулчейн по умолчанию устанавливается в папку `/home/autobuild/tools/win32`, но скрипт вас спросит перед установкой.
Для windows есть установщик(посмотрите в релизах) или росто запустите install.bat. Рекомендуется запускать с повышенными правами
### Windows
Желательно чтобы вы перед установкой тулчейна установите msys из установщика MinGW.
Для windows есть установщик(посмотрите в релизах) или просто запустите `install.bat`. Рекомендуется запускать с повышенными правами.
wget для windows можно поискать в GnuWin32 например, 7z Нужно добавить в PATH.
Тулчейн устанавливается в папку `C:/MinGW/msys/1.0/home/autobuild/tools/win32`
Тулчейн по умолчанию устанавливается в папку `C:/MinGW/msys/1.0/home/autobuild/tools/win32`, но вы можете изменить путь добавив аргумент - путь установки(пустой - путь по умолчанию). Например:
```
install.bat Path
```
## Сборка установщиков
Установщики полностью базируются на скриптах установки, так что без разницы что вы будете использовать скрипт или установщик, но установщики могут и удалить тулчейн.
Установщики собираются с помощью cmake (cmake просто потому что могу).
### Linux
Можно собрать deb пакет. Цель для сборки Package. Для сборки требуется `dpkg-deb`.
### Windows
Установщик собирается с помощью Inno Setup. Цель для сборки Installer. Для сборки требуется компилятор Inno Setup.
Если сборка не работает, добавьте папку Inno Setup (например: `C:\Programs Files\Inno Setup 6`) в PATH.

4
bat/cleanArchives.bat Normal file
View File

@@ -0,0 +1,4 @@
set TOOLCHAIN_DIR=%1
del /Q %TOOLCHAIN_DIR%\kos32-toolchain.7z
del /Q %TOOLCHAIN_DIR%\win32\mingw32\sdk-28-10-16.7z

View File

@@ -0,0 +1,6 @@
set TOOLCHAIN_DIR=%1
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 -o%TOOLCHAIN_DIR%\win32\mingw32

View File

@@ -0,0 +1,5 @@
set TOOLCHAIN_DIR=%1
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 -o%TOOLCHAIN_DIR%

5
bat/updateLibraries.bat Normal file
View File

@@ -0,0 +1,5 @@
set TOOLCHAIN_DIR=%1
wget -r --no-parent http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/
move /y builds.kolibrios.org\en_US\data\contrib\sdk\lib\* %TOOLCHAIN_DIR%\win32\mingw32\lib
rd /s /q builds.kolibrios.org

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>kos32-gcc</id>
<title>KolibriOS gcc toolchain installer</title>
<version>0.1.5</version>
<authors>Egor00f</authors>
<owners>Egor00f</owners>
<summary>idk</summary>
<description>_KolibriOS gcc toolchain installer. This package installing KolibriOS gcc toolchain by Serge.</description>
<packageSourceUrl>https://github.com/Egor00f/kolibrios-gcc-toolchain/</packageSourceUrl>
<tags>kolibrios toolchain compiler C/C++</tags>
<copyright></copyright>
<licenseUrl>https://github.com/Egor00f/kolibrios-gcc-toolchain/blob/main/LICENSE</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<!--<iconUrl>http://cdn.rawgit.com/__CHOCO_PKG_MAINTAINER_REPO__/master/icons/__NAME__.png</iconUrl>-->
<releaseNotes></releaseNotes>
</metadata>
<files>
<file src="tools\**" target="tools" />
</files>
</package>

View File

@@ -0,0 +1,14 @@
#NOTE: Please remove any commented lines to tidy up prior to releasing the package, including this one
$packageName = 'kos32-gcc' # arbitrary name for the package, used in messages
# main helpers - these have error handling tucked into them already
# installer, will assert administrative rights
$INSTALL_PATH = Read-Host 'Path to install toolchain(Enter - default)'
C:\ProgramData\Chocolatey\lib\kos32-gcc\tools\install.ps1
Out-File -FilePath C:\ProgramData\Chocolatey\lib\kos32-gcc\install-path -InputObject $INSTALL_PATH

View File

@@ -0,0 +1,4 @@
$installPath = Get-Content C:\ProgramData\Chocolatey\lib\kos32-gcc\install-path | Out-String | ConvertFrom-StringData
Remove-Item -LiteralPath $installPath -Force -Recurse

View File

@@ -1,26 +1,31 @@
@echo off
rem@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
set DEFAULT_TOOLCHAIN_DIR=C:\MinGW\msys\1.0\home\autobuild\tools
if [%1] == [] (
set TOOLCHAIN_DIR=%DEFAULT_TOOLCHAIN_DIR%
)
else (
set TOOLCHAIN_DIR=%1
)
echo %TOOLCHAIN_DIR%
Call :print_msg Create the C:/MinGW/msys/1.0/home/autobuild folder...
Call :print_msg Create the %TOOLCHAIN_DIR% folder...
mkdir %TOOLCHAIN_DIR%
Call :print_ok Successfully!
cd bat
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
downloadToolchain %TOOLCHAIN_DIR%
Call :print_ok Successfully!
@@ -28,11 +33,7 @@ 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
downloadLibraries.bat %TOOLCHAIN_DIR%
Call :print_ok Successfully!
@@ -40,23 +41,13 @@ 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
updateLibraries %TOOLCHAIN_DIR%
Call :print_ok Successfully!
Call :print_msg Adding C:/MinGW/msys/1.0/home/autobuild/tools/win32/bin to PATH
Call :print_msg Adding C:\MinGW\msys\1.0\home\autobuild\tools\win32\bin to PATH
set PATH=%PATH%;%TOOLCHAIN_DIR%%\win32\bin
@@ -67,9 +58,9 @@ Call :print_ok Installation was successful!
:print_msg
echo %ESC%[92m%*%ESC%[%m
echo %ESC%[34m%*%ESC%[%m
exit /b
:print_ok
echo %ESC%[36m%*%ESC%[%m
echo %ESC%[32m%*%ESC%[%m
exit /b

57
install.ps1 Normal file
View File

@@ -0,0 +1,57 @@
#Requires -RunAsAdministrator
param(
[string]$InstallPath='C:\MinGW\msys\1.0\home\autobuild\tools'
)
if (Get-Module -ListAvailable -Name 7Zip4PowerShell)
{}
else
{
Install-Module -Name 7Zip4PowerShell
}
$LIBS_PATH = '$InstallPath\win32\mingw32\lib\'
$LIBS_URL = 'http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/'
Write-Progress -Activity 'Installing toolchain' -Status 'Installing toolchain' -PercentComplete 0 -CurrentOperation 'Create the $InstallPath folder'
mkdir $InstallPath -Force
Write-Progress -Activity 'Installing toolchain' -Status 'Installing toolchain' -PercentComplete 1 -CurrentOperation 'Download the kos32-gcc toolchain'
Invoke-WebRequest http://ftp.kolibrios.org/users/Serge/new/Toolchain/msys-kos32-5.4.0.7z -OutFile $InstallPath\kos32-toolchain.7z
Write-Progress -Activity 'Installing toolchain' -Status 'Installing toolchain' -PercentComplete 20 -CurrentOperation 'Unpacking kos32-gcc toolchain'
Expand-7Zip -ArchiveFileName $InstallPath\kos32-toolchain.7z -TargetPath $InstallPath
Write-Progress -Activity 'Installing toolchain' -Status 'Installing libraries' -PercentComplete 40 -CurrentOperation 'Downloading libraries'
Invoke-WebRequest http://ftp.kolibrios.org/users/Serge/new/Toolchain/sdk-28-10-16.7z -OutFile $InstallPath\win32\mingw32\sdk-28-10-16.7z
Write-Progress -Activity 'Installing toolchain' -Status 'Installing libraries' -PercentComplete 50 -CurrentOperation 'Unpacking libraries'
Expand-7Zip -ArchiveFileName $InstallPath\win32\mingw32\sdk-28-10-16.7z -TargetPath $InstallPath\win32\mingw32\
Write-Progress -Activity 'Installing toolchain' -Status 'Installing libraries' -PercentComplete 60 -CurrentOperation "Download libraries"
$response = Invoke-WebRequest -Uri $LIBS_URL -Method GET
$files = @( $response.Content -split [environment]::NewLine | ? { $_ -like '*tageswerte*.zip*' } | % { $_ -replace '^(.*>)(tages.*\.zip)<.*', '$2' } )
foreach( $file in $files ) {
Invoke-WebRequest -Uri ($LIBS_URL + $file) -Method GET -OutFile ($LIBS_PATH + $file)
}
Write-Progress -Activity 'Installing toolchain' -Status 'Done!' -PercentComplete 99 -CurrentOperation "end"

View File

@@ -2,32 +2,47 @@
# Written by turbocat2001 (Maxim Logaev)
# Installation steps described by maxcodehack (Maxim Kuzmitsky)
# modified by Egor00f (Egor)
set -e
pwd
DEFAULT_TOOLCHAIN_DIR="/home/autobuild/tools"
TOOLCHAIN_DIR=$DEFAULT_TOOLCHAIN_DIR
print_msg(){
echo -e "\e[34m$1\e[0m"
echo -e "\e[34m$1\e[0m"
}
print_ok(){
echo -e "\e[32m$1\e[0m"
echo -e "\e[32m$1\e[0m"
}
print_err(){
echo -e "\e[31m$1\e[0m"
exit
echo -e "\e[31m$1\e[0m"
exit
}
check_utils(){
printf "%s: " $1
if command -v $1 &> /dev/null
then
print_ok "ok\r"
else
print_err "no\r"
fi
printf "%s: " $1
if command -v $1 &> /dev/null
then
print_ok "ok\r"
else
print_err "no\r"
fi
}
echo -n -e "\e[0m Toolchain install path \e[90m(default is $TOOLCHAIN_DIR): \e[97m"
read INPUT
if [[ ! -z "$INPUT" ]]; then
TOOLCHAIN_DIR=$INPUT
fi
echo -e "\e[0mInstalling toolchain to \e[97m$TOOLCHAIN_DIR\e[0m"
print_msg "Checking utilities..."
@@ -38,11 +53,10 @@ check_utils 7z
print_msg "Create the /home/autobuild folder..."
print_msg "Create the toolchain folders..."
sudo rm -rf ~/autobuild /home/autobuild
mkdir -p ~/autobuild/tools
sudo ln -sf ~/autobuild /home/autobuild
sudo mkdir -p $DEFAULT_TOOLCHAIN_DIR
sudo mkdir -p $TOOLCHAIN_DIR
print_ok "Successfully!"
@@ -50,7 +64,7 @@ print_ok "Successfully!"
print_msg "Download the kos32-gcc toolchain..."
wget http://ftp.kolibrios.org/users/Serge/new/Toolchain/x86_64-linux-kos32-5.4.0.7z -q -O ~/autobuild/tools/kos32-toolchain.7z
sudo wget http://ftp.kolibrios.org/users/Serge/new/Toolchain/x86_64-linux-kos32-5.4.0.7z -q -O $TOOLCHAIN_DIR/kos32-toolchain.7z
print_ok "Successfully!"
@@ -58,9 +72,9 @@ print_ok "Successfully!"
print_msg "Extracting files ..."
cd ~/autobuild/tools/
7z x -y kos32-toolchain.7z
rm -rf kos32-toolchain.7z
cd $TOOLCHAIN_DIR
sudo 7z x -y -bso0 -bsp0 kos32-toolchain.7z
sudo rm -rf kos32-toolchain.7z
print_ok "Successfully!"
@@ -68,10 +82,10 @@ print_ok "Successfully!"
print_msg "Downloading libraries..."
cd ~/autobuild/tools/win32/mingw32
wget http://ftp.kolibrios.org/users/Serge/new/Toolchain/sdk-28-10-16.7z -q -O sdk-28-10-16.7z
7z x -y sdk-28-10-16.7z
rm -rf sdk-28-10-16.7z
cd $TOOLCHAIN_DIR/win32/mingw32
sudo wget http://ftp.kolibrios.org/users/Serge/new/Toolchain/sdk-28-10-16.7z -q -O sdk-28-10-16.7z
sudo 7z x -y -bso0 -bsp0 sdk-28-10-16.7z
sudo rm -rf sdk-28-10-16.7z
print_ok "Successfully!"
@@ -80,15 +94,9 @@ print_ok "Successfully!"
print_msg "Updating libraries"
cd lib
wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libdll.a -q -O libdll.a
wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libfreetype.a -q -O libfreetype.a
wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libc.dll.a -q -O libc.dll.a
wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libSDLn.a -q -O libSDLn.a
wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libcurses.a -q -O libcurses.a
wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libz.dll.a -q -O libz.dll.a
wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libogg.a -q -O libogg.a
wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libvorbis.a -q -O libvorbis.a
wget http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/libopenjpeg.a -q -O libopenjpeg.a
sudo wget -r --no-parent -q http://builds.kolibrios.org/en_US/data/contrib/sdk/lib/
sudo mv builds.kolibrios.org/en_US/data/contrib/sdk/lib/* ./
sudo rm -R builds.kolibrios.org
print_ok "Successfully!"
@@ -98,10 +106,10 @@ print_msg "Downloading libisl..."
cd /tmp
sudo wget http://board.kolibrios.org/download/file.php?id=8301libisl.so.10.2.2.7z -q -O /tmp/libisl.so.10.2.2.7z
sudo 7z x -y libisl.so.10.2.2.7z
sudo 7z x -y -bso0 -bsp0 libisl.so.10.2.2.7z
if ! [ -d /usr/lib/x86_64-linux-gnu/ ]; then
sudo mkdir -p /usr/lib/x86_64-linux-gnu/
sudo mkdir -p /usr/lib/x86_64-linux-gnu/
fi
sudo mv /tmp/libisl.so.10.2.2 /usr/lib/x86_64-linux-gnu/libisl.so.10.2.2
@@ -121,10 +129,36 @@ sudo ln -sf /usr/lib/libmpfr.so.6 /usr/lib/libmpfr.so.4
print_ok "Successfully!"
if ! grep -q 'export PATH=$PATH:/home/autobuild/tools/win32/bin' ~/.bashrc; then
export PATH=$PATH:/home/autobuild/tools/win32/bin
print_msg "Adding '/home/autobuild/tools/win32/bin' to '~/.bashrc'"
echo 'export PATH=$PATH:/home/autobuild/tools/win32/bin' >> ~/.bashrc
if [ "$TOOLCHAIN_DIR" != "$DEFAULT_TOOLCHAIN_DIR" ]; then
sudo ln -sf $TOOLCHAIN_DIR/win32 $DEFAULT_TOOLCHAIN_DIR
fi
MESSAGE="PATH=\$PATH:$TOOLCHAIN_DIR/win32/bin"
EXPORT_MESSSAGE="export $MESSAGE"
if [ ! "$(id -u)" -ne 0 ]
then
echo $MESSAGE >> /etc/profile
sudo mkdir -p /etc/kos32-gcc
echo $TOOLCHAIN_DIR > /etc/kos32-gcc/install-path
else
if ! grep -q $EXPORT_MESSSAGE ~/.bashrc; then
print_msg "Adding '$TOOLCHAIN_DIR/win32/bin' to '~/.bashrc'"
echo '$EXPORT_MESSSAGE' >> ~/.bashrc
fi
fi
sudo chmod 775 $TOOLCHAIN_DIR/win32/bin/*
sudo chmod 774 $TOOLCHAIN_DIR/win32/include/*
sudo chmod 774 $TOOLCHAIN_DIR/win32/lib/*
sudo chmod 774 $TOOLCHAIN_DIR/win32/mingw32/lib/*
sudo chmod -R 775 /home/autobuild/tools/win32/lib/gcc
cd "$OLDPWD"
export PATH=$PATH:$TOOLCHAIN_DIR/win32/bin
print_ok "Installation was successful!"

View File

@@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "KolibriOS gcc toolchain"
#define MyAppVersion "0.1"
#define MyAppVersion "0.1.5"
#define MyAppPublisher "Egor00f"
#define MyAppURL "https://github.com/Egor00f/kolibrios-gcc-toolchain"
@@ -16,7 +16,8 @@ AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}\releases
AppReadmeFile=.\README.md
DefaultDirName=C:\MinGW\msys\1.0\home\autobuild\tools
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
@@ -57,8 +58,46 @@ Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"
[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\win32\bin"; \
Check: NeedsAddPath('{app}\win32\bin')
[Files]
Source: ".\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: ".\bat\downloadToolchain.bat"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: ".\bat\downloadLibraries.bat"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: ".\bat\updateLibraries.bat"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Run]
Filename: "{app}\install.bat"; description: "install script"; StatusMsg: "Installing toolchain"; Flags: runhidden logoutput
Filename: "{app}\downloadToolchain.bat"; description: "install toolchain script"; StatusMsg: "Installing toolchain"; Parameters: "{app}"; Flags: runhidden logoutput
Filename: "{app}\downloadLibraries.bat"; description: "download libraries script"; StatusMsg: "Download libraries"; Parameters: "{app}"; Flags: runhidden logoutput
Filename: "{app}\updateLibraries.bat"; description: "update libraries script"; StatusMsg: "Updating libraries"; Parameters: "{app}"; Flags: runhidden logoutput
Filename: "{app}\cleanArchives.bat"; description: "Delete downloaded archives script"; StatusMsg: "Delete downloaded archives"; Parameters: "{app}"; Flags: runhidden logoutput
[Icons]
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
[UninstallDelete]
Type: files; Name: "{app}"
Type: filesandordirs; Name: "{app}\win32"
[Code]
function NeedsAddPath(Param: string): boolean;
var
OrigPath: string;
begin
if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
'SYSTEM\CurrentControlSet\Control\Session Manager\Environment',
'Path', OrigPath)
then begin
Result := True;
exit;
end;
{ look for the path with leading and trailing semicolon }
{ Pos() returns 0 if not found }
Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
end;

14
package/DEBIAN/control Executable file
View File

@@ -0,0 +1,14 @@
Package: kos32-gcc
Version: 0.1.7
Architecture: amd64
Section: devel
Depends: libc6-i386:amd64, libmpc3:amd64
Pre-Depends: p7zip-full, wget
Recommends: fasm
Priority: optional
Homepage: https://github.com/Egor00f/kolibrios-gcc-toolchain
Origin: http://ftp.kolibrios.org/users/Serge/new/Toolchain
Maintainer: Egor00f <velikiydolbayeb@gmail.com>
Installed-Size: 131708
Description: KolibriOS gcc toolchain installer
This package installing KolibriOS gcc toolchain by Serge.

12
package/DEBIAN/postrm Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
TOOLCHAIN_DIR=$(head -n 1 /etc/kos32-gcc/install-path)
MESSAGE="PATH=\$PATH:$TOOLCHAIN_DIR/win32/bin"
sudo sed -i '/$MESSAGE/d' /etc/profile
rm /etc/kos32-gcc -R

7
package/DEBIAN/prerm Executable file
View File

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