DeRap: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with " DeRap Version 1.xx by Mikero. See ReadMeGeneral and fixes ---- * DeRap is the dual dos/windows app. * DeRapDos is supplied as a speed-freak dos only version...")
 
m (Text replacement - " (={2,})([^ = ])(.*)([^ = ])(={2,}) * " to " $1 $2$3$4 $5 ")
 
(4 intermediate revisions by 3 users not shown)
Line 11: Line 11:
* DeRapDos is supplied as a speed-freak dos only version.
* DeRapDos is supplied as a speed-freak dos only version.
   
   
DeRap is aware of all binarised text files (known  
DeRap is aware of all binarised text files (known internally as raP) for all engine types and all extensions. Flashpoint , Xbox, Arma, Arrowhead, rvmat, bisurf,. etc etc. All binary types will be converted into standard text class statements. With a #define to declare what engine-target '''this''' text must have been made for.
internally as raP) for all engine types and all extensions. Flashpoint , Xbox,  
Arma, Arrowhead, rvmat, bisurf,. etc etc


#define _ARMA_
<br>
#define _XBOX_
All binary types will be converted into standard text class statements. With a
#define _OFP_
#define to declare what engine-target *this* text must have been made for.<br> <br> '''Usage:'''
 
The resulting text output (known by Bis as paramfile data) is the same for all engines. The #define is merely a convenience for [[Rapify]].exe when converting back to binary, since the binary equivalents are different for each engine.
 
As a auto-documenting convenience, DeRap always produces an informational banner stating the time '''this''' text was produced and the file and filetime it came from. A big bonus when dealing with potentially updated source you were unaware of.
 
 
DeRap is one of the most heavily used support exes for the major Mikero tools such as [[pboProject]], [[Eliteness]] and [[Arma3P]]
 
It illustrates the benefit of using one, single, well proven, algorithm (and application) for every possible combination of the need to debinarise data. Only it is revised and updated, as appropriate, '''not''' the dozens of batch files and other exes that need extracted text.
 
The same philsophy is internal to [[dePbo]].dll. There is one place in the source code where all-things-rap, are accessed.
 
It is also the reason why there is only one location on your pc that '''this''' application can exist. You are not given the chance to use stale copies from 'some\where\else'.
 
 
== Usage ==


   
   
'''Gui'''
=== Gui ===


   
   
Drag n drop any file onto the gui, or use it's browse  
Drag n drop any file onto the gui, or use it is browse button
button


   
   
Plain Jane text is shown in the window. It can be saved  
Plain Jane text is shown in the window. It can be saved anywhere that gives you a thrill, or cut 'n pasted into whatever might give you a thrill.
anywhere that gives you a thrill, or cut 'n pasted into whatever might give you  
a thrill.


   
   
Be aware that to  
Be aware that to protect you from real nasty surprises, the default output is renamed to .txt.  
protect you from real nasty surprises, the default output is renamed to .txt.  
This to save you the embarrassment of overwriting the original file
This to save you the embarrassment of overwriting the original file


Line 41: Line 50:


    
    
<br> '''Command line ''' <br>
=== Command line ===
DeRap [-options] whateverFileOrFolder [whereverFileOrFolder]<br> <br>
DeRap [-options] whateverFileOrFolder [whereverFileOrFolder]<br> <br>
-n noisy <br>
-n noisy <br>
Line 52: Line 61:


   
   
syntax: derap -Q nameOfFile
syntax: derap -Q nameOfFile


   
   
Line 58: Line 67:


    
    
<u>'''Input file versus input folder'''</u>
==== Input file versus input folder ====


   
   
DeRap will search the specified folder '''and all subfolders '''for rapified  
DeRap will search the specified folder '''and all subfolders '''for rapified files.
files.


   
   
The actual names of the files in the folders are immaterial. DeRap will  
The actual names of the files in the folders are immaterial. DeRap will examine all of them for mime-type rap. Those that are not rapped are ignored.
examine all of them for mime-type rap. Those that aren't rapped are ignored.


   
   
Hopefully obvious: if a destination is specified, it clearly must be a  
Hopefully obvious: if a destination is specified, it clearly must be a folder. DeRap will make that folder if not present (and all subsequent subfolders if any)
folder. DeRap will make that folder if not present (and all subsequent  
subfolders if any)


    
    
Line 77: Line 82:


    
    
GOLDEN RULE: *.bin is ALWAYS output as *.cpp irrespective of destination.
*GOLDEN RULE: *.bin is ALWAYS output as *.cpp irrespective of destination.


   
   
<br> <br>
<br> <br>
if no destination is specified:<br> <br>
*if no destination is specified:<br> <br>
output is to same folder as source AND output name appended  
**output is to same folder as source AND output name appended with .txt<br> <br> <br>
with .txt<br> <br> <br>
*When a destination is specified:<br> <br>
When a destination is specified:<br> <br>
**if a folder is specified (with or without trailing \)<br> <br>
if a folder is specified (with or without trailing \)<br> <br>
output name == input name <br> <br>
output name == input name <br> <br>
if a folder\file is specified<br> <br>
**if a folder\file is specified<br> <br>
output name == folder\file name<br> <br> <br>
output name == folder\file name<br> <br> <br>
A check however is made that source and destination are not the same thru  
A check however is made that source and destination are not the same thru  
inadvertence (eg specifying same destination folder), if so<br>
inadvertence (eg specifying same destination folder), if so output is appended with .txt
output is appended with .txt


   
   
<br> <br>
=== No Pause ===
---------------<br>
 
No Pause<br>
normally the exe will pause before exiting so that the user can 'see' the result. In a dos bat application this is not always wanted or desired (the bat file can or should do the pausing instead)<br>
---------------<br> <br>
 
normally the exe will pause before exiting so that the user can 'see' the  
 
result<br>
 
in a dos bat application this is not always wanted or desired (the bat file can  
[[Category:Mikero Tools]]
or should do the pausing instead)<br>

Latest revision as of 18:57, 31 January 2021

DeRap Version 1.xx by Mikero.


See ReadMeGeneral and fixes



  • DeRap is the dual dos/windows app.
  • DeRapDos is supplied as a speed-freak dos only version.

DeRap is aware of all binarised text files (known internally as raP) for all engine types and all extensions. Flashpoint , Xbox, Arma, Arrowhead, rvmat, bisurf,. etc etc. All binary types will be converted into standard text class statements. With a #define to declare what engine-target this text must have been made for.

  1. define _ARMA_
  2. define _XBOX_
  3. define _OFP_

The resulting text output (known by Bis as paramfile data) is the same for all engines. The #define is merely a convenience for Rapify.exe when converting back to binary, since the binary equivalents are different for each engine.

As a auto-documenting convenience, DeRap always produces an informational banner stating the time this text was produced and the file and filetime it came from. A big bonus when dealing with potentially updated source you were unaware of.


DeRap is one of the most heavily used support exes for the major Mikero tools such as pboProject, Eliteness and Arma3P

It illustrates the benefit of using one, single, well proven, algorithm (and application) for every possible combination of the need to debinarise data. Only it is revised and updated, as appropriate, not the dozens of batch files and other exes that need extracted text.

The same philsophy is internal to dePbo.dll. There is one place in the source code where all-things-rap, are accessed.

It is also the reason why there is only one location on your pc that this application can exist. You are not given the chance to use stale copies from 'some\where\else'.


Usage

Gui

Drag n drop any file onto the gui, or use it is browse button


Plain Jane text is shown in the window. It can be saved anywhere that gives you a thrill, or cut 'n pasted into whatever might give you a thrill.


Be aware that to protect you from real nasty surprises, the default output is renamed to .txt. This to save you the embarrassment of overwriting the original file


Rename the output suit your circumstance.


Command line

DeRap [-options] whateverFileOrFolder [whereverFileOrFolder]

-n noisy
-s silent (default)
-t do NOT use tabbed output (use space)
-P do not pause


-Q test if file is in fact rapified.


syntax: derap -Q nameOfFile


note a israp.bat is supplied to achieve same


Input file versus input folder

DeRap will search the specified folder and all subfolders for rapified files.


The actual names of the files in the folders are immaterial. DeRap will examine all of them for mime-type rap. Those that are not rapped are ignored.


Hopefully obvious: if a destination is specified, it clearly must be a folder. DeRap will make that folder if not present (and all subsequent subfolders if any)


Output file or folder


  • GOLDEN RULE: *.bin is ALWAYS output as *.cpp irrespective of destination.




  • if no destination is specified:

    • output is to same folder as source AND output name appended with .txt


  • When a destination is specified:

    • if a folder is specified (with or without trailing \)

output name == input name

    • if a folder\file is specified

output name == folder\file name


A check however is made that source and destination are not the same thru inadvertence (eg specifying same destination folder), if so output is appended with .txt


No Pause

normally the exe will pause before exiting so that the user can 'see' the result. In a dos bat application this is not always wanted or desired (the bat file can or should do the pausing instead)