Powerpacker final.

Community Forums/Developer Stations/Powerpacker final.

Filax(Posted 2004) [#1]
PowerPacker 1.0 By P.Agnisola (C) 2004


What is powerpacker ?

With powerpacker create easily crypted with RSA and compressed big file for your blitz apps ! You can merge PPK file in your executable
file for distribute your apps and media in one file.

Licence ?

You can use powerpacker for personal or commercial projects :)

But ! you should not distribute the full code or a partial
section of Inc_PowerPacker.bb code without our permission !

Interface :





First Step :

For creating a PPK file :

- Add files by files with the 'ADD ONE FILE' button and click on 'CREATE PPK FILE' or click directly on 'PACK DIRECTORY' button to compress
all the files in a directory in one time (do not include sub directory).

Next a PPK file is created under powerpacker directory...

For merging PPK file in executable file :

- Do the first step for creating PPK file, next click on the 'ADD PACK TO EXE' button, select the ppk file and next select the executable file
the programm, a msgbox ask if you want pack executable file with the exe packer 'UPX' before merging files. Click Yes or No.

What is UPX ? : UPX is a freeware program (http://upx.sourceforge.net/). This program can compress blitz executable files.
For use UPX with powerpacker put the UPX.EXE file in the powerpacker root.

WARNING : If you have some <space> in the executable filename ! UPX bug ! warning !

Next, for distribute your product, you MUST put powerpacker.dll in the executable root !!

Note : After process powerpacker save a little blitz example bb file in the powerpacker root ! for help you to use ppk file "Exemple_PPK.bb"

Security :

Powerpacker use a RSA encoding + compression for protect your files. In the powerpacker GUI you can change the default encoding key !
(You can use anything you like).


How use PPK files ? :

It's really simple to use ! I have wrapped the blitz functions for use PPK files without change your practices :) for example, if you have some
path for loading your model like : MyBitmap=LoadImage("C:\Test\MyMedias\Test.bmp") your can work with PPK file without changing
your path !!

Example MyBitmap=PPK_LoadImage("C:\Test\MyMedias\Test.bmp") work ! your are not obliged to change all your medias
path for use PPK files.



PPK Blitz commands :

PPK_OpenPak(Name$,RSAKey$,OutDir$)
Use this command to init pack file, the optional OutDir parameter can be used for define the ouput path for decrunch files
(by default the windows TEMP directory is used).The RSAKey define en encryption key used (you can use anything you like).

PPK_ClosePack()
Use this command to close PPK file.

PPK_ExtractFile(Name$)
Use this command to only extract a file. if you want to read this file use for example :

PPK_ExtractFile("MyTexte.txt")
MyFile=ReadFile(PPK_ExtractDirectory$+"MyTexte.txt")

PPK_LoadSound(Name$)
Use this command to load a sound file from PPK, example :

MySound=PPK_LoadSound("MySound.mp3')

PPK_Load3DSound(Name$)
Use this command to load a sound 3D file from PPK, example :

MySound=PPK_Load3DSound("MySound.mp3')

PPK_PlayMusic(Name$)
Use this command to play a music file from PPK, example :

MyMusic=PPK_PlayMusic("MySound.mp3')

PPK_LoadTerrain(Name$,Parent=0)
Use this command to create a terrain from PPK, example :

MyTerrain=PPK_LoadTerrain("MyTerrain.bmp")

PPK_LoadImage(Name$)
Use this command to load an image file from PPK, example :

MyImage=PPK_LoadImage("Bitmap.bmp')

PPK_LoadSprite(Name$,Flags=0,Parent=0)
Use this command to load a sprite file from PPK, example :

MySprite=PPK_LoadSprite("Sprite.bmp')

PPK_LoadBrush(Name$,Flags=0,U_Scale=1,V_Scale=1)
Use this command to load a brush file from PPK, example :

MyBrush=PPK_LoadBrush("Bitmap.bmp',1+2)

PPK_LoadTexture(Name$,Flags=1)
Use this command to load a texture file from PPK, example :

MyTexture=PPK_LoadTexture("Bitmap.bmp',2+512+256)

PPK_LoadMD2(Name$,Parent=0)
Use this command to load a MD2 model file from PPK, example :

MyModel=PPK_LoadMD2("Model.md2',MyPivot)

PPK_LoadMesh(Name$,Parent=0)
Use this command to load a 3DS,B3D,X file from PPK (model textures are extracted), example :

MyModel=PPK_LoadMesh("Model.b3d',MyWorld)

PPK_LoadAnimMesh(Name$,Parent=0)
Use this command to load a 3DS,B3D,X animated file from PPK (model textures are extracted), example :

MyModel=PPK_LoadAnimMesh("Model.b3d',MyWorld)


Example of code :

Include "Inc_PowerPacker.bb"

Graphics3D 800,600,32,2
SetBuffer BackBuffer()

; -----------------
; PPK File init
; ------------------

Light=CreateLight()
PositionEntity Light,10,10,-10

Camera=CreateCamera()
PositionEntity Camera,0,0,-10

PPK_OpenPak("DATAS.PPK")
;Music=PPK_LoadSound("Sound.mp3")
;Image=PPK_LoadImage("Image.bmp")
;Mesh=PPK_LoadMesh("Mesh.3ds")
PPK_ClosePack()

;PlaySound Music

While Not KeyHit(1)
RenderWorld

;TurnEntity Mesh,0,1,0
;DrawImage Image,0,0
Flip
Wend

End

Try powerpacker :
http://www.blitz3dfr.com/powerpacker_projet/powerpacker.zip

For register powerpacker (price 12 EUROS) :
http://www.shareit.com/product.html?productid=210917&languageid=1



:)


Kornflex(Posted 2004) [#2]
Nice Packer Filax !

Regards,


popcade(Posted 2004) [#3]
Can I disable the encryption?

Encrypted files are poorly compressed in most cases.

And what's the major diffs among TeraPak & MoleBox?


Filax(Posted 2004) [#4]
Yes ! but i crypt file after compressing :)

I can be compared with TerraPAck


ashmantle(Posted 2004) [#5]
EDIT: Im dumb.. carry on!