how do you store file bigger 100MB with IncludeBinary ?

Just starting out? Need help? Post your questions and find answers here.
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

how do you store file bigger 100MB with IncludeBinary ?

Post by sec »

how do you store file bigger 100MB with IncludeBinary ? or how break that limit 10MB of example:

Code: Select all

 DataSection
    myinstaller:
    IncludeBinary "C:\myinstaller.zip"
    
 EndDataSection 
 
BarryG
Addict
Addict
Posts: 4178
Joined: Thu Apr 18, 2019 8:17 am

Re: how do you store file bigger 100MB with IncludeBinary ?

Post by BarryG »

Split the file into 9 MB chunks, then IncludeBinary each, then re-join after all are extracted.
User avatar
jacdelad
Addict
Addict
Posts: 2010
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: how do you store file bigger 100MB with IncludeBinary ?

Post by jacdelad »

I didn't know there was a limit...
If I include them one after another, without label between, do I get the whole file again?
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
BarryG
Addict
Addict
Posts: 4178
Joined: Thu Apr 18, 2019 8:17 am

Re: how do you store file bigger 100MB with IncludeBinary ?

Post by BarryG »

jacdelad wrote: Tue Oct 17, 2023 9:38 amIf I include them one after another, without label between, do I get the whole file again?
Yep:

Code: Select all

OpenWindow(0,400,200,0,0,"test",#PB_Window_SystemMenu)

i=CatchImage(0,?image_start,?image_end-?image_start)

ImageGadget(0,0,0,0,0,ImageID(0))

ResizeWindow(0,#PB_Ignore,#PB_Ignore,ImageWidth(0),ImageHeight(0))

Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow

End

DataSection
  image_start:
  IncludeBinary "1of2.bmp"
  IncludeBinary "2of2.bmp"
  image_end:
EndDataSection
Source images (valid for 6 days, but link saved in the Wayback Machine) -> http://web.archive.org/web/202300000000 ... q4hy0gdvmv

Note: The source images are just the PureBasic logo image that I cut in half in a hex editor.
Last edited by BarryG on Tue Oct 24, 2023 10:47 am, edited 1 time in total.
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Re: how do you store file bigger 100MB with IncludeBinary ?

Post by sec »

great.

thank you much.
BarryG wrote: Tue Oct 17, 2023 10:06 am
jacdelad wrote: Tue Oct 17, 2023 9:38 amIf I include them one after another, without label between, do I get the whole file again?
Yep:

Code: Select all

OpenWindow(0,400,200,0,0,"test",#PB_Window_SystemMenu)

i=CatchImage(0,?image_start,?image_end-?image_start)

ImageGadget(0,0,0,0,0,ImageID(0))

ResizeWindow(0,#PB_Ignore,#PB_Ignore,ImageWidth(0),ImageHeight(0))

Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow

End

DataSection
  image_start:
  IncludeBinary "1of2.bmp"
  IncludeBinary "2of2.bmp"
  image_end:
EndDataSection
Source images (valid for 6 days, but link saved in the Wayback Machine) -> https://filebin.net/cjxazfq4hy0gdvmv

Note: The source images are just the PureBasic logo image that I cut in half in a hex editor.
moricode
Enthusiast
Enthusiast
Posts: 162
Joined: Thu May 25, 2023 3:55 am

Re: how do you store file bigger 100MB with IncludeBinary ?

Post by moricode »

the limitation of includebinary has no meaning , seems we could all cut the file to small size , and put in the datasection one by one :


myfile.vob , size 180MB

split in to 20 file , 9MB each

Code: Select all

Datasection 
     movie_start:
     IncludeBinary "1_20.vob"
     IncludeBinary "2_20.vob"
     IncludeBinary "3_20.vob"
     IncludeBinary "4_20.vob"
     IncludeBinary "5_20.vob"
     IncludeBinary "6_20.vob"
     IncludeBinary "7_20.vob"
     IncludeBinary "8_20.vob"
     IncludeBinary "9_20.vob"
     IncludeBinary "10_20.vob"
     IncludeBinary "11_20.vob"
     IncludeBinary "12_20.vob"
     IncludeBinary "13_20.vob"
     IncludeBinary "14_20.vob"
     IncludeBinary "15_20.vob"
     IncludeBinary "16_20.vob"
     IncludeBinary "17_20.vob"
     IncludeBinary "18_20.vob"
     IncludeBinary "19_20.vob"
     IncludeBinary "20_20.vob"
    movie_end:
EndDatasection
; it is same as
Datasection
movie_start:
IncludeBinary "myfile.vob"
movie_end:
EndDatasection

; so , why make limitation without sense , and only mass code in size that can avoid ?
juergenkulow
Enthusiast
Enthusiast
Posts: 581
Joined: Wed Sep 25, 2019 10:18 am

Re: how do you store file bigger 100MB with IncludeBinary ?

Post by juergenkulow »

From how many megabytes upwards the following different errors occur on the various operating systems and compilers: :
Error: Linker error: Internal error: write_executable_image().
cc1.exe runs endless.
Error: Assembler error: out of memory.
Error: Assembler error: Getötet signal terminated program cc1

The answer should be somewhere in the PureBasic documentation.
novablue
Enthusiast
Enthusiast
Posts: 177
Joined: Sun Nov 27, 2016 6:38 am

Re: how do you store file bigger 100MB with IncludeBinary ?

Post by novablue »

Same problem here seems like it is a limitation with the linker.
juergenkulow
Enthusiast
Enthusiast
Posts: 581
Joined: Wed Sep 25, 2019 10:18 am

Re: how do you store file bigger 100MB with IncludeBinary ?

Post by juergenkulow »

novablue wrote: Tue Oct 24, 2023 5:44 pm Same problem here seems like it is a limitation with the linker.
If the error already occurs with gcc cc1 the linker has not been called yet.
Post Reply