Skip to content

Commit

Permalink
Merge pull request #5 from devlinx9/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
devlinx9 authored Nov 1, 2021
2 parents c864887 + 56f84d7 commit 3d7aaf0
Show file tree
Hide file tree
Showing 20 changed files with 106 additions and 55 deletions.
4 changes: 2 additions & 2 deletions docs/check-update.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<head>
<script>
var CURRENT_VERSION = 104;
var RELEASE_URL = "https://github.com/subhra74/snowflake/releases/tag/v1.0.4";
var CURRENT_VERSION = 121;
var RELEASE_URL = "https://github.com/devlinx9/muon-ssh/releases/tag/v1.2.1";
function printVersion() {
var rx = /\?v=(\d+)/;
var str = window.location.search;
Expand Down
2 changes: 2 additions & 0 deletions flatpak/muon
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
java -jar /app/muon/muon.jar
5 changes: 5 additions & 0 deletions flatpak/org.muon_ssh.App.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Desktop Entry]
Name=Muon SSH client
Exec=muon
Icon=org.muon_ssh.App
Type=Application
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
{
"app-id": "org.snowflake_ssh.App",
"app-id": "org.muon_ssh.App",
"runtime": "org.freedesktop.Platform",
"runtime-version": "19.08",
"sdk": "org.freedesktop.Sdk",
"sdk-extensions" : [ "org.freedesktop.Sdk.Extension.openjdk11" ],
"command": "snowflake",
"command": "muon",
"modules": [
{
"name" : "openjdk",
"buildsystem" : "simple",
"build-commands" : [ "/usr/lib/sdk/openjdk11/install.sh" ]
},
{
"name": "snowflake",
"name": "muon",
"buildsystem": "simple",
"build-commands": [
"mkdir -p /app/snowflake",
"mkdir -p /app/muon",
"mkdir -p /app/bin",
"mkdir -p /app/share/icons/hicolor/128x128/apps",
"mkdir -p /app/share/applications",
"cp snowflake.jar /app/snowflake",
"cp snowflake /app/bin",
"chmod 755 /app/bin/snowflake",
"cp org.snowflake_ssh.App.png /app/share/icons/hicolor/128x128/apps",
"cp org.snowflake_ssh.App.desktop /app/share/applications"
"cp muon.jar /app/muon",
"cp muon /app/bin",
"chmod 755 /app/bin/muon",
"cp org.muon_ssh.App.png /app/share/icons/hicolor/128x128/apps",
"cp org.muon_ssh.App.desktop /app/share/applications"
],
"sources": [
{
"type": "file",
"path": "snowflake.jar"
"path": "muon.jar"
},
{
"type": "file",
"path": "snowflake"
"path": "muon"
},
{
"type": "file",
"path": "org.snowflake_ssh.App.png"
"path": "org.muon_ssh.App.png"
},
{
"type": "file",
"path": "org.snowflake_ssh.App.desktop"
"path": "org.muon_ssh.App.desktop"
}
]
}
Expand Down
File renamed without changes
5 changes: 0 additions & 5 deletions flatpak/org.snowflake_ssh.App.desktop

This file was deleted.

2 changes: 0 additions & 2 deletions flatpak/snowflake

This file was deleted.

40 changes: 39 additions & 1 deletion muon-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>muon</groupId>
<artifactId>muon</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</parent>
<groupId>muon-app</groupId>
<artifactId>muon-app</artifactId>
Expand Down Expand Up @@ -293,6 +293,44 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>l4j-clui</id>
<phase>package</phase>
<goals><goal>launch4j</goal></goals>
<configuration>
<icon>src/exe/image.ico</icon>
<headerType>console</headerType>
<outfile>target/muon.exe</outfile>
<jar>target/muon_1.2.1.jar</jar>
<errTitle>muon</errTitle>
<classPath>
<mainClass>muon.app.App</mainClass>
<addDependencies>false</addDependencies>
<preCp>anything</preCp>
</classPath>
<jre>
<minVersion>11.0.0</minVersion>
</jre>
<versionInfo>
<fileVersion>1.0.0.0</fileVersion>
<txtFileVersion>1.0.0.0</txtFileVersion>
<fileDescription>Executes muon ssh client</fileDescription>
<copyright>GPLv3.0</copyright>
<productVersion>1.2.0.0</productVersion>
<txtProductVersion>1.2.0.0</txtProductVersion>
<productName>MuonSSH</productName>
<internalName>muonssh</internalName>
<originalFilename>muon.exe</originalFilename>
</versionInfo>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
Expand Down
Binary file added muon-app/src/exe/image.ico
Binary file not shown.
7 changes: 5 additions & 2 deletions muon-app/src/main/java/muon/app/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
import util.PlatformUtils;
import util.Win32DragHandler;

import static util.Constants.APPLICATION_VERSION;
import static util.Constants.UPDATE_URL;

/**
* Hello world!
*
Expand All @@ -50,8 +53,8 @@ public class App {
System.setProperty("java.net.useSystemProxies", "true");
}

public static final VersionEntry VERSION = new VersionEntry("v1.0.5");
public static final String UPDATE_URL = "https://subhra74.github.io/snowflake/check-update.html?v="
public static final VersionEntry VERSION = new VersionEntry("v"+APPLICATION_VERSION);
public static final String UPDATE_URL2 = UPDATE_URL + "/check-update.html?v="
+ VERSION.getNumericValue();

public static final String CONFIG_DIR = System.getProperty("user.home") + File.separatorChar + "muon-ssh";
Expand Down
17 changes: 7 additions & 10 deletions muon-app/src/main/java/muon/app/ui/AppWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@
import muon.app.ui.components.session.SessionListPanel;
import muon.app.ui.components.session.files.transfer.BackgroundFileTransfer;
import muon.app.ui.components.session.files.transfer.BackgroundTransferPanel;
import muon.app.ui.components.session.files.transfer.FileTransfer;
import muon.app.ui.components.settings.SettingsDialog;
import muon.app.ui.components.settings.SettingsPageName;
import muon.app.updater.UpdateChecker;
import util.FontAwesomeContants;


import static muon.app.App.bundle;
import static util.Constants.*;

/**
* @author subhro
*
Expand All @@ -63,15 +64,11 @@ public class AppWindow extends JFrame {
private final Component bottomPanel;
private JLabel lblUpdate, lblUpdateText;

public static final String HELP_URL = "https://github.com/subhra74/snowflake/wiki";
public static final String GITHUB_URL = "https://github.com/subhra74/snowflake";


/**
*
*/
public AppWindow() {
super("Muon SSH");
super(APPLICATION_NAME);
try {
this.setIconImage(ImageIO.read(AppWindow.class.getResource("/muon.png")));
} catch (Exception e) {
Expand Down Expand Up @@ -212,7 +209,7 @@ private Component createBottomPanel() {
public void mouseClicked(MouseEvent e) {
if (Desktop.isDesktopSupported()) {
try {
Desktop.getDesktop().browse(new URI(GITHUB_URL));
Desktop.getDesktop().browse(new URI(REPOSITORY_URL));
} catch (IOException ex) {
ex.printStackTrace();
} catch (URISyntaxException ex) {
Expand All @@ -224,7 +221,7 @@ public void mouseClicked(MouseEvent e) {

// b1.setBorder(new EmptyBorder(5, 5, 5, 5));

JLabel lblBrand = new JLabel("Muon SSH 1.1.0");
JLabel lblBrand = new JLabel(APPLICATION_NAME+ " "+ APPLICATION_VERSION);
lblBrand.addMouseListener(ml);
lblBrand.setCursor(new Cursor(Cursor.HAND_CURSOR));
// lblBrand.setFont(App.SKIN.getDefaultFont().deriveFont(Font.PLAIN,
Expand All @@ -234,7 +231,7 @@ public void mouseClicked(MouseEvent e) {
b1.add(lblBrand);
b1.add(Box.createRigidArea(new Dimension(10, 10)));

JLabel lblUrl = new JLabel("https://github.com/devlinx9/muon-ssh");
JLabel lblUrl = new JLabel(REPOSITORY_URL);
lblUrl.addMouseListener(ml);
lblUrl.setCursor(new Cursor(Cursor.HAND_CURSOR));
// lblUrl.setFont(App.SKIN.getDefaultFont().deriveFont(Font.PLAIN, 14));
Expand Down Expand Up @@ -370,7 +367,7 @@ public void mouseClicked(MouseEvent e) {
protected void openUpdateURL() {
if (Desktop.isDesktopSupported()) {
try {
Desktop.getDesktop().browse(new URI(App.UPDATE_URL));
Desktop.getDesktop().browse(new URI(App.UPDATE_URL2));
} catch (IOException ex) {
ex.printStackTrace();
} catch (URISyntaxException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public void actionPerformed(ActionEvent e) {
parentNode = (DefaultMutableTreeNode) parentNode.getParent();
}
JComboBox<String> cmbImports = new JComboBox<>(
new String[] { "Putty", "WinSCP", "Snowflake session store" });
new String[] { "Putty", "WinSCP", "Muon session store" });

if (JOptionPane.showOptionDialog(this, new Object[] { bundle.getString("import_from"), cmbImports }, bundle.getString("import_sessions"),
JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ public static synchronized final void importOnFirstRun() {
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
try {
SavedSessionTree savedSessionTree = objectMapper.readValue(new File(System.getProperty("user.home")
+ File.separator + "snowflake-ssh" + File.separator + "session-store.json"),
+ File.separator + "muon-ssh" + File.separator + "session-store.json"),
new TypeReference<SavedSessionTree>() {
});
SessionStore.save(savedSessionTree.getFolder(), savedSessionTree.getLastSelection(),
new File(App.CONFIG_DIR, App.SESSION_DB_FILE));
Files.copy(Paths.get(System.getProperty("user.home"), "snowflake-ssh", "snippets.json"),
Files.copy(Paths.get(System.getProperty("user.home"), "muon-ssh", "snippets.json"),
Paths.get(App.CONFIG_DIR, App.SNIPPETS_FILE));
} catch (IOException e) {
e.printStackTrace();
Expand Down
5 changes: 3 additions & 2 deletions muon-app/src/main/java/muon/app/updater/UpdateChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

import muon.app.App;

import static util.Constants.API_UPDATE_URL;

public class UpdateChecker {
public static final String UPDATE_URL = "https://api.github.com/repos/subhra74/snowflake/releases/latest";

static {
CertificateValidator.registerCertificateHook();
Expand All @@ -27,7 +28,7 @@ public static boolean isNewUpdateAvailable() {
System.out.println("Checking for url");
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
VersionEntry latestRelease = objectMapper.readValue(new URL(UPDATE_URL).openStream(),
VersionEntry latestRelease = objectMapper.readValue(new URL(API_UPDATE_URL).openStream(),
new TypeReference<VersionEntry>() {
});
System.out.println("Latest release: " + latestRelease);
Expand Down
12 changes: 12 additions & 0 deletions muon-app/src/main/java/util/Constants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package util;

public class Constants {
public static final String BASE_URL="https://github.com/devlinx9";
public static final String HELP_URL="https://github.com/subhra74/snowflake/wiki"; //TODO change wiki pages
public static final String UPDATE_URL="https://devlinx9.github.io/muon-ssh";
public static final String API_UPDATE_URL="https://api.github.com/repos/devlinx9/muon-ssh/releases/latest";
public static final String REPOSITORY_URL=BASE_URL + "/muon-ssh";
public static final String APPLICATION_VERSION ="1.2.1";
public static final String APPLICATION_NAME="Muon SSH";

}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>muon</groupId>
<artifactId>muon</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
<packaging>pom</packaging>
<modules>
<module>muon-app</module>
Expand Down
5 changes: 5 additions & 0 deletions snap/snap/gui/muon.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Desktop Entry]
Name=Muon SSH client
Exec=muon
Icon=${SNAP}/meta/gui/muon.png
Type=Application
File renamed without changes
5 changes: 0 additions & 5 deletions snap/snap/gui/snowflake.desktop

This file was deleted.

18 changes: 9 additions & 9 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: snowflake
version: "1.0.4"
name: muon
version: "1.2.1"
summary: Graphical SFTP client and terminal emulator with helpful utilities
description: |
Snowflake is a graphical SSH client. It has a file browser,
Muon is a graphical SSH client. It has a file browser,
terminal emulator, resource/process manager, disk space analyzer,
text editor, log viewer and lots of other helpful tools,
which makes it easy to work with remote servers.
More information is available on GitHub Repo: https://github.com/subhra74/snowflake
More information is available on GitHub Repo: https://github.com/devlinx9/muon-ssh
grade: stable
base: core18
icon: snap/gui/snowflake.png
icon: snap/gui/muon.png
confinement: strict

apps:
snowflake:
command: java -jar $SNAP/jar/snowflake-1.0.4-full.jar
muon:
command: java -jar $SNAP/jar/muon_1.2.1.jar
environment:
# Needed for fontconfig
XDG_DATA_HOME: ${SNAP}/usr/share
Expand All @@ -24,9 +24,9 @@ apps:
plugs: [x11, ssh-keys,network, desktop, home, network-bind]

parts:
snowflake:
muon:
plugin: maven
source: https://github.com/subhra74/snowflake.git
source: https://github.com/devlinx9/muon-ssh.git
build-packages:
- openjdk-11-jdk
stage-packages:
Expand Down

0 comments on commit 3d7aaf0

Please sign in to comment.