#!/bin/sh

chmod +x ./wine-associations.sh
./wine-associations.sh


PWD=`pwd`
START=start_qadmin.sh
rm -f ${START}
echo "#!/bin/sh" > ${START}
echo "" >> ${START}
echo "QAEXE=qadmin.exe" >> ${START}
echo "LOG=\${QAEXE}.log" >> ${START}
echo "export LANG=ru_RU.UTF-8" >> ${START}
echo "cd ${PWD}" >> ${START}
echo "date >> \${LOG}" >> ${START}
echo "wine ${PWD}/\${QAEXE} >> \${LOG} 2>&1" >> ${START}
chmod +x ${START}

RUN=qadmin.desktop
rm -f ${RUN}
echo "[Desktop Entry]" > ${RUN}
echo "Name=Quik Administrator" >> ${RUN}
echo "Name[ru]=Quik Administrator" >> ${RUN}
echo "Type=Application" >> ${RUN}
echo "NoDisplay=false" >> ${RUN}
echo "Hidden=false" >> ${RUN}
echo "Terminal=false" >> ${RUN}
echo "StartupNotify=false" >> ${RUN}
echo "Categories=Utility" >> ${RUN}

echo "Exec=${PWD}/${START}" >> ${RUN}
echo "Icon=${PWD}/qadmin.ico" >> ${RUN}
