Mac adjustments

This commit is contained in:
Michel Mastriani 2020-03-14 15:40:56 -03:00
parent 6fc5082fd4
commit c35393655f
3 changed files with 40 additions and 0 deletions

23
Data/fractorium-sh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/bash
CONFIG_PATH=~/.config/fractorium
DARK_MAC=~/.config/fractorium/dark_mac.qss
LIGHT_DARK=~/.config/fractorium/lightdark.qss
URANIUM=~/.config/fractorium/uranium.qss
#./fractorium
if [ ! -e "$DARK_LINUX" ] ; then
mkdir -p $CONFIG_PATH
cp dark_mac.qss $CONFIG_PATH
fi
if [ ! -e "$LIGHT_DARK" ] ; then
mkdir -p $CONFIG_PATH
cp lightdark.qss $CONFIG_PATH
fi
if [ ! -e "$URANIUM" ] ; then
mkdir -p $CONFIG_PATH
cp uranium.qss $CONFIG_PATH
fi

View File

@ -2,6 +2,18 @@
#include "Fractorium.h"
#include <QtWidgets/QApplication>
#ifdef __APPLE__
/// <summary>
/// Export default user data to ./config/fractorium
/// </summary>
void ExportUserData()
{
QProcess exec;
exec.setWorkingDirectory(QCoreApplication::applicationDirPath());
exec.start("/bin/sh", QStringList() << "fractorium-sh");
}
#endif
/// <summary>
/// Main program entry point for Fractorium.exe.
/// </summary>
@ -43,6 +55,10 @@ int main(int argc, char* argv[])
#endif
Fractorium w;
w.show();
#ifdef __APPLE__
// exporting user data
ExportUserData();
#endif
a.installEventFilter(&w);
rv = a.exec();
}

View File

@ -54,6 +54,7 @@ cp uranium.qss $FRACTORIUM_FINAL_ROOT
cp flam3-palettes.xml $FRACTORIUM_FINAL_ROOT
cp *.gradient $FRACTORIUM_FINAL_ROOT
cp *.ugr $FRACTORIUM_FINAL_ROOT
cp fractorium-sh $FRACTORIUM_FINAL_ROOT
cp Info.plist $FRACTORIUM_FINAL_ROOT/../
cp -r Bench $FRACTORIUM_FINAL_ROOT
cp -r examples $FRACTORIUM_FINAL_ROOT