use of net.technicpack.launchercore.install.tasks.TaskGroup in project LauncherV3 by TechnicPack.
the class TechnicRelauncher method buildUpdaterTasks.
@Override
public InstallTasksQueue buildUpdaterTasks() {
screen = new SplashScreen(resources.getImage("launch_splash.png"), 30);
Color bg = LauncherFrame.COLOR_FORMELEMENT_INTERNAL;
screen.getContentPane().setBackground(new Color(bg.getRed(), bg.getGreen(), bg.getBlue(), 255));
screen.getProgressBar().setForeground(Color.white);
screen.getProgressBar().setBackground(LauncherFrame.COLOR_GREEN);
screen.getProgressBar().setBackFill(LauncherFrame.COLOR_CENTRAL_BACK_OPAQUE);
screen.getProgressBar().setFont(resources.getFont(ResourceLoader.FONT_OPENSANS, 12));
screen.pack();
screen.setLocationRelativeTo(null);
screen.setVisible(true);
InstallTasksQueue<Object> queue = new InstallTasksQueue<Object>(screen.getProgressBar(), createMirrorStore());
ArrayList<IInstallTask> postDownloadTasks = new ArrayList<IInstallTask>();
postDownloadTasks.add(new LaunchMoverMode(resources.getString("updater.launchmover"), getTempLauncher(), this));
TaskGroup downloadFilesGroup = new TaskGroup(resources.getString("updater.downloads"));
queue.addTask(new EnsureUpdateFolders(resources.getString("updater.folders"), getDirectories()));
queue.addTask(new QueryUpdateStream(resources.getString("updater.query"), updateStream, downloadFilesGroup, getDirectories(), this, postDownloadTasks));
queue.addTask(downloadFilesGroup);
return queue;
}
Aggregations