--Code changes

-Fix up .pro file for building with the new examples files.
 -Rename FlameExamples folder to Examples.
This commit is contained in:
Person 2020-03-08 23:37:27 -07:00
parent 8e8c8a3e7d
commit 61dd5e6eeb
11 changed files with 1605 additions and 1580 deletions

View File

@ -85,7 +85,7 @@
<Directory Id="AppDataFolder" >
<Directory Id="INSTALLFOLDER" Name="Fractorium" >
<Directory Id="INSTALLFOLDERBENCH" Name="Bench" />
<Directory Id="INSTALLFOLDEREXAMPLES" Name="FlameExamples" />
<Directory Id="INSTALLFOLDEREXAMPLES" Name="Examples" />
<Directory Id="INSTALLFOLDERPLATFORMS" Name="platforms" />
<Directory Id="INSTALLFOLDERIMAGEFORMATS" Name="imageformats" />
</Directory>
@ -340,31 +340,31 @@
<Fragment>
<ComponentGroup Id="ExampleComponents" Directory="INSTALLFOLDEREXAMPLES">
<Component Id="pillemaster_hexagonal_tilings.flame" Guid="a0b85758-30b2-49e7-85ca-438046cb83e8">
<File Id="pillemaster_hexagonal_tilings.flame" Source="$(var.SolutionDir)..\..\..\Data\FlameExamples\pillemaster_hexagonal_tilings.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
<File Id="pillemaster_hexagonal_tilings.flame" Source="$(var.SolutionDir)..\..\..\Data\Examples\pillemaster_hexagonal_tilings.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
</Component>
<Component Id="plangkye_examples.flame" Guid="aa6c81a6-28e4-49e7-bef6-fdebfe21e47c">
<File Id="plangkye_examples.flame" Source="$(var.SolutionDir)..\..\..\Data\FlameExamples\plangkye_examples.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
<File Id="plangkye_examples.flame" Source="$(var.SolutionDir)..\..\..\Data\Examples\plangkye_examples.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
</Component>
<Component Id="tatasz_examples.flame" Guid="27d621ec-88b7-4957-ae5f-9b3cc8c8f21a">
<File Id="tatasz_examples.flame" Source="$(var.SolutionDir)..\..\..\Data\FlameExamples\tatasz_examples.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
<File Id="tatasz_examples.flame" Source="$(var.SolutionDir)..\..\..\Data\Examples\tatasz_examples.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
</Component>
<Component Id="tatasz_substitution.flame" Guid="bb1cb196-e5d9-4250-843a-1e649c896ba8">
<File Id="tatasz_substitution.flame" Source="$(var.SolutionDir)..\..\..\Data\FlameExamples\tatasz_substitution.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
<File Id="tatasz_substitution.flame" Source="$(var.SolutionDir)..\..\..\Data\Examples\tatasz_substitution.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
</Component>
<Component Id="tyrantwave_base_forms.flame" Guid="8773ff3a-d29f-4a41-acb4-e06cafb236ad">
<File Id="tyrantwave_base_forms.flame" Source="$(var.SolutionDir)..\..\..\Data\FlameExamples\tyrantwave_base_forms.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
<File Id="tyrantwave_base_forms.flame" Source="$(var.SolutionDir)..\..\..\Data\Examples\tyrantwave_base_forms.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
</Component>
<Component Id="b33rheart_examples.flame" Guid="c014f5b0-d45f-4bb5-9af7-ac98326dcef1">
<File Id="b33rheart_examples.flame" Source="$(var.SolutionDir)..\..\..\Data\FlameExamples\b33rheart_examples.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
<File Id="b33rheart_examples.flame" Source="$(var.SolutionDir)..\..\..\Data\Examples\b33rheart_examples.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
</Component>
<Component Id="b33rheart_sierpinski.flame" Guid="535430de-6878-41b2-913e-cb35e915cb4f">
<File Id="b33rheart_sierpinski.flame" Source="$(var.SolutionDir)..\..\..\Data\FlameExamples\b33rheart_sierpinski.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
<File Id="b33rheart_sierpinski.flame" Source="$(var.SolutionDir)..\..\..\Data\Examples\b33rheart_sierpinski.flame" KeyPath="yes" Checksum="yes" ReadOnly="yes"/>
</Component>
</ComponentGroup>
</Fragment>

View File

@ -225,11 +225,27 @@ OTHER_FILES += \
RESOURCES += \
$$PRJ_SRC_DIR/Fractorium.qrc
DISTFILES += \
../../../Data/FlameExamples/b33rheart_examples.flame \
../../../Data/FlameExamples/b33rheart_sierpinski.flame \
../../../Data/FlameExamples/pillemaster_hexagonal_tilings.flame \
../../../Data/FlameExamples/plangkye_examples.flame \
../../../Data/FlameExamples/tatasz_examples.flame \
../../../Data/FlameExamples/tatasz_substitution.flame \
../../../Data/FlameExamples/tyrantwave_base_forms.flame
bench.path = $$SHARE_INSTALL_DIR/bench
bench.files += \
$$ASSETS_DIR/Bench/EmberBench.ps1 \
$$ASSETS_DIR/Bench/golubaja_rippingfrominside_complexcode.flame \
$$ASSETS_DIR/Bench/mfeemster_basicmemory.flame \
$$ASSETS_DIR/Bench/tatasz_springcrown_manysimplexforms.flame \
$$ASSETS_DIR/Bench/tyrantwave_flippeddisc_normal.flame \
$$ASSETS_DIR/Bench/zy0rg_six_bigcomplexcode.flame
#message(BENCH INSTALL SOURCE: $$bench.files)
INSTALLS += bench
examples.path = $$SHARE_INSTALL_DIR/examples
examples.files += \
$$ASSETS_DIR/Examples/b33rheart_examples.flame \
$$ASSETS_DIR/Examples/b33rheart_sierpinski.flame \
$$ASSETS_DIR/Examples/pillemaster_hexagonal_tilings.flame \
$$ASSETS_DIR/Examples/plangkye_examples.flame \
$$ASSETS_DIR/Examples/tatasz_examples.flame \
$$ASSETS_DIR/Examples/tatasz_substitution.flame \
$$ASSETS_DIR/Examples/tyrantwave_base_forms.flame
#message(EXAMPLES INSTALL SOURCE: $$examples.files)
INSTALLS += examples

View File

@ -897,7 +897,16 @@ QStringList Fractorium::SetupOpenXmlDialog(bool openExamples)
if (openExamples)
{
m_OpenFileDialog->selectFile("*");
m_OpenFileDialog->setDirectory(QCoreApplication::applicationDirPath() + "/FlameExamples");
#ifndef _WIN32
if (QDir("/usr/share/fractorium/examples").exists())
m_OpenFileDialog->setDirectory("/usr/share/fractorium/examples");
else
m_OpenFileDialog->setDirectory(QCoreApplication::applicationDirPath() + "/examples");
#else
m_OpenFileDialog->setDirectory(QCoreApplication::applicationDirPath() + "/examples");
#endif
m_OpenFileDialog->selectNameFilter("flame (*.flame)");
}
else
@ -923,7 +932,7 @@ QStringList Fractorium::SetupOpenXmlDialog(bool openExamples)
if (openExamples)
{
defaultFilter = "flame (*.flame)";
filenames = QFileDialog::getOpenFileNames(this, tr("Open Flame"), QCoreApplication::applicationDirPath() + "/FlameExamples", tr("flame(*.flame)"), &defaultFilter);
filenames = QFileDialog::getOpenFileNames(this, tr("Open Flame"), QCoreApplication::applicationDirPath() + "/Examples", tr("flame(*.flame)"), &defaultFilter);
}
else
{

View File

@ -540,10 +540,10 @@ namespace apoconv
foreach (var file in files)
{
var lines = File.ReadAllLines(file);
var lines = System.IO.File.ReadAllLines(file);
tb1lines.AddRange(lines.ToList());
final += Apo2Fractorium(lines, true);
/*
/*
var guid = Guid.NewGuid();
var fileonly = System.IO.Path.GetFileName(file);