I'm currently completing an iphone 3d programming book
The book says to add following python code into a build phase in xcode, to run the provided texturetool.
Book Quote
a. Leave the shell as /bin/sh.
b. Enter this directly into the script box:
BIN=${PLATFORM_DIR}/../iPhoneOS.platform/Developer/usr/bin
INFILE=${SRCROOT}/Textures/Grid16.png
OUTFILE=${SRCROOT}/Textures/Grid16.pvr
${BIN}/texturetool -m -f PVR -e PVRTC $INFILE -o $OUTFILE
c. Add this to Input Files:
$(SRCROOT)/Textures/Grid16.png
Add this to Output Files:
$(SRCROOT)/Textures/Grid16.pvr
However when doing this I receive the following message.
Failed to load image
Failed to perform Encode
Command /bin/sh failed with exit code 1
Could anyone shed a light on this?
You have spaces in your directories!
Replace $(SRCROOT) with ${SRCROOT}
Related
I am attempting to try out sparkle formation following the documentation, but I do not receive any output from the command bundle exec sfn print --file compute. I have also tried different paths to my compute file with no change. I would like to view the template cloudformation json that this is supposed to create. How can I do that?
The guide is somewhat incomplete and I needed to add a name for my stack and the exact path to the template file into the command: bundle exec sfn print my-stack-name --file sparkleformation/compute.rb
I am using JasperStarter to create pdf from several jrprint files and then print it using JasperStarter functtions.
I want to create one single pdf file with all the .jrprint files.
If I give command like:
jasperstarter pr a.jprint b.jprint -f pdf -o rep
It does not recognise the files after the first input file.
Can we create one single output file with many input jasper/jrprint files?
Please help.
Thanks,
Oshin
Looking at the documentation, this is not possible:
The command process (pr)
The command process is for processing a report.
In direct comparison to the command for compiling:
The command compile (cp)
The command compile is for compiling one report or all reports in a directory.
Say I had a script that checked honeypot locations using md5sum.
#!/bin/bash
#cryptocheck.sh
#Designed to check md5 CRC's of honeypot files located throughout the filesystem.
#Must develop file with specific hashes and create crypto.chk using following command:
#/opt/bin/md5sum * > crypto.chk
#After creating file, copy honeypot folder out to specific folders
locations=("/share/ConfData" "/share/ConfData/Archive" "/share/ConfData/Application"
"/share/ConfData/Graphics")
for i in "${locations[#]}"
do
cd "$i/aaaCryptoAudit"
/opt/bin/md5sum -c /share/homes/admin/crypto.chk
done
And the output looked like this:
http://pastebin.com/b4AU4s6k
Where would you start to try and recognize the output and perhaps trigger some sort of response by the system if there is a 'FAILED'?
I've worked a bit with PERL trying to parse log files before but my attempts typically failed miserably for one reason or another.
This may not be the proper way to go about this, but I'd want to be putting this script into a cronjob that would run every minute. I had some guys telling me that an inotify job or script (I'm not familiar with this) would be better than doing it this way.
Any suggestions?
--- edit
I made another script to call the script above and send the output to a file. The new script then runs a grep -q on 'FAILED' and if it picks anything up, it sounds the alarm (tbd what the alarm will be).
#!/bin/bash
#cryptocheckinit.sh
#
#rm /share/homes/admin/cryptoalert.warn
/share/homes/admin/cryptocheck.sh > /share/homes/admin/cryptoalert.warn
grep -q "FAILED" /share/homes/admin/cryptoalert.warn && echo "LIGHT THE SIGNAL FIRES"
Use:
if ! /opt/bin/md5sum -c /share/homes/admin/crypto.chk
then
# Do something
fi
Or pipe the output of the loop:
for i in "${locations[#]}"
do
cd "$i/aaaCryptoAudit"
/opt/bin/md5sum -c /share/homes/admin/crypto.chk
done | grep -q FAILED && echo "LIGHT THE SIGNAL FIRES"
Is it possible to remove a file using a build phase in xcode 4 based on if it is release or dev?
If so has anyone got an example?
I have tried :
if [ "${CONFIGURATION}" = "Debug" ]; then
find "$TARGET_BUILD_DIR" -name '*-live.*' -print0 | xargs -0 rm
fi
This prints CopyStringsFile
"build/Debug-iphonesimulator/Blue Sky.app/PortalText-live.strings" CDL/PortalText-live.strings
cd "/Users/internet/Desktop/iPhone Template/iPhonePortalTemplate/CDL.Labs"
setenv PATH "/Developer/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-copyStrings --validate --inputencoding utf-8 --outputencoding binary --outdir "/Users/internet/Desktop/iPhone Template/iPhonePortalTemplate/CDL.Labs/build/Debug-iphonesimulator/Blue Sky.app" -- CDL/PortalText-live.strings
But does actually remove the file from the bundle.
The only way I've ever had different files, is having a separate Target, and only include certain files in certain targets.
EDIT WITH AN EXAMPLE
Ok, I've done exactly the same in another project. We had a DefaultProperties.plist file, which was included in the target.
We then had 3 copies of this, NOT included in the target, ProdProperties.plist, TestProperties.plist, UatProperties.plist.
We built for environments on the command line, using xcodebuild, as it was built using an automated build server (Bamboo).
Prior to executing xcodebuild, we would run this:
cp -vf "./Properties/Environments/${environment}Properties.plist" ./Properties/shared/DefaultProperties.plist
touch Properties/shared/DefaultProperties.plist
with $(environment) being passed into the script.
You could do something like this with the RunScript phase in Xcode.
It's the first time i try to generate a VCD and i am getting some troubles.
I have a testbench called bench_minimips.vhdl that contain the entity sim_minimips.
I want simulate it and get a VCD out of it.
i am typing the following command in the Modelsim shell:
vsim work.sim_minimips
vcd file myvcd1.vcd
vcd add -file bench_minimips.vhd/*
run
but if i open myvcd1.vcd in an empty file. What should i do to create the dump?
I tryed as well as sudgested in another forum the command:
wlf2vcd -o myvcd2.vcd vsim.wlf
but a error is generated.
I am really lost in understanding because all the websites i find tells you to use a TCL generated by altera or some other company and i do not have theyr content to look at.
Does someone knows what should i do?
Best,
Stefano
The -file parameter to vcd add is not used to specify signals but the name of the VCD (if you've created several).
What you want to do instead is to add objects in your simulation. For example:
vcd file myvcd1.vcd
vcd add -r /sim_minimips/*