diff --git a/Makefile b/Makefile index eff339d19..9c13848a3 100644 --- a/Makefile +++ b/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 $@ diff --git a/docs/build-system.md b/docs/build-system.md index 7894112a8..e2dea76c4 100644 --- a/docs/build-system.md +++ b/docs/build-system.md @@ -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. | diff --git a/source/qb64pe.bas b/source/qb64pe.bas index b5d2e536f..77e7af112 100644 --- a/source/qb64pe.bas +++ b/source/qb64pe.bas @@ -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" @@ -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,18 @@ 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)) + 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 IF Debug THEN PRINT #9, "Beginning generation of code for saving/sharing common array data..." @@ -12600,7 +12574,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"