Skip to content

Commit

Permalink
Merge pull request #87 from i-net-software/revert-80-feature/startup-…
Browse files Browse the repository at this point in the history
…modes

Revert "Add property `winStartupMode` to allow "delayed" on Windows"
  • Loading branch information
Horcrux7 authored Jan 9, 2020
2 parents 2f7e2a9 + b138110 commit 167ae0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
18 changes: 1 addition & 17 deletions src/com/inet/gradle/setup/abstracts/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
* Definition of a service to be installed on the target system.
*/
public class Service extends Application {

private boolean startOnBoot = true, keepAlive = false;

private String id, wrapper, logPath, logPrefix, logLevel, pidFile, stdError, stdOutput, libraryPath, javaHome, jvm, winStartupMode;
private String id, wrapper, logPath, logPrefix, logLevel, pidFile, stdError, stdOutput, libraryPath, javaHome, jvm;

/**
* Create a new Service
Expand All @@ -39,7 +38,6 @@ public Service( SetupBuilder setup ) {
/**
* Returns a boolean flag indicating whether the service is started when the system is booted.
*
* @see #getWinStartupMode()
* @return boolean flag indicating whether the service is started when the system is booted
*/
public boolean isStartOnBoot() {
Expand All @@ -49,26 +47,12 @@ public boolean isStartOnBoot() {
/**
* Sets a boolean flag indicating whether the service is started when the system is booted.
*
* @see #setWinStartupMode(String)
* @param startOnBoot boolean flag indicating whether the service is started when the system is booted
*/
public void setStartOnBoot( boolean startOnBoot ) {
this.startOnBoot = startOnBoot;
}

/**
* Gets the startup mode for Windows. One of "delayed", "auto", or "manual". Overrides {@link #isStartOnBoot()}
* if set.
*/
public String getWinStartupMode() {
return winStartupMode;
}

/** Service startup mode can be either "delayed", "auto", or "manual". Overrides {@link #setStartOnBoot(boolean)} */
public void setWinStartupMode( String winStartupMode ) {
this.winStartupMode = winStartupMode;
}

/**
* Returns the serviceID which should be a short version of the application name
*
Expand Down
3 changes: 1 addition & 2 deletions src/com/inet/gradle/setup/msi/WxsFileBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,7 @@ private void addServices() throws IOException {
if( !service.getDescription().isEmpty() ) {
addAttributeIfNotExists( install, "Description", service.getDescription() );
}
addAttributeIfNotExists( install, "Start", service.getWinStartupMode() != null ? service.getWinStartupMode()
: service.isStartOnBoot() ? "auto" : "demand" );
addAttributeIfNotExists( install, "Start", service.isStartOnBoot() ? "auto" : "demand" );
addAttributeIfNotExists( install, "Type", "ownProcess" );
addAttributeIfNotExists( install, "ErrorControl", "normal" );
addAttributeIfNotExists( install, "Arguments", " \"//RS//" + name + "\"");
Expand Down

0 comments on commit 167ae0d

Please sign in to comment.