iOS DOxygen adding docSet to Xcode Documents - iphone

Hey Everyone just having a problem with DOxygen, Ive generated my documentation and its allthere, but i find i am unable to add it to Xcode.
I currently have a script which takes the HTML directory containing all the files, and generates the .docset file.
# Run the makefile. The --silent parameter stops it from spamming us with too much output.
#/Applications/Xcode.app/Contents/Developer/usr/bin/docsetutil
make --silent -C "$DOCSET_OUTPUT/html" install
# Load docset
osascript "$[location of personal library]/Scripts/XcodeLoadDocSet.scpt"
"~/Library/Developer/Shared/Documentation/DocSets/$DOXYGEN_ID.docset"
This should also add the item to xcode, but running it manually reveals a problem..
/Developer/usr/bin/docsetutil index com.[my app].docset
make: /Developer/usr/bin/docsetutil: No such file or directory
make: *** [docset] Error 1
This is what i have atm for the makefile,
DOCSET_NAME=com.[my app].docset
DOCSET_CONTENTS=$(DOCSET_NAME)/Contents
DOCSET_RESOURCES=$(DOCSET_CONTENTS)/Resources
DOCSET_DOCUMENTS=$(DOCSET_RESOURCES)/Documents
DESTDIR=~/Library/Developer/Shared/Documentation/DocSets
XCODE_INSTALL=$(shell xcode-select -print-path)
all: docset
docset:
mkdir -p $(DOCSET_DOCUMENTS)
cp Nodes.xml $(DOCSET_RESOURCES)
cp Tokens.xml $(DOCSET_RESOURCES)
cp Info.plist $(DOCSET_CONTENTS)
tar --exclude $(DOCSET_NAME) \
--exclude Nodes.xml \
--exclude Tokens.xml \
--exclude Info.plist \
--exclude Makefile -c -f - . \
| (cd $(DOCSET_DOCUMENTS); tar xvf -)
$(XCODE_INSTALL)/usr/bin/docsetutil index $(DOCSET_NAME)
rm -f $(DOCSET_DOCUMENTS)/Nodes.xml
rm -f $(DOCSET_DOCUMENTS)/Info.plist
rm -f $(DOCSET_DOCUMENTS)/Makefile
rm -f $(DOCSET_RESOURCES)/Nodes.xml
rm -f $(DOCSET_RESOURCES)/Tokens.xml
install: docset
mkdir -p $(DESTDIR)
cp -R $(DOCSET_NAME) $(DESTDIR)
uninstall:
rm -rf $(DESTDIR)/$(DOCSET_NAME)
always:
If anyone has had a similer problem please let me know.
Cheers
Michael.

With Xcode 4, docsetutil is located under /Applications/Xcode.app/Contents/Developer/usr/bin/

Related

PostgreSQL - HyperLogLog extension not found

Can someone explain in a better way (well, in a way for dummies to understand), or more correctly how to install HyperLogLog hll extension for PostgreSQL on my Mac M1 machine.
When running CREATE EXTENSION hll;
I get:
Query 1 ERROR: ERROR: could not open extension control file "/opt/homebrew/share/postgresql/extension/hll.control": No such file or directory
I am new at this, so this documentation https://github.com/citusdata/postgresql-hll did not helped me a lot.
I installed all other extensions that I need except this one..
When typing which postgres I get:
/opt/homebrew/bin/postgres
And version: postgres (PostgreSQL) 14.3
I saw about configuring PG_CONFIG but I do not understand what exactly I should be doing here?
I will appreciate the help and I hope that this post will be of use for other dummies as I. :)
We can simplify the script above and execute it inline by copying and pasting all of the following into your terminal:
> yes |
#!/bin/bash
# download latest release
curl -s https://api.github.com/repos/citusdata/postgresql-hll/releases/latest \
| grep '"tarball_url":' \
| sed -E 's/.*"([^"]+)".*/\1/' \
| xargs curl -o package.tar.gz -L
# extract to new hll directory
mkdir hll && tar xf package.tar.gz -C hll --strip-components 1
# build and install extension to postgres extensions folder
cd hll
make
make install
# remove hll directory
cd ../
rm -r ./hll
# connect to PostgreSQL and install extension
psql -U postgres -c "CREATE EXTENSION hll;"
I wrote the script for myself to get the last package and install it.
I build it by using make.
# check if Makefile installed
make -v
# download latest release
curl -s https://api.github.com/repos/citusdata/postgresql-hll/releases/latest \
| grep '"tarball_url":' \
| sed -E 's/.*"([^"]+)".*/\1/' \
| xargs curl -o package.tar.gz -L
# extract to hll directory
mkdir hll && tar xf package.tar.gz -C hll --strip-components 1
cd hll
# build and instll extension to postgres extensions folder
make
make install
# remove hll directory
cd ../
rm -r ./hll
# connect to PostgreSQL
psql -U postgres
# install extension in your DB
CREATE EXTENSION hll;

Building postgres from source throws "'utils/errcodes.h' file not found" when called from other makefile

I am currently constructing a Makefile and one of the things it will be doing is downloading and building postgres from source. Before starting to write the makefile file I always used the following set of commands to do this:
curl -LJ https://github.com/postgres/postgres/archive/refs/tags/REL_13_3.zip -o postgres.zip
unzip postgres.zip
rm postgres.zip
cd postgres-REL_13_3
./configure --prefix "`pwd`" --without-readline --without-zlib
make
make install
Executing the above listed commands in the terminal results in the successful installation of postgres. Then I translated these into a makefile which looks as follows:
build:
curl -LJ https://github.com/postgres/postgres/archive/refs/tags/REL_13_3.zip -o postgres.zip
unzip postgres.zip
rm postgres.zip
cd postgres-REL_13_3 \
&& ./configure --prefix "`pwd`" --without-readline --without-zlib \
&& $(MAKE) \
&& $(MAKE) install
Running this Makefile results in the error:
../../src/include/utils/elog.h:71:10: fatal error: 'utils/errcodes.h' file not found
It seems that something about calling the make from another Makefile causes a referencing issue with the files during the build process, but I just can figure out for the life of me what I have to change to fix this.
It appears to be the influence of Makefile enviromental variables. I didn't discover the exact mechanism, but unsetting them helps.
build:
curl -LJ https://github.com/postgres/postgres/archive/refs/tags/REL_13_3.zip -o postgres.zip
unzip postgres.zip
rm postgres.zip
unset MAKELEVEL && unset MAKEFLAGS && unset MFLAGS && cd postgres-REL_13_3 \
&& ./configure --prefix "`pwd`" --without-readline --without-zlib \
&& $(MAKE) \
&& $(MAKE) install

chown -R not working in Yocto-Project recipe

Sorry, I'm not a native English speaker.
I'm trying to install my web application using a Yocto-Project recipe file.
PR = "r0"
PV = "1.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=d41d8cd98f00b204e9800998ecf8427e"
SRC_URI = "\
file://sources \
file://COPYING \
"
S = "${WORKDIR}"
do_install() {
install -d ${D}${localstatedir}/www
cp -r ${S}/sources/* ${D}${localstatedir}/www/
chown -R www-data:www-data ${D}${localstatedir}/www/
chmod -R 775 ${D}${localstatedir}/www/cgi-bin
}
But /var/www is still owned by root:root and not www-data:www-data like desired.
Question
So how do I chown the /var/www directory recusively to www-data:www-data?
EDIT
I have seen page 9 of the following presentation: https://wiki.yoctoproject.org/wiki/images/e/e6/Custom_Users_Groups_in_Yocto1.1.pdf .
I created this recipe file to mimic this page.
First, chown and chmod should work in YP/OE recipes the way you use them.
The problem may be that you've missed a / in your path arguments for the commands. According to the documentation [1] ${D} has no trailing /.
Therefore the following should work:
do_install() {
install -d ${D}/${localstatedir}/www
cp -r ${S}/sources/* ${D}/${localstatedir}/www/
chown -R www-data:www-data ${D}/${localstatedir}/www/
chmod -R 775 ${D}/${localstatedir}/www/cgi-bin
}
(If not please post your bitbake logs)
[1] https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-D
sudo chown -R wwwdata:wwwdata /var/www/ to make the ownership of the desired folder and its inner folders or files recursively

Renaming a downloaded file using wget

Here is my wget command where i am trying to rename the file which i am downloading but it is not working. I am using -O option here but somehow it is not working.
access="http://mvn:8081/nexus/content/com/mvn/"
wget -r -np -nd -l1 -O "access.war" "$access" -A "com.infa.products.ldm.ingestion.access.web-"$n"-.-1-ldm-access-web.war"
Here i am renaming it to access.war. I can only use wget to do this job due to some restrictions.
Thanks for the help.
The option -A is "comma separated", but you are using dots to separate the extensions!
Instead of
-A "com.infa.products.ldm.ingestion.access.web-"$n"-.-1-ldm-access-web.war"
Try
-A "com,infa,products,ldm,ingestion,access,web-"$n"-,-1-ldm-access-web,war"
If this is not the solution to your problem, I suggest you simplify your wget-call down to something like this
wget -r -np -nd -l1 -O "access.war" "$access"
Just to verify that all else is working.
Or even better (to get fewer files)
wget -r -np -nd -l1 -O "access.war" "$access" -A "war"

fail building ffmpeg for armv6-7

I've been trying to build ffmpeg in every possible way I can think of. I'm trying with the latest revision from their git repository and with a build script which I have confirmation that it works, it's from this question: iPhone SDK 4.3 libav compiling problem. The script was updated yesterday and apparently works for the guy in the question.
my problem is that it doesn't generate the .a files (or actually any files) for armv6 anc armv7. and therefor the lipo commands, to concat into universal libs, fail. I've also tried using the build scripts from iFrameExtractor without any success it also fails with the lipo-commands in the end, i get the following:
lipo: can't open input file: ./compiled/armv6/lib/libavcodec.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libavdevice.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libavfilter.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libavformat.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libavutil.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libpostproc.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libswscale.a (No such file or directory)
and i have also posted the entire output here if anyone has any idea what to look for there (because i don't know where to start, it almost 5000 lines of output.)
i should also mention that i'm compiling it for armv6, armv7 and i386. I want to import it in XCode to get H.264 frames from video feed.
when i try to build for armv6 i use the following configure:
./configure \
--enable-cross-compile \
--arch=arm \
--extra-cflags='-arch armv6' \
--extra-ldflags='-arch armv6' \
--target-os=darwin \
--cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk \
--cpu=arm1176jzf-s \
--extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/system \
--prefix=compiled/armv6
and get the following output:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc is unable to create an executable file.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user#ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
so the question, what c compiler should I use? i've tried different:
arm-apple-darwin10-gcc-4.2.1
arm-apple-darwin10-llvm-gcc-4.2
gcc
but with the same result. gcc works for both i386 and armv7 so i guess it should work for armv6 aswell
i used the following to compile only for armv6 and armv7. I couldn't get it working for i386, i receive errors that the cputype and subcputype are wrong. apparently the cputype is supposed to be x86 and subcputype should be intel.
anyhow i used the following build scripts to compile (i ended up using gcc and it worked, it was the configure flags that were wrong from the beginning i guess) for the arm architectures:
build script:
#!/bin/sh
set -e
SCRIPT_DIR=$( (cd -P $(dirname $0) && pwd) )
DIST_DIR_BASE=${DIST_DIR_BASE:="$SCRIPT_DIR/dist"}
if [ -d ffmpeg ]
then
echo "Found ffmpeg source directory, no need to fetch from git..."
else
echo "Fetching ffmpeg from git://git.videolan.org/ffmpeg.git..."
git clone git://git.videolan.org/ffmpeg.git
fi
ARCHS=${ARCHS:-"armv6 armv7"}
for ARCH in $ARCHS
do
FFMPEG_DIR=ffmpeg-$ARCH
if [ -d $FFMPEG_DIR ]
then
echo "Removing old directory $FFMPEG_DIR"
rm -rf $FFMPEG_DIR
fi
echo "Copying source for $ARCH to directory $FFMPEG_DIR"
cp -a ffmpeg $FFMPEG_DIR
cd $FFMPEG_DIR
DIST_DIR=$DIST_DIR_BASE-$ARCH
mkdir -p $DIST_DIR
case $ARCH in
armv6)
EXTRA_FLAGS="--enable-cross-compile --target-os=darwin --arch=arm --cpu=arm1176jzf-s"
EXTRA_CFLAGS="-arch $ARCH"
EXTRA_LDFLAGS="-arch $ARCH"
;;
armv7)
EXTRA_FLAGS="--enable-cross-compile --target-os=darwin --arch=arm --cpu=cortex-a8 --enable-pic"
EXTRA_CFLAGS="-arch $ARCH"
EXTRA_LDFLAGS="-arch $ARCH"
;;
x86_64)
EXTRA_CC_FLAGS="-mdynamic-no-pic"
;;
esac
echo "Configuring ffmpeg for $ARCH..."
./configure \
--prefix=$DIST_DIR \
--extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/system \
--disable-bzlib \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffserver \
--cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk \
--extra-ldflags="$EXTRA_LDFLAGS" \
--extra-cflags="$EXTRA_CFLAGS" \
$EXTRA_FLAGS
echo "Installing ffmpeg for $ARCH..."
make && make install
cd $SCRIPT_DIR
if [ -d $DIST_DIR/bin ]
then
rm -rf $DIST_DIR/bin
fi
if [ -d $DIST_DIR/share ]
then
rm -rf $DIST_DIR/share
fi
done
and combine libs script:
#!/bin/bash
set -e
ARCHS="armv6 armv7"
for ARCH in $ARCHS
do
if [ -d dist-$ARCH ]
then
MAIN_ARCH=$ARCH
fi
done
if [ -z "$MAIN_ARCH" ]
then
echo "Please compile an architecture"
exit 1
fi
OUTPUT_DIR="dist-uarch"
rm -rf $OUTPUT_DIR
mkdir -p $OUTPUT_DIR/lib $OUTPUT_DIR/include
for LIB in dist-$MAIN_ARCH/lib/*.a
do
LIB=`basename $LIB`
LIPO_CREATE=""
for ARCH in $ARCHS
do
if [ -d dist-$ARCH ]
then
LIPO_CREATE="$LIPO_CREATE-arch $ARCH dist-$ARCH/lib/$LIB "
fi
done
OUTPUT="$OUTPUT_DIR/lib/$LIB"
echo "Creating: $OUTPUT"
lipo -create $LIPO_CREATE -output $OUTPUT
lipo -info $OUTPUT
done
echo "Copying headers from dist-$MAIN_ARCH..."
cp -R dist-$MAIN_ARCH/include/* $OUTPUT_DIR/include
then i import the .a files from BUILD-FOLDER/dist-uarch and it builds in xcode like a charm!