Version 4.7.0u Release
This commit is contained in:
1 parent
13cce29e9c
commit
b2cd41bbcf
300 files changed
+9030
-2499
No files matched your search
@@ -1 +0,0 @@
|
||||
ca.canuckcoding.wosqi.WebOSQuickInstallApp
|
||||
@@ -1,211 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.9" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||
<Property name="modal" type="boolean" value="true"/>
|
||||
<Property name="name" type="java.lang.String" value="aboutBox" noResource="true"/>
|
||||
<Property name="resizable" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||||
</SyntheticProperties>
|
||||
<Events>
|
||||
<EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="formKeyPressed"/>
|
||||
<EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="formKeyTyped"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLayeredPane1" alignment="0" pref="350" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLayeredPane1" alignment="0" pref="341" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JLayeredPane" name="jLayeredPane1">
|
||||
<Properties>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="c0" green="c0" red="c0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jLayeredPane1" noResource="true"/>
|
||||
<Property name="opaque" type="boolean" value="true"/>
|
||||
</Properties>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
|
||||
<Property name="useNullLayout" type="boolean" value="true"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="closeButton">
|
||||
<Properties>
|
||||
<Property name="action" type="javax.swing.Action" editor="org.netbeans.modules.swingapp.ActionEditor">
|
||||
<action class="ca.canucksoftware.WebOSQuickInstallAboutBox" id="closeAboutBox" methodName="closeAboutBox"/>
|
||||
</Property>
|
||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="c0" green="c0" red="c0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="closeButton" property="font" relativeSize="true" size="0"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="ca/canuckcoding/wosqi/Bundle.properties" key="About.closeButton.text" replaceFormat="bundle.getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="name" type="java.lang.String" value="closeButton" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="closeButtonKeyTyped"/>
|
||||
</Events>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||
<AbsoluteConstraints x="130" y="310" width="90" height="-1"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="jLabel5" italic="true" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/ca/canuckcoding/wosqi/resources/donate.gif"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="ca/canuckcoding/wosqi/Bundle.properties" key="About.jLabel5.text" replaceFormat="bundle.getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="horizontalTextPosition" type="int" value="0"/>
|
||||
<Property name="name" type="java.lang.String" value="jLabel5" noResource="true"/>
|
||||
<Property name="verticalTextPosition" type="int" value="1"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabel5MouseClicked"/>
|
||||
<EventHandler event="mouseMoved" listener="java.awt.event.MouseMotionListener" parameters="java.awt.event.MouseEvent" handler="jLabel5MouseMoved"/>
|
||||
</Events>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||
<AbsoluteConstraints x="10" y="120" width="330" height="50"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/ca/canuckcoding/wosqi/resources/title.png"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jLabel1" noResource="true"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||
<AbsoluteConstraints x="0" y="0" width="350" height="60"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="jLabel6" property="font" relativeSize="true" size="0"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="ca/canuckcoding/wosqi/Bundle.properties" key="About.jLabel6.text" replaceFormat="bundle.getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jLabel6" noResource="true"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||
<AbsoluteConstraints x="20" y="200" width="310" height="110"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="appVersionLabel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font bold="true" component="appVersionLabel" property="font" relativeSize="true" size="5"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="ca/canuckcoding/wosqi/Bundle.properties" key="About.appVersionLabel.text" replaceFormat="bundle.getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="appVersionLabel" noResource="true"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||
<AbsoluteConstraints x="10" y="50" width="330" height="30"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="jLabel4" property="font" relativeSize="true" size="0"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="ca/canuckcoding/wosqi/Bundle.properties" key="About.jLabel4.text" replaceFormat="bundle.getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jLabel4" noResource="true"/>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||
<AbsoluteConstraints x="20" y="170" width="310" height="40"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.editors2.FontEditor">
|
||||
<FontInfo relative="true">
|
||||
<Font component="jLabel2" property="font" relativeSize="true" size="1"/>
|
||||
</FontInfo>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="ca/canuckcoding/wosqi/Bundle.properties" key="About.jLabel2.text" replaceFormat="bundle.getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="name" type="java.lang.String" value="jLabel2" noResource="true"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabel2MouseClicked"/>
|
||||
</Events>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
|
||||
<AbsoluteConstraints x="10" y="80" width="330" height="40"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -1,11 +0,0 @@
|
||||
# Application global resources
|
||||
|
||||
Application.name = WebOS Quick Install
|
||||
Application.title = WebOS Quick Install
|
||||
Application.version = 4.2.1
|
||||
Application.vendor = Jason Robitaille
|
||||
Application.homepage = http://canuckcoding.ca
|
||||
Application.description = An advanced tool for installing and managine packages on webOS devices.
|
||||
Application.vendorId = Jason Robitaille
|
||||
Application.id = WebOS Quick Install
|
||||
Application.lookAndFeel = system
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
package ca.canuckcoding.ipkg;
|
||||
package ipkg;
|
||||
|
||||
import ca.canuckcoding.utils.OnlineFile;
|
||||
import ca.canuckcoding.webos.InstalledEntry;
|
||||
@@ -1,8 +1,4 @@
|
||||
/*
|
||||
* PackageFeed.java
|
||||
*/
|
||||
|
||||
package ca.canuckcoding.ipkg;
|
||||
package ipkg;
|
||||
|
||||
import ca.canuckcoding.utils.OnlineFile;
|
||||
import java.util.ArrayList;
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
package ca.canuckcoding.ipkg;
|
||||
package ipkg;
|
||||
|
||||
/**
|
||||
* @author Jason Robitaille
|
||||
@@ -1,16 +1,18 @@
|
||||
package ipkg;
|
||||
|
||||
package ca.canuckcoding.ipkg;
|
||||
|
||||
import ca.canuckcoding.webos.InstalledEntry;
|
||||
import ca.canuckcoding.webos.DeviceInfo;
|
||||
import ca.canuckcoding.wosqi.WebOSQuickInstallApp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.prefs.Preferences;
|
||||
|
||||
import javax.swing.JTextArea;
|
||||
|
||||
import org.json.JSONArray;
|
||||
|
||||
import ca.canuckcoding.webos.DeviceInfo;
|
||||
import ca.canuckcoding.webos.InstalledEntry;
|
||||
import wosqi.WebOSQuickInstallApp;
|
||||
|
||||
/**
|
||||
* @author Jason Robitaille
|
||||
*/
|
||||
@@ -32,19 +34,26 @@ public class PackageManager {
|
||||
}
|
||||
|
||||
public PackageManager(DeviceInfo info, ArrayList<InstalledEntry> apps, JTextArea display) {
|
||||
|
||||
device = info;
|
||||
installed = apps;
|
||||
label = display;
|
||||
bundle = WebOSQuickInstallApp.bundle;
|
||||
ALL_CATEGORIES = "--" + bundle.getString("ALL") + "--";
|
||||
|
||||
if(info.os().toLowerCase().contains("luneos")) {
|
||||
|
||||
defaultFeeds = new String[] {
|
||||
"http://ipkg.preware.net/feeds/precentral/Packages.gz",
|
||||
"http://ipkg.preware.net/feeds/webos-internals/all/Packages.gz",
|
||||
"http://ipkg.preware.net/feeds/webos-internals/" + device.arch() + "/Packages.gz"
|
||||
};
|
||||
} else {
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
defaultFeeds = new String[] {
|
||||
|
||||
"http://ipkg.preware.net/feeds/precentral/Packages.gz",
|
||||
"http://ipkg.preware.net/feeds/webos-internals/all/Packages.gz",
|
||||
"http://ipkg.preware.net/feeds/webos-internals/" + device.arch() + "/Packages.gz",
|
||||
@@ -52,15 +61,20 @@ public class PackageManager {
|
||||
"http://ipkg.preware.net/feeds/webos-kernels/" + device.version() + "/Packages.gz",
|
||||
"http://www.prethemer.com/feeds/preware/themes/Packages.gz",
|
||||
"http://ipkg.preware.net/feeds/precentral-themes/Packages.gz",
|
||||
"http://webos-clock-themer.googlecode.com/svn/trunk/WebOS%20Clock%20Theme%20Builder/feed/Packages.gz"
|
||||
"https://github.com/NotAlexNoyle/WebOS-Clock-Themer/raw/master/feed/Packages.gz"
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Preferences prefs = Preferences.systemRoot();
|
||||
|
||||
Preferences prefs = Preferences.userRoot();
|
||||
int numFeeds = prefs.getInt("numCustomFeeds", 0);
|
||||
feedStates = new boolean[defaultFeeds.length + numFeeds];
|
||||
feedUrls = new String[defaultFeeds.length + numFeeds];
|
||||
for(int i=0; i<defaultFeeds.length; i++) {
|
||||
|
||||
feedStates[i] = prefs.getBoolean("defaultFeedState-" + i, true);
|
||||
|
||||
}
|
||||
|
||||
feeds = new PackageFeed[defaultFeeds.length + numFeeds];
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
package ca.canuckcoding.ipkg;
|
||||
package ipkg;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,11 @@
|
||||
# Application global resources
|
||||
|
||||
Application.name = WebOS Quick Install
|
||||
Application.title = WebOS Quick Install
|
||||
Application.version = v4.7.0u
|
||||
Application.vendor = NotAlexNoyle
|
||||
Application.homepage = http://github.com/NotAlexNoyle/WebOS-Quick-Install
|
||||
Application.description = An advanced tool for installing and managing packages on webOS devices.
|
||||
Application.id = WOSQI
|
||||
Application.vendorId = NotAlexNoyle
|
||||
Application.lookAndFeel = system
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,4 @@
|
||||
|
||||
package ca.canuckcoding.utils;
|
||||
package utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
package ca.canuckcoding.utils;
|
||||
package utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -1,26 +1,33 @@
|
||||
package wosqi;
|
||||
|
||||
package ca.canuckcoding.wosqi;
|
||||
|
||||
import org.jdesktop.application.Action;
|
||||
import java.awt.Cursor;
|
||||
import java.awt.Desktop;
|
||||
import java.net.URI;
|
||||
import java.awt.Cursor;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javax.swing.JLabel;
|
||||
|
||||
import org.jdesktop.application.Action;
|
||||
|
||||
public class About extends javax.swing.JDialog {
|
||||
|
||||
private ResourceBundle bundle;
|
||||
|
||||
public About(java.awt.Frame parent) {
|
||||
|
||||
super(parent);
|
||||
bundle = WebOSQuickInstallApp.bundle;
|
||||
initComponents();
|
||||
getRootPane().setDefaultButton(closeButton);
|
||||
jLabel5.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||
|
||||
}
|
||||
|
||||
@Action
|
||||
public void closeAboutBox() {
|
||||
|
||||
dispose();
|
||||
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
@@ -42,86 +49,114 @@ public class About extends javax.swing.JDialog {
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setModal(true);
|
||||
setName("aboutBox"); // NOI18N
|
||||
setName("aboutBox");
|
||||
setResizable(false);
|
||||
addKeyListener(new java.awt.event.KeyAdapter() {
|
||||
|
||||
public void keyPressed(java.awt.event.KeyEvent evt) {
|
||||
|
||||
formKeyPressed(evt);
|
||||
|
||||
}
|
||||
public void keyTyped(java.awt.event.KeyEvent evt) {
|
||||
|
||||
formKeyTyped(evt);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
jLayeredPane1.setBackground(new java.awt.Color(192, 192, 192));
|
||||
jLayeredPane1.setName("jLayeredPane1"); // NOI18N
|
||||
jLayeredPane1.setName("jLayeredPane1");
|
||||
jLayeredPane1.setOpaque(true);
|
||||
|
||||
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(ca.canuckcoding.wosqi.WebOSQuickInstallApp.class).getContext().getActionMap(About.class, this);
|
||||
closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N
|
||||
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(wosqi.WebOSQuickInstallApp.class).getContext().getActionMap(About.class, this);
|
||||
closeButton.setAction(actionMap.get("closeAboutBox"));
|
||||
closeButton.setBackground(new java.awt.Color(192, 192, 192));
|
||||
closeButton.setFont(closeButton.getFont());
|
||||
closeButton.setText(bundle.getString("About.closeButton.text")); // NOI18N
|
||||
closeButton.setText(bundle.getString("About.closeButton.text"));
|
||||
closeButton.setFocusable(false);
|
||||
closeButton.setName("closeButton"); // NOI18N
|
||||
closeButton.setName("closeButton");
|
||||
closeButton.addKeyListener(new java.awt.event.KeyAdapter() {
|
||||
|
||||
public void keyTyped(java.awt.event.KeyEvent evt) {
|
||||
|
||||
closeButtonKeyTyped(evt);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
jLayeredPane1.add(closeButton);
|
||||
closeButton.setBounds(130, 310, 90, 25);
|
||||
|
||||
jLabel5.setFont(jLabel5.getFont().deriveFont((jLabel5.getFont().getStyle() | java.awt.Font.ITALIC), jLabel5.getFont().getSize()+1));
|
||||
jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ca/canuckcoding/wosqi/resources/donate.gif"))); // NOI18N
|
||||
jLabel5.setText(bundle.getString("About.jLabel5.text")); // NOI18N
|
||||
jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/donate.gif")));
|
||||
jLabel5.setText(bundle.getString("About.jLabel5.text"));
|
||||
jLabel5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
jLabel5.setName("jLabel5"); // NOI18N
|
||||
jLabel5.setName("jLabel5");
|
||||
jLabel5.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
|
||||
jLabel5.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
|
||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||
|
||||
jLabel5MouseClicked(evt);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
jLabel5.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
|
||||
public void mouseMoved(java.awt.event.MouseEvent evt) {
|
||||
jLabel5MouseMoved(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLayeredPane1.add(jLabel5);
|
||||
jLabel5.setBounds(10, 120, 330, 50);
|
||||
|
||||
JLabel jLabel7 = new javax.swing.JLabel();
|
||||
jLabel7.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||
jLabel7.setFont(jLabel7.getFont().deriveFont((jLabel7.getFont().getStyle() | java.awt.Font.ITALIC), jLabel7.getFont().getSize()+1));
|
||||
jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/donate.gif")));
|
||||
jLabel7.setText(bundle.getString("About.jLabel7.text"));
|
||||
jLabel7.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
jLabel7.setName("jLabel7");
|
||||
jLabel7.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
|
||||
jLabel7.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||
jLabel7MouseClicked(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLayeredPane1.add(jLabel7);
|
||||
jLabel7.setBounds(10, 175, 330, 50);
|
||||
|
||||
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ca/canuckcoding/wosqi/resources/title.png"))); // NOI18N
|
||||
jLabel1.setName("jLabel1"); // NOI18N
|
||||
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/title.png")));
|
||||
jLabel1.setName("jLabel1");
|
||||
jLayeredPane1.add(jLabel1);
|
||||
jLabel1.setBounds(0, 0, 350, 60);
|
||||
|
||||
jLabel6.setFont(jLabel6.getFont());
|
||||
jLabel6.setText(bundle.getString("About.jLabel6.text")); // NOI18N
|
||||
jLabel6.setName("jLabel6"); // NOI18N
|
||||
jLabel6.setText(bundle.getString("About.jLabel6.text"));
|
||||
jLabel6.setName("jLabel6");
|
||||
jLayeredPane1.add(jLabel6);
|
||||
jLabel6.setBounds(20, 200, 310, 110);
|
||||
jLabel6.setBounds(20, 210, 310, 110);
|
||||
|
||||
appVersionLabel.setFont(appVersionLabel.getFont().deriveFont(appVersionLabel.getFont().getStyle() | java.awt.Font.BOLD, appVersionLabel.getFont().getSize()+5));
|
||||
appVersionLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
appVersionLabel.setText(bundle.getString("About.appVersionLabel.text")); // NOI18N
|
||||
appVersionLabel.setName("appVersionLabel"); // NOI18N
|
||||
appVersionLabel.setText(bundle.getString("About.appVersionLabel.text"));
|
||||
appVersionLabel.setName("appVersionLabel");
|
||||
jLayeredPane1.add(appVersionLabel);
|
||||
appVersionLabel.setBounds(10, 50, 330, 30);
|
||||
|
||||
jLabel4.setFont(jLabel4.getFont());
|
||||
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel4.setText(bundle.getString("About.jLabel4.text")); // NOI18N
|
||||
jLabel4.setName("jLabel4"); // NOI18N
|
||||
jLabel4.setText(bundle.getString("About.jLabel4.text"));
|
||||
jLabel4.setName("jLabel4");
|
||||
jLayeredPane1.add(jLabel4);
|
||||
jLabel4.setBounds(20, 170, 310, 40);
|
||||
jLabel4.setBounds(20, 280, 310, 40);
|
||||
|
||||
jLabel2.setFont(jLabel2.getFont().deriveFont(jLabel2.getFont().getSize()+1f));
|
||||
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel2.setText(bundle.getString("About.jLabel2.text")); // NOI18N
|
||||
jLabel2.setName("jLabel2"); // NOI18N
|
||||
jLabel2.setText(bundle.getString("About.jLabel2.text"));
|
||||
jLabel2.setName("jLabel2");
|
||||
jLabel2.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||
jLabel2MouseClicked(evt);
|
||||
@@ -156,14 +191,17 @@ public class About extends javax.swing.JDialog {
|
||||
|
||||
}//GEN-LAST:event_closeButtonKeyTyped
|
||||
|
||||
private void jLabel5MouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel5MouseMoved
|
||||
}//GEN-LAST:event_jLabel5MouseMoved
|
||||
|
||||
private void jLabel5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel5MouseClicked
|
||||
try {
|
||||
Desktop.getDesktop().browse(new URI("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7G5QLAXMVVSGY"));
|
||||
} catch(Exception e) {}
|
||||
}//GEN-LAST:event_jLabel5MouseClicked
|
||||
}//GEN-LAST:event_jLabel5MouseClicked
|
||||
|
||||
private void jLabel7MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel7MouseClicked
|
||||
try {
|
||||
Desktop.getDesktop().browse(new URI("https://www.paypal.me/NotAlexNoyle"));
|
||||
} catch(Exception e) {}
|
||||
}//GEN-LAST:event_jLabel7MouseClicked
|
||||
|
||||
private void jLabel2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel2MouseClicked
|
||||
/*try {
|
||||
@@ -1,6 +1,15 @@
|
||||
# To change this template, choose Tools | Templates
|
||||
# and open the template in the editor.
|
||||
|
||||
MainView.name = WebOS Quick Install
|
||||
MainView.id = WOSQI
|
||||
MainView.title = WebOS Quick Install
|
||||
MainView.version = v4.7.0u
|
||||
MainView.vendor = Alexander Noyle
|
||||
MainView.vendorId = NotAlexNoyle
|
||||
MainView.homepage = https://github.com/NotAlexNoyle/WebOS-Quick-Install
|
||||
MainView.description = The ultimate bridge between your computer and your webOS device.
|
||||
MainView.lookAndFeel = system
|
||||
MainView.jLabel2.text=Device:
|
||||
MainView.fileMenu.text=File
|
||||
MainView.jLayeredPane7.border.title=Files to Install
|
||||
@@ -104,11 +113,12 @@ InstalledPatchInfo.jLabel1.text=Name:
|
||||
InstalledPatchInfo.jLabel5.text=Description:
|
||||
InstalledPatchInfo.jLabel11.text=Author:
|
||||
About.closeButton.text=Close
|
||||
About.jLabel5.text=Help support development
|
||||
About.appVersionLabel.text=Version 4.6.0
|
||||
About.jLabel2.text=Opensource under Apache License 2.0
|
||||
About.jLabel4.text=<html>Copyright \u00a9 2009-2014 Jason Robitaille.
|
||||
About.jLabel6.text=<html><p align="justify">Jason Robitaille and Canuck Coding are in no way affiliated with HP, LG or their affiliates. Palm, Pre, Pixi, Veer, TouchPad, Enyo, webOS, and Open webOS are among the trademarks owned by or licensed to HP and/or LG Electronics.</p>
|
||||
About.jLabel5.text=Donate to support the original developer:
|
||||
About.appVersionLabel.text=Version v4.7.0u
|
||||
About.jLabel2.text=Open Source under the Apache License 2.0
|
||||
About.jLabel4.text=Copyright 2009-2014 Jason Robitaille.
|
||||
About.jLabel7.text=Donate to support the new maintainer:
|
||||
About.jLabel6.text=<html><p align="justify">Jason Robitaille, Alex Noyle, and Canuck Coding are in no way affiliated with HP, LG or their affiliates. Palm, Pre, Pixi, Veer, TouchPad, Enyo, webOS, and Open webOS are among the trademarks owned by or licensed to HP and/or LG Electronics.</p>
|
||||
FeedLoader.jLabel5.text=Downloading and parsing:
|
||||
FeedLoader.jLabel6.text=
|
||||
FeedViewer.jLayeredPane1.TabConstraints.tabTitle=Updates
|
||||
@@ -325,4 +335,4 @@ OK=OK
|
||||
DRIVER_INSTALLED_SUCCESSFULLY.=Driver installed successfully.
|
||||
ERROR\:_DRIVER_INSTALLATION_FAILED=ERROR: Driver installation failed
|
||||
MainView.jMenuItem10.text=License
|
||||
MainView.jMenuItem10.toolTipText=
|
||||
MainView.jMenuItem10.toolTipText=
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,8 +1,4 @@
|
||||
/*
|
||||
* WebOSQuickInstallAboutBox.java
|
||||
*/
|
||||
|
||||
package ca.canuckcoding.wosqi;
|
||||
package wosqi;
|
||||
|
||||
import ca.canuckcoding.webos.InstalledEntry;
|
||||
import ca.canuckcoding.webos.DeviceInfo;
|
||||
@@ -67,27 +63,27 @@ public class DeviceManagement extends javax.swing.JDialog {
|
||||
DeviceInfo info = webOS.getDeviceInfo();
|
||||
URL imgURL;
|
||||
if(info.model().equals(DeviceInfo.Model.Emulator.toString())) {
|
||||
imgURL = getClass().getResource("resources/Emulator 64x64.png");
|
||||
imgURL = getClass().getResource("/resources/Emulator 64x64.png");
|
||||
} else if(info.model().equals(DeviceInfo.Model.Palm_Pixi.toString()) ||
|
||||
info.model().equals(DeviceInfo.Model.Palm_Pixi_Plus.toString())) {
|
||||
imgURL = getClass().getResource("resources/Palm Pixi 64x64.png");
|
||||
imgURL = getClass().getResource("/resources/Palm Pixi 64x64.png");
|
||||
} else if(info.model().equals(DeviceInfo.Model.Palm_Pre.toString()) ||
|
||||
info.model().equals(DeviceInfo.Model.Palm_Pre_Plus.toString())) {
|
||||
imgURL = getClass().getResource("resources/Palm Pre 64x64.png");
|
||||
imgURL = getClass().getResource("/resources/Palm Pre 64x64.png");
|
||||
} else if(info.model().equals(DeviceInfo.Model.Palm_Pre_2.toString())) {
|
||||
imgURL = getClass().getResource("resources/Palm Pre 2 64x64.png");
|
||||
imgURL = getClass().getResource("/resources/Palm Pre 2 64x64.png");
|
||||
} else if(info.model().equals(DeviceInfo.Model.HP_Veer.toString())) {
|
||||
imgURL = getClass().getResource("resources/HP Veer 64x64.png");
|
||||
imgURL = getClass().getResource("/resources/HP Veer 64x64.png");
|
||||
} else if(info.model().equals(DeviceInfo.Model.HP_TouchPad.toString())) {
|
||||
imgURL = getClass().getResource("resources/HP TouchPad 64x64.png");
|
||||
imgURL = getClass().getResource("/resources/HP TouchPad 64x64.png");
|
||||
} else if(info.model().equals(DeviceInfo.Model.HP_Pre_3.toString())) {
|
||||
imgURL = getClass().getResource("resources/HP Pre 3 64x64.png");
|
||||
imgURL = getClass().getResource("/resources/HP Pre 3 64x64.png");
|
||||
} else if(info.model().equals(DeviceInfo.Model.Samsung_Galaxy_Nexus.toString())
|
||||
|| info.model().equals(DeviceInfo.Model.LG_Nexus_4.toString())
|
||||
|| info.model().equals(DeviceInfo.Model.Asus_Nexus_7.toString())) {
|
||||
imgURL = getClass().getResource("resources/LuneOS 64x64.png");
|
||||
imgURL = getClass().getResource("/resources/LuneOS 64x64.png");
|
||||
} else { //unknown/Open webOS generic
|
||||
imgURL = getClass().getResource("resources/Open webOS 64x64.png");
|
||||
imgURL = getClass().getResource("/resources/Open webOS 64x64.png");
|
||||
}
|
||||
jLabel7.setIcon(new ImageIcon(imgURL));
|
||||
jLabel2.setText(bundle.getString("DEVICE:") + " " + info.name());
|
||||
@@ -446,7 +442,7 @@ public class DeviceManagement extends javax.swing.JDialog {
|
||||
jComboBox1.setBounds(154, 20, 100, 20);
|
||||
jLayeredPane3.add(jComboBox1, javax.swing.JLayeredPane.DEFAULT_LAYER);
|
||||
|
||||
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(ca.canuckcoding.wosqi.WebOSQuickInstallApp.class).getContext().getActionMap(DeviceManagement.class, this);
|
||||
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(wosqi.WebOSQuickInstallApp.class).getContext().getActionMap(DeviceManagement.class, this);
|
||||
jButton1.setAction(actionMap.get("uninstall")); // NOI18N
|
||||
jButton1.setText(bundle.getString("DeviceManagement.jButton1.text")); // NOI18N
|
||||
jButton1.setFocusable(false);
|
||||
File renamed without changes.
@@ -1,10 +1,6 @@
|
||||
/*
|
||||
* WebOSQuickInstallAboutBox.java
|
||||
*/
|
||||
package wosqi;
|
||||
|
||||
package ca.canuckcoding.wosqi;
|
||||
|
||||
import ca.canuckcoding.ipkg.PackageManager;
|
||||
import ipkg.PackageManager;
|
||||
import ca.canuckcoding.webos.DeviceInfo;
|
||||
import ca.canuckcoding.webos.WebOSConnection;
|
||||
import java.text.MessageFormat;
|
||||
@@ -89,28 +85,28 @@ public class FeedLoader extends javax.swing.JDialog {
|
||||
jTextArea2.setBackground(new java.awt.Color(219, 219, 219));
|
||||
jTextArea2.setColumns(20);
|
||||
jTextArea2.setEditable(false);
|
||||
jTextArea2.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
|
||||
jTextArea2.setFont(new java.awt.Font("Tahoma", 0, 11));
|
||||
jTextArea2.setLineWrap(true);
|
||||
jTextArea2.setRows(2);
|
||||
jTextArea2.setWrapStyleWord(true);
|
||||
jTextArea2.setBorder(null);
|
||||
jTextArea2.setName("jTextArea2"); // NOI18N
|
||||
jTextArea2.setName("jTextArea2");
|
||||
jScrollPane2.setViewportView(jTextArea2);
|
||||
|
||||
jLayeredPane1.add(jScrollPane2);
|
||||
jScrollPane2.setBounds(10, 20, 240, 30);
|
||||
|
||||
jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ca/canuckcoding/wosqi/resources/activity.gif"))); // NOI18N
|
||||
jLabel6.setText(bundle.getString("FeedLoader.jLabel6.text")); // NOI18N
|
||||
jLabel6.setName("jLabel6"); // NOI18N
|
||||
jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/activity.gif"))); // NOI18N
|
||||
jLabel6.setText(bundle.getString("FeedLoader.jLabel6.text"));
|
||||
jLabel6.setName("jLabel6");
|
||||
jLayeredPane1.add(jLabel6);
|
||||
jLabel6.setBounds(0, 48, 260, 20);
|
||||
|
||||
jLabel5.setFont(jLabel5.getFont().deriveFont(jLabel5.getFont().getStyle() | java.awt.Font.BOLD));
|
||||
jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel5.setText(bundle.getString("FeedLoader.jLabel5.text")); // NOI18N
|
||||
jLabel5.setName("jLabel5"); // NOI18N
|
||||
jLabel5.setText(bundle.getString("FeedLoader.jLabel5.text"));
|
||||
jLabel5.setName("jLabel5");
|
||||
jLayeredPane1.add(jLabel5);
|
||||
jLabel5.setBounds(10, 0, 240, 20);
|
||||
|
||||
File renamed without changes.
File diff suppressed because it is too large.
Load diff
File renamed without changes.
+1
-1
@@ -2,7 +2,7 @@
|
||||
* WebOSQuickInstallAboutBox.java
|
||||
*/
|
||||
|
||||
package ca.canuckcoding.wosqi;
|
||||
package wosqi;
|
||||
|
||||
import ca.canuckcoding.webos.InstalledEntry;
|
||||
import ca.canuckcoding.webos.WebOSConnection;
|
||||
File renamed without changes.
@@ -1,8 +1,4 @@
|
||||
/*
|
||||
* WebOSQuickInstallAboutBox.java
|
||||
*/
|
||||
|
||||
package ca.canuckcoding.wosqi;
|
||||
package wosqi;
|
||||
|
||||
import ca.canuckcoding.webos.InstalledEntry;
|
||||
import ca.canuckcoding.webos.WebOSConnection;
|
||||
File renamed without changes.
@@ -1,11 +1,7 @@
|
||||
/*
|
||||
* WebOSQuickInstallAboutBox.java
|
||||
*/
|
||||
package wosqi;
|
||||
|
||||
package ca.canuckcoding.wosqi;
|
||||
|
||||
import ca.canuckcoding.ipkg.PackageFeed;
|
||||
import ca.canuckcoding.utils.FileUtils;
|
||||
import ipkg.PackageFeed;
|
||||
import utils.FileUtils;
|
||||
import ca.canuckcoding.utils.OnlineFile;
|
||||
import ca.canuckcoding.webos.DeviceInfo;
|
||||
import ca.canuckcoding.webos.Patcher;
|
||||
@@ -158,7 +154,7 @@ public class Installer extends javax.swing.JDialog {
|
||||
setForeground(new java.awt.Color(219, 219, 219));
|
||||
setIconImage(null);
|
||||
setModal(true);
|
||||
setName("transfer"); // NOI18N
|
||||
setName("transfer");
|
||||
setResizable(false);
|
||||
addWindowListener(new java.awt.event.WindowAdapter() {
|
||||
public void windowActivated(java.awt.event.WindowEvent evt) {
|
||||
@@ -174,41 +170,41 @@ public class Installer extends javax.swing.JDialog {
|
||||
|
||||
jLayeredPane1.setBackground(new java.awt.Color(219, 219, 219));
|
||||
jLayeredPane1.setForeground(new java.awt.Color(243, 241, 233));
|
||||
jLayeredPane1.setName("jLayeredPane1"); // NOI18N
|
||||
jLayeredPane1.setName("jLayeredPane1");
|
||||
jLayeredPane1.setOpaque(true);
|
||||
|
||||
jLabel5.setFont(jLabel5.getFont());
|
||||
jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel5.setText(bundle.getString("Installer.jLabel5.text")); // NOI18N
|
||||
jLabel5.setName("jLabel5"); // NOI18N
|
||||
jLabel5.setText(bundle.getString("Installer.jLabel5.text"));
|
||||
jLabel5.setName("jLabel5");
|
||||
jLayeredPane1.add(jLabel5);
|
||||
jLabel5.setBounds(30, 70, 240, 20);
|
||||
|
||||
jLabel1.setBackground(new java.awt.Color(219, 219, 219));
|
||||
jLabel1.setForeground(new java.awt.Color(219, 219, 219));
|
||||
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ca/canuckcoding/wosqi/resources/busy_icon.gif"))); // NOI18N
|
||||
jLabel1.setName("jLabel1"); // NOI18N
|
||||
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/busy_icon.gif")));
|
||||
jLabel1.setName("jLabel1");
|
||||
jLabel1.setOpaque(true);
|
||||
jLayeredPane1.add(jLabel1);
|
||||
jLabel1.setBounds(120, 10, 60, 50);
|
||||
|
||||
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ca/canuckcoding/wosqi/resources/Pre-48x48.png"))); // NOI18N
|
||||
jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Pre-48x48.png")));
|
||||
jLabel3.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
|
||||
jLabel3.setName("jLabel3"); // NOI18N
|
||||
jLabel3.setName("jLabel3");
|
||||
jLayeredPane1.add(jLabel3);
|
||||
jLabel3.setBounds(170, 10, 60, 50);
|
||||
|
||||
jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ca/canuckcoding/wosqi/resources/Computer-48x48.png"))); // NOI18N
|
||||
jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/Computer-48x48.png")));
|
||||
jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
jLabel4.setName("jLabel4"); // NOI18N
|
||||
jLabel4.setName("jLabel4");
|
||||
jLayeredPane1.add(jLabel4);
|
||||
jLabel4.setBounds(70, 10, 50, 50);
|
||||
|
||||
jLabel2.setFont(jLabel2.getFont());
|
||||
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
jLabel2.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
jLabel2.setName("jLabel2"); // NOI18N
|
||||
jLabel2.setName("jLabel2");
|
||||
jLayeredPane1.add(jLabel2);
|
||||
jLabel2.setBounds(30, 90, 240, 30);
|
||||
|
||||
File renamed without changes.
@@ -1,15 +1,5 @@
|
||||
package wosqi;
|
||||
|
||||
package ca.canuckcoding.wosqi;
|
||||
|
||||
import ca.canuckcoding.ipkg.PackageManager;
|
||||
import ca.canuckcoding.novacom.Novacom;
|
||||
import ca.canuckcoding.novacom.NovacomDrivers;
|
||||
import ca.canuckcoding.utils.FileUtils;
|
||||
import ca.canuckcoding.webos.DeviceInfo;
|
||||
import ca.canuckcoding.webos.WebOS;
|
||||
import ca.canuckcoding.webos.WebOSConnection;
|
||||
import ca.canuckcoding.webos.WebOSDevice;
|
||||
import ca.canuckcoding.webos.WebOSException;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Container;
|
||||
@@ -18,30 +8,50 @@ import java.awt.Desktop;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Image;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.prefs.Preferences;
|
||||
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JPasswordField;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import net.iharder.dnd.FileDrop;
|
||||
import org.jdesktop.application.SingleFrameApplication;
|
||||
import org.jdesktop.application.FrameView;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
/**
|
||||
* The application's main frame.
|
||||
*/
|
||||
import org.jdesktop.application.FrameView;
|
||||
import org.jdesktop.application.SingleFrameApplication;
|
||||
|
||||
import com.profesorfalken.jpowershell.PowerShell;
|
||||
|
||||
import ca.canuckcoding.novacom.Novacom;
|
||||
import ca.canuckcoding.novacom.NovacomDrivers;
|
||||
import ca.canuckcoding.webos.DeviceInfo;
|
||||
import ca.canuckcoding.webos.WebOS;
|
||||
import ca.canuckcoding.webos.WebOSConnection;
|
||||
import ca.canuckcoding.webos.WebOSDevice;
|
||||
import ca.canuckcoding.webos.WebOSException;
|
||||
import ipkg.PackageManager;
|
||||
import net.iharder.dnd.FileDrop;
|
||||
import utils.FileUtils;
|
||||
|
||||
// The application's main frame
|
||||
public class MainView extends FrameView {
|
||||
private ResourceBundle bundle;
|
||||
private Image bgImg;
|
||||
@@ -53,20 +63,303 @@ public class MainView extends FrameView {
|
||||
private DefaultTableModel modTable;
|
||||
private File installDir;
|
||||
private Timer timer;
|
||||
|
||||
public boolean novacomInstallationCheck() {
|
||||
|
||||
String os = System.getProperty("os.name");
|
||||
boolean isFound = false;
|
||||
|
||||
if(os.contains("Windows")) {
|
||||
|
||||
isFound = Novacom.isInstalled();
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
try {
|
||||
|
||||
Process commandExecutor = null;
|
||||
|
||||
// BSD and Solaris-derivatives support planned in the future!
|
||||
if(os.equals("Linux")) {
|
||||
|
||||
commandExecutor = Runtime.getRuntime().exec("which novacomd");
|
||||
|
||||
}
|
||||
else if(os.equals("Mac OS X")) {
|
||||
|
||||
commandExecutor = Runtime.getRuntime().exec("which novacom");
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "Unsuppoted platform: " + os + ". Please open up an issue on https://github.com/NotAlexNoyle/WebOS-Quick-Install");
|
||||
|
||||
}
|
||||
|
||||
String moverString = new String();
|
||||
String commandOutputStorage = new String();
|
||||
BufferedReader commandOutputReader = new BufferedReader(new InputStreamReader(commandExecutor.getInputStream()));
|
||||
try {
|
||||
|
||||
while ((moverString = commandOutputReader.readLine()) != null) {
|
||||
|
||||
commandOutputStorage += moverString;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (IOException e) {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "Novacomd installation check failed with error: \"" + e + ".\" Please open up an issue on https://github.com/NotAlexNoyle/WebOS-Quick-Install");
|
||||
|
||||
}
|
||||
|
||||
if(! commandOutputStorage.equals("")) {
|
||||
|
||||
isFound = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (IOException e) {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "Novacomd installation check failed with error: \"" + e + ".\" Please open up an issue on https://github.com/NotAlexNoyle/WebOS-Quick-Install");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return isFound;
|
||||
|
||||
}
|
||||
|
||||
public boolean novacomdIsRunningOnWindows() {
|
||||
|
||||
boolean didNovacomdStart = false;
|
||||
|
||||
String[] cmd = {"powershell.exe", "/c", "Get-Service", "novacomd"};
|
||||
|
||||
Process p = null;
|
||||
try {
|
||||
|
||||
p = Runtime.getRuntime().exec(cmd);
|
||||
|
||||
}
|
||||
catch(IOException e) {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "Novacomd could not be detected due to this error: " + e.getMessage() + ". Please open up an issue at https://github.com/NotAlexNoyle/WebOS-Quick-Install");
|
||||
|
||||
}
|
||||
|
||||
String commandOutputStorage = new String();
|
||||
BufferedReader commandOutputReader = new BufferedReader(new InputStreamReader(p.getInputStream()));
|
||||
try {
|
||||
|
||||
for(int i = 0; i < 6; i++) {
|
||||
|
||||
commandOutputStorage += commandOutputReader.readLine();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (IOException e) {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "Novacomd failed to start with error: \"" + e + ".\" Please open up an issue on https://github.com/NotAlexNoyle/WebOS-Quick-Install");
|
||||
|
||||
}
|
||||
|
||||
if(commandOutputStorage.contains("Running")) {
|
||||
|
||||
didNovacomdStart = true;
|
||||
|
||||
}
|
||||
|
||||
return didNovacomdStart;
|
||||
|
||||
}
|
||||
|
||||
public boolean novacomdIsRunningOnLinux() {
|
||||
|
||||
boolean novacomdIsRunning = false;
|
||||
|
||||
PrintWriter writer = null;
|
||||
try {
|
||||
|
||||
writer = new PrintWriter("/tmp/script.tmp", "UTF-8");
|
||||
|
||||
}
|
||||
catch (FileNotFoundException | UnsupportedEncodingException e) {
|
||||
|
||||
System.out.println("File could not be created.");
|
||||
|
||||
}
|
||||
|
||||
writer.println("#!/bin/sh");
|
||||
writer.println("");
|
||||
// Yes, this makes the program slower, however, it solves an issue with detecting whether or not novacomd is running. The code that starts novacomd, and the code that attempts to detect it, run so fast that the detection code carries out it's query before the novacomd process has time to properly start. This 2 second filler gives novacomd the time it needs to start, so that it's state can be properly detected.
|
||||
writer.println("sleep 2");
|
||||
writer.println("");
|
||||
writer.println("pidof novacomd");
|
||||
writer.close();
|
||||
|
||||
Process process = null;
|
||||
try {
|
||||
|
||||
process = Runtime.getRuntime().exec(String.format("sh /tmp/script.tmp"));
|
||||
|
||||
}
|
||||
catch (IOException e) {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "Novacomd could not be detected. Please open up an issue at https://github.com/NotAlexNoyle/WebOS-Quick-Install");
|
||||
|
||||
}
|
||||
|
||||
String output = new String();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||
try {
|
||||
|
||||
while((output = br.readLine()) != null) {
|
||||
|
||||
sb.append(output);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (IOException e) {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "Novacomd could not be detected. Please open up an issue at https://github.com/NotAlexNoyle/WebOS-Quick-Install");
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Integer.valueOf(sb.charAt(0));
|
||||
novacomdIsRunning = true;
|
||||
|
||||
}
|
||||
catch(StringIndexOutOfBoundsException e) {
|
||||
|
||||
// do nothing, therefore novacomdIsRunning will be returned as false.
|
||||
|
||||
}
|
||||
|
||||
// clean up
|
||||
File f = new File("/tmp/script.tmp");
|
||||
f.delete();
|
||||
|
||||
return novacomdIsRunning;
|
||||
|
||||
}
|
||||
|
||||
public boolean startNovacomd() {
|
||||
|
||||
boolean novacomdIsRunning = false;
|
||||
String os = System.getProperty("os.name");
|
||||
if(os.equals("Linux")) {
|
||||
|
||||
if(novacomdIsRunningOnLinux()) {
|
||||
|
||||
novacomdIsRunning = true;
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
String[] cmd = {"sudo", "-S", "novacomd", "&"};
|
||||
|
||||
JPanel panel = new JPanel();
|
||||
JLabel label = new JLabel("Enter a password:");
|
||||
JPasswordField pass = new JPasswordField(10);
|
||||
panel.add(label);
|
||||
panel.add(pass);
|
||||
|
||||
String[] options = new String[]{"OK"};
|
||||
int option = JOptionPane.showOptionDialog(null, panel, "Start novacomd", JOptionPane.NO_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, options[0]);
|
||||
|
||||
char[] supply = new char[pass.getPassword().length];
|
||||
if(option == 0) {
|
||||
|
||||
supply = pass.getPassword();
|
||||
|
||||
}
|
||||
|
||||
Process p;
|
||||
try {
|
||||
|
||||
p = Runtime.getRuntime().exec(cmd);
|
||||
|
||||
PrintWriter stdin = new PrintWriter(p.getOutputStream());
|
||||
stdin.println(supply);
|
||||
pass = null;
|
||||
supply = null;
|
||||
stdin.close();
|
||||
|
||||
}
|
||||
catch (IOException e) {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "Novacomd failed to start with error: \"" + e.getMessage() + ".\" Please open up an issue on https://github.com/NotAlexNoyle/WebOS-Quick-Install");
|
||||
|
||||
}
|
||||
|
||||
if(novacomdIsRunningOnLinux()) {
|
||||
|
||||
novacomdIsRunning = true;
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "ERROR: Novacomd failed to start. Please open up an issue on https://github.com/NotAlexNoyle/WebOS-Quick-Install");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else if(os.contains("Windows")) {
|
||||
|
||||
if(novacomdIsRunningOnWindows()) {
|
||||
|
||||
novacomdIsRunning = true;
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "Please accept the upcoming Windows UAC dialog in order to start novacomd.");
|
||||
|
||||
PowerShell.executeSingleCommand("if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole({Security.Principal.WindowsBuiltInRole] \"Administrator\"})) { Start-Process C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe \"-NoProfile -ExecutionPolicy Bypass -Command `\"Start-Service novacomd`\"\" -Verb RunAs}");
|
||||
|
||||
if(novacomdIsRunningOnWindows()) {
|
||||
|
||||
novacomdIsRunning = true;
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
JOptionPane.showMessageDialog(null, "Novacomd failed to start. Please open up an issue on https://github.com/NotAlexNoyle/WebOS-Quick-Install");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return novacomdIsRunning;
|
||||
|
||||
}
|
||||
|
||||
public MainView(SingleFrameApplication app) {
|
||||
super(app);
|
||||
bundle = WebOSQuickInstallApp.bundle;
|
||||
URL bgURL = getClass().getResource("resources/background.jpg");
|
||||
URL bgURL = MainView.class.getResource("/resources/background.jpg");
|
||||
bgImg = new ImageIcon(bgURL).getImage();
|
||||
URL iconURL = getClass().getResource("resources/icon.png");
|
||||
URL iconURL = MainView.class.getResource("/resources/icon.png");
|
||||
getFrame().setIconImage(new ImageIcon(iconURL).getImage());
|
||||
items = new ArrayList<File>();
|
||||
initComponents();
|
||||
jButton2.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||
jTable1.setGridColor(Color.CYAN);
|
||||
modTable = (DefaultTableModel) jTable1.getModel();
|
||||
installDir = new File(FileUtils.appDirectory(), bundle.getString("INSTALL"));
|
||||
chooserPath = Preferences.userRoot().get("chooserPath", null);
|
||||
new FileDrop(jTable1, new FileDrop.Listener() {
|
||||
public void filesDropped(File[] files ) {
|
||||
@@ -81,19 +374,33 @@ public class MainView extends FrameView {
|
||||
});
|
||||
devices = new WebOSDevice[0];
|
||||
webOS = new WebOSConnection[0];
|
||||
loadList();
|
||||
timer = new Timer();
|
||||
reloadDeviceCache();
|
||||
if(jComboBox1.getItemCount()==0) {
|
||||
if(Novacom.isInstalled()) {
|
||||
timer.schedule(new FirstCheckConnection(), 100);
|
||||
} else {
|
||||
timer.schedule(new DoInstallDrivers(), 100);
|
||||
if(jComboBox1.getItemCount() == 0) {
|
||||
|
||||
if(novacomInstallationCheck()) {
|
||||
|
||||
if(startNovacomd()) {
|
||||
|
||||
loadList();
|
||||
|
||||
timer.schedule(new FirstCheckConnection(), 100);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
timer.schedule(new DoInstallDrivers(), 100);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void loadList() {
|
||||
installDir = new File(FileUtils.appDirectory(), bundle.getString("INSTALL"));
|
||||
if(!installDir.isDirectory()) {
|
||||
installDir.mkdirs();
|
||||
}
|
||||
@@ -106,6 +413,7 @@ public class MainView extends FrameView {
|
||||
items.add(files[i]);
|
||||
addRow(files[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void addRow(File current){
|
||||
@@ -124,10 +432,18 @@ public class MainView extends FrameView {
|
||||
}
|
||||
|
||||
private void removeRow(){
|
||||
|
||||
int index = jTable1.getSelectedRow();
|
||||
items.get(index).delete();
|
||||
items.remove(index);
|
||||
modTable.removeRow(index);
|
||||
|
||||
// Prevents NullPointerException
|
||||
if(index != -1) {
|
||||
|
||||
items.get(index).delete();
|
||||
items.remove(index);
|
||||
modTable.removeRow(index);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -289,13 +605,19 @@ public class MainView extends FrameView {
|
||||
}
|
||||
|
||||
private void installDrivers(boolean exitOnFail) {
|
||||
|
||||
NovacomDrivers driver = new NovacomDrivers();
|
||||
if(driver.install()) {
|
||||
JOptionPane.showMessageDialog(mainPanel, bundle.getString("DRIVER_INSTALLED_SUCCESSFULLY."));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
|
||||
JOptionPane.showMessageDialog(mainPanel, bundle.getString("ERROR\\:_DRIVER_INSTALLATION_FAILED"));
|
||||
|
||||
}
|
||||
|
||||
reloadDeviceCache();
|
||||
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
@@ -341,11 +663,11 @@ public class MainView extends FrameView {
|
||||
jMenuItem10 = new javax.swing.JMenuItem();
|
||||
javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
|
||||
|
||||
mainPanel.setName("mainView"); // NOI18N
|
||||
mainPanel.setName("mainView");
|
||||
|
||||
jLayeredPane3.setFocusable(false);
|
||||
|
||||
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ca/canuckcoding/wosqi/resources/pre_shadow.png"))); // NOI18N
|
||||
jLabel1.setIcon(new javax.swing.ImageIcon(MainView.class.getResource("/resources/pre_shadow.png")));
|
||||
jLabel1.setFocusable(false);
|
||||
jLayeredPane3.add(jLabel1);
|
||||
jLabel1.setBounds(10, 30, 150, 160);
|
||||
@@ -353,10 +675,10 @@ public class MainView extends FrameView {
|
||||
jLayeredPane1.add(jLayeredPane3);
|
||||
jLayeredPane3.setBounds(460, 160, 170, 210);
|
||||
|
||||
jLayeredPane7.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(128, 128, 128), 1, true), bundle.getString("MainView.jLayeredPane7.border.title"))); // NOI18N
|
||||
jLayeredPane7.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(128, 128, 128), 1, true), bundle.getString("MainView.jLayeredPane7.border.title")));
|
||||
|
||||
jButton4.setBackground(new java.awt.Color(203, 203, 203));
|
||||
jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ca/canuckcoding/wosqi/resources/remove.png"))); // NOI18N
|
||||
jButton4.setIcon(new javax.swing.ImageIcon(MainView.class.getResource("/resources/remove.png")));
|
||||
jButton4.setFocusable(false);
|
||||
jButton4.setIconTextGap(0);
|
||||
jButton4.setMargin(new java.awt.Insets(0, 0, 0, 0));
|
||||
@@ -371,10 +693,10 @@ public class MainView extends FrameView {
|
||||
jLayeredPane7.add(jButton4);
|
||||
jButton4.setBounds(520, 70, 40, 30);
|
||||
|
||||
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(ca.canuckcoding.wosqi.WebOSQuickInstallApp.class).getContext().getActionMap(MainView.class, this);
|
||||
jButton5.setAction(actionMap.get("openRepository")); // NOI18N
|
||||
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(wosqi.WebOSQuickInstallApp.class).getContext().getActionMap(MainView.class, this);
|
||||
jButton5.setAction(actionMap.get("openRepository"));
|
||||
jButton5.setBackground(new java.awt.Color(203, 203, 203));
|
||||
jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ca/canuckcoding/wosqi/resources/online.png"))); // NOI18N
|
||||
jButton5.setIcon(new javax.swing.ImageIcon(MainView.class.getResource("/resources/online.png")));
|
||||
jButton5.setFocusable(false);
|
||||
jButton5.setIconTextGap(0);
|
||||
jButton5.setMargin(new java.awt.Insets(0, 0, 0, 0));
|
||||
@@ -392,7 +714,7 @@ public class MainView extends FrameView {
|
||||
jScrollPane2.setAutoscrolls(true);
|
||||
jScrollPane2.setPreferredSize(new java.awt.Dimension(485, 191));
|
||||
|
||||
jTable1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
|
||||
jTable1.setFont(new java.awt.Font("Tahoma", 0, 12));
|
||||
jTable1.setModel(new javax.swing.table.DefaultTableModel(
|
||||
new Object [][] {
|
||||
|
||||
@@ -420,27 +742,27 @@ public class MainView extends FrameView {
|
||||
jTable1.setFocusable(false);
|
||||
jTable1.setMaximumSize(new java.awt.Dimension(2147483647, 2147483647));
|
||||
jTable1.setMinimumSize(new java.awt.Dimension(45, 45));
|
||||
jTable1.setName("installTable"); // NOI18N
|
||||
jTable1.setName("installTable");
|
||||
jTable1.setRowHeight(20);
|
||||
jTable1.getTableHeader().setReorderingAllowed(false);
|
||||
jScrollPane2.setViewportView(jTable1);
|
||||
if (jTable1.getColumnModel().getColumnCount() > 0) {
|
||||
jTable1.getColumnModel().getColumn(0).setResizable(false);
|
||||
jTable1.getColumnModel().getColumn(0).setPreferredWidth(350);
|
||||
jTable1.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("MainView.installTable.columnModel.title0")); // NOI18N
|
||||
jTable1.getColumnModel().getColumn(0).setHeaderValue(bundle.getString("MainView.installTable.columnModel.title0"));
|
||||
jTable1.getColumnModel().getColumn(1).setResizable(false);
|
||||
jTable1.getColumnModel().getColumn(1).setPreferredWidth(125);
|
||||
jTable1.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("MainView.installTable.columnModel.title1")); // NOI18N
|
||||
jTable1.getColumnModel().getColumn(1).setHeaderValue(bundle.getString("MainView.installTable.columnModel.title1"));
|
||||
jTable1.getColumnModel().getColumn(2).setResizable(false);
|
||||
jTable1.getColumnModel().getColumn(2).setPreferredWidth(250);
|
||||
jTable1.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("MainView.installTable.columnModel.title2")); // NOI18N
|
||||
jTable1.getColumnModel().getColumn(2).setHeaderValue(bundle.getString("MainView.installTable.columnModel.title2"));
|
||||
}
|
||||
|
||||
jLayeredPane7.add(jScrollPane2);
|
||||
jScrollPane2.setBounds(20, 30, 485, 191);
|
||||
|
||||
jButton1.setBackground(new java.awt.Color(220, 220, 220));
|
||||
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ca/canuckcoding/wosqi/resources/add.png"))); // NOI18N
|
||||
jButton1.setIcon(new javax.swing.ImageIcon(MainView.class.getResource("/resources/add.png")));
|
||||
jButton1.setFocusable(false);
|
||||
jButton1.setIconTextGap(0);
|
||||
jButton1.setMargin(new java.awt.Insets(0, 0, 0, 0));
|
||||
@@ -459,12 +781,12 @@ public class MainView extends FrameView {
|
||||
jLayeredPane7.setBounds(10, 25, 590, 240);
|
||||
|
||||
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
|
||||
jLabel2.setText(bundle.getString("MainView.jLabel2.text")); // NOI18N
|
||||
jLabel2.setText(bundle.getString("MainView.jLabel2.text"));
|
||||
jLabel2.setFocusable(false);
|
||||
jLayeredPane1.add(jLabel2);
|
||||
jLabel2.setBounds(350, 5, 100, 20);
|
||||
|
||||
jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ca/canuckcoding/wosqi/resources/find-apps-precentralnet.png"))); // NOI18N
|
||||
jButton2.setIcon(new javax.swing.ImageIcon(MainView.class.getResource("/resources/find-apps-precentralnet.png")));
|
||||
jButton2.setBorderPainted(false);
|
||||
jButton2.setContentAreaFilled(false);
|
||||
jButton2.setFocusable(false);
|
||||
@@ -478,7 +800,7 @@ public class MainView extends FrameView {
|
||||
|
||||
jButton3.setBackground(new java.awt.Color(165, 165, 165));
|
||||
jButton3.setFont(jButton3.getFont().deriveFont(jButton3.getFont().getSize()+3f));
|
||||
jButton3.setText(bundle.getString("MainView.jButton3.text")); // NOI18N
|
||||
jButton3.setText(bundle.getString("MainView.jButton3.text"));
|
||||
jButton3.setFocusable(false);
|
||||
jButton3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
|
||||
jButton3.addActionListener(new java.awt.event.ActionListener() {
|
||||
@@ -520,9 +842,9 @@ public class MainView extends FrameView {
|
||||
.add(jLayeredPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 345, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
fileMenu.setText(bundle.getString("MainView.fileMenu.text")); // NOI18N
|
||||
fileMenu.setText(bundle.getString("MainView.fileMenu.text"));
|
||||
|
||||
jMenuItem1.setText(bundle.getString("MainView.jMenuItem1.text")); // NOI18N
|
||||
jMenuItem1.setText(bundle.getString("MainView.jMenuItem1.text"));
|
||||
jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jMenuItem1ActionPerformed(evt);
|
||||
@@ -531,7 +853,7 @@ public class MainView extends FrameView {
|
||||
fileMenu.add(jMenuItem1);
|
||||
fileMenu.add(jSeparator2);
|
||||
|
||||
jMenuItem8.setText(bundle.getString("MainView.jMenuItem8.text")); // NOI18N
|
||||
jMenuItem8.setText(bundle.getString("MainView.jMenuItem8.text"));
|
||||
jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jMenuItem8ActionPerformed(evt);
|
||||
@@ -539,7 +861,7 @@ public class MainView extends FrameView {
|
||||
});
|
||||
fileMenu.add(jMenuItem8);
|
||||
|
||||
jMenuItem2.setText(bundle.getString("MainView.jMenuItem2.text")); // NOI18N
|
||||
jMenuItem2.setText(bundle.getString("MainView.jMenuItem2.text"));
|
||||
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jMenuItem2ActionPerformed(evt);
|
||||
@@ -548,15 +870,15 @@ public class MainView extends FrameView {
|
||||
fileMenu.add(jMenuItem2);
|
||||
fileMenu.add(jSeparator1);
|
||||
|
||||
exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
|
||||
exitMenuItem.setText(bundle.getString("EXIT")); // NOI18N
|
||||
exitMenuItem.setAction(actionMap.get("quit"));
|
||||
exitMenuItem.setText(bundle.getString("EXIT"));
|
||||
fileMenu.add(exitMenuItem);
|
||||
|
||||
menuBar.add(fileMenu);
|
||||
|
||||
toolMenu.setText(bundle.getString("MainView.toolMenu.text")); // NOI18N
|
||||
toolMenu.setText(bundle.getString("MainView.toolMenu.text"));
|
||||
|
||||
jMenuItem3.setText(bundle.getString("MainView.jMenuItem3.text")); // NOI18N
|
||||
jMenuItem3.setText(bundle.getString("MainView.jMenuItem3.text"));
|
||||
jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jMenuItem3ActionPerformed(evt);
|
||||
@@ -564,7 +886,7 @@ public class MainView extends FrameView {
|
||||
});
|
||||
toolMenu.add(jMenuItem3);
|
||||
|
||||
jMenuItem4.setText(bundle.getString("MainView.jMenuItem4.text")); // NOI18N
|
||||
jMenuItem4.setText(bundle.getString("MainView.jMenuItem4.text"));
|
||||
jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jMenuItem4ActionPerformed(evt);
|
||||
@@ -572,7 +894,7 @@ public class MainView extends FrameView {
|
||||
});
|
||||
toolMenu.add(jMenuItem4);
|
||||
|
||||
jMenuItem5.setText(bundle.getString("MainView.jMenuItem5.text")); // NOI18N
|
||||
jMenuItem5.setText(bundle.getString("MainView.jMenuItem5.text"));
|
||||
jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jMenuItem5ActionPerformed(evt);
|
||||
@@ -581,7 +903,7 @@ public class MainView extends FrameView {
|
||||
toolMenu.add(jMenuItem5);
|
||||
toolMenu.add(jSeparator3);
|
||||
|
||||
jMenuItem9.setText(bundle.getString("MainView.jMenuItem9.text")); // NOI18N
|
||||
jMenuItem9.setText(bundle.getString("MainView.jMenuItem9.text"));
|
||||
jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jMenuItem9ActionPerformed(evt);
|
||||
@@ -591,9 +913,9 @@ public class MainView extends FrameView {
|
||||
|
||||
menuBar.add(toolMenu);
|
||||
|
||||
helpMenu.setText(bundle.getString("MainView.helpMenu.text")); // NOI18N
|
||||
helpMenu.setText(bundle.getString("MainView.helpMenu.text"));
|
||||
|
||||
jMenuItem6.setText(bundle.getString("MainView.jMenuItem6.text")); // NOI18N
|
||||
jMenuItem6.setText(bundle.getString("MainView.jMenuItem6.text"));
|
||||
jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jMenuItem6ActionPerformed(evt);
|
||||
@@ -601,7 +923,7 @@ public class MainView extends FrameView {
|
||||
});
|
||||
helpMenu.add(jMenuItem6);
|
||||
|
||||
jMenuItem7.setText(bundle.getString("MainView.jMenuItem7.text")); // NOI18N
|
||||
jMenuItem7.setText(bundle.getString("MainView.jMenuItem7.text"));
|
||||
jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jMenuItem7ActionPerformed(evt);
|
||||
@@ -609,9 +931,9 @@ public class MainView extends FrameView {
|
||||
});
|
||||
helpMenu.add(jMenuItem7);
|
||||
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("ca/canuckcoding/wosqi/Bundle"); // NOI18N
|
||||
jMenuItem10.setText(bundle.getString("MainView.jMenuItem10.text")); // NOI18N
|
||||
jMenuItem10.setToolTipText(bundle.getString("MainView.jMenuItem10.toolTipText")); // NOI18N
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("wosqi/Bundle");
|
||||
jMenuItem10.setText(bundle.getString("MainView.jMenuItem10.text"));
|
||||
jMenuItem10.setToolTipText(bundle.getString("MainView.jMenuItem10.toolTipText"));
|
||||
jMenuItem10.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jMenuItem10ActionPerformed(evt);
|
||||
@@ -619,8 +941,8 @@ public class MainView extends FrameView {
|
||||
});
|
||||
helpMenu.add(jMenuItem10);
|
||||
|
||||
aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
|
||||
aboutMenuItem.setText(bundle.getString("MainView.aboutMenuItem.text")); // NOI18N
|
||||
aboutMenuItem.setAction(actionMap.get("showAboutBox"));
|
||||
aboutMenuItem.setText(bundle.getString("MainView.aboutMenuItem.text"));
|
||||
aboutMenuItem.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
aboutMenuItemActionPerformed(evt);
|
||||
@@ -641,7 +963,6 @@ public class MainView extends FrameView {
|
||||
items);
|
||||
installer.setLocationRelativeTo(mainFrame);
|
||||
WebOSQuickInstallApp.getApplication().show(installer);
|
||||
loadList();
|
||||
reloadDeviceCache();
|
||||
timer.schedule(new CheckConnection(), 200);
|
||||
}
|
||||
@@ -844,7 +1165,8 @@ public class MainView extends FrameView {
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
System.exit(0);*/
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
File renamed without changes.
@@ -2,9 +2,9 @@
|
||||
* WebOSQuickInstallAboutBox.java
|
||||
*/
|
||||
|
||||
package ca.canuckcoding.wosqi;
|
||||
package wosqi;
|
||||
|
||||
import ca.canuckcoding.utils.FileUtils;
|
||||
import utils.FileUtils;
|
||||
import ca.canuckcoding.webos.DeviceInfo;
|
||||
import ca.canuckcoding.webos.WebOSConnection;
|
||||
import javax.swing.JFileChooser;
|
||||
File renamed without changes.
@@ -1,10 +1,6 @@
|
||||
/*
|
||||
* WebOSQuickInstallAboutBox.java
|
||||
*/
|
||||
package wosqi;
|
||||
|
||||
package ca.canuckcoding.wosqi;
|
||||
|
||||
import ca.canuckcoding.utils.FileUtils;
|
||||
import utils.FileUtils;
|
||||
import ca.canuckcoding.webos.DeviceInfo;
|
||||
import ca.canuckcoding.webos.WebOSConnection;
|
||||
import javax.swing.JFileChooser;
|
||||
File renamed without changes.
@@ -1,8 +1,4 @@
|
||||
/*
|
||||
* WebOSQuickInstallAboutBox.java
|
||||
*/
|
||||
|
||||
package ca.canuckcoding.wosqi;
|
||||
package wosqi;
|
||||
|
||||
import ca.canuckcoding.utils.OnlineFile;
|
||||
import ca.canuckcoding.webos.DeviceInfo;
|
||||
File renamed without changes.
@@ -1,8 +1,4 @@
|
||||
/*
|
||||
* WebOSQuickInstallAboutBox.java
|
||||
*/
|
||||
|
||||
package ca.canuckcoding.wosqi;
|
||||
package wosqi;
|
||||
|
||||
import org.jdesktop.application.Action;
|
||||
import java.util.ResourceBundle;
|
||||
@@ -56,19 +52,19 @@ public class Usage extends javax.swing.JDialog {
|
||||
|
||||
jTextPane1.setBackground(new java.awt.Color(240, 240, 240));
|
||||
jTextPane1.setBorder(null);
|
||||
jTextPane1.setContentType(bundle.getString("Usage.jTextPane1.contentType")); // NOI18N
|
||||
jTextPane1.setContentType(bundle.getString("Usage.jTextPane1.contentType"));
|
||||
jTextPane1.setEditable(false);
|
||||
jTextPane1.setFont(jTextPane1.getFont().deriveFont(jTextPane1.getFont().getSize()+1f));
|
||||
jTextPane1.setText(bundle.getString("Usage.jTextPane1.text")); // NOI18N
|
||||
jTextPane1.setName("jTextPane1"); // NOI18N
|
||||
jTextPane1.setText(bundle.getString("Usage.jTextPane1.text"));
|
||||
jTextPane1.setName("jTextPane1");
|
||||
jScrollPane1.setViewportView(jTextPane1);
|
||||
|
||||
jLayeredPane2.add(jScrollPane1);
|
||||
jScrollPane1.setBounds(10, 30, 320, 310);
|
||||
|
||||
jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ca/canuckcoding/wosqi/resources/devmode.jpg"))); // NOI18N
|
||||
jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/devmode.jpg")));
|
||||
jLabel2.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||
jLabel2.setName("jLabel2"); // NOI18N
|
||||
jLabel2.setName("jLabel2");
|
||||
jLayeredPane2.add(jLabel2);
|
||||
jLabel2.setBounds(350, 40, 180, 270);
|
||||
|
||||
+43
-14
@@ -1,10 +1,5 @@
|
||||
/*
|
||||
* WebOSQuickInstallApp.java
|
||||
*/
|
||||
package wosqi;
|
||||
|
||||
package ca.canuckcoding.wosqi;
|
||||
|
||||
import ca.canuckcoding.utils.FileUtils;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
@@ -14,12 +9,16 @@ import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.prefs.Preferences;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import org.jdesktop.application.Application;
|
||||
import org.jdesktop.application.SingleFrameApplication;
|
||||
|
||||
import utils.FileUtils;
|
||||
|
||||
/**
|
||||
* The main class of the application.
|
||||
*/
|
||||
@@ -28,15 +27,17 @@ public class WebOSQuickInstallApp extends SingleFrameApplication {
|
||||
public static ResourceBundle bundle;
|
||||
|
||||
/**
|
||||
* At startup create and show the main frame of the application.
|
||||
* At startup, creates and shows the main frame of the application.
|
||||
*/
|
||||
@Override protected void startup() {
|
||||
|
||||
MainView app = new MainView(this);
|
||||
app.getFrame().setResizable(false);
|
||||
app.getFrame().setSize(630, 400);
|
||||
app.getFrame().setVisible(true);
|
||||
//app.mainPanel.requestFocus();
|
||||
app.getFrame().setTitle("WebOS Quick Install (v4.7.0u)");
|
||||
show(app);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,11 +71,14 @@ public class WebOSQuickInstallApp extends SingleFrameApplication {
|
||||
JComponent.setDefaultLocale(specific);
|
||||
JFileChooser.setDefaultLocale(specific);
|
||||
}
|
||||
bundle = ResourceBundle.getBundle("ca/canuckcoding/wosqi/Bundle");
|
||||
File install = new File(FileUtils.appDirectory(), bundle.getString("INSTALL"));
|
||||
if(!install.isDirectory()) {
|
||||
bundle = ResourceBundle.getBundle("wosqi/Bundle");
|
||||
File install = new File(System.getProperty("user.dir"));
|
||||
if(install.isDirectory()) {
|
||||
|
||||
install.mkdirs();
|
||||
|
||||
}
|
||||
|
||||
int start = 0;
|
||||
if(args.length>0) {
|
||||
if(args[0].equals("-log")) {
|
||||
@@ -92,17 +96,42 @@ public class WebOSQuickInstallApp extends SingleFrameApplication {
|
||||
File from = new File(args[i]);
|
||||
if(from.isFile()) {
|
||||
if(from.getName().toLowerCase().endsWith("ipk")) {
|
||||
|
||||
File to = new File(install, FileUtils.getFilename(from));
|
||||
try {
|
||||
|
||||
FileUtils.copy(from, to);
|
||||
} catch (IOException ex) {
|
||||
System.err.println("Unable to copy to install directory: "
|
||||
+ args[i]);
|
||||
|
||||
}
|
||||
catch (IOException ex) {
|
||||
|
||||
System.err.println("Unable to copy to install directory: " + args[i]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
launch(WebOSQuickInstallApp.class, args);
|
||||
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
|
||||
File installDir = new File("Install/");
|
||||
|
||||
if(installDir.isDirectory() && installDir.list().length == 0) {
|
||||
|
||||
installDir.delete();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}, "Shutdown-thread"));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user