mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-05 01:50:25 +00:00
Merge pull request #22 from DualBrain/master
The road to 2.1.1 begins...
This commit is contained in:
commit
36c7cc9798
|
@ -1,11 +1,9 @@
|
||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
|
||||||
|
|
||||||
rem cd internal\c
|
if not exist .ci (cd ..)
|
||||||
rem set MINGW=mingw32
|
if not exist .ci exit /b 1
|
||||||
rem IF "%PLATFORM%"=="x64" set MINGW=mingw64
|
|
||||||
rem ren %MINGW% c_compiler
|
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||||
rem cd ../..
|
|
||||||
|
|
||||||
rem Check if the C++ compiler is there and skip downloading if it exists
|
rem Check if the C++ compiler is there and skip downloading if it exists
|
||||||
if exist internal\c\c_compiler\bin\c++.exe goto skipccompsetup
|
if exist internal\c\c_compiler\bin\c++.exe goto skipccompsetup
|
||||||
|
@ -14,14 +12,16 @@ rem Create the c_compiler directory that should contain the mingw binaries
|
||||||
mkdir internal\c\c_compiler
|
mkdir internal\c\c_compiler
|
||||||
|
|
||||||
rem Check the processor type and then set the MINGW variable to correct mingw filename
|
rem Check the processor type and then set the MINGW variable to correct mingw filename
|
||||||
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set MINGW=mingw32 || set MINGW=mingw64
|
rem reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set MINGW=mingw32 ||
|
||||||
|
|
||||||
|
set MINGW=mingw64
|
||||||
|
|
||||||
rem Set the correct file to download based on processor type
|
rem Set the correct file to download based on processor type
|
||||||
if "%MINGW%"=="mingw64" (
|
rem if "%MINGW%"=="mingw64" (
|
||||||
set url="https://github.com/niXman/mingw-builds-binaries/releases/download/12.1.0-rt_v10-rev3/x86_64-12.1.0-release-win32-seh-rt_v10-rev3.7z"
|
set url="https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev0/x86_64-12.2.0-release-win32-seh-rt_v10-rev0.7z"
|
||||||
) else (
|
rem ) else (
|
||||||
set url="https://github.com/niXman/mingw-builds-binaries/releases/download/12.1.0-rt_v10-rev3/i686-12.1.0-release-win32-sjlj-rt_v10-rev3.7z"
|
rem set url="https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev0/i686-12.2.0-release-win32-sjlj-rt_v10-rev0.7z"
|
||||||
)
|
rem )
|
||||||
|
|
||||||
echo Downloading %url%...
|
echo Downloading %url%...
|
||||||
curl -L %url% -o temp.7z
|
curl -L %url% -o temp.7z
|
||||||
|
@ -71,4 +71,3 @@ cd internal\c
|
||||||
c_compiler\bin\windres.exe -i ..\temp\icon.rc -o ..\temp\icon.o
|
c_compiler\bin\windres.exe -i ..\temp\icon.rc -o ..\temp\icon.o
|
||||||
c_compiler\bin\g++ -mconsole -s -Wfatal-errors -w -Wall qbx.cpp libqb\os\win\libqb_setup.o ..\temp\icon.o -D DEPENDENCY_LOADFONT parts\video\font\ttf\os\win\src.o -D DEPENDENCY_SOCKETS -D DEPENDENCY_NO_PRINTER -D DEPENDENCY_ICON -D DEPENDENCY_NO_SCREENIMAGE parts\core\os\win\src.a -lopengl32 -lglu32 -mwindows -static-libgcc -static-libstdc++ -D GLEW_STATIC -D FREEGLUT_STATIC -lws2_32 -lwinmm -lgdi32 -o "..\..\qb64_bootstrap.exe"
|
c_compiler\bin\g++ -mconsole -s -Wfatal-errors -w -Wall qbx.cpp libqb\os\win\libqb_setup.o ..\temp\icon.o -D DEPENDENCY_LOADFONT parts\video\font\ttf\os\win\src.o -D DEPENDENCY_SOCKETS -D DEPENDENCY_NO_PRINTER -D DEPENDENCY_ICON -D DEPENDENCY_NO_SCREENIMAGE parts\core\os\win\src.a -lopengl32 -lglu32 -mwindows -static-libgcc -static-libstdc++ -D GLEW_STATIC -D FREEGLUT_STATIC -lws2_32 -lwinmm -lgdi32 -o "..\..\qb64_bootstrap.exe"
|
||||||
IF ERRORLEVEL 1 exit /b 1
|
IF ERRORLEVEL 1 exit /b 1
|
||||||
|
|
||||||
|
|
64
.ci/bootstrap32.bat
Normal file
64
.ci/bootstrap32.bat
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
if not exist .ci (cd ..)
|
||||||
|
if not exist .ci exit /b 1
|
||||||
|
|
||||||
|
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
|
rem Check if the C++ compiler is there and skip downloading if it exists
|
||||||
|
if exist internal\c\c_compiler\bin\c++.exe goto skipccompsetup
|
||||||
|
|
||||||
|
rem Create the c_compiler directory that should contain the mingw binaries
|
||||||
|
mkdir internal\c\c_compiler
|
||||||
|
|
||||||
|
set MINGW=mingw32
|
||||||
|
set url="https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev0/i686-12.2.0-release-win32-sjlj-rt_v10-rev0.7z"
|
||||||
|
|
||||||
|
echo Downloading %url%...
|
||||||
|
curl -L %url% -o temp.7z
|
||||||
|
|
||||||
|
echo Downloading 7zr.exe...
|
||||||
|
curl -L https://www.7-zip.org/a/7zr.exe -o 7zr.exe
|
||||||
|
|
||||||
|
echo Extracting C++ Compiler...
|
||||||
|
7zr.exe x temp.7z -y
|
||||||
|
|
||||||
|
echo Moving C++ compiler...
|
||||||
|
for /f %%a in ('dir %MINGW% /b') do move /y "%MINGW%\%%a" internal\c\c_compiler\
|
||||||
|
|
||||||
|
echo Cleaning up..
|
||||||
|
rd %MINGW%
|
||||||
|
del 7zr.exe
|
||||||
|
del temp.7z
|
||||||
|
|
||||||
|
:skipccompsetup
|
||||||
|
|
||||||
|
echo Building library 'LibQB'
|
||||||
|
cd internal\c\libqb\os\win
|
||||||
|
call setup_build.bat
|
||||||
|
IF ERRORLEVEL 1 exit /b 1
|
||||||
|
|
||||||
|
cd ..\..\..\..\..
|
||||||
|
|
||||||
|
echo Building library 'FreeType'
|
||||||
|
cd internal\c\parts\video\font\ttf\os\win
|
||||||
|
call setup_build.bat
|
||||||
|
IF ERRORLEVEL 1 exit /b 1
|
||||||
|
|
||||||
|
cd ..\..\..\..\..\..\..\..
|
||||||
|
|
||||||
|
echo Building library 'Core:FreeGLUT'
|
||||||
|
cd internal\c\parts\core\os\win
|
||||||
|
call setup_build.bat
|
||||||
|
IF ERRORLEVEL 1 exit /b 1
|
||||||
|
|
||||||
|
cd ..\..\..\..\..\..
|
||||||
|
|
||||||
|
echo Bootstrapping QB64
|
||||||
|
copy internal\source\*.* internal\temp\ >nul
|
||||||
|
copy source\qb64.ico internal\temp\ >nul
|
||||||
|
copy source\icon.rc internal\temp\ >nul
|
||||||
|
cd internal\c
|
||||||
|
c_compiler\bin\windres.exe -i ..\temp\icon.rc -o ..\temp\icon.o
|
||||||
|
c_compiler\bin\g++ -mconsole -s -Wfatal-errors -w -Wall qbx.cpp libqb\os\win\libqb_setup.o ..\temp\icon.o -D DEPENDENCY_LOADFONT parts\video\font\ttf\os\win\src.o -D DEPENDENCY_SOCKETS -D DEPENDENCY_NO_PRINTER -D DEPENDENCY_ICON -D DEPENDENCY_NO_SCREENIMAGE parts\core\os\win\src.a -lopengl32 -lglu32 -mwindows -static-libgcc -static-libstdc++ -D GLEW_STATIC -D FREEGLUT_STATIC -lws2_32 -lwinmm -lgdi32 -o "..\..\qb64_bootstrap.exe"
|
||||||
|
IF ERRORLEVEL 1 exit /b 1
|
|
@ -1,3 +1,8 @@
|
||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
if not exist .ci (cd ..)
|
||||||
|
if not exist .ci exit /b 1
|
||||||
|
|
||||||
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
echo Compiling new QB64
|
echo Compiling new QB64
|
||||||
|
|
|
@ -6,6 +6,9 @@ appveyor.yml
|
||||||
.git
|
.git
|
||||||
.gitignore
|
.gitignore
|
||||||
.github
|
.github
|
||||||
|
build.bat
|
||||||
|
findcurl.cmd
|
||||||
|
reset.cmd
|
||||||
setup_win.bat
|
setup_win.bat
|
||||||
internal/c/mingw32
|
internal/c/mingw32
|
||||||
internal/c/mingw64
|
internal/c/mingw64
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
|
|
||||||
|
if not exist .ci (cd ..)
|
||||||
|
if not exist .ci exit /b 1
|
||||||
|
|
||||||
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
if defined GITHUB_SHA (echo From git %GITHUB_SHA:~0,7% > internal\version.txt)
|
if defined GITHUB_SHA (echo From git %GITHUB_SHA:~0,7% > internal\version.txt)
|
||||||
|
|
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: upload linux ${{ github.run_number }}
|
name: qb64_${{ github.ref_name }}_${{ github.sha }}_lnx
|
||||||
path: /home/runner/work/qb64/qb64_*.tar.gz
|
path: /home/runner/work/qb64/qb64_*.tar.gz
|
||||||
|
|
||||||
macos-build:
|
macos-build:
|
||||||
|
@ -42,7 +42,7 @@ jobs:
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: upload macos ${{ github.run_number }}
|
name: qb64_${{ github.ref_name }}_${{ github.sha }}_osx
|
||||||
path: /Users/runner/work/qb64/qb64_*.tar.gz
|
path: /Users/runner/work/qb64/qb64_*.tar.gz
|
||||||
|
|
||||||
windows-x86-build:
|
windows-x86-build:
|
||||||
|
@ -53,7 +53,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Bootstrap compiler
|
- name: Bootstrap compiler
|
||||||
run: .ci/bootstrap.bat
|
run: .ci/bootstrap32.bat
|
||||||
- name: Compile
|
- name: Compile
|
||||||
run: .ci/compile.bat
|
run: .ci/compile.bat
|
||||||
- name: Publish
|
- name: Publish
|
||||||
|
@ -63,11 +63,9 @@ jobs:
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: upload winx86 ${{ github.run_number }}
|
name: qb64_${{ github.ref_name }}_${{ github.sha }}_win-x86
|
||||||
path: D:\a\qb64\qb64_*.7z
|
path: D:\a\qb64\qb64_*.7z
|
||||||
|
|
||||||
# path: ${{ github.workspace }}\qb64_*.7z
|
|
||||||
|
|
||||||
windows-x64-build:
|
windows-x64-build:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
if: "!contains(github.event.head_commit.message, 'ci-skip')"
|
if: "!contains(github.event.head_commit.message, 'ci-skip')"
|
||||||
|
@ -85,5 +83,8 @@ jobs:
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: upload winx64 ${{ github.run_number }}
|
name: qb64_${{ github.ref_name }}_${{ github.sha }}_win-x64
|
||||||
path: D:\a\qb64\qb64_*.7z
|
path: D:\a\qb64\qb64_*.7z
|
||||||
|
|
||||||
|
# ${{ github.event.repository.updated_at }}
|
||||||
|
# path: ${{ github.workspace }}\qb64_*.7z
|
|
@ -18547,24 +18547,24 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
||||||
//Creating/destroying an image surface:
|
//Creating/destroying an image surface:
|
||||||
|
|
||||||
int32 func__newimage(int32 x,int32 y,int32 bpp,int32 passed){
|
int32 func__newimage(int32 x,int32 y,int32 bpp,int32 passed){
|
||||||
#ifdef QB64_WINDOWS
|
// #ifdef QB64_WINDOWS
|
||||||
#if WINVER >= 0x0600 //this block is not compatible with XP
|
// #if WINVER >= 0x0600 //this block is not compatible with XP
|
||||||
static bool j;
|
// static bool j;
|
||||||
if(j != 1){
|
// if(j != 1){
|
||||||
FARPROC dpiaware;
|
// FARPROC dpiaware;
|
||||||
HMODULE user32 = LoadLibrary(TEXT("user32.dll"));
|
// HMODULE user32 = LoadLibrary(TEXT("user32.dll"));
|
||||||
if(user32 != NULL){
|
// if(user32 != NULL){
|
||||||
dpiaware = GetProcAddress(user32, "SetProcessDPIAware");
|
// dpiaware = GetProcAddress(user32, "SetProcessDPIAware");
|
||||||
if(NULL != dpiaware){
|
// if(NULL != dpiaware){
|
||||||
(dpiaware) ();
|
// (dpiaware) ();
|
||||||
j = 1;
|
// j = 1;
|
||||||
FreeLibrary(user32);
|
// FreeLibrary(user32);
|
||||||
}
|
// }
|
||||||
FreeLibrary(user32);
|
// FreeLibrary(user32);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
#endif
|
// #endif
|
||||||
#endif
|
// #endif
|
||||||
static int32 i;
|
static int32 i;
|
||||||
if (new_error) return 0;
|
if (new_error) return 0;
|
||||||
if (x<=0||y<=0){error(5); return 0;}
|
if (x<=0||y<=0){error(5); return 0;}
|
||||||
|
|
36691
internal/source/main.txt
36691
internal/source/main.txt
File diff suppressed because it is too large
Load diff
|
@ -38,18 +38,38 @@ del /q /s internal\temp\*.* >nul 2>nul
|
||||||
rem Check if the C++ compiler is there and skip downloading if it exists
|
rem Check if the C++ compiler is there and skip downloading if it exists
|
||||||
if exist internal\c\c_compiler\bin\c++.exe goto skipccompsetup
|
if exist internal\c\c_compiler\bin\c++.exe goto skipccompsetup
|
||||||
|
|
||||||
rem Create the c_compiler directory that should contain the mingw binaries
|
rem Create the c_compiler directory that should contain the MINGW binaries
|
||||||
mkdir internal\c\c_compiler
|
mkdir internal\c\c_compiler
|
||||||
|
|
||||||
rem Check the processor type and then set the MINGW variable to correct mingw filename
|
rem Check the processor type and then set the MINGW variable to correct MINGW filename
|
||||||
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set MINGW=mingw32 || set MINGW=mingw64
|
|
||||||
|
|
||||||
rem Set the correct file to download based on processor type
|
rem reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set MINGW=mingw32 || set MINGW=mingw64
|
||||||
if "%MINGW%"=="mingw64" (
|
rem
|
||||||
set url="https://github.com/niXman/mingw-builds-binaries/releases/download/12.1.0-rt_v10-rev3/x86_64-12.1.0-release-win32-seh-rt_v10-rev3.7z"
|
rem rem Set the correct file to download based on processor type
|
||||||
) else (
|
rem if "%MINGW%"=="mingw64" (
|
||||||
set url="https://github.com/niXman/mingw-builds-binaries/releases/download/12.1.0-rt_v10-rev3/i686-12.1.0-release-win32-sjlj-rt_v10-rev3.7z"
|
rem set url="https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev0/x86_64-12.2.0-release-win32-seh-rt_v10-rev0.7z"
|
||||||
)
|
rem ) else (
|
||||||
|
rem set url="https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev0/i686-12.2.0-release-win32-sjlj-rt_v10-rev0.7z"
|
||||||
|
rem )
|
||||||
|
|
||||||
|
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && goto chose32 || goto choose
|
||||||
|
|
||||||
|
:choose
|
||||||
|
choice /c 12 /M "Use (1) 64-bit or (2) 32-bit MINGW? "
|
||||||
|
if errlevel == 1 goto chose64
|
||||||
|
goto chose32
|
||||||
|
|
||||||
|
:chose32
|
||||||
|
set url="https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev0/i686-12.2.0-release-win32-sjlj-rt_v10-rev0.7z"
|
||||||
|
set MINGW=mingw32
|
||||||
|
goto chosen
|
||||||
|
|
||||||
|
:chose64
|
||||||
|
set url="https://github.com/niXman/mingw-builds-binaries/releases/download/12.2.0-rt_v10-rev0/x86_64-12.2.0-release-win32-seh-rt_v10-rev0.7z"
|
||||||
|
set MINGW=mingw64
|
||||||
|
goto chosen
|
||||||
|
|
||||||
|
:chosen
|
||||||
|
|
||||||
echo Downloading %url%...
|
echo Downloading %url%...
|
||||||
curl -L %url% -o temp.7z
|
curl -L %url% -o temp.7z
|
||||||
|
|
|
@ -2,7 +2,7 @@ DIM SHARED Version AS STRING
|
||||||
DIM SHARED DevChannel AS STRING
|
DIM SHARED DevChannel AS STRING
|
||||||
DIM SHARED AutoBuildMsg AS STRING
|
DIM SHARED AutoBuildMsg AS STRING
|
||||||
|
|
||||||
Version$ = "2.1"
|
Version$ = "2.1.1"
|
||||||
DevChannel$ = "Development Build"
|
DevChannel$ = "Development Build"
|
||||||
IF _FILEEXISTS("internal/version.txt") THEN
|
IF _FILEEXISTS("internal/version.txt") THEN
|
||||||
versionfile = FREEFILE
|
versionfile = FREEFILE
|
||||||
|
|
|
@ -5207,8 +5207,12 @@ FUNCTION ide2 (ignore)
|
||||||
IF menu$(m, s) = "#About..." THEN
|
IF menu$(m, s) = "#About..." THEN
|
||||||
helpabout:
|
helpabout:
|
||||||
PCOPY 2, 0
|
PCOPY 2, 0
|
||||||
m$ = "QB64 Version " + Version$ + CHR$(10) + DevChannel$
|
m$ = "QB64 Version " + Version$ '+ CHR$(10) + DevChannel$
|
||||||
IF LEN(AutoBuildMsg$) THEN m$ = m$ + CHR$(10) + AutoBuildMsg$
|
IF LEN(AutoBuildMsg$) THEN
|
||||||
|
m$ = m$ + CHR$(10) + AutoBuildMsg$
|
||||||
|
ELSE
|
||||||
|
m$ = m$ + CHR$(10) + DevChannel$
|
||||||
|
END IF
|
||||||
result = idemessagebox("About", m$, "")
|
result = idemessagebox("About", m$, "")
|
||||||
PCOPY 3, 0: SCREEN , , 3, 0
|
PCOPY 3, 0: SCREEN , , 3, 0
|
||||||
GOTO ideloop
|
GOTO ideloop
|
||||||
|
|
Loading…
Reference in a new issue