Commit Graph

218 Commits (43690d3e6a006ae55e6845c2983ac4ad0fc93778)

Author SHA1 Message Date
NextTurn 459d5d7647 Increase code coverage 2020-04-11 14:08:12 +08:00
Michael Karmazin a8fee1975f
Add stopwait command 2020-04-09 12:59:05 +00:00
NextTurn b0c09e1bb1 Enable strong cryptography when running on .NET Framework 4.6 2020-04-09 18:07:22 +08:00
NextTurn 505c2385c9 Enable system default TLS versions when targeting .NET Framework 4.6.1 2020-04-09 11:51:16 +08:00
Oleg Nenashev 00c9f37041
Merge pull request #495 from NextTurn/version
Fix versioning of WinSW builds
2020-04-08 12:08:50 +02:00
NextTurn 6c630c24c4
Skip the failing test 2020-04-08 17:24:49 +08:00
NextTurn fed55ba9d4
Fix versioning 2020-04-08 16:27:23 +08:00
Scott Selberg fef46672ab
Feature/eliminate newlines (#483)
* Added code to collapse newlines, line returns and groups of spaces into a single space.
This is to allow users to put lots of arguments into the configuration xml using one
line per argument for readability.  This is really helpful when trying to wrap swarm-client.jar
calls which can have a lot of long arguments.

* fixed the comment text.

* included tabs in the list of things to collapse.

* added back in the missing space for the tab.

* Switched to a regex.

* Just removing newlines, line returns and tabs.

* Trimming off leading and trailing whitespace.

* Updated per recommendation from NextTurn.
2020-04-07 08:36:03 +08:00
Oleg Nenashev 9bae4caf90
Merge pull request #361 from NextTurn/expand
Ensure that environment variables are loaded before resolving configurations
2020-04-06 09:40:58 +02:00
Oleg Nenashev 638d78f297
Merge pull request #465 from NextTurn/commands
Split commands into functions
2020-04-06 09:37:51 +02:00
NextTurn 01f3c2d79d
Split commands into functions 2020-04-06 13:55:09 +08:00
Next Turn 5fcfe177af
Merge pull request #463 from NextTurn/nullable
Annotate for NRT
2020-03-31 23:52:07 +08:00
Oleg Nenashev 109e754813
Merge pull request #464 from NextTurn/domain
Fix default domain name
2020-03-31 11:19:47 +02:00
NextTurn f83916d430
Load environment variables first 2020-03-31 13:45:51 +08:00
NextTurn 2c22e62aa0
Fix default domain name 2020-03-31 08:40:25 +08:00
NextTurn ba6881a106
Annotate for NRT 2020-03-30 23:23:25 +08:00
NextTurn e37c641520
Replace or remove `SetServiceStatus` calls 2020-03-29 17:23:07 +08:00
NextTurn 750ac75dc6
Set description via advapi32 2020-03-29 17:16:01 +08:00
NextTurn 23c2202406
Support security descriptor string 2020-03-28 14:50:19 +08:00
Next Turn 3f58cdef68
Merge pull request #357 from NextTurn/emit
Optimize DynamicProxy
2020-03-28 00:01:02 +08:00
Next Turn 6280a688ed
Merge pull request #362 from NextTurn/pinvoke
Improve P/Invoke signatures
2020-03-25 21:45:39 +08:00
Oleg Nenashev ecadc0ef8b
Merge pull request #403 from NextTurn/ims
Support 'If-Modified-Since' for downloads
2020-03-25 11:05:52 +01:00
NextTurn 80e99d8426
Rework P/Invoke signatures 2020-03-24 23:37:02 +08:00
NextTurn 05b421b37b
Remove unused file 2020-03-24 23:36:16 +08:00
NextTurn fc08355620
Specify Unicode versions 2020-03-24 23:36:16 +08:00
NextTurn 5bc19e43af
Introduce constant strings 2020-03-24 23:36:16 +08:00
NextTurn f1036e613b
Replace GetLastError 2020-03-24 23:36:16 +08:00
NextTurn 3bb10ab60d
Remove unnecessary attributes 2020-03-24 23:36:15 +08:00
Oleg Nenashev dbb8efe410
Merge pull request #430 from NextTurn/enum
Use generic enum parsing methods in all packages except .NET 2.0
2020-03-11 12:04:51 +01:00
NextTurn e843c5c89c
Generic enum parsing 2020-03-02 08:54:42 +08:00
NextTurn 76a7fff7a6
Use StringBuilder 2020-03-01 11:00:05 +08:00
NextTurn 89677a7f49
Support 'If-Modified-Since' for downloads 2020-02-25 11:12:59 +08:00
NextTurn b991f8c9f1
Revert CLI behaviors in non-interactive mode 2020-02-21 14:04:29 +08:00
NextTurn d97c72e48f
Disable MMI 2020-02-18 11:37:31 +08:00
Oleg Nenashev 0f0ed5f850
Merge pull request #408 from NextTurn/download
Update exception handling for downloads
2020-02-16 07:38:26 +01:00
NextTurn bf09ea36f9
Update downloading 2020-02-13 10:45:41 +08:00
Oleg Nenashev 3753bce369
Merge pull request #387 from NextTurn/stop
Treat ERROR_SERVICE_CANNOT_ACCEPT_CTRL as success for stop command
2020-02-12 21:04:57 +01:00
Oleg Nenashev 9a7e0b141a
Merge pull request #391 from NextTurn/redirect
Fix stdout/stderr redirection when log disabled
2020-02-12 21:04:06 +01:00
Oleg Nenashev 7bbe98e326
Merge pull request #385 from NextTurn/start
Treat ERROR_SERVICE_ALREADY_RUNNING as success for start command
2020-02-11 17:07:57 +01:00
NextTurn da2772c6c4
Treat ERROR_SERVICE_CANNOT_ACCEPT_CTRL as success for stop command 2020-02-10 19:14:52 +08:00
NextTurn 16205acbc8
Treat ERROR_SERVICE_ALREADY_RUNNING as success for start command 2020-02-10 19:08:28 +08:00
NextTurn b86a028392
Throw correct exceptions for IO errors 2020-02-10 18:59:08 +08:00
NextTurn 368b99d8a1
Implement atomic file movement 2020-02-10 18:28:59 +08:00
Oleg Nenashev 96c03efb0a
Merge pull request #397 from NextTurn/nullable
Annotate more nullable variables
2020-02-07 04:38:13 -05:00
Oleg Nenashev dc10d4d3ce
Merge pull request #367 from NextTurn/download
Parallelize downloads in .NET 4.6.1 and .NET Core bundles
2020-02-06 05:31:12 -05:00
NextTurn 08da959737
Optimize DynamicProxy 2020-02-06 18:20:38 +08:00
NextTurn ec6d9b0a69
Rename to FEATURE_CIM 2020-02-06 11:18:48 +08:00
NextTurn 30c5994c42
Migrate to MMI 2020-02-06 10:58:37 +08:00
NextTurn da71f5dd83
Annotate more nullable variables 2020-02-06 10:55:13 +08:00
Oleg Nenashev b36aff024e
Merge pull request #394 from NextTurn/tls
Enable TLS 1.1/1.2 when using .NET2 and .NET4 packages on Windows 7 and Windows Server 2008 R2
2020-02-05 12:49:31 -05:00
Oleg Nenashev b49216fcb1
Merge pull request #374 from NextTurn/cli
Improve CLI behaviors with empty arguments
2020-02-05 12:40:43 -05:00
NextTurn fce9a79d66
Fix stdout/stderr redirection when log disabled 2020-02-02 11:18:47 +08:00
NextTurn ce7b6078f9
Enable TLS 1.1/1.2 on outdated versions 2020-02-02 11:02:22 +08:00
NextTurn 5a42863fdc
Potentially fix RunawayProcessKillerTest 2020-02-01 14:00:45 +08:00
NextTurn ff60522b0d
Use Debug logging level for modes 2020-02-01 10:58:35 +08:00
NextTurn e8e1ee2300
Improve CLI behaviors with empty arguments 2020-02-01 10:58:33 +08:00
Oleg Nenashev e06ae851f4
Merge pull request #373 from NextTurn/catch
Don't print stack trace to console for user errors
2020-01-31 22:53:38 +01:00
Oleg Nenashev a1df4472a5
Merge pull request #390 from NextTurn/line
Stop buffering stdout/stderr
2020-01-31 22:49:26 +01:00
Oleg Nenashev fef7d7e560
Merge pull request #383 from NextTurn/artifacts
Produce ready-to-publish artifacts in build phase for AppVeyor
2020-01-31 22:47:44 +01:00
Oleg Nenashev a157b79dcb
Merge pull request #359 from NextTurn/envvar
Fix RunawayProcessKiller
2020-01-31 22:43:16 +01:00
NextTurn aa3b6249a5
Stop buffering stdout/stderr 2020-01-30 16:59:54 +08:00
NextTurn 189e3d52e2
Fix executable path on .NET Core 2020-01-29 11:09:50 +08:00
NextTurn ab22212252
Produce ready-to-publish artifacts in build phase for AppVeyor 2020-01-27 17:24:49 +08:00
NextTurn b3d4b466aa
Don't print stack trace to console for invalid config files 2020-01-24 15:42:07 +08:00
NextTurn ba328e3162
Optimize Download 2020-01-21 11:16:11 +08:00
NextTurn 941e67d08c
Simplify syntax 2020-01-20 21:09:39 +08:00
NextTurn c32d17c21b
Don't use System.Environment APIs 2020-01-20 12:33:24 +08:00
NextTurn cff7360118
Fix RunawayProcessKiller 2020-01-20 12:27:23 +08:00
NextTurn 466b5264e1
Annotate other libraries for nullable reference types 2020-01-20 12:19:26 +08:00
NextTurn 93b2212774
Suppress warnings for confusing designs 2020-01-20 12:19:07 +08:00
NextTurn 315b0ac440
Throw for necessary settings 2020-01-20 12:19:06 +08:00
NextTurn 5be8708701
Annotate WinSWCore for nullable reference types 2020-01-20 12:18:58 +08:00
NextTurn 3a7a332b84
Target .NET Framework 4.6.1 2020-01-19 21:14:19 +08:00
NextTurn cf396b718b
Publish single executable 2020-01-15 00:27:19 +08:00
NextTurn 492a4e3e42
Fix tests and update test framework 2020-01-15 00:07:44 +08:00
NextTurn eebc49d295
Fix an ancient bug 2020-01-14 20:11:47 +08:00
NextTurn bab17429d2
Improve RollingSizeTimeLogAppender 2020-01-14 19:44:12 +08:00
NextTurn 8864b676fb
Add new target frameworks 2020-01-14 19:26:26 +08:00
NextTurn b9089ab748
Remove unused variables 2020-01-14 14:05:04 +08:00
NextTurn 08bae2a682
Use built-in types 2020-01-14 14:05:03 +08:00
NextTurn 9808ae88e8
Clean up styles 2020-01-14 14:04:25 +08:00
NextTurn 6e9d25a7b5
Fix versioning 2020-01-13 14:39:16 +08:00
NextTurn afadf8f2b2
Fix tests 2020-01-13 14:39:14 +08:00
NextTurn 9634ddf0a9
Migrate to SDK-style projects 2020-01-13 14:10:57 +08:00
Oleg Nenashev 075be3f03d
Merge pull request #315 from mmatt1967/master
Prevent application crash when `roll-by-size-time` is enabled
2019-08-17 00:47:41 +02:00
Oleg Nenashev 831c7fbb7e
Merge pull request #321 from jeacott1/hidewindow
Add a new `hidewindow` option to suppress windows popup on legacy platforms
2019-08-17 00:44:38 +02:00
Ryan Rupp 502ed969fc Fix missing space in logging format 2019-08-13 23:30:53 -05:00
Ryan Rupp 47a3ca964a Fix duplicate startup logging 2019-08-13 16:54:13 -05:00
jeacott1 e2bf78f1df adds a <hidewindow>true</hidewindow> config switch
so that launching bat files on legacy machines
running Interactive Services Detection don't balk.
2019-05-28 13:25:17 +09:30
Pram 092b972617
Fix test for spelling 2019-05-20 19:26:06 +01:00
Mark Matthews e94e364a90 Fix issue #314 2019-04-29 12:08:05 +02:00
Dinz 9014f38b9c Added Support for the log appender roll-by-size-time to zip older files (#259)
* Introduced the following new elements.
1. logname - you can override the name of the log file rather than using the EXE name, this means you don't have to call your EXE a different name, just name the winsw exe different. Default's the name to the EXE as before.
2. outfiledisabled - you can disable writing to the out file. Defaults to false.
3. errfiledisabled - you can disable writing to the error file. Defaults to false.
4. outfilepattern - you can choose the pattern of the out file. Defaults to .out.log.
5. errfilepattern - you can choos the pattern of the error file. Defaults to .err.log.

* Downgraded from C#7.0 syntax.

* Applied reviewers comment

* not required

* removed the key

* Added unit test for new fields logname, outfiledisabled, errfiledisabled and errfilepattern.

Created a new appender called roll-by-size-time see class RollingSizeTimeLogAppender, this appender supports rolling by time and size and rolling at a specific time each day.

Added unit test for the new appender.

Added a new option testwait which is similar to test but waits for the user to press any key before calling the stop method.

* Update loggingAndErrorReporting.md

* Cannot use $ string.format syntax, downgraded code to string.format.

* Another syntax found of $

* Fixed a unit tests

* Added support to zip files.

* Added error handling

* Removed the zip call at startup.

* Fix issue with UTC

* Update loggingAndErrorReporting.md

Documented the new fields zipolderthannumdays and zipdateformat

* Update loggingAndErrorReporting.md

* Applied Code review

* Fixed a BST bug

* Added zip lib
2018-06-19 18:39:03 +02:00
Gabor Garancsi 56ab348652 Fix environment variable setting in RunawayProcessKiller test
This way the check can be reenabled as well.
2018-05-31 10:19:00 +02:00
Gerald Senarclens de Grancy f4da4bb8a8 pass ServiceDescriptor when creating wrapperservice 2017-10-30 13:36:17 +01:00
Oleg Nenashev 8d94277288 Issue #237 - Improve diagnostics of the Runaway Process Killer when it kills the process (#239)
* Issue #237 - Improve diagnostics of the Runaway Process Killer when it kills the process

* Issue #237 - Also print the process (not sure if it's safe)
2017-09-18 18:25:16 +02:00
Dinz 221d30f271 Introduced the following new elements. (#247)
* Introduced the following new elements.
1. logname - you can override the name of the log file rather than using the EXE name, this means you don't have to call your EXE a different name, just name the winsw exe different. Default's the name to the EXE as before.
2. outfiledisabled - you can disable writing to the out file. Defaults to false.
3. errfiledisabled - you can disable writing to the error file. Defaults to false.
4. outfilepattern - you can choose the pattern of the out file. Defaults to .out.log.
5. errfilepattern - you can choos the pattern of the error file. Defaults to .err.log.

* Downgraded from C#7.0 syntax.

* Applied reviewers comment

* not required

* removed the key

* Added unit test for new fields logname, outfiledisabled, errfiledisabled and errfilepattern.

Created a new appender called roll-by-size-time see class RollingSizeTimeLogAppender, this appender supports rolling by time and size and rolling at a specific time each day.

Added unit test for the new appender.

Added a new option testwait which is similar to test but waits for the user to press any key before calling the stop method.

* Update loggingAndErrorReporting.md

* Cannot use $ string.format syntax, downgraded code to string.format.

* Another syntax found of $

* Fixed a unit tests
2017-09-18 18:22:01 +02:00
Dos Moonen 0833d67c26 Start using stopTimeoutMs 2017-06-28 15:56:12 +02:00
Dos Moonen 138bca822d Noticed a small 'error' and fixed it 2017-06-27 09:58:04 +02:00
Oleg Nenashev 69857d5d8c Issue #218 - Also support managing Stdin, which is required in the main executable logic 2017-06-08 23:44:24 +02:00
Oleg Nenashev 05092376f3 Issue #218 - ProcessHelper#StartProcessAndCallbackForExit() should redirect STDOUT/STDERR when LogHandler is defined
It restores logging of executables, which has been broken in https://github.com/kohsuke/winsw/pull/220.
Not a regression, because the change has not been released yet
2017-06-08 22:54:44 +02:00