mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-20 05:34:47 +00:00
commit
ab23b0f773
4 changed files with 28 additions and 54 deletions
8
Makefile
8
Makefile
|
@ -373,15 +373,10 @@ ifeq ($(OS),win)
|
|||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(filter y,$(DEP_DATA)),)
|
||||
EXE_OBJS += $(PATH_INTERNAL_TEMP)/data.o
|
||||
endif
|
||||
|
||||
ifneq ($(filter y,$(DEP_EMBED)),)
|
||||
EXE_OBJS += $(PATH_INTERNAL_TEMP)/embedded.o
|
||||
endif
|
||||
|
||||
|
||||
QBLIB := $(PATH_INTERNAL_C)/$(QBLIB_NAME).o
|
||||
|
||||
$(QBLIB): $(PATH_INTERNAL_C)/libqb.cpp
|
||||
|
@ -408,9 +403,6 @@ ifeq ($(OS),osx)
|
|||
$(CXX) $(CXXFLAGS) $< -c -o $@
|
||||
endif
|
||||
|
||||
$(PATH_INTERNAL_TEMP)/data.o: $(PATH_INTERNAL_TEMP)/data.bin
|
||||
$(OBJCOPY) -Ibinary $(OBJCOPY_FLAGS) $< $@
|
||||
|
||||
$(PATH_INTERNAL_TEMP)/embedded.o: $(PATH_INTERNAL_TEMP)/embedded.cpp
|
||||
$(CXX) $(CXXFLAGS) $< -c -o $@
|
||||
|
||||
|
|
|
@ -128,7 +128,6 @@ These flags controls whether certain dependencies are compiled in or not. All of
|
|||
| `DEP_FONT` | Enables various `_FONT` related support. |
|
||||
| `DEP_DEVICEINPUT` | Enables game controller input support. |
|
||||
| `DEP_ZLIB` | Adds `_DEFLATE` and `_INFLATE` support. |
|
||||
| `DEP_DATA` | Compiles in data produced via `DATA` statements. |
|
||||
| `DEP_EMBED` | Compiles in data embedded via `$EMBED` statements. |
|
||||
| `DEP_CONSOLE` | On Windows, this gives the program console support (graphical support is still allowed) |
|
||||
| `DEP_CONSOLE_ONLY` | Same as `DEP_CONSOLE`, but also removes GLUT and graphics support. |
|
||||
|
|
|
@ -68,11 +68,11 @@ rem MINGW_DIR is actually the internal directory name inside the zip / 7z file
|
|||
rem It needs to be updated whenever the toolchains are updated
|
||||
if "%ARCH%" == "ARM" (
|
||||
if %BITS% == 64 (
|
||||
set URL="https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-ucrt-aarch64.zip"
|
||||
set MINGW_DIR=llvm-mingw-20231128-ucrt-aarch64
|
||||
set URL="https://github.com/mstorsjo/llvm-mingw/releases/download/20240320/llvm-mingw-20240320-ucrt-aarch64.zip"
|
||||
set MINGW_DIR=llvm-mingw-20240320-ucrt-aarch64
|
||||
) else (
|
||||
set URL="https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-ucrt-armv7.zip"
|
||||
set MINGW_DIR=llvm-mingw-20231128-ucrt-armv7
|
||||
set URL="https://github.com/mstorsjo/llvm-mingw/releases/download/20240320/llvm-mingw-20240320-ucrt-armv7.zip"
|
||||
set MINGW_DIR=llvm-mingw-20240320-ucrt-armv7
|
||||
)
|
||||
set MINGW_TEMP_FILE=temp.zip
|
||||
) else (
|
||||
|
|
|
@ -221,8 +221,6 @@ IF INSTR(_OS$, "[LINUX]") THEN os$ = "LNX"
|
|||
DIM SHARED MacOSX AS LONG
|
||||
IF INSTR(_OS$, "[MACOSX]") THEN MacOSX = 1
|
||||
|
||||
DIM SHARED inline_DATA
|
||||
IF MacOSX OR INSTR(_OS$, "[ARM]") THEN inline_DATA = 1
|
||||
|
||||
DIM SHARED BATCHFILE_EXTENSION AS STRING
|
||||
BATCHFILE_EXTENSION = ".bat"
|
||||
|
@ -230,7 +228,7 @@ IF os$ = "LNX" THEN BATCHFILE_EXTENSION = ".sh"
|
|||
IF MacOSX THEN BATCHFILE_EXTENSION = ".command"
|
||||
|
||||
|
||||
DIM inlinedatastr(255) AS STRING
|
||||
DIM inlinedatastr(0 TO 255) AS STRING
|
||||
FOR i = 0 TO 255
|
||||
inlinedatastr(i) = str2$(i) + ","
|
||||
NEXT
|
||||
|
@ -440,7 +438,7 @@ END IF
|
|||
'255 A qb error happened in the IDE (compiler->ide)
|
||||
' note: detected by the fact that ideerror was not set to 0
|
||||
' [255]
|
||||
'$include:'./utilities/hash.bi'
|
||||
'$INCLUDE:'./utilities/hash.bi'
|
||||
|
||||
TYPE Label_Type
|
||||
State AS _UNSIGNED _BYTE '0=label referenced, 1=label created
|
||||
|
@ -11961,42 +11959,28 @@ IF DataOffset = 0 THEN
|
|||
|
||||
ELSE
|
||||
|
||||
IF inline_DATA = 0 THEN
|
||||
IF os$ = "WIN" THEN
|
||||
IF OS_BITS = 32 THEN
|
||||
x$ = CHR$(0): WriteBufRawData DataBinBuf, x$
|
||||
WriteBufLine GlobTxtBuf, "extern " + CHR$(34) + "C" + CHR$(34) + "{"
|
||||
WriteBufLine GlobTxtBuf, "extern char *binary_internal_temp" + tempfolderindexstr2$ + "_data_bin_start;"
|
||||
WriteBufLine GlobTxtBuf, "}"
|
||||
WriteBufLine GlobTxtBuf, "uint8 *data=(uint8*)&binary_internal_temp" + tempfolderindexstr2$ + "_data_bin_start;"
|
||||
ELSE
|
||||
x$ = CHR$(0): WriteBufRawData DataBinBuf, x$
|
||||
WriteBufLine GlobTxtBuf, "extern " + CHR$(34) + "C" + CHR$(34) + "{"
|
||||
WriteBufLine GlobTxtBuf, "extern char *_binary_internal_temp" + tempfolderindexstr2$ + "_data_bin_start;"
|
||||
WriteBufLine GlobTxtBuf, "}"
|
||||
WriteBufLine GlobTxtBuf, "uint8 *data=(uint8*)&_binary_internal_temp" + tempfolderindexstr2$ + "_data_bin_start;"
|
||||
END IF
|
||||
END IF
|
||||
IF os$ = "LNX" THEN
|
||||
x$ = CHR$(0): WriteBufRawData DataBinBuf, x$
|
||||
WriteBufLine GlobTxtBuf, "extern " + CHR$(34) + "C" + CHR$(34) + "{"
|
||||
WriteBufLine GlobTxtBuf, "extern char *_binary_internal_temp" + tempfolderindexstr2$ + "_data_bin_start;"
|
||||
WriteBufLine GlobTxtBuf, "}"
|
||||
WriteBufLine GlobTxtBuf, "uint8 *data=(uint8*)&_binary_internal_temp" + tempfolderindexstr2$ + "_data_bin_start;"
|
||||
END IF
|
||||
ELSE
|
||||
'inline data
|
||||
ff = OpenBuffer%("B", tmpdir$ + "data.bin")
|
||||
x$ = ReadBufRawData$(ff, GetBufLen&(ff))
|
||||
x2$ = "uint8 inline_data[]={"
|
||||
FOR i = 1 TO LEN(x$)
|
||||
x2$ = x2$ + inlinedatastr$(ASC(x$, i))
|
||||
NEXT
|
||||
x2$ = x2$ + "0};"
|
||||
WriteBufLine GlobTxtBuf, x2$
|
||||
WriteBufLine GlobTxtBuf, "uint8 *data=&inline_data[0];"
|
||||
x$ = "": x2$ = ""
|
||||
END IF
|
||||
'inline data
|
||||
ff = OpenBuffer%("B", tmpdir$ + "data.bin")
|
||||
x$ = ReadBufRawData$(ff, GetBufLen&(ff))
|
||||
|
||||
idsL = LEN(inlinedatastr(255))
|
||||
xL = LEN(x$)
|
||||
|
||||
x2$ = SPACE$(xL * idsL) ' pre-allocate buffer
|
||||
|
||||
x2Ofs = 1
|
||||
FOR i = 1 TO xL
|
||||
MID$(x2$, x2Ofs, idsL) = inlinedatastr(ASC(x$, i))
|
||||
x2Ofs = x2Ofs + idsL
|
||||
NEXT
|
||||
|
||||
WriteBufLine GlobTxtBuf, "uint8 inline_data[]={"
|
||||
WriteBufLine GlobTxtBuf, x2$
|
||||
WriteBufLine GlobTxtBuf, "0};"
|
||||
WriteBufLine GlobTxtBuf, "uint8 *data=&inline_data[0];"
|
||||
|
||||
x$ = "": x2$ = ""
|
||||
|
||||
END IF
|
||||
|
||||
IF Debug THEN PRINT #9, "Beginning generation of code for saving/sharing common array data..."
|
||||
|
@ -12600,7 +12584,6 @@ IF DEPENDENCY(DEPENDENCY_SCREENIMAGE) THEN makedeps$ = makedeps$ + " DEP_SCREENI
|
|||
IF DEPENDENCY(DEPENDENCY_LOADFONT) THEN makedeps$ = makedeps$ + " DEP_FONT=y"
|
||||
IF DEPENDENCY(DEPENDENCY_DEVICEINPUT) THEN makedeps$ = makedeps$ + " DEP_DEVICEINPUT=y"
|
||||
IF DEPENDENCY(DEPENDENCY_ZLIB) THEN makedeps$ = makedeps$ + " DEP_ZLIB=y"
|
||||
IF inline_DATA = 0 AND DataOffset THEN makedeps$ = makedeps$ + " DEP_DATA=y"
|
||||
IF DEPENDENCY(DEPENDENCY_EMBED) THEN makedeps$ = makedeps$ + " DEP_EMBED=y"
|
||||
IF ConsoleOn THEN makedeps$ = makedeps$ + " DEP_CONSOLE=y"
|
||||
IF ExeIconSet OR VersionInfoSet THEN makedeps$ = makedeps$ + " DEP_ICON_RC=y"
|
||||
|
|
Loading…
Reference in a new issue