note more windows peculiarities
This commit is contained in:
parent
1c4bfd4baf
commit
3252a7f39f
31
README.md
31
README.md
|
@ -89,12 +89,24 @@ Windows 10: [64-bit Download](https://rootprojects.org/serviceman/dist/windows/a
|
||||||
powershell.exe $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest https://rootprojects.org/serviceman/dist/windows/amd64/serviceman.exe -OutFile serviceman.exe
|
powershell.exe $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest https://rootprojects.org/serviceman/dist/windows/amd64/serviceman.exe -OutFile serviceman.exe
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Debug version**:
|
||||||
|
|
||||||
|
```
|
||||||
|
powershell.exe $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest https://rootprojects.org/serviceman/dist/windows/amd64/serviceman.debug.exe -OutFile serviceman.debug.exe
|
||||||
|
```
|
||||||
|
|
||||||
Windows 7: [32-bit Download](https://rootprojects.org/serviceman/dist/windows/386/serviceman.exe)
|
Windows 7: [32-bit Download](https://rootprojects.org/serviceman/dist/windows/386/serviceman.exe)
|
||||||
|
|
||||||
```
|
```
|
||||||
powershell.exe "(New-Object Net.WebClient).DownloadFile('https://rootprojects.org/serviceman/dist/windows/386/serviceman.exe', 'serviceman.exe')"
|
powershell.exe "(New-Object Net.WebClient).DownloadFile('https://rootprojects.org/serviceman/dist/windows/386/serviceman.exe', 'serviceman.exe')"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Debug version**:
|
||||||
|
|
||||||
|
```
|
||||||
|
powershell.exe "(New-Object Net.WebClient).DownloadFile('https://rootprojects.org/serviceman/dist/windows/386/serviceman.debug.exe', 'serviceman.debug.exe')"
|
||||||
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### Linux
|
### Linux
|
||||||
|
@ -396,6 +408,23 @@ If you have gripes about it, tell me. It shouldn't suck. That's the goal anyway.
|
||||||
|
|
||||||
## Peculiarities of Windows
|
## Peculiarities of Windows
|
||||||
|
|
||||||
|
# Console vs No Console
|
||||||
|
|
||||||
|
Windows binaries can be built either for the console or the GUI.
|
||||||
|
|
||||||
|
When they're built for the console they can hide themselves when they start.
|
||||||
|
They must open up a terminal window.
|
||||||
|
|
||||||
|
When they're built for the GUI they can't print any output - even if they're started in the terminal.
|
||||||
|
|
||||||
|
This is why there's a **Debug version** for the windows binaries -
|
||||||
|
so that you can get your arguments correct with the one and then
|
||||||
|
switch to the other.
|
||||||
|
|
||||||
|
There's probably a clever way to work around this, but I don't know what it is yet.
|
||||||
|
|
||||||
|
# No userspace launcher
|
||||||
|
|
||||||
Windows doesn't have a userspace daemon launcher.
|
Windows doesn't have a userspace daemon launcher.
|
||||||
This means that if your application crashes, it won't automatically restart.
|
This means that if your application crashes, it won't automatically restart.
|
||||||
|
|
||||||
|
@ -408,7 +437,7 @@ If the application fails to start `serviceman` will retry continually,
|
||||||
but it does have an exponential backoff of up to 1 minute between failed
|
but it does have an exponential backoff of up to 1 minute between failed
|
||||||
restart attempts.
|
restart attempts.
|
||||||
|
|
||||||
See the bit on `serviceman run` in the **Debugging** section down below for more information.
|
See the bit on `serviceman run` in the **Debugging** section up above for more information.
|
||||||
|
|
||||||
# Building
|
# Building
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,10 @@ go generate -mod=vendor ./...
|
||||||
echo ""
|
echo ""
|
||||||
echo "Windows amd64"
|
echo "Windows amd64"
|
||||||
GOOS=windows GOARCH=amd64 go build -mod=vendor -o dist/windows/amd64/${exe}.exe -ldflags "-H=windowsgui" $gocmd
|
GOOS=windows GOARCH=amd64 go build -mod=vendor -o dist/windows/amd64/${exe}.exe -ldflags "-H=windowsgui" $gocmd
|
||||||
|
GOOS=windows GOARCH=amd64 go build -mod=vendor -o dist/windows/amd64/${exe}.debug.exe
|
||||||
echo "Windows 386"
|
echo "Windows 386"
|
||||||
GOOS=windows GOARCH=386 go build -mod=vendor -o dist/windows/386/${exe}.exe -ldflags "-H=windowsgui" $gocmd
|
GOOS=windows GOARCH=386 go build -mod=vendor -o dist/windows/386/${exe}.exe -ldflags "-H=windowsgui" $gocmd
|
||||||
|
GOOS=windows GOARCH=386 go build -mod=vendor -o dist/windows/386/${exe}.debug.exe
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Darwin (macOS) amd64"
|
echo "Darwin (macOS) amd64"
|
||||||
|
|
Loading…
Reference in New Issue