1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 12:40:36 +00:00

Rewrite distribution logic, download mingw*.exe

This commit is contained in:
Matthew Kilgore 2022-04-26 18:11:10 -04:00
parent 97ab4f4dc9
commit 77aced1b1c
9 changed files with 86 additions and 37 deletions

View file

@ -3,13 +3,17 @@ SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
mkdir internal\c\c_compiler
cd internal\c\mingw
set MINGW=mingw32.exe
IF "%PLATFORM%"=="x64" set MINGW=mingw64.exe
%MINGW% -y -o"..\c_compiler\"
set url="https://www.qb64phoenix.com/qb64_files/%MINGW%"
cd ..\..\..
echo Downloading %url%...
curl %url% -o %MINGW%
echo Extracting %MINGW% as C++ Compiler
@echo off
%MINGW% -y -o"./internal/c/c_compiler/"
echo Building library 'LibQB'
cd internal\c\libqb\os\win

View file

@ -1,29 +0,0 @@
#!/bin/bash
buildPlatform=$1
case "$buildPlatform" in
windows-latest)
filename="qb64_win-$PLATFORM.7z"
cd ..
7z a "-xr@QB64pe\.ci\common-exclusion.list" "-xr@QB64pe\.ci\win-exclusion.list" "$filename" "QB64pe"
;;
ubuntu-latest)
filename="qb64_lnx.tar.gz"
cd ..
tar --create --auto-compress --file ${filename} --exclude-from=./QB64pe/.ci/common-exclusion.list --exclude-from=./QB64pe/.ci/lnx-exclusion.list ./QB64pe
;;
macos-latest)
filename="qb64_osx.tar.gz"
cd ..
tar --create --auto-compress --file ${filename} --exclude-from=./QB64pe/.ci/common-exclusion.list --exclude-from=./QB64pe/.ci/osx-exclusion.list ./QB64pe
;;
esac
mv "./$filename" "./QB64pe/"

69
.ci/make-dist.sh Executable file
View file

@ -0,0 +1,69 @@
#!/bin/bash
buildPlatform=$1
format=
ARCHIVE_ROOT=qb64
DIST_ROOT=./dist/$ARCHIVE_ROOT
mkdir -p $DIST_ROOT
mkdir -p $DIST_ROOT/internal
mkdir -p $DIST_ROOT/internal/c
cp -rp ./source $DIST_ROOT
cp -rp ./licenses $DIST_ROOT
cp ./CHANGELOG.md $DIST_ROOT
cp ./COPYING.txt $DIST_ROOT
cp ./README.md $DIST_ROOT
cp ./qb64.1 $DIST_ROOT
cp -rp ./internal/source $DIST_ROOT/internal/
cp -rp ./internal/help $DIST_ROOT/internal/
cp -rp ./internal/support $DIST_ROOT/internal/
cp -rp ./internal/temp $DIST_ROOT/internal/
cp ./internal/config.ini $DIST_ROOT/internal/
cp ./internal/version.txt $DIST_ROOT/internal/
cp ./internal/clean.bat $DIST_ROOT/internal/
cp -rp ./internal/c/libqb $DIST_ROOT/internal/c/
cp -rp ./internal/c/parts $DIST_ROOT/internal/c/
cp -p ./internal/c/* $DIST_ROOT/internal/c/
case "$buildPlatform" in
windows-latest)
filename="qb64_win-$PLATFORM.7z"
format=7zip
cp ./qb64.exe $DIST_ROOT
;;
ubuntu-latest)
filename="qb64_lnx.tar.gz"
format=tar
cp -p ./qb64 $DIST_ROOT
cp -p ./setup_lnx.sh $DIST_ROOT
;;
macos-latest)
filename="qb64_osx.tar.gz"
format=tar
cp -p ./qb64_start.command $DIST_ROOT
cp -p ./qb64.1 $DIST_ROOT
cp -p ./setup_osx.command $DIST_ROOT
;;
esac
cd ./dist
case "$format" in
7zip)
7z a "../$filename" ./$ARCHIVE_ROOT
;;
tar)
tar --create --auto-compress --file ../${filename} ./$ARCHIVE_ROOT
;;
esac

View file

@ -60,7 +60,7 @@ jobs:
- name: Create QB64 Artifact
shell: bash
run: .ci/deploy.sh ${{ matrix.os }}
run: .ci/make-dist.sh ${{ matrix.os }}
- uses: actions/upload-artifact@v3
with:

2
.gitignore vendored
View file

@ -14,3 +14,5 @@ internal/c/qbx[2-9].cpp
*.ttf
/run_qb64.sh
/qb64
mingw32.exe
mingw64.exe

View file

@ -1 +0,0 @@
!*.exe

Binary file not shown.

Binary file not shown.

View file

@ -12,13 +12,17 @@ del /q /s internal\temp\*.* >nul 2>nul
mkdir internal\c\c_compiler
if exist internal\c\c_compiler\bin\c++.exe goto skipccompsetup
cd internal\c\mingw
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set MINGW=mingw32.exe || set MINGW=mingw64.exe
set url="https://www.qb64phoenix.com/qb64_files/%MINGW%"
echo Downloading %url%...
curl %url% -o %MINGW%
echo Extracting %MINGW% as C++ Compiler
@echo off
%MINGW% -y -o"..\c_compiler\"
%MINGW% -y -o"./internal/c/c_compiler/"
cd ../../..
:skipccompsetup
echo Building library 'LibQB'