| | |
| | | import java.util.Collections;
|
| | | import java.util.List;
|
| | |
|
| | | import com.gitblit.Constants;
|
| | | import com.gitblit.Launcher;
|
| | | import com.gitblit.build.Build;
|
| | | import com.gitblit.build.Build.DownloadListener;
|
| | |
| | | DownloadListener downloadListener = new DownloadListener() {
|
| | | @Override
|
| | | public void downloading(String name) {
|
| | | updateSplash(splash, "Downloading " + name + "..."); |
| | | updateSplash(splash, Translation.get("gb.downloading") + " " + name + "..."); |
| | | }
|
| | | };
|
| | |
|
| | | // download rpc client runtime dependencies
|
| | | Build.rpcClient(downloadListener);
|
| | |
|
| | | updateSplash(splash, "Scanning Library Folder...");
|
| | | File libFolder = new File("ext");
|
| | | List<File> jars = Launcher.findJars(libFolder.getAbsoluteFile());
|
| | |
|
| | |
| | | Collections.reverse(jars);
|
| | | for (File jar : jars) {
|
| | | try {
|
| | | updateSplash(splash, "Loading " + jar.getName() + "...");
|
| | | updateSplash(splash, Translation.get("gb.loading") + " " + jar.getName() + "...");
|
| | | Launcher.addJarFile(jar);
|
| | | } catch (IOException e) {
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | updateSplash(splash, "Starting Gitblit RPC Client...");
|
| | | updateSplash(splash, Translation.get("gb.starting") + " Gitblit RPC Client...");
|
| | | GitblitClient.main(args);
|
| | | }
|
| | |
|
| | |
| | | if (g != null) {
|
| | | // Splash is 320x120
|
| | | FontMetrics fm = g.getFontMetrics();
|
| | | |
| | | // paint startup status
|
| | | g.setColor(Color.darkGray);
|
| | | int h = fm.getHeight() + fm.getMaxDescent();
|
| | | int x = 5;
|
| | |
| | | g.setColor(Color.WHITE);
|
| | | int xw = fm.stringWidth(string);
|
| | | g.drawString(string, x + ((w - xw) / 2), y - 5);
|
| | | |
| | | // paint version
|
| | | String ver = "v" + Constants.VERSION;
|
| | | int vw = g.getFontMetrics().stringWidth(ver);
|
| | | g.drawString(ver, 320 - vw - 5, 34);
|
| | | g.dispose();
|
| | | splash.update();
|
| | | }
|