Skip to content

Commit

Permalink
Update to V.1.0.5
Browse files Browse the repository at this point in the history
Version 1.0.5 : 21 Aout 2018 // Mise a jour du bootstrap(Ram Selector + Update libs OpenLauncherLibs), côté launcher : update libs, window undecorated et ajout des boutons réseaux sociaux
  • Loading branch information
StoneSet committed Aug 21, 2018
1 parent b8a0186 commit ca376e2
Show file tree
Hide file tree
Showing 32 changed files with 1,148 additions and 92 deletions.
1 change: 0 additions & 1 deletion src/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="C:/Users/valen/workspace/Libs/gson-2.3.1.jar"/>
<classpathentry kind="lib" path="C:/Users/valen/workspace/Libs/openlauncherlib-2.1-SNAPSHOT.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="lib" path="C:/Users/valen/workspace/Libs/openlauncherlib-3.0.4.jar"/>
<classpathentry kind="lib" path="C:/Users/valen/workspace/Libs/s-update-3.1.0-BETA.jar"/>
Expand Down
14 changes: 8 additions & 6 deletions src/LICENSE ALL
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ Ce launcher a

youtube.com/user/Litarvan

Il est possible de se baser sur notre code tout en respectant le travail fourni, nous y avons passer �normement de temps a ce launcher
Merci de ne pas decompiler ce launcher (m�me si c'est tr�s difficile)
Il est interdit de se baser sur notre code, nous y avons passer �normement de temps a ce launcher.


MOJANG AB; TOUS DROITS RESERVES
HAPPYBLOCKS 2018; TOUS DROITS RESERVES
LITARVAN LIBS; TOUS DROITS RESERVES
FORGE; TOUS DROITS RESERVES
MOJANG AB; TOUS DROITS RESERVEES
HAPPYBLOCKS 2016; TOUS DROITS RESERVEES
LITARVAN LIBS; TOUS DROITS RESERVEES
FORGE; TOUS DROITS RESERVEES

Le launcher utilise forge et Custom Main Menu, merci de respecter la CGU en vigueur.

Bon jeu sur nos serveurs !

PS: Le code n'est peut �tre pas optimiser mais sa fonctionner, moic'est plut�t le HTML.

//HappyBlocks Server, MOJANG AB, FORGE, LITARVAN, VERSION OFFICIELLE
Binary file removed src/Libs/gson-2.3.1.jar
Binary file not shown.
Binary file removed src/Libs/openauth-1.0.3-SNAPSHOT.jar
Binary file not shown.
Binary file removed src/Libs/openlauncherlib-2.1-SNAPSHOT.jar
Binary file not shown.
Binary file removed src/Libs/openlauncherlib-3.0.4.jar
Binary file not shown.
Binary file removed src/Libs/s-update-3.1.0-BETA.jar
Binary file not shown.
Binary file removed src/Libs/s-update-server-3.1.0.zip
Binary file not shown.
Binary file removed src/Libs/swinger-1.0.0-BETA.jar
Binary file not shown.
Binary file removed src/Libs/zip4j-1.3.2.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/bin/info/happyblocks/happyblocks/launcher/Launcher$1.class
Binary file not shown.
Binary file modified src/bin/info/happyblocks/happyblocks/launcher/Launcher.class
Binary file not shown.
Binary file modified src/bin/info/happyblocks/happyblocks/launcher/LauncherFrame.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/logs/2018-08-21-1.log.gz
Binary file not shown.
444 changes: 444 additions & 0 deletions src/logs/fml-client-1.log

Large diffs are not rendered by default.

444 changes: 444 additions & 0 deletions src/logs/fml-client-latest.log

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/logs/fml-junk-earlystartup.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[11:11:43] [Thread-3/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[11:11:43] [Thread-3/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[11:11:43] [Thread-3/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[13:32:45] [Thread-4/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[13:32:46] [Thread-4/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[13:32:46] [Thread-4/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
21 changes: 21 additions & 0 deletions src/logs/latest.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[13:33:00] [Client thread/INFO]: Setting user: stonesetmc
[13:33:14] [Client thread/INFO]: LWJGL Version: 2.9.4
[13:33:29] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Custom Main Menu
[13:33:45] [Sound Library Loader/INFO]: Starting up SoundSystem...
[13:33:45] [Thread-14/INFO]: Initializing LWJGL OpenAL
[13:33:45] [Thread-14/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[13:33:46] [Thread-14/INFO]: OpenAL initialized.
[13:33:46] [Sound Library Loader/INFO]: Sound engine started
[13:34:00] [Client thread/INFO]: Created: 16x16 textures-atlas
[13:34:05] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Custom Main Menu
[13:34:16] [Client thread/INFO]: SoundSystem shutting down...
[13:34:16] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
[13:34:16] [Sound Library Loader/INFO]: Starting up SoundSystem...
[13:34:17] [Thread-16/INFO]: Initializing LWJGL OpenAL
[13:34:17] [Thread-16/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[13:34:17] [Thread-16/INFO]: OpenAL initialized.
[13:34:17] [Sound Library Loader/INFO]: Sound engine started
[13:34:30] [Client thread/INFO]: Created: 1024x512 textures-atlas
[13:34:57] [Client thread/INFO]: Stopping!
[13:34:57] [Client thread/INFO]: SoundSystem shutting down...
[13:34:57] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
Original file line number Diff line number Diff line change
Expand Up @@ -4,68 +4,83 @@
import static fr.theshark34.swinger.Swinger.getResource;
import static fr.theshark34.swinger.Swinger.getTransparentWhite;

import java.awt.Color;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;

import fr.theshark34.openlauncherlib.bootstrap.Bootstrap;
import fr.theshark34.openlauncherlib.bootstrap.LauncherClasspath;
import fr.theshark34.openlauncherlib.bootstrap.LauncherInfos;
import fr.theshark34.openlauncherlib.util.ErrorUtil;
import fr.theshark34.openlauncherlib.util.GameDir;
import javax.swing.JLabel;
import javax.swing.SwingConstants;

import fr.theshark34.openlauncherlib.LanguageManager;
import fr.theshark34.openlauncherlib.LaunchException;
import fr.theshark34.openlauncherlib.external.ClasspathConstructor;
import fr.theshark34.openlauncherlib.external.ExternalLaunchProfile;
import fr.theshark34.openlauncherlib.external.ExternalLauncher;
import fr.theshark34.openlauncherlib.minecraft.util.GameDirGenerator;
import fr.theshark34.openlauncherlib.util.CrashReporter;
import fr.theshark34.openlauncherlib.util.SplashScreen;
import fr.theshark34.openlauncherlib.util.explorer.ExploredDirectory;
import fr.theshark34.openlauncherlib.util.explorer.Explorer;
import fr.theshark34.openlauncherlib.util.ramselector.RamSelector;
import fr.theshark34.supdate.BarAPI;
import fr.theshark34.supdate.SUpdate;
import fr.theshark34.swinger.Swinger;
import fr.theshark34.swinger.colored.SColoredBar;

public class HappyBlocksBootstrap {

private static final File HB_DIR = new File(GameDirGenerator.createGameDir("HappyBlocks"), ("launcher"));
static final CrashReporter HB_B_REPORTER = new CrashReporter("HappyBlocks Bootstrap", new File(HB_DIR, "launcher/crashes/"));

private static RamSelector selector = new RamSelector(new File (HB_DIR, "ram.txt"));
private static SplashScreen splash;
private static SColoredBar bar;
private static Thread barThread;

private static final LauncherInfos HB_B_INFOS = new LauncherInfos("HappyBlocks Bootstrap", "info.happyblocks.happyblocks.launcher.LauncherFrame");
private static final File HB_DIR = GameDir.createGameDir("HappyBlocks");
private static final LauncherClasspath HB_B_CP = new LauncherClasspath(new File(HB_DIR, "launcher/launcher.jar"), new File(HB_DIR, "launcher/libs"));

private static ErrorUtil errorUtil = new ErrorUtil(new File(HB_DIR, "launcher/crashes/"));

private static Thread barThread;
private static JLabel infoLabel = new JLabel("Update...", SwingConstants.CENTER);
public static void main(String[] args) {
LanguageManager.setLang(LanguageManager.FRENCH);
Swinger.setResourcePath("/info/happyblocks/happyblocks/bootstrap/resources/");
displaySplash();
try {


doUpdate();
} catch (Exception e) {
errorUtil.catchError(e, "Impossible de mettre à jour le launcher !");
barThread.interrupt();
if(barThread != null)
barThread.interrupt();

HB_B_REPORTER.catchError(e, "Impossible de mettre à jour le launcher !");

}
selector.setFrameClass(HappyBlocksRamSelectorWindows.class );
selector.display();

try {
launchLauncher();
} catch (IOException e) {
errorUtil.catchError(e, "Impossible de lancer le launcher !");
}

}

private static void displaySplash() {
splash = new SplashScreen("HappyBlocks", getResource("splash.png"));

splash = new SplashScreen("HappyBlocks Bootstrap", getResource("splash.png"));
splash.setBackground(Swinger.TRANSPARENT);
splash.getContentPane().setBackground(Swinger.TRANSPARENT);
splash.setIconImage(Swinger.getResource("favicon.png"));
splash.setLayout(null);

bar = new SColoredBar(getTransparentWhite(75), getTransparentWhite(125));
bar.setBounds(312, 312, 330, 70);
bar.setBounds(0, 520, 630, 40);
splash.add(bar);

splash.setVisible(true);
splash.setIconImage(Swinger.getResource("favicon.png"));
infoLabel.setForeground(Color.WHITE);
infoLabel.setFont(infoLabel.getFont().deriveFont(20F));
infoLabel.setBounds(0, 570, 630, 40);
splash.add(infoLabel);

splash.setVisible(true);
}

private static void doUpdate() throws Exception {
SUpdate su = new SUpdate("http://bootstrap.happyblocks.info", new File(HB_DIR, "launcher"));
static void doUpdate() throws Exception {
SUpdate su = new SUpdate("http://bootstrap.happyblocks.info", new File(HB_DIR, ""));
barThread = new Thread() {
@SuppressWarnings("static-access")
@Override
Expand All @@ -85,15 +100,24 @@ public void run() {
}


private static void launchLauncher() throws IOException {
Bootstrap bootstrap = new Bootstrap(HB_B_CP, HB_B_INFOS);
Process p = bootstrap.launch();
static void launchLauncher() throws LaunchException {

ClasspathConstructor constructor = new ClasspathConstructor();
ExploredDirectory gameDir = Explorer.dir(HB_DIR);
constructor.add(gameDir.sub("launcher_lib").allRecursive().files().match("^(.*\\.((jar)$))*$"));
constructor.add(gameDir.get("launcher.jar"));
ExternalLaunchProfile profile = new ExternalLaunchProfile("info.happyblocks.happyblocks.launcher.LauncherFrame", constructor.make());
profile.setVmArgs(Arrays.asList(selector.getRamArguments()));

ExternalLauncher launcher = new ExternalLauncher(profile);

Process p = launcher.launch();

splash.setVisible(false);

try {
p.waitFor();
} catch (InterruptedException e) {
} catch (InterruptedException ignored) {
}
System.exit(0);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package info.happyblocks.happyblocks.bootstrap;

import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.SwingConstants;

import fr.theshark34.openlauncherlib.LanguageManager;
import fr.theshark34.openlauncherlib.LaunchException;
import fr.theshark34.openlauncherlib.util.ramselector.AbstractOptionFrame;
import fr.theshark34.openlauncherlib.util.ramselector.RamSelector;
import fr.theshark34.swinger.Swinger;

public class HappyBlocksRamSelectorWindows extends AbstractOptionFrame implements ActionListener
{

private JLabel ramLabel;
private JComboBox<String> ramBox;
private JButton ok;

public HappyBlocksRamSelectorWindows(RamSelector selector)
{
super(selector);

this.setTitle("Ram");
this.setResizable(false);
this.setSize(275, 100);
this.setLocationRelativeTo(null);
this.setLayout(null);
this.setIconImage(Swinger.getResource("favicon.png"));
this.setUndecorated(false);
this.setBackground(Color.ORANGE);
this.getContentPane().setBackground(Color.ORANGE);
this.setDefaultCloseOperation(1);

ramLabel = new JLabel(LanguageManager.lang("Ram alloué :"));
ramLabel.setBounds(8, 20, 90, 25);
this.add(ramLabel);

ramBox = new JComboBox<String>(RamSelector.RAM_ARRAY);
ramBox.setBounds(80, 20, 125, 25);
this.add(ramBox);

ok = new JButton("Ok");
ok.addActionListener(this);
ok.setBounds(210, 20, 55, 25);
this.add(ok);

}

@Override
public void setSelectedIndex(int index) { ramBox.setSelectedIndex(index); }

@Override
public int getSelectedIndex() { return ramBox.getSelectedIndex(); }

@Override
public void actionPerformed(ActionEvent e)
{
this.setVisible(false);
getSelector().save();
try {
HappyBlocksBootstrap.launchLauncher();

}
catch (LaunchException ex)
{
HappyBlocksBootstrap.HB_B_REPORTER.catchError(ex, "Impossible de lancer le launcher !");
}
}
}
47 changes: 19 additions & 28 deletions src/src/info/happyblocks/happyblocks/launcher/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,38 @@
package info.happyblocks.happyblocks.launcher;

import java.io.File;
import java.io.IOException;

import net.lingala.zip4j.core.ZipFile;
import net.lingala.zip4j.exception.ZipException;
import fr.theshark34.openauth.AuthPoints;
import fr.theshark34.openauth.AuthenticationException;
import fr.theshark34.openauth.Authenticator;
import fr.theshark34.openauth.model.AuthAgent;
import fr.theshark34.openauth.model.response.AuthResponse;
import fr.theshark34.openlauncherlib.launcher.AuthInfos;
import fr.theshark34.openlauncherlib.launcher.GameFolder;
import fr.theshark34.openlauncherlib.launcher.GameInfos;
import fr.theshark34.openlauncherlib.launcher.GameLauncher;
import fr.theshark34.openlauncherlib.launcher.GameTweak;
import fr.theshark34.openlauncherlib.launcher.GameType;
import fr.theshark34.openlauncherlib.launcher.GameVersion;
import fr.theshark34.openlauncherlib.util.ErrorUtil;
import fr.theshark34.openlauncherlib.LaunchException;
import fr.theshark34.openlauncherlib.internal.InternalLaunchProfile;
import fr.theshark34.openlauncherlib.internal.InternalLauncher;
import fr.theshark34.openlauncherlib.minecraft.AuthInfos;
import fr.theshark34.openlauncherlib.minecraft.GameFolder;
import fr.theshark34.openlauncherlib.minecraft.GameInfos;
import fr.theshark34.openlauncherlib.minecraft.GameTweak;
import fr.theshark34.openlauncherlib.minecraft.GameType;
import fr.theshark34.openlauncherlib.minecraft.GameVersion;
import fr.theshark34.openlauncherlib.minecraft.MinecraftLauncher;
import fr.theshark34.supdate.BarAPI;
import fr.theshark34.supdate.SUpdate;
import fr.theshark34.supdate.application.integrated.FileDeleter;
import fr.theshark34.swinger.Swinger;
import net.lingala.zip4j.core.ZipFile;
import net.lingala.zip4j.exception.ZipException;

public class Launcher {

public static final GameVersion HB_VERSION = new GameVersion("1.8", GameType.V1_8_HIGHER);
public static final GameInfos HB_INFOS = new GameInfos("HappyBlocks", HB_VERSION, true, new GameTweak[] {GameTweak.FORGE});
public static final GameInfos HB_INFOS = new GameInfos("HappyBlocks", HB_VERSION, new GameTweak[] {GameTweak.FORGE});
public static final File HB_DIR = HB_INFOS.getGameDir();
public static final File HB_CRASHES_DIR = new File(HB_DIR, "crashes");
private static AuthInfos authInfos;
private static Thread updateThread;

private static ErrorUtil errorUtil = new ErrorUtil(HB_CRASHES_DIR);

public static void auth(String username, String password) throws AuthenticationException {
Authenticator authenticator = new Authenticator(Authenticator.MOJANG_AUTH_URL, AuthPoints.NORMAL_AUTH_POINTS);
AuthResponse response = authenticator.authenticate(AuthAgent.MINECRAFT, username, password,"");
Expand Down Expand Up @@ -89,18 +88,13 @@ public void run() {

}

public static void launch() throws IOException {
GameLauncher gameLauncher = new GameLauncher(HB_INFOS, GameFolder.BASIC, authInfos);
Process p = gameLauncher.launch();
try {
Thread.sleep(5000L);
} catch (InterruptedException e) {
}
public static void launch() throws LaunchException
{
InternalLaunchProfile profile = MinecraftLauncher.createInternalProfile(HB_INFOS, GameFolder.BASIC, authInfos);
InternalLauncher launcher = new InternalLauncher(profile);
LauncherFrame.getInstance().setVisible(false);
try {
p.waitFor();
} catch (InterruptedException e) {
}
launcher.launch();

System.exit(0);
}

Expand All @@ -109,9 +103,6 @@ public static void interruptThread() {


}
public static ErrorUtil getErrorUtil() {
return errorUtil;
}
}

//HappyBlocks Server, MOJANG AB, FORGE, LITARVAN, VERSION OFFICIELLE
Loading

0 comments on commit ca376e2

Please sign in to comment.