feat(build): MSI installer improvements (#3376)
* feat(build): add a make target to build a msi installer locally * Testing wrapping the executable in cmd * build(ci): build msis in parallel * feat(server): add LogFile config option * Revert "Testing wrapping the executable in cmd" This reverts commit be29592254cb903fd4904f2f50d4d1a860795d33. * Adding --log-file for service executable * feat(ini): wip * feat(ini): parse nested ini section * fix(conf): fix fatal error messages * Now navidrome supports INI, we can use the built-in msi ini system and not require the VBScript to convert it into toml * File needs to be called .ini to be parsed as an INI and correct filename needs to be passed to the service * fix(msi): build msi locally * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): pipeline * fix(msi): Makefile * fix(msi): more clean up * fix(log): convert LF to CRLF on Windows * fix(msi): config filename should be case-insensitive * fix(msi): make it a little more idiomatic * Including the latest windows release of ffmpeg into the msi as built by https://www.gyan.dev/ffmpeg/builds/ (linked to on the official ffmpeg source) * This should version independent * Need bash expansion for the * to work * This will run twice, once for x86 and once for x64, I'll make it cache the executable for now as it'll be quicker * Silencing wget * Add ffmpeg path to the config so Navidrome knows where to find it * refactor: download ffmpeg from our repository * When going back from the "Are you ready to install?" it should go back to the Settings dialogue that you just came from * fix: comments --------- Co-authored-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package log
|
||||
|
||||
import (
|
||||
"io"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
@@ -22,3 +23,29 @@ func ShortDur(d time.Duration) string {
|
||||
s = strings.TrimSuffix(s, "0s")
|
||||
return strings.TrimSuffix(s, "0m")
|
||||
}
|
||||
|
||||
func CRLFWriter(w io.Writer) io.Writer {
|
||||
return &crlfWriter{w: w}
|
||||
}
|
||||
|
||||
type crlfWriter struct {
|
||||
w io.Writer
|
||||
lastByte byte
|
||||
}
|
||||
|
||||
func (cw *crlfWriter) Write(p []byte) (int, error) {
|
||||
var written int
|
||||
for _, b := range p {
|
||||
if b == '\n' && cw.lastByte != '\r' {
|
||||
if _, err := cw.w.Write([]byte{'\r'}); err != nil {
|
||||
return written, err
|
||||
}
|
||||
}
|
||||
if _, err := cw.w.Write([]byte{b}); err != nil {
|
||||
return written, err
|
||||
}
|
||||
written++
|
||||
cw.lastByte = b
|
||||
}
|
||||
return written, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user