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:
+36
-2
@@ -1,15 +1,18 @@
|
||||
package log
|
||||
package log_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/navidrome/navidrome/log"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = DescribeTable("ShortDur",
|
||||
func(d time.Duration, expected string) {
|
||||
Expect(ShortDur(d)).To(Equal(expected))
|
||||
Expect(log.ShortDur(d)).To(Equal(expected))
|
||||
},
|
||||
Entry("1ns", 1*time.Nanosecond, "1ns"),
|
||||
Entry("9µs", 9*time.Microsecond, "9µs"),
|
||||
@@ -24,3 +27,34 @@ var _ = DescribeTable("ShortDur",
|
||||
Entry("4h", 4*time.Hour+2*time.Second, "4h"),
|
||||
Entry("4h2m", 4*time.Hour+2*time.Minute+5*time.Second+200*time.Millisecond, "4h2m"),
|
||||
)
|
||||
|
||||
var _ = Describe("CRLFWriter", func() {
|
||||
var (
|
||||
buffer *bytes.Buffer
|
||||
writer io.Writer
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
buffer = new(bytes.Buffer)
|
||||
writer = log.CRLFWriter(buffer)
|
||||
})
|
||||
|
||||
Describe("Write", func() {
|
||||
It("should convert all LFs to CRLFs", func() {
|
||||
n, err := writer.Write([]byte("hello\nworld\nagain\n"))
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(n).To(Equal(18))
|
||||
Expect(buffer.String()).To(Equal("hello\r\nworld\r\nagain\r\n"))
|
||||
})
|
||||
|
||||
It("should not convert LF to CRLF if preceded by CR", func() {
|
||||
n, err := writer.Write([]byte("hello\r"))
|
||||
Expect(n).To(Equal(6))
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
n, err = writer.Write([]byte("\nworld\n"))
|
||||
Expect(n).To(Equal(7))
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(buffer.String()).To(Equal("hello\r\nworld\r\n"))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user