mirror of
https://github.com/Egor00f/kolibrios-gcc-toolchain.git
synced 2025-01-28 00:40:05 +01:00
fix windows installer
This commit is contained in:
parent
3fe69b35df
commit
79af1f9411
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ build/
|
||||
chocolatey/kos32-gcc*.nupkg
|
||||
chocolatey/install.ps1
|
||||
chocolatey/tools/install.ps1
|
||||
bat/builds.kolibrios.org
|
||||
|
@ -26,7 +26,11 @@
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
## Сборка установщиков
|
||||
|
||||
|
4
bat/cleanArchives.bat
Normal file
4
bat/cleanArchives.bat
Normal 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
|
6
bat/downloadLibraries.bat
Normal file
6
bat/downloadLibraries.bat
Normal 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
|
5
bat/downloadToolchain.bat
Normal file
5
bat/downloadToolchain.bat
Normal 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
5
bat/updateLibraries.bat
Normal 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
|
22
install.bat
22
install.bat
@ -1,4 +1,4 @@
|
||||
@echo off
|
||||
rem@echo off
|
||||
|
||||
for /f %%a in ('echo prompt $E^| cmd') do set "ESC=%%a"
|
||||
|
||||
@ -12,6 +12,7 @@ else (
|
||||
set TOOLCHAIN_DIR=%1
|
||||
)
|
||||
|
||||
echo %TOOLCHAIN_DIR%
|
||||
|
||||
Call :print_msg Create the %TOOLCHAIN_DIR% folder...
|
||||
|
||||
@ -20,14 +21,11 @@ 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 -o%TOOLCHAIN_DIR%
|
||||
downloadToolchain %TOOLCHAIN_DIR%
|
||||
|
||||
Call :print_ok Successfully!
|
||||
|
||||
@ -35,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!
|
||||
|
||||
@ -47,11 +41,7 @@ Call :print_ok Successfully!
|
||||
|
||||
Call :print_msg Updating libraries
|
||||
|
||||
cd %TOOLCHAIN_DIR%\win32\mingw32\lib
|
||||
|
||||
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\* .\
|
||||
rd /s /q builds.kolibrios.org
|
||||
updateLibraries %TOOLCHAIN_DIR%
|
||||
|
||||
Call :print_ok Successfully!
|
||||
|
||||
|
@ -65,18 +65,25 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environmen
|
||||
Check: NeedsAddPath('{app}\win32\bin')
|
||||
|
||||
[Files]
|
||||
Source: ".\install.ps1"; 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.ps1"; description: "install script"; StatusMsg: "Installing toolchain"; Parameters: "-InstallPath {app}"; 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: files; Name: "{app}"
|
||||
Type: filesandordirs; Name: "{app}\win32"
|
||||
|
||||
[Code]
|
||||
function NeedsAddPath(Param: string): boolean;
|
||||
@ -93,4 +100,4 @@ begin
|
||||
{ look for the path with leading and trailing semicolon }
|
||||
{ Pos() returns 0 if not found }
|
||||
Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
x
Reference in New Issue
Block a user