Skip to content

Commit 167ae0d

Browse files
authored
Merge pull request #87 from i-net-software/revert-80-feature/startup-modes
Revert "Add property `winStartupMode` to allow "delayed" on Windows"
2 parents 2f7e2a9 + b138110 commit 167ae0d

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

src/com/inet/gradle/setup/abstracts/Service.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@
2222
* Definition of a service to be installed on the target system.
2323
*/
2424
public class Service extends Application {
25-
2625
private boolean startOnBoot = true, keepAlive = false;
2726

28-
private String id, wrapper, logPath, logPrefix, logLevel, pidFile, stdError, stdOutput, libraryPath, javaHome, jvm, winStartupMode;
27+
private String id, wrapper, logPath, logPrefix, logLevel, pidFile, stdError, stdOutput, libraryPath, javaHome, jvm;
2928

3029
/**
3130
* Create a new Service
@@ -39,7 +38,6 @@ public Service( SetupBuilder setup ) {
3938
/**
4039
* Returns a boolean flag indicating whether the service is started when the system is booted.
4140
*
42-
* @see #getWinStartupMode()
4341
* @return boolean flag indicating whether the service is started when the system is booted
4442
*/
4543
public boolean isStartOnBoot() {
@@ -49,26 +47,12 @@ public boolean isStartOnBoot() {
4947
/**
5048
* Sets a boolean flag indicating whether the service is started when the system is booted.
5149
*
52-
* @see #setWinStartupMode(String)
5350
* @param startOnBoot boolean flag indicating whether the service is started when the system is booted
5451
*/
5552
public void setStartOnBoot( boolean startOnBoot ) {
5653
this.startOnBoot = startOnBoot;
5754
}
5855

59-
/**
60-
* Gets the startup mode for Windows. One of "delayed", "auto", or "manual". Overrides {@link #isStartOnBoot()}
61-
* if set.
62-
*/
63-
public String getWinStartupMode() {
64-
return winStartupMode;
65-
}
66-
67-
/** Service startup mode can be either "delayed", "auto", or "manual". Overrides {@link #setStartOnBoot(boolean)} */
68-
public void setWinStartupMode( String winStartupMode ) {
69-
this.winStartupMode = winStartupMode;
70-
}
71-
7256
/**
7357
* Returns the serviceID which should be a short version of the application name
7458
*

src/com/inet/gradle/setup/msi/WxsFileBuilder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,7 @@ private void addServices() throws IOException {
676676
if( !service.getDescription().isEmpty() ) {
677677
addAttributeIfNotExists( install, "Description", service.getDescription() );
678678
}
679-
addAttributeIfNotExists( install, "Start", service.getWinStartupMode() != null ? service.getWinStartupMode()
680-
: service.isStartOnBoot() ? "auto" : "demand" );
679+
addAttributeIfNotExists( install, "Start", service.isStartOnBoot() ? "auto" : "demand" );
681680
addAttributeIfNotExists( install, "Type", "ownProcess" );
682681
addAttributeIfNotExists( install, "ErrorControl", "normal" );
683682
addAttributeIfNotExists( install, "Arguments", " \"//RS//" + name + "\"");

0 commit comments

Comments
 (0)