-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 89e3376
Showing
10 changed files
with
1,813 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0"?> | ||
<project name="UECIDE Core" default="build"> | ||
|
||
<target name="clean" description="Clean out the build directories"> | ||
<delete dir="bin" /> | ||
</target> | ||
|
||
<target name="compile" description="Compile"> | ||
<mkdir dir="bin" /> | ||
<javac target="1.7" | ||
debug="true" | ||
debuglevel="lines,vars,source" | ||
deprecation="true" | ||
source="1.7" | ||
encoding="UTF-8" | ||
bootclasspath="${bootclass.path}" | ||
includeAntRuntime="false" | ||
srcdir="src" | ||
destdir="bin"> | ||
<compilerarg value="-Xlint:unchecked"/> | ||
</javac> | ||
</target> | ||
|
||
<target name="build" depends="compile" description="Build"> | ||
<jar basedir="bin" destfile="RepoBuilder.jar"> | ||
<fileset dir="bin" /> | ||
<manifest> | ||
<attribute name="Built-By" value="${user.name}" /> | ||
<attribute name="Main-Class" value="org.uecide.RepoBuilder" /> | ||
<attribute name="Class-Path" value="RepoBuilder.jar" /> | ||
</manifest> | ||
</jar> | ||
<chmod perm="0755" file="RepoBuilder.jar" /> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package org.uecide; | ||
|
||
import javax.swing.*; | ||
import java.awt.*; | ||
import java.awt.event.*; | ||
import javax.swing.table.*; | ||
import java.util.*; | ||
import java.io.*; | ||
import java.net.*; | ||
|
||
class Board extends Package { | ||
|
||
public Board(File r, String name) { | ||
super(r, name); | ||
} | ||
|
||
public String getBlock() { | ||
StringBuilder sb = new StringBuilder(); | ||
|
||
sb.append("Package: " + packagename + "\n"); | ||
sb.append("Section: boards\n"); | ||
sb.append("Architecture: all\n"); | ||
|
||
sb.append(getEntry("XBSC-Group")); | ||
sb.append(getEntry("XBSC-Subroup")); | ||
sb.append(getEntry("XBSC-Image")); | ||
sb.append(getEntry("Depends")); | ||
sb.append(getEntry("Recommends")); | ||
sb.append(getEntry("Homepage")); | ||
sb.append(getEntry("Description")); | ||
|
||
return sb.toString(); | ||
} | ||
|
||
public void populatePanel(final JPanel p) { | ||
p.setLayout(new GridBagLayout()); | ||
GridBagConstraints c = new GridBagConstraints(); | ||
c.gridwidth = 1; | ||
c.gridheight = 1; | ||
c.gridx = 0; | ||
c.gridy = 0; | ||
c.fill = GridBagConstraints.HORIZONTAL; | ||
c.weightx = 1.0; | ||
|
||
|
||
addCodename(p, c, "Board Codename:"); | ||
addDescriptionPair(p, c, "Board Name:"); | ||
|
||
addEntry(p, c, "Group", "XBSC-Group"); | ||
addEntry(p, c, "Subgroup", "XBSC-Subgroup"); | ||
addEntry(p, c, "Depends", "Depends"); | ||
addEntry(p, c, "Recommends", "Recommends"); | ||
|
||
addFileTable(p, c); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.uecide; | ||
|
||
import javax.swing.*; | ||
import java.awt.*; | ||
import java.awt.event.*; | ||
import javax.swing.table.*; | ||
import java.util.*; | ||
import java.io.*; | ||
import java.net.*; | ||
|
||
class Compiler extends Package { | ||
public Compiler(File r, String name) { | ||
super(r,name); | ||
} | ||
|
||
public String getBlock() { | ||
StringBuilder sb = new StringBuilder(); | ||
|
||
sb.append("Package: " + packagename + "\n"); | ||
sb.append("Section: compilers\n"); | ||
sb.append("Architecture: any\n"); | ||
|
||
sb.append(getEntry("XBSC-Group")); | ||
sb.append(getEntry("XBSC-Subroup")); | ||
sb.append(getEntry("XBSC-Image")); | ||
sb.append(getEntry("Depends")); | ||
sb.append(getEntry("Recommends")); | ||
sb.append(getEntry("Homepage")); | ||
sb.append(getEntry("Description")); | ||
|
||
return sb.toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
package org.uecide; | ||
|
||
import javax.swing.*; | ||
import java.awt.*; | ||
import java.awt.event.*; | ||
import javax.swing.table.*; | ||
import java.util.*; | ||
import java.io.*; | ||
import java.net.*; | ||
|
||
class Core extends Package { | ||
JTextField recommendBox; | ||
|
||
public Core(File r, String name) { | ||
super(r, name); | ||
} | ||
|
||
public String getBlock() { | ||
StringBuilder sb = new StringBuilder(); | ||
|
||
sb.append("Package: " + packagename + "\n"); | ||
sb.append("Section: cores\n"); | ||
sb.append("Architecture: all\n"); | ||
|
||
sb.append(getEntry("XBSC-Group")); | ||
sb.append(getEntry("XBSC-Subroup")); | ||
sb.append(getEntry("XBSC-Image")); | ||
sb.append(getEntry("Depends")); | ||
sb.append(getEntry("Recommends")); | ||
sb.append(getEntry("Homepage")); | ||
sb.append(getEntry("Description")); | ||
|
||
return sb.toString(); | ||
} | ||
|
||
public void populatePanel(final JPanel p) { | ||
p.setLayout(new GridBagLayout()); | ||
GridBagConstraints c = new GridBagConstraints(); | ||
c.gridwidth = 1; | ||
c.gridheight = 1; | ||
c.gridx = 0; | ||
c.gridy = 0; | ||
c.fill = GridBagConstraints.HORIZONTAL; | ||
c.weightx = 1.0; | ||
|
||
|
||
addCodename(p, c, "Core Codename:"); | ||
addDescriptionPair(p, c, "Core Name:"); | ||
|
||
addEntry(p, c, "Group", "XBSC-Group"); | ||
addEntry(p, c, "Subgroup", "XBSC-Subgroup"); | ||
addEntry(p, c, "Depends", "Depends"); | ||
recommendBox = addEntry(p, c, "Recommends", "Recommends"); | ||
c.gridx = 1; | ||
JButton addLibs = new JButton("Add all libraries"); | ||
addLibs.addActionListener(new ActionListener() { | ||
public void actionPerformed(ActionEvent e) { | ||
doAddAllLibs(); | ||
} | ||
}); | ||
p.add(addLibs, c); | ||
c.gridx = 0; | ||
c.gridy++; | ||
|
||
addFileTable(p, c); | ||
|
||
} | ||
|
||
public void doAddAllLibs() { | ||
String liblist = ""; | ||
for (Package p : RepoBuilder.repo.getPackages()) { | ||
if (p instanceof Library) { | ||
if (!liblist.equals("")) { | ||
liblist += ", "; | ||
} | ||
liblist += p.toString(); | ||
} | ||
} | ||
set("Recommends", liblist); | ||
recommendBox.setText(liblist); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
package org.uecide; | ||
|
||
import javax.swing.*; | ||
import java.awt.*; | ||
import java.awt.event.*; | ||
import javax.swing.table.*; | ||
import java.util.*; | ||
import java.io.*; | ||
import java.net.*; | ||
|
||
class Library extends Package { | ||
public Library(File r, String name) { | ||
super(r, name); | ||
} | ||
|
||
public String getBlock() { | ||
StringBuilder sb = new StringBuilder(); | ||
|
||
sb.append("Package: " + packagename + "\n"); | ||
sb.append("Section: libraries\n"); | ||
sb.append("Architecture: all\n"); | ||
|
||
sb.append(getEntry("XBSC-Group")); | ||
sb.append(getEntry("XBSC-Subgroup")); | ||
sb.append(getEntry("XBSC-Image")); | ||
sb.append(getEntry("Depends")); | ||
sb.append(getEntry("Recommends")); | ||
sb.append(getEntry("Provides")); | ||
sb.append(getEntry("Homepage")); | ||
sb.append(getEntry("Description")); | ||
|
||
return sb.toString(); | ||
} | ||
|
||
public void populatePanel(final JPanel p) { | ||
p.setLayout(new GridBagLayout()); | ||
GridBagConstraints c = new GridBagConstraints(); | ||
c.gridwidth = 1; | ||
c.gridheight = 1; | ||
c.gridx = 0; | ||
c.gridy = 0; | ||
c.fill = GridBagConstraints.HORIZONTAL; | ||
c.weightx = 1.0; | ||
|
||
|
||
addCodename(p, c, "Library Codename:"); | ||
addDescriptionPair(p, c, "Library Name:"); | ||
|
||
Object[] groupKeys = RepoBuilder.libs.keySet().toArray(); | ||
JLabel groupLab = new JLabel("Group:"); | ||
final JComboBox groupBox = new JComboBox(groupKeys); | ||
groupBox.setSelectedItem(get("XBSC-Group")); | ||
c.gridx = 0; | ||
p.add(groupLab, c); | ||
c.gridx = 1; | ||
p.add(groupBox, c); | ||
c.gridx = 0; | ||
c.gridy++; | ||
|
||
String g = get("XBSC-Group"); | ||
if (g == null) { | ||
Object[] obs = RepoBuilder.libs.keySet().toArray(); | ||
g = (String)obs[0]; | ||
} | ||
Object[] subgroupKeys; | ||
ArrayList<String>sgl = RepoBuilder.libs.get(g); | ||
if (sgl != null) { | ||
subgroupKeys = sgl.toArray(); | ||
} else { | ||
subgroupKeys = new String[0]; | ||
} | ||
|
||
JLabel subgroupLab = new JLabel("Subgroup:"); | ||
final JComboBox subgroupBox = new JComboBox(subgroupKeys); | ||
subgroupBox.setSelectedItem(get("XBSC-Subgroup")); | ||
c.gridx = 0; | ||
p.add(subgroupLab, c); | ||
c.gridx = 1; | ||
p.add(subgroupBox, c); | ||
c.gridx = 0; | ||
c.gridy++; | ||
|
||
groupBox.addActionListener(new ActionListener() { | ||
public void actionPerformed(ActionEvent e) { | ||
Library.this.set("XBSC-Group", (String)groupBox.getSelectedItem()); | ||
Object[] subgroupKeys = RepoBuilder.libs.get(groupBox.getSelectedItem()).toArray(); | ||
|
||
subgroupBox.removeAllItems(); | ||
for (Object o : subgroupKeys) { | ||
subgroupBox.addItem(o); | ||
} | ||
subgroupBox.setSelectedItem(get("XBSC-Subgroup")); | ||
} | ||
}); | ||
|
||
subgroupBox.addActionListener(new ActionListener() { | ||
public void actionPerformed(ActionEvent e) { | ||
Library.this.set("XBSC-Subgroup", (String)subgroupBox.getSelectedItem()); | ||
} | ||
}); | ||
|
||
addEntry(p, c, "Provides", "Provides"); | ||
addEntry(p, c, "Depends", "Depends"); | ||
addEntry(p, c, "Recommends", "Recommends"); | ||
|
||
addFileTable(p, c); | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.