hbons / SparkleShare

Share and collaborate by syncing with any Git repository instantly. Linux, macOS, and Windows.
https://sparkleshare.org
Other
4.87k stars 579 forks source link

Working build for windows #1946

Closed uenz closed 4 years ago

uenz commented 4 years ago

After seeing the pull-request of etinin i tried to build the windows version. Because of the binary files you did not accept the pull-request. Therefore i found a workaround to use the Windows 10 openSSH. I described the setup procedure in the windows readme.md. I also changed the mysysgit to the same git version as is used in the mac build. With these changes the windows version builds and is working. The installer is not fixed yet.

hbons commented 4 years ago

Thanks! This looks good. I did not know Windows now includes OpenSSH. That's cool.

One thing before merging: In CheckForNewVersion() it should check the sparkleshare.org certificate manually. Here's an example in the gravatar fetch code.

uenz commented 4 years ago

I played a bit with the code. If i only set the security protocol ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; the key is validated by the system without overloading ServicePointManager.ServerCertificateValidationCallback. But i´m not sure if that is sufficient. But on my windows machine it works.

I found that windows 10 comes with curl and tar out of the box. So it should be possible to download git as a build step. I´ll try to make a script these days.

uenz commented 4 years ago

I did further testing with my own local server . Cloning and down-syncing works. But up-syncing fails with C:/Users/secretuser/AppData/Roaming/org.sparkleshare.SparkleShare/bin/git-lfs': No such file or directory The last git command while uploading git.exe push --all --progress origin expects git-lfs.exe to be in in the AppData folder. Placing it manually there makes SparkeShare fully working. I´ve seen that on macos the executable is also stored in the .config folder. So my question: "who" copies git-lfs on macos and "who" should do in on windows? Should it be done at the startup of the program or as setuptime?

uenz commented 4 years ago

Found a possible solution myself. Now the program seems to be fully functional.

uenz commented 4 years ago

Please reject this pull-request. Ill make a new pull-request, which also includes post build git download.