Page 1 of 1

Newbie - Compiler Question

Posted: Mon Dec 01, 2003 1:04 pm
by ghopkins
One quick question regarding PureBasic.

If I was to write a program that either displayed a graphic (GIF, JPEG, etc) or played an audio file (wave, midi, mp3, etc) will those files be compressed into the final executable (exe)?
Or, will they be external and just called by the exe during the run?

Can someone tell me what actually gets compiled and what doesn't? Thanks!

Can someone tell me how they create installs for their programs? Is this a feature built in PB, as I didn't find it in my first look? Typically, what files need to be included when a program is installed? I guess I used to VB and all those nice files and runtime that must be included in order to make a small (under 100k) file actually run. :roll:

Thanks, again!

-Greg

Re: Newbie - Compiler Question

Posted: Mon Dec 01, 2003 1:25 pm
by freedimension
ghopkins wrote:One quick question regarding PureBasic.

If I was to write a program that either displayed a graphic (GIF, JPEG, etc) or played an audio file (wave, midi, mp3, etc) will those files be compressed into the final executable (exe)?
Or, will they be external and just called by the exe during the run?

Can someone tell me what actually gets compiled and what doesn't? Thanks!
It depends. You can do both. If you just load a file, let's say an image with LoadImage(...) then the file is held externally. But you can also include Files with IncludeBinary. Doing so, the files will be linked into the executable and can be refetched, for example with CatchImage or CatchSound.
Hope I could enlighten you
free

Re: Newbie - Compiler Question

Posted: Tue Dec 02, 2003 4:03 pm
by StarHawk
ghopkins wrote:Can someone tell me how they create installs for their programs? Is this a feature built in PB, as I didn't find it in my first look? Typically, what files need to be included when a program is installed? I guess I used to VB and all those nice files and runtime that must be included in order to make a small (under 100k) file actually run.
-Greg
I use Thinstall. The features are too numerous to list, suffice to say your installation is packed into a single .exe that is encrypted, hack proof, license key protected (you can interact with environmental variables from inside of Purebasic with Thinstall so your program can be made to do certain things if your program is "licensed" or "registered" or not), and locked to a certain machine. The installation stays compressed at all times, even after installing, and your program is converted to use the "virtual operating system" so that your .exe contents are never extracted to the hard drive but instead in a virtual folder. Over 300 of the most common API commands such as CreateWindow, DestroyWindow, etc... are processed by the virtual operating system and not Windows for ultra security (so setting break points with a program like SoftIce is very difficult as many common API break points such as CreateWindow or memcpy are not processed by the operating system and therefore do not exist to SoftIce).

Thinstall is used by the IRS, and the U.S. Department of Defense to name a few. To date no one has cracked or hacked an .exe created with Thinstall.

Thinstall is very expensive and is a professional solution and not for the hobbyist. You asked what some people are using and now I've told you. You can check them out at http://thinstall.com/

Re: Newbie - Compiler Question

Posted: Tue Dec 02, 2003 4:20 pm
by ghopkins
StarHawk wrote:Thinstall is very expensive and is a professional solution and not for the hobbyist. You asked what some people are using and now I've told you. You can check them out at http://thinstall.com/
Terrific! Thank you. I had not heard of Thinstall, so I will certainly check it out. It may be out of my league regarding the price. however, things are getting better each day, so you never know.

Thanks very much for this information. :D

All the best,
Greg

Re: Newbie - Compiler Question

Posted: Tue Dec 02, 2003 4:22 pm
by Rings
StarHawk wrote: To date no one has cracked or hacked an .exe created with Thinstall.
are you sure ?

ps. if you are right i should give it a try, i like competition :)

Posted: Tue Dec 02, 2003 5:00 pm
by Rings
after some minutes of evaluating :

Thinstall is a nice piece of software. They (Jonathan Clark) did a very good job with the virtual File- and Registry system.

btw for those who are interested:

ThInstall patches the import-table with its own file/registry functions to emulate the virtual system and its not uncrackable :)
read more at: http://jonathanclark.com/diary/thinstall/

Posted: Tue Dec 02, 2003 11:04 pm
by Karbon
It certainly isn't uncrackable but it is a very nice step in that direction. Jonathan is very kind regarding payment options - he'll work with you if you ask!

Posted: Mon Apr 03, 2006 7:15 pm
by Jan2004
Who will enlight me how to include bmp into exe with the following code:

Code: Select all

      If LoadImage(#obraz_wpis, "dane.bmp") 
        ImageGadget(#obraz_wpis, 10,6,350,80,UseImage(#obraz_wpis), #PB_Image_Border)
      EndIf
Where to write IncludeBinary line ? Before the above code or after.
Show me how to make it, writting a few lines of code, please.

Is it possible at all or - as suggested in this topis - only with thinstall ?

Posted: Mon Apr 03, 2006 7:56 pm
by Trond
Did you even read the thread before replying. To use a file included in the exe you need to use CatchImage(). :roll:

Code: Select all

#obraz_wpis = 0

OpenWindow(0, 0, 0, 400, 300, #PB_Window_ScreenCentered | #PB_Window_SystemMenu, "")
CreateGadgetList(WindowID(0))
If CatchImage(#obraz_wpis, ?Image) 
  ImageGadget(#obraz_wpis, 10,6,350,80,UseImage(#obraz_wpis), #PB_Image_Border) 
EndIf

Repeat
  Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      Break
  EndSelect
ForEver

End
Image: IncludeBinary "c:\map.bmp"

Posted: Tue Apr 04, 2006 6:02 am
by Jan2004
Thanks. Now I understand more (but not all).