mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-02-21 00:17:05 +01:00
fixes
This commit is contained in:
parent
11273b1589
commit
1c5dfc46a0
@ -91,6 +91,7 @@ launch4j {
|
||||
icon = "${projectDir}/src/main/resources/static/favicon.ico"
|
||||
|
||||
outfile="Stirling-PDF.exe"
|
||||
|
||||
if(System.getenv("STIRLING_PDF_DESKTOP_UI") == 'true') {
|
||||
headerType = "gui"
|
||||
} else {
|
||||
|
@ -75,19 +75,17 @@ public class SPdfApplication {
|
||||
|
||||
public static void main(String[] args) throws IOException, InterruptedException {
|
||||
|
||||
|
||||
|
||||
SpringApplication app = new SpringApplication(SPdfApplication.class);
|
||||
|
||||
|
||||
Properties props = new Properties();
|
||||
|
||||
if("true".equals(System.getenv("STIRLING_PDF_DESKTOP_UI"))) {
|
||||
System.setProperty("java.awt.headless", "false");
|
||||
app.setHeadless(false);
|
||||
props.put("java.awt.headless", "false");
|
||||
props.put("spring.main.web-application-type", "servlet");
|
||||
|
||||
if ("true".equals(System.getenv("STIRLING_PDF_DESKTOP_UI"))) {
|
||||
System.setProperty("java.awt.headless", "false");
|
||||
app.setHeadless(false);
|
||||
// props.put("java.awt.headless", "false");
|
||||
// props.put("spring.main.web-application-type", "servlet");
|
||||
}
|
||||
|
||||
|
||||
app.setAdditionalProfiles("default");
|
||||
app.addInitializers(new ConfigInitializer());
|
||||
Map<String, String> propertyFiles = new HashMap<>();
|
||||
@ -112,10 +110,17 @@ public class SPdfApplication {
|
||||
logger.warn("Custom configuration file 'configs/custom_settings.yml' does not exist.");
|
||||
}
|
||||
Properties finalProps = new Properties();
|
||||
finalProps.putAll(Collections.singletonMap(
|
||||
"spring.config.additional-location",
|
||||
propertyFiles.get("spring.config.additional-location")));
|
||||
finalProps.putAll(props);
|
||||
|
||||
if (!propertyFiles.isEmpty()) {
|
||||
finalProps.putAll(
|
||||
Collections.singletonMap(
|
||||
"spring.config.additional-location",
|
||||
propertyFiles.get("spring.config.additional-location")));
|
||||
}
|
||||
|
||||
if (props.isEmpty()) {
|
||||
finalProps.putAll(props);
|
||||
}
|
||||
app.setDefaultProperties(finalProps);
|
||||
|
||||
app.run(args);
|
||||
|
@ -90,7 +90,6 @@ public class LoadingWindow extends JDialog {
|
||||
try {
|
||||
progressBar.setValue(Math.min(Math.max(progress, 0), 100));
|
||||
progressBar.setString(progress + "%");
|
||||
log.info(progress + "%");
|
||||
mainPanel.revalidate();
|
||||
mainPanel.repaint();
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user