arrow_back_ios Back to List

Custom Build Step

Offload KB - getting-started

Old Content Alert

Please note that this is a old document archive and the will most likely be out-dated or superseded by various other products and is purely here for historical purposes.

Offload™ can be used as a custom build step in Visual Studio or in a makefile, it is just a compiler that takes input files and compiler options and produces an object file.When using Offload™ as a custom build step, ensure that the correct environment variables have been set prior to performing the operation. Some developers using Offload™ have found that having a wrapper batch file to set the required variables prior to execution is useful, and below you will find an example batch file you could use!

@echo off



if not "%PATH%"=="" set PATH=;%PATH%

if not "%INCLUDE%"=="" set INCLUDE=;%INCLUDE%
set INCLUDE=%OFFLOADFOLDER%offload-sdkinclude%INCLUDE%

set CMDS=%*
set OCDIR=

set TMP=%1" "
set TMP=%TMP:"=%


if "%TMP%"==" " goto continue

if "%TMP%"=="-ocdir " set OCDIR=%~2

set TMP=%1" "
set TMP=%TMP:"=%

goto loop


if not "%OCDIR%"=="" rmdir /S /Q "%OCDIR%"

%OFFLOADFOLDER%offloadps3cpp.exe %CMDS%

The above batch file example assumes that the offload-sdk folder is in the same folder as the OffloadPS3CPP.exe executable and the batchfile, and that the batchfile is being called with a fully qualified path, e.g. 'C:yourpath ooffloadatchfile.bat'. It will also attempt to remove the previous iterations OutputC folder, as is recommended.