Page 1 of 1

how do you store file bigger 100MB with IncludeBinary ?

Posted: Tue Oct 17, 2023 7:21 am
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 
 

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

Posted: Tue Oct 17, 2023 8:52 am
by BarryG
Split the file into 9 MB chunks, then IncludeBinary each, then re-join after all are extracted.

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

Posted: Tue Oct 17, 2023 9:38 am
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?

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

Posted: Tue Oct 17, 2023 10:06 am
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.

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

Posted: Tue Oct 17, 2023 2:49 pm
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.

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

Posted: Tue Oct 24, 2023 2:48 am
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 ?

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

Posted: Tue Oct 24, 2023 7:25 am
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.

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

Posted: Tue Oct 24, 2023 5:44 pm
by novablue
Same problem here seems like it is a limitation with the linker.

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

Posted: Wed Oct 25, 2023 4:06 am
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.