Bundle data into EXE
category: general [glöplog]
for what it's worth, i made a visual studio compile rule (C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults\*.rules) so if i pull any file into the project, i just set the build rule to "Raw Data Compiler" and it automagically gets .obj-ified.
here's the .rules file itself:
here's the .rules file itself:
Code:
<?xml version="1.0" encoding="utf-8"?>
<VisualStudioToolFile
Name="Raw data"
Version="8,00"
>
<Rules>
<CustomBuildRule
Name="Raw Data"
DisplayName="Raw Data Compiler"
CommandLine="nasmw.exe -f win32 "%NASMDIR%\bin2obj.asm" -o "$(OutDir)\$(InputName).obj" -dOBJNAME=_$(InputName) -dBINNAME=\"$(InputPath)\""
Outputs="$(OutDir)\$(InputName).obj"
FileExtensions="*.raw"
ExecutionDescription="Compiling raw data..."
>
<Properties>
</Properties>
</CustomBuildRule>
</Rules>
</VisualStudioToolFile>
oh and the bin2obj.asm i use is
(a bit of an overkill using a macro but i used to use one asm file to include a lot of stuff and it kindof got deprecated)
Code:
%macro include_binary 2
global %1
%1 incbin %2
%1_end:
global %1_size
%1_size dd %1_end - %1
%endmacro
section .data
include_binary OBJNAME, BINNAME
(a bit of an overkill using a macro but i used to use one asm file to include a lot of stuff and it kindof got deprecated)
thanks gargaj -- those are going into the "if ever needed" folder :)
and i´m doin it the hard way all the time !
number_of_textures=x;
size_of_textures=y;
of1fset_textures=x*y;
[...]
data_size=offset_textures+offset_models+blahblah+blah+blah...
am i doin it wrong ?!!
number_of_textures=x;
size_of_textures=y;
of1fset_textures=x*y;
[...]
data_size=offset_textures+offset_models+blahblah+blah+blah...
am i doin it wrong ?!!