yourkit-java: use our desktop item
This commit is contained in:
@@ -47,6 +47,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
mkdir -p $out
|
||||
cp -pr bin lib license.html license-redist.txt probes samples $out
|
||||
cp ${./forbid-desktop-item-creation} $out/bin/forbid-desktop-item-creation
|
||||
for i in attach integrate; do
|
||||
sed -i -e 's|profiler.sh|yourkit-java-profiler|' $out/bin/$i.sh
|
||||
done
|
||||
@@ -56,6 +57,10 @@ stdenv.mkDerivation rec {
|
||||
mv $out/bin/profiler.ico $out/bin/yourkit-java-profiler.ico
|
||||
sed -i -e 's|JAVA_EXE="$YD/jre64/bin/java"|JAVA_EXE=${jre}/bin/java|' \
|
||||
$out/bin/yourkit-java-profiler
|
||||
# Use our desktop item, which will be purged when this package
|
||||
# gets removed
|
||||
sed -i -e "2isource $out/bin/forbid-desktop-item-creation" \
|
||||
$out/bin/yourkit-java-profiler
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
CONFIG_DIR=$HOME/.yjp/config
|
||||
if [ ! -d $CONFIG_DIR ]; then
|
||||
mkdir -p $CONFIG_DIR
|
||||
fi
|
||||
|
||||
REGISTRY=$CONFIG_DIR/registry8.xml
|
||||
if [ ! -e $REGISTRY ]; then
|
||||
cat >$REGISTRY <<EOF
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<registry8>
|
||||
<desktop-file.created>
|
||||
<boolean value="true"/>
|
||||
</desktop-file.created>
|
||||
</registry8>
|
||||
EOF
|
||||
fi
|
||||
Reference in New Issue
Block a user