Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Copyright.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2014 Stephen Leitnick

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# RobloxLauncher
A RobloxLauncher made using the RobloxProxy.dll. and Launch ROBLOX without the website, given the Place ID.
RobloxLauncher
==============

Launch ROBLOX without the website, given the Place ID.

Requires Java 1.6 or newer.


I created this application because I can no longer launch ROBLOX games from their website (on any browser). When I attempt to,
the ROBLOX updater window would pop up and sit there for several minutes, but never would launch the game. This application
shortcuts the process and launches the game by itself.
7 changes: 7 additions & 0 deletions RobloxLauncher/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/LuaJ"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions RobloxLauncher/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
17 changes: 17 additions & 0 deletions RobloxLauncher/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>RobloxLauncher</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
11 changes: 11 additions & 0 deletions RobloxLauncher/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
58 changes: 58 additions & 0 deletions RobloxLauncher/src/sleitnick/roblox/launcher/Browser.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package sleitnick.roblox.launcher;

import java.awt.Desktop;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;

public final class Browser {

private static final Desktop DESKTOP = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;

/**
* Check if Browser support is available
* @return isSupported
*/
public static boolean isSupported() {
return DESKTOP.isSupported(Desktop.Action.BROWSE);
}

/**
* Browse to the given URI
* @param uri {@link URI}
*/
public static void browse(URI uri) {
try {
DESKTOP.browse(uri);
} catch (IOException e) {
e.printStackTrace();
}
}

/**
* Browse to the given URL
* @param url {@link URL}
*/
public static void browse(URL url) {
try {
browse(url.toURI());
} catch (URISyntaxException e) {
e.printStackTrace();
}
}

/**
* Browse to the given URL
* @param url {@link String} URL
*/
public static void browse(String url) {
try {
browse(new URL(url));
} catch (MalformedURLException e) {
e.printStackTrace();
}
}

}
94 changes: 94 additions & 0 deletions RobloxLauncher/src/sleitnick/roblox/launcher/DataStoreService.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
package sleitnick.roblox.launcher;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public final class DataStoreService {

private static final class Data implements Serializable {
private static final long serialVersionUID = 1L;
private final Map<String, Object> data = new HashMap<String, Object>();
}

private static final String DATA_DIR_NAME = "data";
private static final String DATA_FILE_NAME = "data.ser";

private static Data data = null;

// Load data:
static {
File dataDir = new File(DATA_DIR_NAME);
if (dataDir.isDirectory()) {
File dataFile = new File(dataDir, DATA_FILE_NAME);
try {
FileInputStream fis = new FileInputStream(dataFile);
ObjectInputStream ois = new ObjectInputStream(fis);
Object objData = ois.readObject();
ois.close();
fis.close();
if (objData instanceof Data) {
data = (Data)objData;
}
} catch (Exception e) {
}
} else {
dataDir.mkdir();
}
if (data == null) {
data = new Data();
}
}

/**
* Set a value in the data store
* @param key {@link String} key
* @param value Value
*/
protected static void set(String key, Object value) {
data.data.put(key, value);
}

/**
* Get value from given key
* @param key {@link String} key
* @return {@link Object} Value
*/
protected static Object get(String key) {
return data.data.get(key);
}

/**
* Save the data in the data store
*/
protected static void save() {
File dataDir = new File(DATA_DIR_NAME);
if (!dataDir.isDirectory()) {
dataDir.mkdir();
}
File dataFile = new File(dataDir, DATA_FILE_NAME);
if (!dataFile.exists()) {
try {
dataFile.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
try {
FileOutputStream fos = new FileOutputStream(dataFile);
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(data);
oos.close();
fos.close();
} catch (Exception e) {
e.printStackTrace();
}
}

}
54 changes: 54 additions & 0 deletions RobloxLauncher/src/sleitnick/roblox/launcher/HttpService.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package sleitnick.roblox.launcher;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;

public final class HttpService {

private static final Map<String, String> RESPONSE_CACHE = new HashMap<String, String>();

/**
* Get the HTTP response from the given URL.
* @param urlStr {@link String} URL
* @param cacheResponse Whether or not to cache the response
* @return {@link String} response
*/
public static final String get(String urlStr, boolean cacheResponse) {
if (cacheResponse) {
String fromCache = RESPONSE_CACHE.get(urlStr);
if (fromCache != null) {
return fromCache;
}
}
URL url;
HttpURLConnection conn;
BufferedReader rd;
String line;
String result = "";
try {
url = new URL(urlStr);
conn = (HttpURLConnection)url.openConnection();
conn.setRequestMethod("GET");
rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
while ((line = rd.readLine()) != null) {
result += line;
}
rd.close();
} catch(IOException e) {
result = "";
} catch(Exception e) {
result = "";
}
if (cacheResponse) {
RESPONSE_CACHE.put(urlStr, result);
}
return result;
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package sleitnick.roblox.launcher;

import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import javax.swing.text.DocumentFilter;

public class IntegerDocumentFilter extends DocumentFilter {

private boolean isUnsignedInteger(String str) {
if (str.isEmpty()) return true;
try {
Integer.parseUnsignedInt(str);
return true;
} catch(NumberFormatException e) {
return false;
}
}

@Override
public void insertString(FilterBypass fb, int offset, String string,
AttributeSet attr) throws BadLocationException {
Document doc = fb.getDocument();
StringBuilder sb = new StringBuilder();
sb.append(doc.getText(0, doc.getLength()));
sb.insert(offset, string);
if (isUnsignedInteger(sb.toString())) {
super.insertString(fb, offset, string, attr);
}
}

@Override
public void remove(FilterBypass fb, int offset, int length)
throws BadLocationException {
Document doc = fb.getDocument();
StringBuilder sb = new StringBuilder();
sb.append(doc.getText(0, doc.getLength()));
sb.delete(offset, offset + length);
if (isUnsignedInteger(sb.toString())) {
super.remove(fb, offset, length);
}
}

@Override
public void replace(FilterBypass fb, int offset, int length, String text,
AttributeSet attrs) throws BadLocationException {
Document doc = fb.getDocument();
StringBuilder sb = new StringBuilder();
sb.append(doc.getText(0, doc.getLength()));
sb.replace(offset, offset + length, text);
if (isUnsignedInteger(sb.toString())) {
super.replace(fb, offset, length, text, attrs);
}
}

}
22 changes: 22 additions & 0 deletions RobloxLauncher/src/sleitnick/roblox/launcher/LuaFileException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package sleitnick.roblox.launcher;

public class LuaFileException extends RuntimeException {

private static final long serialVersionUID = 1L;

private final String msg;

public LuaFileException() {
this("Lua file exception");
}

public LuaFileException(String msg) {
this.msg = msg;
}

@Override
public String getMessage() {
return msg;
}

}
Loading