Skip to content
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

Conversation

harrisonhjones
Copy link
Contributor

@harrisonhjones harrisonhjones commented Mar 26, 2018

Purpose

This change fixes/addresses #3668 by adding an Icon to the Windows syncthing.exe binary.

Based on #4645

Testing

  • Ran go run build.go - success
  • Verified the binary was created at bin/syncthing.exe - success
  • Verified the binary had the Syncthing icon - success
  • Verified the binary had the given file properties by right clicking on it, clicking the "properties" menu item, and then the "details" tab. - success

Note, I tested this build on a Windows machine.

Screenshots

image

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.

@AudriusButkevicius
Copy link
Member

I get when running build

exec: "goversioninfo": executable file not found in %PATH%
exit status 1

It should not abort if it's not present

build.go Outdated

sysoPath := filepath.Join(dir, "cmd", "syncthing", "resource.syso")

runPrint("goversioninfo", "-o", sysoPath)
Copy link
Member

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

Copy link
Contributor Author

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

  1. Removed goversioninfo from my system and re-ran go run build.go.
    • Build succeeded with a logged warning
  2. Added goversioninfo back to my system and re-ran go run build.go
    • Build succeeded without a warning and the syncthing.exe was encoded properly with the icon and build information.

@AudriusButkevicius
Copy link
Member

@st-jenkins rebuild

@AudriusButkevicius AudriusButkevicius merged commit 8208bfa into syncthing:master Mar 26, 2018
@AudriusButkevicius
Copy link
Member

I think the integration test failures are a red herring, hence merged this.

@AudriusButkevicius
Copy link
Member

We need to:

go get github.com/josephspurrier/goversioninfo
go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo

on the build servers, yet I think I no longer have access to those.

@AudriusButkevicius
Copy link
Member

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

@AudriusButkevicius
Copy link
Member

@AudriusButkevicius
Copy link
Member

AudriusButkevicius commented Mar 26, 2018

It seems the icon contains two layers of the same size, one pixelated, one blurred (which I guess is correct):

image

@AudriusButkevicius
Copy link
Member

Seems that even if I remove the layers it ends up pixelated.

@harrisonhjones
Copy link
Contributor Author

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

@AudriusButkevicius
Copy link
Member

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.

@canton7
Copy link
Member

canton7 commented Mar 26, 2018

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

@harrisonhjones
Copy link
Contributor Author

@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)

@AudriusButkevicius
Copy link
Member

I'll try yours tomorrow.

@calmh
Copy link
Member

calmh commented Mar 27, 2018

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)

@AudriusButkevicius
Copy link
Member

Go get just fetches the code right, I think this needs a go install too?

@calmh
Copy link
Member

calmh commented Mar 27, 2018

Nah it installs the binary as well. The magic is in the dotdotdot

@calmh
Copy link
Member

calmh commented Mar 27, 2018 via email

@AudriusButkevicius
Copy link
Member

AudriusButkevicius commented Mar 27, 2018

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.

@calmh
Copy link
Member

calmh commented Mar 27, 2018 via email

AudriusButkevicius added a commit to AudriusButkevicius/syncthing that referenced this pull request Apr 2, 2018
calmh added a commit to calmh/syncthing that referenced this pull request Apr 11, 2018
* 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)
  ...
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Mar 27, 2019
@syncthing syncthing locked and limited conversation to collaborators Mar 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants