The process to creating a B4i Library after build a objectiveC Code is:
Locating the .a and .h files, copy this files to a folder in a another folder with B4Ih2xml.jar and iCore.h
Execute the command java -jar B4Ih2xml.jar test.h test.xml
to create the .xml file
then copy .a and .h into the LIBS folder of the B4i-SERVER to compile your projects
then copy .xml into the B4i folder extra libraries.
:-( :-( :-( :-( :-( :-( :-(
BUT.....
You can put this simple script in your XCODE Project to do this steps easily.
In the "TARGETS -> BUILD PHASES" add a "NEW RUN SCRIPT PHASE" push the "+" button on the top, and when appear "RUN SCRIPT" put this lines:
You need to change ONLY the green lines with your project and server paths
printf "****** SCRIPT AFTER BUILD ***************************\n"
echo -n "Target Directory:" ${TARGET_BUILD_DIR} && printf "\n"
echo -n "Product Name:" ${PRODUCT_NAME} && printf "\n"
printf "*****************************************************\n"
#----------------------------------------------------------------
FolderOutputXML="/Users/iglesias/Documents/SourceCode/B4i/iAwesomeMenu/XML/"
FolderOutputLIBSB4SERVER="/Users/iglesias/Development/B4i-MacServer/Libs/"
FolderOutputLIBSB4IEXTRA="/Users/iglesias/Development/B4i-MacServer/LibExtra/"
/Users/iglesias/Documents/SourceCode/B4i/iAwesomeMenu/XML
FileA="libiAwesomeMessage.a"
FileH="iAwesomeMessage.h"
FileXML="iAwesomeMessage.xml"
#----------------------------------------------------------------
echo -n "FolderOutputXML:" ${FolderOutputXML} && printf "\n"
echo -n "FolderOutputLIBSB4SERVER:" ${FolderOutputLIBSB4SERVER} && printf "\n"
echo -n "FolderOutputLIBSB4IEXTRA:" ${FolderOutputLIBSB4IEXTRA} && printf "\n"
printf "*****************************************************\n\n"
scp ${TARGET_BUILD_DIR}/${FileA} ${FolderOutputXML}
scp ${TARGET_BUILD_DIR}/include/${PRODUCT_NAME}/${FileH} ${FolderOutputXML}
java -jar ${FolderOutputXML}B4Ih2xml.jar ${FolderOutputXML}${FileH} ${FolderOutputXML}${FileXML}
scp ${FolderOutputXML}/${FileH} ${FolderOutputLIBSB4SERVER}
scp ${FolderOutputXML}/${FileA} ${FolderOutputLIBSB4SERVER}
scp ${FolderOutputXML}/${FileXML} ${FolderOutputLIBSB4IEXTRA}
look in a screenshot
This script too facilitates the library creation process.
Hope that helps everyone
Locating the .a and .h files, copy this files to a folder in a another folder with B4Ih2xml.jar and iCore.h
Execute the command java -jar B4Ih2xml.jar test.h test.xml
to create the .xml file
then copy .a and .h into the LIBS folder of the B4i-SERVER to compile your projects
then copy .xml into the B4i folder extra libraries.
:-( :-( :-( :-( :-( :-( :-(
BUT.....
You can put this simple script in your XCODE Project to do this steps easily.
In the "TARGETS -> BUILD PHASES" add a "NEW RUN SCRIPT PHASE" push the "+" button on the top, and when appear "RUN SCRIPT" put this lines:
You need to change ONLY the green lines with your project and server paths
printf "****** SCRIPT AFTER BUILD ***************************\n"
echo -n "Target Directory:" ${TARGET_BUILD_DIR} && printf "\n"
echo -n "Product Name:" ${PRODUCT_NAME} && printf "\n"
printf "*****************************************************\n"
#----------------------------------------------------------------
FolderOutputXML="/Users/iglesias/Documents/SourceCode/B4i/iAwesomeMenu/XML/"
FolderOutputLIBSB4SERVER="/Users/iglesias/Development/B4i-MacServer/Libs/"
FolderOutputLIBSB4IEXTRA="/Users/iglesias/Development/B4i-MacServer/LibExtra/"
/Users/iglesias/Documents/SourceCode/B4i/iAwesomeMenu/XML
FileA="libiAwesomeMessage.a"
FileH="iAwesomeMessage.h"
FileXML="iAwesomeMessage.xml"
#----------------------------------------------------------------
echo -n "FolderOutputXML:" ${FolderOutputXML} && printf "\n"
echo -n "FolderOutputLIBSB4SERVER:" ${FolderOutputLIBSB4SERVER} && printf "\n"
echo -n "FolderOutputLIBSB4IEXTRA:" ${FolderOutputLIBSB4IEXTRA} && printf "\n"
printf "*****************************************************\n\n"
scp ${TARGET_BUILD_DIR}/${FileA} ${FolderOutputXML}
scp ${TARGET_BUILD_DIR}/include/${PRODUCT_NAME}/${FileH} ${FolderOutputXML}
java -jar ${FolderOutputXML}B4Ih2xml.jar ${FolderOutputXML}${FileH} ${FolderOutputXML}${FileXML}
scp ${FolderOutputXML}/${FileH} ${FolderOutputLIBSB4SERVER}
scp ${FolderOutputXML}/${FileA} ${FolderOutputLIBSB4SERVER}
scp ${FolderOutputXML}/${FileXML} ${FolderOutputLIBSB4IEXTRA}
look in a screenshot
This script too facilitates the library creation process.
Hope that helps everyone