Newbie - Compiler Question

Just starting out? Need help? Post your questions and find answers here.
ghopkins
New User
New User
Posts: 7
Joined: Mon Nov 24, 2003 10:01 pm

Newbie - Compiler Question

Post 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
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Re: Newbie - Compiler Question

Post 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
StarHawk
User
User
Posts: 55
Joined: Sun Nov 02, 2003 7:27 am

Re: Newbie - Compiler Question

Post 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/
ghopkins
New User
New User
Posts: 7
Joined: Mon Nov 24, 2003 10:01 pm

Re: Newbie - Compiler Question

Post 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
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Re: Newbie - Compiler Question

Post 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 :)
SPAMINATOR NR.1
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post 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/
SPAMINATOR NR.1
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post 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!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Jan2004
Enthusiast
Enthusiast
Posts: 163
Joined: Fri Jan 07, 2005 7:17 pm

Post 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 ?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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"
Jan2004
Enthusiast
Enthusiast
Posts: 163
Joined: Fri Jan 07, 2005 7:17 pm

Post by Jan2004 »

Thanks. Now I understand more (but not all).
Post Reply