mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-07 12:24:58 +10:00
Release 4.30.0
This commit is contained in:
@@ -3999,7 +3999,7 @@
|
||||
<minor>30</minor>
|
||||
<build>0</build>
|
||||
</versionNumber>
|
||||
<releaseDate>2022-10-04 00:00:00.000 CET</releaseDate>
|
||||
<releaseDate>2022-10-22 00:00:00.000 CET</releaseDate>
|
||||
<name></name>
|
||||
<changes>
|
||||
<org.diylc.appframework.update.Change>
|
||||
@@ -4032,7 +4032,7 @@
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Improved the speed and accuracy of netlist calculation</description>
|
||||
<description>Improved the speed and accuracy of circuit analysis and netlist calculation</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
|
||||
Binary file not shown.
@@ -11,4 +11,5 @@
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="diylc-swing"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value=""C:\Users\bancika\Documents\GitHub\diy-layout-creator\diylc-regression-data" TEST diy-fever"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="diylc-swing"/>
|
||||
<stringAttribute key="yk-options" value=" additional-options2=onexit\=snapshot "/>
|
||||
</launchConfiguration>
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
<property name="jar.dir" value="${build.dir}/jar" />
|
||||
<property name="report.dir" value="${build.dir}/junitreport" />
|
||||
<property name="main.class" value="org.diylc.DIYLCStarter" />
|
||||
<property name="diylc.version" value="4.29.0" />
|
||||
<property name="diylc.version" value="4.30.0" />
|
||||
|
||||
<property name="osx.jre8.path" value="jre\osx\jre8u321\Contents\Home\" />
|
||||
<property name="osx.jre8m1.path" value="jre\osx\jre8zulu\Contents\Home\" />
|
||||
|
||||
<property name="classes.dir" value="${build.dir}/temp/${ant.project.name}/classes" />
|
||||
<property name="test.classes.dir" value="${build.dir}/temp/${ant.project.name}/test.classes" />
|
||||
@@ -124,6 +125,54 @@
|
||||
<zipfileset filemode="755" dir="${basedir}/lang" prefix="DIYLC.app/Contents/Resources/lang" />
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
<target name="mac-m1" depends="jar">
|
||||
<bundleapp
|
||||
outputdirectory="${build.dir}"
|
||||
name="DIYLC"
|
||||
jvmrequired="1.8"
|
||||
copyright="2020 bancika"
|
||||
displayname="DIY Layout Creator"
|
||||
identifier="org.diylc.Desktop"
|
||||
shortversion="${diylc.version}"
|
||||
applicationCategory="public.app-category.graphics-design"
|
||||
icon="icons/diylc.icns"
|
||||
mainclassname="${main.class}">
|
||||
<bundledocument contentTypes="org.diylc.diy"
|
||||
name="DIYLC document"
|
||||
role="Editor"
|
||||
handlerRank="Owner">
|
||||
</bundledocument>
|
||||
<typedeclaration
|
||||
identifier="org.diylc.diy"
|
||||
description="DIYLC file type"
|
||||
icon="icons/diylc.icns"
|
||||
conformsTo="public.xml,public.text"
|
||||
extensions="diy" />
|
||||
<runtime dir="${osx.jre8m1.path}" />
|
||||
<arch name="arm64" />
|
||||
<classpath file="${jar.dir}\diylc.jar" />
|
||||
<classpath file="${jar.dir}\lib\*.jar" />
|
||||
<classpath file="${jar.dir}\library\*.jar" />
|
||||
<option value="-Xms512m" />
|
||||
<option value="-Xmx2048m" />
|
||||
<!--<option value="-javaagent:Contents/Java/jar-loader.jar" />-->
|
||||
<option value="-Dorg.diylc.scriptRun=true" />
|
||||
<option value="-Dfile.encoding=UTF-8" />
|
||||
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
|
||||
<option value="-Dapple.laf.useScreenMenuBar=true"/>
|
||||
<option value="-Dapple.awt.application.name=DIY Layout Creator"/>
|
||||
<option value="-Dcom.apple.smallTabs=true"/>
|
||||
<option value="-Xdock:name=DIY Layout Creator"/>
|
||||
<option value="-Xdock:icon=Contents/Resources/diylc.icns"/>
|
||||
</bundleapp>
|
||||
<zip destfile="${build.dir}/diylc-${diylc.version}-osx-m1.zip">
|
||||
<zipfileset filemode="755" dir="${build.dir}/DIYLC.app" prefix="DIYLC.app" />
|
||||
<zipfileset filemode="755" dir="${basedir}/themes" prefix="DIYLC.app/Contents/Resources/themes" />
|
||||
<zipfileset filemode="755" dir="${basedir}/fonts" prefix="DIYLC.app/Contents/Resources/fonts" />
|
||||
<zipfileset filemode="755" dir="${basedir}/lang" prefix="DIYLC.app/Contents/Resources/lang" />
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
<property name="izpack-dist" value="e:\bane\dev\IzPack" />
|
||||
|
||||
|
||||
@@ -37,6 +37,21 @@
|
||||
<update_contact>nbenitezl_AT_gmail.com</update_contact>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<releases>
|
||||
<release version="4.30.0" date="2022-10-22">
|
||||
<description>
|
||||
<ul>
|
||||
<li>[New Feature] Added 'Rotary Switch (Sealed)' component in several switching configurations</li>
|
||||
<li>[New Feature] Added 'Rotary Switch (Open)' component in several switching configurations</li>
|
||||
<li>[New Feature] Added 'S1 Switch' component that can be combined with potentiometer component or used on its own</li>
|
||||
<li>[New Feature] Added 'DP4T (6-Position Oak Grigsby)' as a new type of Lever Switch component</li>
|
||||
<li>[New Feature] Ability to rotate 'Lever Switch' and 'Schaller Megaswitch' by any angle</li>
|
||||
<li>[New Feature] DIYLC Netlists can be generated including or excluding switching configurations</li>
|
||||
<li>[Improvement] Ability to rotate all guitar/bass pickups through the 'Transform Selection' feature or keyboard shortcut</li>
|
||||
<li>[Improvement] Improved the speed and accuracy of circuit analysis and netlist calculation</li>
|
||||
</ul>
|
||||
</description>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases/tag/v4.30.0</url>
|
||||
</release>
|
||||
<release version="4.29.0" date="2022-10-04">
|
||||
<description>
|
||||
<ul>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -3,10 +3,12 @@ package org.diylc;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -23,6 +25,7 @@ import org.diylc.appframework.update.VersionNumber;
|
||||
import org.diylc.common.IPlugInPort;
|
||||
import org.diylc.core.IView;
|
||||
import org.diylc.netlist.Netlist;
|
||||
import org.diylc.netlist.NetlistException;
|
||||
import org.diylc.presenter.Presenter;
|
||||
import org.diylc.swing.plugins.file.ProjectDrawingProvider;
|
||||
import org.diylc.swingframework.export.DrawingExporter;
|
||||
@@ -178,7 +181,7 @@ public class RegressionTestRunner {
|
||||
}
|
||||
|
||||
private static RegressionTestResult testOutputs(File file, String prefix, Presenter presenter,
|
||||
ProjectDrawingProvider drawingProvider, MockView view) {
|
||||
ProjectDrawingProvider drawingProvider, MockView view) throws NetlistException {
|
||||
RegressionTestResult res = new RegressionTestResult(file.getName());
|
||||
File baseDir = file.getParentFile().getParentFile().getParentFile().getParentFile();
|
||||
File outputDir = new File(baseDir.getAbsolutePath() + File.separator + "output" + File.separator
|
||||
@@ -226,47 +229,13 @@ public class RegressionTestRunner {
|
||||
return res.failed("Images do not match!");
|
||||
}
|
||||
|
||||
List<Netlist> netlists = presenter.extractNetlists(true);
|
||||
File netlistOutputDir = new File(outputDir.getAbsolutePath() + File.separator + "netlist");
|
||||
File netlistOutputFile = new File(netlistOutputDir.getAbsolutePath() + File.separator
|
||||
+ file.getName().replace(".diy", ".txt"));
|
||||
File netlistInputFile = new File(inputDir.getAbsolutePath() + File.separator + "netlist"
|
||||
+ File.separator + (file.getName().replace(".diy", ".txt")));
|
||||
|
||||
netlistOutputDir.mkdirs();
|
||||
try {
|
||||
if (netlistOutputFile.exists()) {
|
||||
netlistOutputFile.delete();
|
||||
}
|
||||
try {
|
||||
try (BufferedWriter writer = new BufferedWriter(
|
||||
new OutputStreamWriter(new FileOutputStream(netlistOutputFile, true), "UTF-8"))) {
|
||||
for (Netlist netlist : netlists) {
|
||||
writer.write(netlist.toString());
|
||||
writer.newLine();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
try (BufferedWriter writer = new BufferedWriter(
|
||||
new OutputStreamWriter(new FileOutputStream(netlistOutputFile, true), "UTF-8"))) {
|
||||
writer.write(e.getClass().getCanonicalName() + ": " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
List<String> inputLines = Files.readAllLines(Paths.get(netlistInputFile.getAbsolutePath()));
|
||||
List<String> outputLines = Files.readAllLines(Paths.get(netlistOutputFile.getAbsolutePath()));
|
||||
|
||||
if (inputLines.size() != outputLines.size()) {
|
||||
return res.failed("Netlists do not match");
|
||||
}
|
||||
for (int i = 0; i < inputLines.size(); i++) {
|
||||
if (!inputLines.get(i).equals(outputLines.get(i))) {
|
||||
return res.failed("Netlists do not match");
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
return res.failed(e.getMessage());
|
||||
}
|
||||
RegressionTestResult netlistResultWithSwitches = testNetlist(file, presenter, res, outputDir, inputDir, true);
|
||||
if (netlistResultWithSwitches != null)
|
||||
return netlistResultWithSwitches;
|
||||
|
||||
RegressionTestResult netlistResultWithoutSwitches = testNetlist(file, presenter, res, outputDir, inputDir, false);
|
||||
if (netlistResultWithoutSwitches != null)
|
||||
return netlistResultWithoutSwitches;
|
||||
|
||||
// List<INetlistAnalyzer> summarizers = presenter.getNetlistAnalyzers();
|
||||
// if (summarizers != null) {
|
||||
@@ -333,6 +302,52 @@ public class RegressionTestRunner {
|
||||
return res.succedded(message);
|
||||
}
|
||||
|
||||
private static RegressionTestResult testNetlist(File file, Presenter presenter, RegressionTestResult res,
|
||||
File outputDir, File inputDir, boolean includeSwitches) throws NetlistException {
|
||||
File netlistOutputDir = new File(outputDir.getAbsolutePath() + File.separator + "netlist");
|
||||
File netlistOutputFile = new File(netlistOutputDir.getAbsolutePath() + File.separator
|
||||
+ file.getName().replace(".diy", includeSwitches ? "_incl_switches.txt" : "_excl_switches.txt"));
|
||||
File netlistInputFile = new File(inputDir.getAbsolutePath() + File.separator + "netlist"
|
||||
+ File.separator + (file.getName().replace(".diy", includeSwitches ? "_incl_switches.txt" : "_excl_switches.txt")));
|
||||
|
||||
netlistOutputDir.mkdirs();
|
||||
try {
|
||||
if (netlistOutputFile.exists()) {
|
||||
netlistOutputFile.delete();
|
||||
}
|
||||
try {
|
||||
List<Netlist> netlists = presenter.extractNetlists(includeSwitches);
|
||||
try (BufferedWriter writer = new BufferedWriter(
|
||||
new OutputStreamWriter(new FileOutputStream(netlistOutputFile, true), "UTF-8"))) {
|
||||
for (Netlist netlist : netlists) {
|
||||
writer.write(netlist.toString());
|
||||
writer.newLine();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
try (BufferedWriter writer = new BufferedWriter(
|
||||
new OutputStreamWriter(new FileOutputStream(netlistOutputFile, true), "UTF-8"))) {
|
||||
writer.write(e.getClass().getCanonicalName() + ": " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
List<String> inputLines = Files.readAllLines(Paths.get(netlistInputFile.getAbsolutePath()));
|
||||
List<String> outputLines = Files.readAllLines(Paths.get(netlistOutputFile.getAbsolutePath()));
|
||||
|
||||
if (inputLines.size() != outputLines.size()) {
|
||||
return res.failed("Netlists do not match");
|
||||
}
|
||||
for (int i = 0; i < inputLines.size(); i++) {
|
||||
if (!inputLines.get(i).equals(outputLines.get(i))) {
|
||||
return res.failed("Netlists do not match");
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
return res.failed(e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static RegressionTestResult prepareInputs(File file,
|
||||
ProjectDrawingProvider drawingProvider, IPlugInPort plugInPort) {
|
||||
RegressionTestResult res = new RegressionTestResult(file.getName());
|
||||
@@ -346,29 +361,8 @@ public class RegressionTestRunner {
|
||||
// always export image to ensure that rendering is done and continuity areas are populated
|
||||
DrawingExporter.getInstance().exportPNG(drawingProvider, pngFile);
|
||||
|
||||
List<Netlist> netlists = plugInPort.extractNetlists(true);
|
||||
File netlistDir = new File(
|
||||
file.getParentFile().getParentFile().getAbsolutePath() + File.separator + "netlist");
|
||||
File netlistFile = new File(
|
||||
netlistDir.getAbsolutePath() + File.separator + file.getName().replace(".diy", ".txt"));
|
||||
|
||||
netlistDir.mkdirs();
|
||||
if (!netlistFile.exists()) {
|
||||
try {
|
||||
try (BufferedWriter writer = new BufferedWriter(
|
||||
new OutputStreamWriter(new FileOutputStream(netlistFile, true), "UTF-8"))) {
|
||||
for (Netlist netlist : netlists) {
|
||||
writer.write(netlist.toString());
|
||||
writer.newLine();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
try (BufferedWriter writer = new BufferedWriter(
|
||||
new OutputStreamWriter(new FileOutputStream(netlistFile, true), "UTF-8"))) {
|
||||
writer.write(e.getClass().getCanonicalName() + ": " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
prepareNetlist(file, plugInPort, true);
|
||||
prepareNetlist(file, plugInPort, false);
|
||||
|
||||
// List<INetlistAnalyzer> summarizers = plugInPort.getNetlistAnalyzers();
|
||||
// if (summarizers != null) {
|
||||
@@ -399,6 +393,34 @@ public class RegressionTestRunner {
|
||||
return res.succedded();
|
||||
}
|
||||
|
||||
private static void prepareNetlist(File file, IPlugInPort plugInPort, boolean includeSwitches)
|
||||
throws IOException, UnsupportedEncodingException, FileNotFoundException, NetlistException {
|
||||
|
||||
File netlistDir = new File(
|
||||
file.getParentFile().getParentFile().getAbsolutePath() + File.separator + "netlist");
|
||||
File netlistFile = new File(
|
||||
netlistDir.getAbsolutePath() + File.separator + file.getName().replace(".diy", includeSwitches ? "_incl_switches.txt" : "_excl_switches.txt"));
|
||||
|
||||
netlistDir.mkdirs();
|
||||
if (!netlistFile.exists()) {
|
||||
try {
|
||||
List<Netlist> netlists = plugInPort.extractNetlists(includeSwitches);
|
||||
try (BufferedWriter writer = new BufferedWriter(
|
||||
new OutputStreamWriter(new FileOutputStream(netlistFile, true), "UTF-8"))) {
|
||||
for (Netlist netlist : netlists) {
|
||||
writer.write(netlist.toString());
|
||||
writer.newLine();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
try (BufferedWriter writer = new BufferedWriter(
|
||||
new OutputStreamWriter(new FileOutputStream(netlistFile, true), "UTF-8"))) {
|
||||
writer.write(e.getClass().getCanonicalName() + ": " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// private static void writeSummariesToFile(List<Netlist> netlists, INetlistAnalyzer summarizer,
|
||||
// File summaryFile)
|
||||
// throws TreeException, IOException, UnsupportedEncodingException, FileNotFoundException {
|
||||
|
||||
Reference in New Issue
Block a user