New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add icon & file info to syncthing.exe #4839
Add icon & file info to syncthing.exe #4839
Conversation
I get when running build
It should not abort if it's not present |
build.go
Outdated
|
||
sysoPath := filepath.Join(dir, "cmd", "syncthing", "resource.syso") | ||
|
||
runPrint("goversioninfo", "-o", sysoPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably want to replace with runError
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use runError
and also had shouldBuildSyso return an error (could probably just rename to
buildSyso`) if it failed to build the syso.
Testing
- Removed
goversioninfo
from my system and re-rango run build.go
.- Build succeeded with a logged warning
- Added
goversioninfo
back to my system and re-rango run build.go
- Build succeeded without a warning and the
syncthing.exe
was encoded properly with the icon and build information.
- Build succeeded without a warning and the
@st-jenkins rebuild |
I think the integration test failures are a red herring, hence merged this. |
We need to:
on the build servers, yet I think I no longer have access to those. |
Also, the icon is too high res (or perhaps we should include a few as I think Windows supports that), but that's a separate issue |
Seems that even if I remove the layers it ends up pixelated. |
I generated the icon with multiple sizes using an .ico plugin for Paint.Net. I'm happy to regenerate it I just don't quite understand the issue |
It seems that no matter what I do the icon remains pixelated. I suspect it's because of number of colors allowed in the smaller icons. |
This is the one I use: lots of resolutions, smart scaling, bit of manual tweaking. https://github.com/canton7/SyncTrayzor/blob/master/src/SyncTrayzor/Icons/default.ico |
@canton7 it looks a bit clipped at the bottom (in my browser at least) but if it's better than the one I contributed let's us it! (assuming you are ok with that) |
I'll try yours tomorrow. |
About the tool, this needs to be added to the build agent docker image we use. I've done so, new image should be rolling out during the afternoon. (https://github.com/kastelo/dockers/tree/master/teamcity-agent) |
Go get just fetches the code right, I think this needs a go install too? |
Nah it installs the binary as well. The magic is in the dotdotdot |
And, uh, I’m a dummy because this obviously should happen on the windows builder which has nothing to do with the docker image. I’ll sort it out.
|
I think the syso stuff works regardless of the platform, as long as the target is Windows, as it's dealt by the Go compiler it seems. |
Yeah but to be relevant for us it needs to happen on the box where we do windows builds, which is the windows builder
|
* master: (24 commits) lib/model: Prevent warning on request in paused folder (fixes syncthing#4870) docker: Add README from old Docker repo (fixes syncthing#4868) (syncthing#4869) cmd/strelaypoolsrv: Move metric scraping to the server itself (syncthing#4866) gui, man: Update docs & translations assets: Use icon from synctrayzor (ref syncthing#4839) (syncthing#4859) cmd/strelaypoolsrv: Handle portless X-Forwarded-For (syncthing#4856) lib/fs: Don't panic when watching a folder with symlinked root (syncthing#4846) cmd/syncthing: Set Content-Type header regardless of asset location (syncthing#4847) authors: Add fuzzybear3965 cmd/syncthing: Correct --paths in some cases (syncthing#4845) gui, man: Update docs & translations lib/osutil: Use unix lowprio implementation on Android (syncthing#4844) lib/scanner, lib/model: Actually assign version when un-ignoring (fixes syncthing#4841) (syncthing#4842) lib/scanner, lib/model: Actually assign version when un-ignoring (fixes syncthing#4841) (syncthing#4842) cmd/stdiscosrv, vendor: Remove remnants of golang.org/x/net/context (syncthing#4843) lib/connections: Wrong context snuck in somehow build: Add icon & file info to syncthing.exe (syncthing#4839) lib/connections: Slightly refactor limiter juggling lib/connections, lib/config: Bandwidth throttling per remote device (fixes syncthing#4516) (syncthing#4603) gui: Add folder label to global changes, use bootstrap table (fixes syncthing#4828) (syncthing#4838) ...
Purpose
This change fixes/addresses #3668 by adding an Icon to the Windows
syncthing.exe
binary.Based on #4645
Testing
go run build.go
- successbin/syncthing.exe
- successNote, I tested this build on a Windows machine.
Screenshots
Documentation
I don't believe this requires a documentation change.
Authorship
Every author of a code contribution (Go, Javascript, HTML, CSS etc, with the
possible exception of minor typo corrections and similar) is recorded in the
AUTHORS and NICKS files and the in-GUI credits. If this is your first
contribution, a maintainer will add you properly before accepting the
contribution. You need not do so yourself or worry about the fact that the
"authors" automated test fails. However, if your name (such as you want it
presented in the credits) is not visible on your Github profile or in your
commit messages, please assist by providing it here.