From bab1f9934d4f9f9b132b00da38e92cde567c25ec Mon Sep 17 00:00:00 2001 From: uenz Date: Sat, 27 Jun 2020 21:02:08 +0200 Subject: [PATCH 01/25] Defined security protokol that validation works --- SparkleShare/Common/AboutController.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SparkleShare/Common/AboutController.cs b/SparkleShare/Common/AboutController.cs index 514d045aa..f943b0154 100644 --- a/SparkleShare/Common/AboutController.cs +++ b/SparkleShare/Common/AboutController.cs @@ -61,6 +61,8 @@ void CheckForNewVersion () UpdateLabelEvent ("Checking for updates…"); Thread.Sleep (500); + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; + var web_client = new WebClient (); var uri = new Uri ("https://www.sparkleshare.org/version"); @@ -78,5 +80,5 @@ void CheckForNewVersion () UpdateLabelEvent ("Couldn’t check for updates\t"); } } - } + } } From 7ac1185c2c7ae5865a6ad87f5c53bd236ad0d7cf Mon Sep 17 00:00:00 2001 From: uenz Date: Sat, 27 Jun 2020 21:03:11 +0200 Subject: [PATCH 02/25] Fixed relative path --- SparkleShare/Windows/build.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SparkleShare/Windows/build.cmd b/SparkleShare/Windows/build.cmd index 2cae645b9..a615f6f24 100644 --- a/SparkleShare/Windows/build.cmd +++ b/SparkleShare/Windows/build.cmd @@ -8,7 +8,7 @@ set wixBinDir=%WIX%\bin if not exist ..\..\bin mkdir ..\..\bin copy Images\sparkleshare-app.ico ..\..\bin\ -%msbuild% /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" "%~dp0\SparkleShare.sln" +%msbuild% /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" "%~dp0\..\..\SparkleShare.sln" if "%1"=="installer" ( if exist "%wixBinDir%" ( From 1f2beb4feba7524a01e2d508c3cfde6a94c15a99 Mon Sep 17 00:00:00 2001 From: uenz Date: Sat, 27 Jun 2020 21:04:19 +0200 Subject: [PATCH 03/25] Added additional debug output --- SparkleShare/Windows/UserInterface/Controller.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/SparkleShare/Windows/UserInterface/Controller.cs b/SparkleShare/Windows/UserInterface/Controller.cs index 7ba2f3bba..cb2e90005 100644 --- a/SparkleShare/Windows/UserInterface/Controller.cs +++ b/SparkleShare/Windows/UserInterface/Controller.cs @@ -54,11 +54,12 @@ public override void Initialize () Environment.SetEnvironmentVariable ("HOME", Environment.GetFolderPath (Environment.SpecialFolder.UserProfile)); - SSHCommand.SSHPath = Path.Combine (msysgit_path, "usr", "bin"); - SSHFetcher.SSHKeyScan = Path.Combine (msysgit_path, "usr", "bin", "ssh-keyscan.exe"); - GitCommand.GitPath = Path.Combine (msysgit_path, "bin", "git.exe"); - + SSHCommand.SSHPath = Path.Combine(Environment.SystemDirectory, "OpenSSH"); + SSHFetcher.SSHKeyScan = Path.Combine(SSHCommand.SSHPath, "ssh-keyscan.exe"); + GitCommand.GitPath = Path.Combine (msysgit_path, "cmd", "git.exe"); base.Initialize (); + File.Copy(Path.Combine(msysgit_path, "mingw64", "libexec", "git-core", "git-lfs.exe"), Path.Combine(Config.BinPath, "git-lfs.exe"), true); + } @@ -129,7 +130,7 @@ public override void CreateStartupItem () Shortcut shortcut = new Shortcut (); shortcut.Create (shortcut_path, shortcut_target); } - + public override void InstallProtocolHandler () { @@ -184,14 +185,14 @@ public override void CopyToClipboard (string text) { try { Clipboard.SetData (DataFormats.Text, text); - + } catch (COMException e) { Logger.LogInfo ("Controller", "Copy to clipboard failed", e); } } - public override void Quit () + public override void PlatformQuit () { base.Quit (); } From 7f115187c550b420ee0678a74f384d7aca50c152 Mon Sep 17 00:00:00 2001 From: uenz Date: Sat, 27 Jun 2020 21:10:36 +0200 Subject: [PATCH 04/25] Added scripts for git / openssh installation during post build --- .../Windows/SparkleShare.Windows.csproj | 13 ++-- SparkleShare/Windows/git.download | 1 + SparkleShare/Windows/installSSH.cmd | 5 ++ SparkleShare/Windows/postBuild.cmd | 62 +++++++++++++++++++ SparkleShare/Windows/sha256.cmd | 59 ++++++++++++++++++ SparkleShare/Windows/sudo.cmd | 3 + 6 files changed, 138 insertions(+), 5 deletions(-) create mode 100644 SparkleShare/Windows/git.download create mode 100644 SparkleShare/Windows/installSSH.cmd create mode 100644 SparkleShare/Windows/postBuild.cmd create mode 100644 SparkleShare/Windows/sha256.cmd create mode 100644 SparkleShare/Windows/sudo.cmd diff --git a/SparkleShare/Windows/SparkleShare.Windows.csproj b/SparkleShare/Windows/SparkleShare.Windows.csproj index a3c32c1dc..9ab1c9c21 100644 --- a/SparkleShare/Windows/SparkleShare.Windows.csproj +++ b/SparkleShare/Windows/SparkleShare.Windows.csproj @@ -211,23 +211,23 @@ Images\user-icon-default.png Always - + Images\document-added-12.png Always - + Images\document-deleted-12.png Always - + Images\document-edited-12.png Always - + Images\document-moved-12.png Always - + Images\process-working-22.png Always @@ -334,4 +334,7 @@ Sparkles.Git + + $(ProjectDir)\postBuild.cmd $(TargetDir)\msysgit + \ No newline at end of file diff --git a/SparkleShare/Windows/git.download b/SparkleShare/Windows/git.download new file mode 100644 index 000000000..ed49e9f2f --- /dev/null +++ b/SparkleShare/Windows/git.download @@ -0,0 +1 @@ +https://github.com/desktop/dugite-native/releases/download/v2.16.2/dugite-native-v2.16.2-win32-119.tar.gz c84d31baa8d5c782bbf2a421c0231895c8515b09f698653d70e491b4ffdc1db3 diff --git a/SparkleShare/Windows/installSSH.cmd b/SparkleShare/Windows/installSSH.cmd new file mode 100644 index 000000000..8854502cf --- /dev/null +++ b/SparkleShare/Windows/installSSH.cmd @@ -0,0 +1,5 @@ + +REM ssh-keyscan comes with OpenSSH.Client +powershell -command "Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0" +REM ssh-keygen comes with OpenSSH.Server +powershell -command "Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0" diff --git a/SparkleShare/Windows/postBuild.cmd b/SparkleShare/Windows/postBuild.cmd new file mode 100644 index 000000000..049cc256d --- /dev/null +++ b/SparkleShare/Windows/postBuild.cmd @@ -0,0 +1,62 @@ +ECHO ON +REM if no target directory is passed use default on +IF [%1]==[] (SET OUTDIR="%~dp0\..\..\bin\msysgit") ELSE (SET OUTDIR=%~1) + +IF EXIST %OUTDIR%\cmd GOTO skipgitdownload +REM download helper tool +ECHO installing git +CALL :downloadandverify https://github.com/senthilrajasek/tartool/releases/download/1.0.0/TarTool.zip tartool.zip 5ed0d78cb4d83dd0e124015a30ea69f8e5101c62c8c29a9f448f208147b59c04 +powershell -command "Expand-Archive -Force -Path tartool.zip -DestinationPath %~dp0/tools" + +REM download git +FOR /F "usebackq tokens=1" %%i IN ("%~dp0\git.download") DO SET url=%%i +FOR /F "usebackq tokens=2" %%i IN ("%~dp0\git.download") DO SET md5hash=%%i +CALL :downloadandverify %url% %~dp0\git.tar.gz %md5hash% +%~dp0\tools\tartool %~dp0\git.tar.gz %OUTDIR% + +DEL /s /q %~dp0\tartool.zip +DEL /s /q %~dp0\git.tar.gz +DEL /s /q %~dp0\tools +RMDIR %~dp0\tools + +:skipgitdownload + +rem This simple check is for 32-bit Windows and for 64-bit Windows with batch +rem file executed in 64-bit environment by 64-bit Windows command processor. +set FolderSSH=%SystemRoot%\System32\OpenSSH +if exist %FolderSSH%\ssh-keygen.exe if exist %FolderSSH%\ssh-keyscan.exe ( + goto skipInstallOpenSSH + echo Found ssh-keygen and ssh-keyscan in: "%FolderSSH%" +) + +rem This check is for 64-bit Windows with batch file executed +rem in 32-bit environment by 32-bit Windows command processor. +if exist %SystemRoot%\Sysnative\cmd.exe set FolderSSH=%SystemRoot%\Sysnative\OpenSSH +if exist %FolderSSH%\ssh-keygen.exe if exist %FolderSSH%\ssh-keyscan.exe ( + goto skipInstallOpenSSH + echo Found ssh-keygen and ssh-keyscan in: "%FolderSSH%" +) +echo ERROR: ssh-keygen.exe AND ssh-keyscan.exe not found. +ECHO installing openSSH +%~dp0\sudo.cmd %~dp0\installSSH +REM powershell -command "Add-Type -AssemblyName PresentationCore,PresentationFramework; [System.Windows.MessageBox]::Show('Sometimes windows has to be restarted to get use of ssh-keyscan and ssh-keygen. If it not works restart and the commands are available.','OpenSSH was installed','Ok','Warning')" +:skipInstallOpenSSH +SET ERRORLEVEL= +ECHO ready +EXIT /B 0 + + +:downloadandverify +REM first parameter url to download +REM second parameter local filename +REM third parameter md5string + +curl -L %~1 -o %~2 +for /f "usebackq" %%i in (`%~dp0\sha256.cmd %~2`) do set sha256=%%i +if "%sha256%" == "%~3" (echo) else (goto :sha256error) +goto:eof + +:sha256error +ECHO sha256 sum of download wrong +SET ERRORLEVEL=2 +goto skipopenSSH diff --git a/SparkleShare/Windows/sha256.cmd b/SparkleShare/Windows/sha256.cmd new file mode 100644 index 000000000..a90a4c8d5 --- /dev/null +++ b/SparkleShare/Windows/sha256.cmd @@ -0,0 +1,59 @@ + +@REM code from https://github.com/npocmaka/batch.scripts/blob/master/fileUtils/sha256.bat +@echo off +setlocal enableDelayedExpansion +if "%~1" equ "" ( + echo no file passed + echo pass -help to see the help message + exit /b 1 +) + +for %%# in (-h -help /h /help) do ( + if "%~1" equ "%%~#" ( + echo generates SHA256 checksum for a given file + (echo() + echo USAGE: + (echo() + echo %~nx0 file [variable] + (echo() + echo variable string in which the generated checksum will be stored + (echo() + exit /b 0 + ) +) + +if not exist "%~1" ( + echo file %~1 does not exist + exit /b 2 +) + +if exist "%~1\" ( + echo %~1 is a directory + exit /b 3 +) + +for %%# in (certutil.exe) do ( + if not exist "%%~f$PATH:#" ( + echo no certutil installed + echo for Windows XP professional and Windows 2003 + echo you need Windows Server 2003 Administration Tools Pack + echo https://www.microsoft.com/en-us/download/details.aspx?id=3725 + exit /b 4 + ) +) + +set "SHA256=" +for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile "%~f1" SHA256') do ( + if not defined SHA256 ( + for %%Z in (%%#) do set "SHA256=!SHA256!%%Z" + ) +) + +if "%~2" neq "" ( + endlocal && ( + set "%~2=%SHA256%" + ) +) else ( + echo %SHA256% +) +endlocal diff --git a/SparkleShare/Windows/sudo.cmd b/SparkleShare/Windows/sudo.cmd new file mode 100644 index 000000000..549f195a8 --- /dev/null +++ b/SparkleShare/Windows/sudo.cmd @@ -0,0 +1,3 @@ +@echo off +powershell -Command "Start-Process cmd -Verb RunAs -ArgumentList '/c %*'" +@echo on From 026e50a6d4490d56c0b7210a3d06401e549ef7a7 Mon Sep 17 00:00:00 2001 From: uenz Date: Sat, 27 Jun 2020 21:11:58 +0200 Subject: [PATCH 05/25] Added additional debug output --- Sparkles/Command.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sparkles/Command.cs b/Sparkles/Command.cs index b186a7e74..c6430b79a 100644 --- a/Sparkles/Command.cs +++ b/Sparkles/Command.cs @@ -62,7 +62,8 @@ public Command (string path, string args, bool write_output) base.Start (); } catch (Exception e) { - Logger.LogInfo ("Cmd", "Couldn't execute command: " + e.Message); + Logger.LogInfo ("Cmd", "Couldn't execute command: " + +StartInfo.FileName+","+ e.Message); Environment.Exit (-1); } } From f3fdba2eb17559078c7bb0d3fed244e92252660d Mon Sep 17 00:00:00 2001 From: uenz Date: Sat, 27 Jun 2020 21:44:51 +0200 Subject: [PATCH 06/25] Corrected path for tartool download --- SparkleShare/Windows/postBuild.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SparkleShare/Windows/postBuild.cmd b/SparkleShare/Windows/postBuild.cmd index 049cc256d..3a5e17e23 100644 --- a/SparkleShare/Windows/postBuild.cmd +++ b/SparkleShare/Windows/postBuild.cmd @@ -5,8 +5,8 @@ IF [%1]==[] (SET OUTDIR="%~dp0\..\..\bin\msysgit") ELSE (SET OUTDIR=%~1) IF EXIST %OUTDIR%\cmd GOTO skipgitdownload REM download helper tool ECHO installing git -CALL :downloadandverify https://github.com/senthilrajasek/tartool/releases/download/1.0.0/TarTool.zip tartool.zip 5ed0d78cb4d83dd0e124015a30ea69f8e5101c62c8c29a9f448f208147b59c04 -powershell -command "Expand-Archive -Force -Path tartool.zip -DestinationPath %~dp0/tools" +CALL :downloadandverify https://github.com/senthilrajasek/tartool/releases/download/1.0.0/TarTool.zip %~dp0\tartool.zip 5ed0d78cb4d83dd0e124015a30ea69f8e5101c62c8c29a9f448f208147b59c04 +powershell -command "Expand-Archive -Force -Path %~dp0\tartool.zip -DestinationPath %~dp0/tools" REM download git FOR /F "usebackq tokens=1" %%i IN ("%~dp0\git.download") DO SET url=%%i From 52d8362b7c3c17e91456f408236c29313574a530 Mon Sep 17 00:00:00 2001 From: uenz Date: Sat, 27 Jun 2020 21:49:26 +0200 Subject: [PATCH 07/25] Changed build requirements --- SparkleShare/Windows/README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/SparkleShare/Windows/README.md b/SparkleShare/Windows/README.md index c85784e1a..d91b48bb7 100644 --- a/SparkleShare/Windows/README.md +++ b/SparkleShare/Windows/README.md @@ -4,10 +4,8 @@ You can choose to build SparkleShare from source or to run the Windows installer ### Installing build requirements -Install version 4.0 of the [.NET Framework](http://www.microsoft.com/download/en/details.aspx?id=17851) if you haven't already. - -Install [msysGit](https://github.com/msysgit/msysgit/releases) and copy the contents of the install folder -(`C:\Program Files (x86)\Git` by default) to `C:\path\to\SparkleShare-sources\bin\msysgit\` (create the "bin"-folder in the SparkleShare source directory). +Install [VisualStudioCommunity](https://visualstudio.microsoft.com/de/vs/community/) +or install version 4.0 of the [.NET Framework](http://www.microsoft.com/download/en/details.aspx?id=17851) if you haven't already. Open a command prompt and execute the following: @@ -16,12 +14,12 @@ cd C:\path\to\SparkleShare-sources cd SparkleShare\Windows build ``` - +The build command ends with 2 errors. But that´s all right. `C:\path\to\SparkleShare-sources\bin` should now contain `SparkleShare.exe`, which you can run. ### Creating a Windows installer - +-- broken at the moment -- To create an installer package, install [WiX 3.7](http://wix.codeplex.com/releases/view/99514), restart Windows and run: ``` @@ -40,4 +38,3 @@ Remove `My Documents\SparkleShare` and `AppData\Roaming\org.sparkleshare.Sparkle ### Uninstalling You can uninstall SparkleShare through the Windows Control Panel. - From d89e4401ea203c149c2925fee5b1c987a229e231 Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 29 Jun 2020 10:50:55 +0200 Subject: [PATCH 08/25] BugFix: exit application and dont call base.Quit, because that leads to loop --- SparkleShare/Windows/UserInterface/Controller.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SparkleShare/Windows/UserInterface/Controller.cs b/SparkleShare/Windows/UserInterface/Controller.cs index cb2e90005..6f52cb91e 100644 --- a/SparkleShare/Windows/UserInterface/Controller.cs +++ b/SparkleShare/Windows/UserInterface/Controller.cs @@ -194,7 +194,7 @@ public override void CopyToClipboard (string text) public override void PlatformQuit () { - base.Quit (); + System.Environment.Exit(0); } } } From f054c2fc356982cf839a8f0f4a27ae77e6eba223 Mon Sep 17 00:00:00 2001 From: uenz Date: Fri, 21 May 2021 16:31:14 +0200 Subject: [PATCH 09/25] Removed external dependency --- SparkleShare/Windows/postBuild.cmd | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/SparkleShare/Windows/postBuild.cmd b/SparkleShare/Windows/postBuild.cmd index 3a5e17e23..15f2fdd91 100644 --- a/SparkleShare/Windows/postBuild.cmd +++ b/SparkleShare/Windows/postBuild.cmd @@ -1,23 +1,19 @@ ECHO ON REM if no target directory is passed use default on -IF [%1]==[] (SET OUTDIR="%~dp0\..\..\bin\msysgit") ELSE (SET OUTDIR=%~1) +IF [%1]==[] (SET OUTDIR="%~dp0..\..\bin\msysgit") ELSE (SET OUTDIR=%~1) IF EXIST %OUTDIR%\cmd GOTO skipgitdownload -REM download helper tool ECHO installing git -CALL :downloadandverify https://github.com/senthilrajasek/tartool/releases/download/1.0.0/TarTool.zip %~dp0\tartool.zip 5ed0d78cb4d83dd0e124015a30ea69f8e5101c62c8c29a9f448f208147b59c04 -powershell -command "Expand-Archive -Force -Path %~dp0\tartool.zip -DestinationPath %~dp0/tools" - REM download git FOR /F "usebackq tokens=1" %%i IN ("%~dp0\git.download") DO SET url=%%i FOR /F "usebackq tokens=2" %%i IN ("%~dp0\git.download") DO SET md5hash=%%i CALL :downloadandverify %url% %~dp0\git.tar.gz %md5hash% -%~dp0\tools\tartool %~dp0\git.tar.gz %OUTDIR% - -DEL /s /q %~dp0\tartool.zip -DEL /s /q %~dp0\git.tar.gz -DEL /s /q %~dp0\tools -RMDIR %~dp0\tools +XCOPY %~dp0\git.tar.gz %OUTDIR%\ /Y /i +CD %OUTDIR% +TAR -xf git.tar.gz +DEL /s /q git.tar.gz +CD %~dp0 +PAUSE :skipgitdownload From e2b1024cb5993d41402cfac37a7ee3819f5412a0 Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 26 Jul 2021 20:30:37 +0200 Subject: [PATCH 10/25] Removed sha256 wrapper for certutil --- SparkleShare/Windows/sha256.cmd | 59 --------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 SparkleShare/Windows/sha256.cmd diff --git a/SparkleShare/Windows/sha256.cmd b/SparkleShare/Windows/sha256.cmd deleted file mode 100644 index a90a4c8d5..000000000 --- a/SparkleShare/Windows/sha256.cmd +++ /dev/null @@ -1,59 +0,0 @@ - -@REM code from https://github.com/npocmaka/batch.scripts/blob/master/fileUtils/sha256.bat -@echo off -setlocal enableDelayedExpansion -if "%~1" equ "" ( - echo no file passed - echo pass -help to see the help message - exit /b 1 -) - -for %%# in (-h -help /h /help) do ( - if "%~1" equ "%%~#" ( - echo generates SHA256 checksum for a given file - (echo() - echo USAGE: - (echo() - echo %~nx0 file [variable] - (echo() - echo variable string in which the generated checksum will be stored - (echo() - exit /b 0 - ) -) - -if not exist "%~1" ( - echo file %~1 does not exist - exit /b 2 -) - -if exist "%~1\" ( - echo %~1 is a directory - exit /b 3 -) - -for %%# in (certutil.exe) do ( - if not exist "%%~f$PATH:#" ( - echo no certutil installed - echo for Windows XP professional and Windows 2003 - echo you need Windows Server 2003 Administration Tools Pack - echo https://www.microsoft.com/en-us/download/details.aspx?id=3725 - exit /b 4 - ) -) - -set "SHA256=" -for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile "%~f1" SHA256') do ( - if not defined SHA256 ( - for %%Z in (%%#) do set "SHA256=!SHA256!%%Z" - ) -) - -if "%~2" neq "" ( - endlocal && ( - set "%~2=%SHA256%" - ) -) else ( - echo %SHA256% -) -endlocal From 67f5bc2ee0625547c5c4b9d654a8e9943550cc2b Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 26 Jul 2021 20:31:20 +0200 Subject: [PATCH 11/25] Removed sha256 wrapper for certutil --- SparkleShare/Windows/postBuild.cmd | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/SparkleShare/Windows/postBuild.cmd b/SparkleShare/Windows/postBuild.cmd index 15f2fdd91..adf88449c 100644 --- a/SparkleShare/Windows/postBuild.cmd +++ b/SparkleShare/Windows/postBuild.cmd @@ -1,4 +1,5 @@ ECHO ON +setlocal enableDelayedExpansion REM if no target directory is passed use default on IF [%1]==[] (SET OUTDIR="%~dp0..\..\bin\msysgit") ELSE (SET OUTDIR=%~1) @@ -39,6 +40,7 @@ REM powershell -command "Add-Type -AssemblyName PresentationCore,PresentationFra :skipInstallOpenSSH SET ERRORLEVEL= ECHO ready +endlocal EXIT /B 0 @@ -48,11 +50,21 @@ REM second parameter local filename REM third parameter md5string curl -L %~1 -o %~2 -for /f "usebackq" %%i in (`%~dp0\sha256.cmd %~2`) do set sha256=%%i -if "%sha256%" == "%~3" (echo) else (goto :sha256error) +set "SHA256=" +for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile %~2 SHA256') do ( + if not defined SHA256 ( + for %%Z in (%%#) do set "SHA256=!SHA256!%%Z" + ) +) +if "%SHA256%" == "%~3" ( +echo +) else ( +del %~2 +goto :sha256error +) goto:eof :sha256error ECHO sha256 sum of download wrong SET ERRORLEVEL=2 -goto skipopenSSH +goto skipInstallOpenSSH From b170e22e2af67ca8b2e4290bcbc26766780dd6d1 Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 26 Jul 2021 20:31:59 +0200 Subject: [PATCH 12/25] Added storage page --- SparkleShare/Windows/UserInterface/Setup.cs | 78 +++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/SparkleShare/Windows/UserInterface/Setup.cs b/SparkleShare/Windows/UserInterface/Setup.cs index d6b523cd4..ca0d245bb 100644 --- a/SparkleShare/Windows/UserInterface/Setup.cs +++ b/SparkleShare/Windows/UserInterface/Setup.cs @@ -17,6 +17,7 @@ using Sparkles; using System; +using System.Collections.Generic; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; @@ -549,6 +550,83 @@ public Setup () break; } + case PageType.StorageSetup: + { + Header = string.Format("Storage type for ‘{0}’", Controller.SyncingFolder); + Description = "What type of storage would you like to use?"; + + //GroupBox layout_vertical = new GroupBox(); + var layout_radio_buttons = new List(); + int position = 100; + foreach (StorageTypeInfo storage_type in SparkleShare.Controller.FetcherAvailableStorageTypes) + { + TextBlock tb = new TextBlock(); + tb.TextWrapping = TextWrapping.Wrap; + //tb.Margin = new Thickness(10); + //tb.Inlines.Add("An example on "); + tb.Inlines.Add(new Run(storage_type.Name) { FontWeight = FontWeights.Bold }); + tb.Inlines.Add("\n"); + tb.Inlines.Add(storage_type.Description); + + RadioButton radio_button = new RadioButton() + { + Content = tb//storage_type.Name + "\n" + storage_type.Description + }; + layout_radio_buttons.Add(radio_button); + ContentCanvas.Children.Add(radio_button); + Canvas.SetLeft(radio_button, 195); + Canvas.SetTop(radio_button, position); + position += 100; + //radio_button.Text = storage_type.Name + "\n" + storage_type.Description; + /* + (radio_button.Child as Label).Markup = string.Format( + "{0}\n{2}", + storage_type.Name, 0, storage_type.Description); + + (radio_button.Child as Label).Xpad = 9;*/ + + //layout_radio_buttons.AddChild(radio_button); + //.PackStart(radio_button, false, false, 9); + /* radio_button.Group = (layout_radio_buttons.Children[0] as RadioButton).Group;*/ + }; + /* + layout_vertical.PackStart(new Label(""), true, true, 0); + layout_vertical.PackStart(layout_radio_buttons, false, false, 0); + layout_vertical.PackStart(new Label(""), true, true, 0); + Add(layout_vertical);*/ + + Button cancel_button = new Button() + { + Content = "Cancel" + }; + + Button continue_button = new Button() + { + Content = "Continue" + }; + continue_button.Click += delegate { + int checkbox_index = 0; + foreach (RadioButton radio_button in layout_radio_buttons) + { + if (radio_button.IsChecked==true) + { + StorageTypeInfo selected_storage_type = SparkleShare.Controller.FetcherAvailableStorageTypes[checkbox_index]; + Controller.StoragePageCompleted(selected_storage_type.Type); + return; + } + + checkbox_index++; + } + }; + + cancel_button.Click += delegate { + Controller.SyncingCancelled(); + }; + + Buttons.Add(cancel_button); + Buttons.Add(continue_button); + break; + } case PageType.CryptoSetup: { // TODO: Merge crypto pages From e24c261f6e0df253224369a2873ae72173211af7 Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 26 Jul 2021 20:32:27 +0200 Subject: [PATCH 13/25] Made eventlog visible --- SparkleShare/Windows/UserInterface/EventLog.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SparkleShare/Windows/UserInterface/EventLog.cs b/SparkleShare/Windows/UserInterface/EventLog.cs index 735648b16..bf8bc6a97 100644 --- a/SparkleShare/Windows/UserInterface/EventLog.cs +++ b/SparkleShare/Windows/UserInterface/EventLog.cs @@ -219,10 +219,12 @@ private void CreateEventLog () { browserGrid.Children.Add(sizingControlHeight); browserGrid.Children.Add(sizingControlWidth); - webbrowser.SetBinding(HeightProperty, new Binding("ActualHeightProperty") { ElementName = sizingControlHeight.Name }); - webbrowser.SetBinding(WidthProperty, new Binding("ActualWidthProperty") { ElementName = sizingControlWidth.Name }); + webbrowser.SetBinding(HeightProperty, new Binding("ActualHeightProperty").ElementName = sizingControlHeight.Name ); + webbrowser.SetBinding(WidthProperty, new Binding("ActualWidthProperty").ElementName = sizingControlWidth.Name ); grid_Base.Children.Add(border); + grid_Base.Children.Add(browserGrid); + Content = grid_Base; } private void OnClosing(object sender, CancelEventArgs cancel_event_args) From 5fb2b6898bbe280eb17fc6c56143ef23db937513 Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 26 Jul 2021 20:33:16 +0200 Subject: [PATCH 14/25] Use ms openssh only for ssh-keyscan --- SparkleShare/Windows/UserInterface/Controller.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/SparkleShare/Windows/UserInterface/Controller.cs b/SparkleShare/Windows/UserInterface/Controller.cs index 6f52cb91e..00ef3b58a 100644 --- a/SparkleShare/Windows/UserInterface/Controller.cs +++ b/SparkleShare/Windows/UserInterface/Controller.cs @@ -54,11 +54,19 @@ public override void Initialize () Environment.SetEnvironmentVariable ("HOME", Environment.GetFolderPath (Environment.SpecialFolder.UserProfile)); - SSHCommand.SSHPath = Path.Combine(Environment.SystemDirectory, "OpenSSH"); - SSHFetcher.SSHKeyScan = Path.Combine(SSHCommand.SSHPath, "ssh-keyscan.exe"); - GitCommand.GitPath = Path.Combine (msysgit_path, "cmd", "git.exe"); + SSHFetcher.SSHKeyScan = Path.Combine(Environment.SystemDirectory, "OpenSSH", "ssh-keyscan.exe"); + SSHCommand.SSHPath = Path.Combine(msysgit_path, "usr","bin"); + GitCommand.GitPath = Path.Combine (msysgit_path, "cmd", "git"); + GitFetcher.OpenSSLPath = Path.Combine(executable_path, "openssl"); base.Initialize (); - File.Copy(Path.Combine(msysgit_path, "mingw64", "libexec", "git-core", "git-lfs.exe"), Path.Combine(Config.BinPath, "git-lfs.exe"), true); + try + { + File.Copy(Path.Combine(msysgit_path, "mingw64", "libexec", "git-core", "git-lfs.exe"), Path.Combine(Config.BinPath, "git-lfs.exe"), true); + } + catch(Exception e) + { + Console.WriteLine(e); + } } From a780b907a2914722a643f12fedaab6a54866420a Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 26 Jul 2021 20:34:16 +0200 Subject: [PATCH 15/25] Fixes windows build process for setup.exe --- SparkleShare/Windows/SparkleShare.wxs | 17 ++--------------- SparkleShare/Windows/build.cmd | 7 ++----- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/SparkleShare/Windows/SparkleShare.wxs b/SparkleShare/Windows/SparkleShare.wxs index 09a6deb42..6081cc610 100644 --- a/SparkleShare/Windows/SparkleShare.wxs +++ b/SparkleShare/Windows/SparkleShare.wxs @@ -14,10 +14,7 @@ - - - - + @@ -26,8 +23,6 @@ - - @@ -40,27 +35,19 @@ - - - - - - - - @@ -77,6 +64,6 @@ - + diff --git a/SparkleShare/Windows/build.cmd b/SparkleShare/Windows/build.cmd index a615f6f24..c8df95132 100644 --- a/SparkleShare/Windows/build.cmd +++ b/SparkleShare/Windows/build.cmd @@ -8,21 +8,18 @@ set wixBinDir=%WIX%\bin if not exist ..\..\bin mkdir ..\..\bin copy Images\sparkleshare-app.ico ..\..\bin\ -%msbuild% /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" "%~dp0\..\..\SparkleShare.sln" +%msbuild% "%~dp0\..\..\SparkleShare.sln" /target:SparkleShare_Windows:Rebuild /p:Configuration=Release /p:Platform="Any CPU" if "%1"=="installer" ( if exist "%wixBinDir%" ( if exist "%~dp0\SparkleShare.msi" del "%~dp0\SparkleShare.msi" "%wixBinDir%\heat.exe" dir "%~dp0\..\..\bin\msysgit" -cg msysGitComponentGroup -gg -scom -sreg -sfrag -srd -dr MSYSGIT_DIR -var wix.msysgitpath -o msysgit.wxs - "%wixBinDir%\heat.exe" dir "%~dp0\..\..\bin\plugins" -cg pluginsComponentGroup -gg -scom -sreg -sfrag -srd -dr PLUGINS_DIR -var wix.pluginsdir -o plugins.wxs "%wixBinDir%\candle" "%~dp0\SparkleShare.wxs" -ext WixUIExtension -ext WixUtilExtension "%wixBinDir%\candle" "%~dp0\msysgit.wxs" -ext WixUIExtension -ext WixUtilExtension - "%wixBinDir%\candle" "%~dp0\plugins.wxs" -ext WixUIExtension -ext WixUtilExtension - "%wixBinDir%\light" -ext WixUIExtension -ext WixUtilExtension Sparkleshare.wixobj msysgit.wixobj plugins.wixobj -droot="%~dp0\..\.." -dmsysgitpath="%~dp0\..\..\bin\msysgit" -dpluginsdir="%~dp0\..\..\bin\plugins" -o SparkleShare.msi + "%wixBinDir%\light" -ext WixUIExtension -ext WixUtilExtension Sparkleshare.wixobj msysgit.wixobj -droot="%~dp0\..\.." -dmsysgitpath="%~dp0\..\..\bin\msysgit" -dpluginsdir="%~dp0\..\..\bin\plugins" -o SparkleShare.msi if exist "%~dp0\SparkleShare.msi" echo SparkleShare.msi created. ) else ( echo Not building installer ^(could not find wix, Windows Installer XML toolset^) echo wix is available at http://wix.sourceforge.net/ ) ) else echo Not building installer, as it was not requested. ^(Issue "build.cmd installer" to build installer ^) - From 7ae0f697ee29585a9d44057568f25b93c5715d75 Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 26 Jul 2021 20:42:41 +0200 Subject: [PATCH 16/25] Made openssl available --- Sparkles/Git/Git.Fetcher.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Sparkles/Git/Git.Fetcher.cs b/Sparkles/Git/Git.Fetcher.cs index 81bcfd52a..53d62a6cd 100644 --- a/Sparkles/Git/Git.Fetcher.cs +++ b/Sparkles/Git/Git.Fetcher.cs @@ -25,7 +25,15 @@ public class GitFetcher : SSHFetcher { GitCommand git_clone; SSHAuthenticationInfo auth_info; + public static string OpenSSLPath = ""; + public static string OpenSSLCommandPath + { + get + { + return Path.Combine(OpenSSLPath, "openssl").Replace("\\", "/"); + } + } string password_salt = Path.GetRandomFileName ().SHA256 ().Substring (0, 16); @@ -237,10 +245,10 @@ public override void EnableFetchedRepoCrypto (string password) var git_config_required = new GitCommand (TargetFolder, "config filter.encryption.required true"); var git_config_smudge = new GitCommand (TargetFolder, "config filter.encryption.smudge " + - string.Format ("\"openssl enc -d -aes-256-cbc -base64 -S {0} -pass file:{1} -md sha256\"", password_salt, password_file)); + string.Format ("\"{0} enc -d -aes-256-cbc -base64 -S {1} -pass file:{2} -md sha256\"", OpenSSLCommandPath, password_salt, password_file)); var git_config_clean = new GitCommand (TargetFolder, "config filter.encryption.clean " + - string.Format ("\"openssl enc -e -aes-256-cbc -base64 -S {0} -pass file:{1} -md sha256\"", password_salt, password_file)); + string.Format ("\"{0} enc -e -aes-256-cbc -base64 -S {1} -pass file:{2} -md sha256\"", OpenSSLCommandPath, password_salt, password_file)); git_config_required.StartAndWaitForExit (); git_config_smudge.StartAndWaitForExit (); @@ -272,7 +280,7 @@ public override bool IsFetchedRepoPasswordCorrect (string password) string args = string.Format ("enc -d -aes-256-cbc -base64 -S {0} -pass pass:{1} -in \"{2}\" -md sha256", password_salt, password.SHA256 (password_salt), password_check_file_path); - var process = new Command ("openssl", args); + var process = new Command (OpenSSLCommandPath, args); process.StartInfo.WorkingDirectory = TargetFolder; process.StartAndWaitForExit (); From e9be00c22cef9e412699a2c08cdd8282eee48aac Mon Sep 17 00:00:00 2001 From: uenz Date: Tue, 3 Aug 2021 18:43:05 +0200 Subject: [PATCH 17/25] Updated creating installer section --- SparkleShare/Windows/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/SparkleShare/Windows/README.md b/SparkleShare/Windows/README.md index d91b48bb7..540697304 100644 --- a/SparkleShare/Windows/README.md +++ b/SparkleShare/Windows/README.md @@ -19,7 +19,6 @@ The build command ends with 2 errors. But that´s all right. ### Creating a Windows installer --- broken at the moment -- To create an installer package, install [WiX 3.7](http://wix.codeplex.com/releases/view/99514), restart Windows and run: ``` From 390c02280fffea9dc365e0de39844ed0377359a1 Mon Sep 17 00:00:00 2001 From: uenz Date: Wed, 4 Aug 2021 12:26:44 +0200 Subject: [PATCH 18/25] Update README.md Package of linked wix installer was outdated --- SparkleShare/Windows/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SparkleShare/Windows/README.md b/SparkleShare/Windows/README.md index 540697304..71f85cba9 100644 --- a/SparkleShare/Windows/README.md +++ b/SparkleShare/Windows/README.md @@ -19,7 +19,7 @@ The build command ends with 2 errors. But that´s all right. ### Creating a Windows installer -To create an installer package, install [WiX 3.7](http://wix.codeplex.com/releases/view/99514), restart Windows and run: +To create an installer package, install [WiX 3.11.2](https://github.com/wixtoolset/wix3/releases/tag/wix3112rtm), restart Windows and run: ``` cd C:\path\to\SparkleShare-sources\SparkleShare\Windows\ From ccd78200893eb2199cd8e9fa0a50df32c54d95a5 Mon Sep 17 00:00:00 2001 From: uenz Date: Fri, 6 Aug 2021 21:13:59 +0200 Subject: [PATCH 19/25] Install OpenSSH.Client and Openssh.Server from installer --- SparkleShare/Windows/SparkleShare.wxs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/SparkleShare/Windows/SparkleShare.wxs b/SparkleShare/Windows/SparkleShare.wxs index 6081cc610..3d13dfc52 100644 --- a/SparkleShare/Windows/SparkleShare.wxs +++ b/SparkleShare/Windows/SparkleShare.wxs @@ -42,6 +42,24 @@ + + + + + + + NOT Installed + NOT Installed + + From 39804f5da4a702e22dff22902e432e847a2d636b Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 6 Sep 2021 22:16:11 +0200 Subject: [PATCH 20/25] Fixes for automated windows build --- .../Windows/SparkleShare.Windows.csproj | 42 ++----------- SparkleShare/Windows/SparkleShare.wxs | 22 ++++--- .../Windows/UserInterface/Controller.cs | 4 +- SparkleShare/Windows/build.cmd | 21 ++++--- SparkleShare/Windows/postBuild.cmd | 60 +++++++++---------- 5 files changed, 58 insertions(+), 91 deletions(-) diff --git a/SparkleShare/Windows/SparkleShare.Windows.csproj b/SparkleShare/Windows/SparkleShare.Windows.csproj index c746ea0db..bb0b729f8 100644 --- a/SparkleShare/Windows/SparkleShare.Windows.csproj +++ b/SparkleShare/Windows/SparkleShare.Windows.csproj @@ -1,4 +1,4 @@ - + Debug @@ -41,7 +41,7 @@ prompt 4 AllRules.ruleset - x86 + AnyCPU TRACE true false @@ -97,39 +97,6 @@ - - ..\..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.dll - - - ..\..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.MsDelta.dll - - - ..\..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.PatchApi.dll - - - ..\..\packages\squirrel.windows.1.5.2\lib\Net45\ICSharpCode.SharpZipLib.dll - - - ..\..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.dll - - - ..\..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Mdb.dll - - - ..\..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Pdb.dll - - - ..\..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Rocks.dll - - - ..\..\packages\squirrel.windows.1.5.2\lib\Net45\NuGet.Squirrel.dll - - - ..\..\packages\Splat.1.6.2\lib\Net45\Splat.dll - - - ..\..\packages\squirrel.windows.1.5.2\lib\Net45\Squirrel.dll - @@ -266,7 +233,6 @@ Always - @@ -327,6 +293,6 @@ - $(ProjectDir)\postBuild.cmd $(TargetDir)\msysgit + "$(ProjectDir)\postBuild.cmd" "$(TargetDir)\msysgit" - \ No newline at end of file + diff --git a/SparkleShare/Windows/SparkleShare.wxs b/SparkleShare/Windows/SparkleShare.wxs index 3d13dfc52..61a382f50 100644 --- a/SparkleShare/Windows/SparkleShare.wxs +++ b/SparkleShare/Windows/SparkleShare.wxs @@ -21,8 +21,9 @@ - - + + + @@ -42,7 +43,7 @@ - + NOT Installed NOT Installed - + +--> + + - + @@ -78,10 +77,9 @@ - - + diff --git a/SparkleShare/Windows/UserInterface/Controller.cs b/SparkleShare/Windows/UserInterface/Controller.cs index 00ef3b58a..b2adfacc5 100644 --- a/SparkleShare/Windows/UserInterface/Controller.cs +++ b/SparkleShare/Windows/UserInterface/Controller.cs @@ -54,10 +54,10 @@ public override void Initialize () Environment.SetEnvironmentVariable ("HOME", Environment.GetFolderPath (Environment.SpecialFolder.UserProfile)); - SSHFetcher.SSHKeyScan = Path.Combine(Environment.SystemDirectory, "OpenSSH", "ssh-keyscan.exe"); SSHCommand.SSHPath = Path.Combine(msysgit_path, "usr","bin"); + SSHFetcher.SSHKeyScan = Path.Combine(msysgit_path, "usr", "bin", "ssh-keyscan.exe"); GitCommand.GitPath = Path.Combine (msysgit_path, "cmd", "git"); - GitFetcher.OpenSSLPath = Path.Combine(executable_path, "openssl"); + GitFetcher.OpenSSLPath = Path.Combine(msysgit_path, "usr", "bin", "ssl.exe"); base.Initialize (); try { diff --git a/SparkleShare/Windows/build.cmd b/SparkleShare/Windows/build.cmd index c8df95132..9b5ef7ac2 100644 --- a/SparkleShare/Windows/build.cmd +++ b/SparkleShare/Windows/build.cmd @@ -1,25 +1,30 @@ -@echo off +@echo on set WinDirNet=%WinDir%\Microsoft.NET\Framework set msbuild="%WinDirNet%\v4.0\msbuild.exe" if not exist %msbuild% set msbuild="%WinDirNet%\v4.0.30319\msbuild.exe" +set WIX=C:\Program Files (x86)\WiX Toolset v3.11 set wixBinDir=%WIX%\bin - -if not exist ..\..\bin mkdir ..\..\bin -copy Images\sparkleshare-app.ico ..\..\bin\ +if not exist %~dp0\..\..\bin mkdir %~dp0\..\..\bin +copy %~dp0\Images\sparkleshare-app.ico %~dp0\..\..\bin\ %msbuild% "%~dp0\..\..\SparkleShare.sln" /target:SparkleShare_Windows:Rebuild /p:Configuration=Release /p:Platform="Any CPU" if "%1"=="installer" ( if exist "%wixBinDir%" ( if exist "%~dp0\SparkleShare.msi" del "%~dp0\SparkleShare.msi" - "%wixBinDir%\heat.exe" dir "%~dp0\..\..\bin\msysgit" -cg msysGitComponentGroup -gg -scom -sreg -sfrag -srd -dr MSYSGIT_DIR -var wix.msysgitpath -o msysgit.wxs - "%wixBinDir%\candle" "%~dp0\SparkleShare.wxs" -ext WixUIExtension -ext WixUtilExtension - "%wixBinDir%\candle" "%~dp0\msysgit.wxs" -ext WixUIExtension -ext WixUtilExtension - "%wixBinDir%\light" -ext WixUIExtension -ext WixUtilExtension Sparkleshare.wixobj msysgit.wixobj -droot="%~dp0\..\.." -dmsysgitpath="%~dp0\..\..\bin\msysgit" -dpluginsdir="%~dp0\..\..\bin\plugins" -o SparkleShare.msi + "%wixBinDir%\heat.exe" dir "%~dp0\..\..\bin\msysgit" -cg msysGitComponentGroup -gg -scom -sreg -sfrag -srd -dr MSYSGIT_DIR -var wix.msysgitpath -o "%~dp0\msysgit.wxs" + "%wixBinDir%\heat.exe" dir "%~dp0\..\..\bin\Images" -cg ImagesComponentGroup -gg -scom -sreg -sfrag -srd -dr IMAGES_DIR -var wix.imagespath -o "%~dp0\images.wxs" + "%wixBinDir%\heat.exe" dir "%~dp0\..\..\bin\Presets" -cg PresetsComponentGroup -gg -scom -sreg -sfrag -srd -dr PRESETS_DIR -var wix.presetspath -o "%~dp0\presets.wxs" + "%wixBinDir%\candle" "%~dp0\SparkleShare.wxs" -ext WixUIExtension -ext WixUtilExtension -o "%~dp0\" + "%wixBinDir%\candle" "%~dp0\msysgit.wxs" -ext WixUIExtension -ext WixUtilExtension -o "%~dp0\" + "%wixBinDir%\candle" "%~dp0\images.wxs" -ext WixUIExtension -ext WixUtilExtension -o "%~dp0\" + "%wixBinDir%\candle" "%~dp0\presets.wxs" -ext WixUIExtension -ext WixUtilExtension -o "%~dp0\" + "%wixBinDir%\light" -ext WixUIExtension -ext WixUtilExtension "%~dp0\Sparkleshare.wixobj" "%~dp0\msysgit.wixobj" "%~dp0\images.wixobj" "%~dp0\presets.wixobj" -droot="%~dp0\..\.." -dmsysgitpath="%~dp0\..\..\bin\msysgit" -dimagespath="%~dp0\..\..\bin\Images" -dpresetspath="%~dp0\..\..\bin\Presets" -o "%~dp0\SparkleShare.msi" if exist "%~dp0\SparkleShare.msi" echo SparkleShare.msi created. ) else ( echo Not building installer ^(could not find wix, Windows Installer XML toolset^) echo wix is available at http://wix.sourceforge.net/ + SET ERRORLEVEL=2 ) ) else echo Not building installer, as it was not requested. ^(Issue "build.cmd installer" to build installer ^) diff --git a/SparkleShare/Windows/postBuild.cmd b/SparkleShare/Windows/postBuild.cmd index adf88449c..11d780bea 100644 --- a/SparkleShare/Windows/postBuild.cmd +++ b/SparkleShare/Windows/postBuild.cmd @@ -1,7 +1,7 @@ -ECHO ON +@ECHO ON setlocal enableDelayedExpansion REM if no target directory is passed use default on -IF [%1]==[] (SET OUTDIR="%~dp0..\..\bin\msysgit") ELSE (SET OUTDIR=%~1) +IF [%1]==[] (SET OUTDIR="%~dp0..\..\bin\msysgit") ELSE (SET OUTDIR=""%~1) IF EXIST %OUTDIR%\cmd GOTO skipgitdownload ECHO installing git @@ -9,39 +9,37 @@ REM download git FOR /F "usebackq tokens=1" %%i IN ("%~dp0\git.download") DO SET url=%%i FOR /F "usebackq tokens=2" %%i IN ("%~dp0\git.download") DO SET md5hash=%%i CALL :downloadandverify %url% %~dp0\git.tar.gz %md5hash% -XCOPY %~dp0\git.tar.gz %OUTDIR%\ /Y /i -CD %OUTDIR% -TAR -xf git.tar.gz -DEL /s /q git.tar.gz -CD %~dp0 -PAUSE - -:skipgitdownload - -rem This simple check is for 32-bit Windows and for 64-bit Windows with batch -rem file executed in 64-bit environment by 64-bit Windows command processor. -set FolderSSH=%SystemRoot%\System32\OpenSSH -if exist %FolderSSH%\ssh-keygen.exe if exist %FolderSSH%\ssh-keyscan.exe ( - goto skipInstallOpenSSH - echo Found ssh-keygen and ssh-keyscan in: "%FolderSSH%" +mkdir %OUTDIR% +REM check if tar is available else use tartool and unzip +IF EXIST C:\Windows\System32\TAR.exe ( + C:\Windows\System32\TAR -zxvf %~dp0\git.tar.gz -C %OUTDIR% +) ELSE ( + tartool %~dp0\git.tar.gz %OUTDIR% ) +DEL /s /q %~dp0\git.tar.gz -rem This check is for 64-bit Windows with batch file executed -rem in 32-bit environment by 32-bit Windows command processor. -if exist %SystemRoot%\Sysnative\cmd.exe set FolderSSH=%SystemRoot%\Sysnative\OpenSSH -if exist %FolderSSH%\ssh-keygen.exe if exist %FolderSSH%\ssh-keyscan.exe ( - goto skipInstallOpenSSH - echo Found ssh-keygen and ssh-keyscan in: "%FolderSSH%" +curl -L https://github.com/PowerShell/Win32-OpenSSH/releases/download/V8.6.0.0p1-Beta/OpenSSH-Win32.zip -o %~dp0\OpenSSH-Win32.zip +REM check if tar is available else use tartool and unzip +IF EXIST C:\Windows\System32\TAR.exe ( + C:\Windows\System32\TAR -zxvf %~dp0\OpenSSH-Win32.zip -C %~dp0 +) ELSE ( + echo "Using linux / GitBash tar arguments" + unzip %~dp0\OpenSSH-Win32.zip -d %~dp0 ) -echo ERROR: ssh-keygen.exe AND ssh-keyscan.exe not found. -ECHO installing openSSH -%~dp0\sudo.cmd %~dp0\installSSH -REM powershell -command "Add-Type -AssemblyName PresentationCore,PresentationFramework; [System.Windows.MessageBox]::Show('Sometimes windows has to be restarted to get use of ssh-keyscan and ssh-keygen. If it not works restart and the commands are available.','OpenSSH was installed','Ok','Warning')" -:skipInstallOpenSSH -SET ERRORLEVEL= +DEL /s /q %~dp0\OpenSSH-Win32.zip +XCOPY %~dp0\OpenSSH-Win32\ssh-keygen.exe %OUTDIR%\usr\bin /Y +XCOPY %~dp0\OpenSSH-Win32\ssh-keyscan.exe %OUTDIR%\usr\bin /Y +XCOPY %~dp0\OpenSSH-Win32\ssh.exe %OUTDIR%\usr\bin /Y +XCOPY %~dp0\OpenSSH-Win32\libcrypto.dll %OUTDIR%\usr\bin /Y +RMDIR /s /q %~dp0\OpenSSH-Win32 + +:skipgitdownload +SET ERRORLEVEL=0 ECHO ready + +:ready endlocal -EXIT /B 0 +EXIT /B %ERRORLEVEL% :downloadandverify @@ -67,4 +65,4 @@ goto:eof :sha256error ECHO sha256 sum of download wrong SET ERRORLEVEL=2 -goto skipInstallOpenSSH +goto ready From cac14c63550d6a1045a7fa7b5ed55595b1ca254f Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 6 Sep 2021 22:17:55 +0200 Subject: [PATCH 21/25] changes for automated macos build --- SparkleShare.sln | 28 ++++++++++++++++++---------- SparkleShare/Mac/checkGit.sh | 13 +++++++++---- SparkleShare/Windows/packages.config | 7 ------- 3 files changed, 27 insertions(+), 21 deletions(-) delete mode 100644 SparkleShare/Windows/packages.config diff --git a/SparkleShare.sln b/SparkleShare.sln index 203f2813c..10d04666b 100644 --- a/SparkleShare.sln +++ b/SparkleShare.sln @@ -47,7 +47,6 @@ Global {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.Release|Any CPU.ActiveCfg = Release|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.Release|Any CPU.Build.0 = Release|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU - {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.ReleaseDist|Any CPU.Build.0 = Release|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -55,7 +54,6 @@ Global {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Release|Any CPU.ActiveCfg = Release|Any CPU {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Release|Any CPU.Build.0 = Release|Any CPU {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseDist|Any CPU.Build.0 = Release|Any CPU {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -72,18 +70,28 @@ Global GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 $0.DotNetNamingPolicy = $1 - $1.DirectoryNamespaceAssociation = None - $1.ResourceNamePolicy = FileFormatDefault $0.TextStylePolicy = $2 - $2.FileWidth = 120 - $2.inheritsSet = VisualStudio - $2.inheritsScope = text/plain $2.scope = text/plain + $2.TabsToSpaces = True $0.CSharpFormattingPolicy = $3 - $3.inheritsSet = Mono - $3.inheritsScope = text/x-csharp $3.scope = text/x-csharp + $3.IndentSwitchSection = False + $3.NewLinesForBracesInProperties = False + $3.NewLinesForBracesInAccessors = False + $3.NewLinesForBracesInAnonymousMethods = False + $3.NewLinesForBracesInControlBlocks = False + $3.NewLinesForBracesInAnonymousTypes = False + $3.NewLinesForBracesInObjectCollectionArrayInitializers = False + $3.NewLinesForBracesInLambdaExpressionBody = False + $3.NewLineForElse = False + $3.NewLineForCatch = False + $3.NewLineForFinally = False + $3.NewLineForMembersInObjectInit = False + $3.NewLineForMembersInAnonymousTypes = False + $3.NewLineForClausesInQuery = False + $3.SpacingAfterMethodDeclarationName = True + $3.SpaceAfterMethodCallName = True + $3.SpaceBeforeOpenSquareBracket = True version = EndGlobalSection EndGlobal - diff --git a/SparkleShare/Mac/checkGit.sh b/SparkleShare/Mac/checkGit.sh index 9acee4d91..4421f2c4a 100755 --- a/SparkleShare/Mac/checkGit.sh +++ b/SparkleShare/Mac/checkGit.sh @@ -1,4 +1,5 @@ -#!/bin/sh +#!/bin/sh +set -x function abspath() { case "${1}" in @@ -37,6 +38,10 @@ then printf "${gitSHA256} ${gitName}" | shasum --check --algorithm 256 fi - -rm git.tar.gz -ln -s $gitName git.tar.gz +if [[ -f ${projectFolder}/git.tar.gz ]]; +then + rm ${projectFolder}/git.tar.gz +fi +echo $gitName +echo ${projectFolder}/git.tar.gz +ln -s $gitName ${projectFolder}/git.tar.gz diff --git a/SparkleShare/Windows/packages.config b/SparkleShare/Windows/packages.config deleted file mode 100644 index 6c3600dac..000000000 --- a/SparkleShare/Windows/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file From 68a379e4c8310f6379d2d2b8c876e8095114590a Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 6 Sep 2021 22:33:02 +0200 Subject: [PATCH 22/25] Updated travis.yml to jobs syntaqx and added deployment --- .travis.yml | 86 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1bd44034b..cb218bd94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,28 +1,75 @@ language: csharp +cache: + directories: + - upload +jobs: + # for debugging enable next two lines to allow an os to fail without quitting pipeline + # allow_failures: + # language: csharp -matrix: include: - - os: linux + - stage: "Compile for Mac" + os: osx + before_install: + - mkdir -p ./upload + - wget https://dl.xamarin.com/XamarinforMac/Mac/xamarin.mac-3.0.0.393.pkg + - sudo installer -pkg xamarin.mac*.pkg -target / + script: + - msbuild /p:Configuration=ReleaseDist SparkleShare.sln + before_deploy: + - zip -r ./SparkleShare/Mac/bin/ReleaseDist/SparkleShare.zip ./SparkleShare/Mac/bin/ReleaseDist/SparkleShare.app + - cp ./SparkleShare/Mac/bin/ReleaseDist/SparkleShare.zip ./upload/SparkleShare-macos-nightly.zip + deploy: &deploy_base + provider: releases + api_key: ${GITHUB_TOKEN} + file: ./upload/SparkleShare-macos-nightly.zip + skip_cleanup: true + draft: true + name: Nightly CI Build + on: + branch: + - master + tags: false + + - stage: "Compile for Linux" + os: linux services: - docker - - os: osx - sudo: required - -before_install: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull ubuntu:latest ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget https://dl.xamarin.com/XamarinforMac/Mac/xamarin.mac-3.0.0.393.pkg ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo installer -pkg xamarin.mac*.pkg -target / ; fi + before_install: + - mkdir -p ./upload + - docker pull ubuntu:latest + script: + - docker build --file scripts/ci/Dockerfile --tag sparkleshare:nightly . + before_deploy: + - export DEPLOY_FILE=`docker run --name container sparkleshare:nightly find / -name sparkleshare*.tar.gz` + # unfortunately no sparkleshare*.tar.gz will be created by the above commands, so no upload for linux + # if fixed the tar.gz issue uncomment the following 6 lines to enable upload + # - cp ${DEPLOY_FILE} ./upload/SparkleShare-linux-nightly.tar.gz + # deploy for linux is disabled, because to docker run + # deploy: + # <<: *deploy_base + # draft: true + # file: ./upload/SparkleShare-linux-nightly.tar.gz -script: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build --file scripts/ci/Dockerfile --tag sparkleshare:nightly . ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then msbuild /p:Configuration=ReleaseMac SparkleShare.sln ; fi - -before_deploy: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DEPLOY_FILE=`docker run --name container sparkleshare:nightly find / -name sparkleshare*.tar.gz` ; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker cp container:${DEPLOY_FILE} ./ ; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv sparkleshare*.tar.gz sparkleshare-linux-nightly-${TRAVIS_COMMIT}.tar.gz ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mv SparkleShare/Mac/bin/ReleaseMac/SparkleShare.app . ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then zip --recurse-paths sparkleshare-mac-nightly-${TRAVIS_COMMIT}.zip SparkleShare.app ; fi + - stage: "Compile for Windows" + os: windows + mono: none + before_install: + - mkdir -p ./upload + # - choco install netfx-4.5.2-devpack + # - choco install windows-sdk-8.0 + - powershell Install-WindowsFeature Net-Framework-Core + - choco install -y wixtoolset --version=3.11.2 + - choco install tartool + - choco install unzip + script: + - ./SparkleShare/Windows/build.cmd installer + before_deploy: + - mv ./SparkleShare/Windows/SparkleShare.msi ./upload/SparkleShare-windows-nightly.msi + deploy: + <<: *deploy_base + draft: true + file: ./upload/SparkleShare-windows-nightly.msi notifications: webhooks: @@ -31,4 +78,3 @@ notifications: on_success: change on_failure: always on_start: never - From 4ef45c3b4126396a8ce97c850dcfbf9887d1a016 Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 6 Sep 2021 23:05:32 +0200 Subject: [PATCH 23/25] Deleted unused file --- SparkleShare/Windows/sudo.cmd | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 SparkleShare/Windows/sudo.cmd diff --git a/SparkleShare/Windows/sudo.cmd b/SparkleShare/Windows/sudo.cmd deleted file mode 100644 index 549f195a8..000000000 --- a/SparkleShare/Windows/sudo.cmd +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -powershell -Command "Start-Process cmd -Verb RunAs -ArgumentList '/c %*'" -@echo on From f969033f5527fe465ef06b005ce573bee0e5e5fc Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 6 Sep 2021 23:07:22 +0200 Subject: [PATCH 24/25] Deleted unused file --- SparkleShare/Windows/installSSH.cmd | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 SparkleShare/Windows/installSSH.cmd diff --git a/SparkleShare/Windows/installSSH.cmd b/SparkleShare/Windows/installSSH.cmd deleted file mode 100644 index 8854502cf..000000000 --- a/SparkleShare/Windows/installSSH.cmd +++ /dev/null @@ -1,5 +0,0 @@ - -REM ssh-keyscan comes with OpenSSH.Client -powershell -command "Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0" -REM ssh-keygen comes with OpenSSH.Server -powershell -command "Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0" From 200b5d552a19d100f2de3f5bf9541351f1ed50b4 Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 1 Nov 2021 20:17:15 +0100 Subject: [PATCH 25/25] Changed git engine to git-scm Changed engine to git-scm Merged latest changes --- .travis.yml | 86 +++++------------- SparkleShare.sln | 87 +++++++++++++------ SparkleShare/Common/BaseController.cs | 4 + SparkleShare/Mac/Controller.cs | 10 +-- SparkleShare/Mac/packReleaseDist.sh | 4 +- .../Windows/SparkleShare.Windows.csproj | 39 ++++----- SparkleShare/Windows/SparkleShare.wxs | 5 +- .../Windows/UserInterface/Controller.cs | 64 ++++++-------- SparkleShare/Windows/build.cmd | 16 ++-- SparkleShare/Windows/git.download | 2 +- SparkleShare/Windows/postBuild.cmd | 41 +++------ Sparkles/Command.cs | 39 +++++++-- Sparkles/Configuration.cs | 6 -- Sparkles/Git/Git.Command.cs | 23 +++-- Sparkles/Git/Git.Fetcher.cs | 30 +++---- Sparkles/Git/Git.Repository.cs | 17 ++-- Sparkles/OpenSSLCommand.cs | 54 ++++++++++++ Sparkles/SSHAuthenticationInfo.cs | 2 +- Sparkles/SSHCommand.cs | 63 +++++++++++++- Sparkles/SSHFetcher.cs | 5 +- Sparkles/Sparkles.csproj | 7 +- Sparkles/meson.build | 4 +- 22 files changed, 338 insertions(+), 270 deletions(-) create mode 100644 Sparkles/OpenSSLCommand.cs diff --git a/.travis.yml b/.travis.yml index cb218bd94..1bd44034b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,75 +1,28 @@ language: csharp -cache: - directories: - - upload -jobs: - # for debugging enable next two lines to allow an os to fail without quitting pipeline - # allow_failures: - # language: csharp +matrix: include: - - stage: "Compile for Mac" - os: osx - before_install: - - mkdir -p ./upload - - wget https://dl.xamarin.com/XamarinforMac/Mac/xamarin.mac-3.0.0.393.pkg - - sudo installer -pkg xamarin.mac*.pkg -target / - script: - - msbuild /p:Configuration=ReleaseDist SparkleShare.sln - before_deploy: - - zip -r ./SparkleShare/Mac/bin/ReleaseDist/SparkleShare.zip ./SparkleShare/Mac/bin/ReleaseDist/SparkleShare.app - - cp ./SparkleShare/Mac/bin/ReleaseDist/SparkleShare.zip ./upload/SparkleShare-macos-nightly.zip - deploy: &deploy_base - provider: releases - api_key: ${GITHUB_TOKEN} - file: ./upload/SparkleShare-macos-nightly.zip - skip_cleanup: true - draft: true - name: Nightly CI Build - on: - branch: - - master - tags: false - - - stage: "Compile for Linux" - os: linux + - os: linux services: - docker - before_install: - - mkdir -p ./upload - - docker pull ubuntu:latest - script: - - docker build --file scripts/ci/Dockerfile --tag sparkleshare:nightly . - before_deploy: - - export DEPLOY_FILE=`docker run --name container sparkleshare:nightly find / -name sparkleshare*.tar.gz` - # unfortunately no sparkleshare*.tar.gz will be created by the above commands, so no upload for linux - # if fixed the tar.gz issue uncomment the following 6 lines to enable upload - # - cp ${DEPLOY_FILE} ./upload/SparkleShare-linux-nightly.tar.gz - # deploy for linux is disabled, because to docker run - # deploy: - # <<: *deploy_base - # draft: true - # file: ./upload/SparkleShare-linux-nightly.tar.gz + - os: osx + sudo: required + +before_install: + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull ubuntu:latest ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget https://dl.xamarin.com/XamarinforMac/Mac/xamarin.mac-3.0.0.393.pkg ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo installer -pkg xamarin.mac*.pkg -target / ; fi - - stage: "Compile for Windows" - os: windows - mono: none - before_install: - - mkdir -p ./upload - # - choco install netfx-4.5.2-devpack - # - choco install windows-sdk-8.0 - - powershell Install-WindowsFeature Net-Framework-Core - - choco install -y wixtoolset --version=3.11.2 - - choco install tartool - - choco install unzip - script: - - ./SparkleShare/Windows/build.cmd installer - before_deploy: - - mv ./SparkleShare/Windows/SparkleShare.msi ./upload/SparkleShare-windows-nightly.msi - deploy: - <<: *deploy_base - draft: true - file: ./upload/SparkleShare-windows-nightly.msi +script: + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build --file scripts/ci/Dockerfile --tag sparkleshare:nightly . ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then msbuild /p:Configuration=ReleaseMac SparkleShare.sln ; fi + +before_deploy: + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DEPLOY_FILE=`docker run --name container sparkleshare:nightly find / -name sparkleshare*.tar.gz` ; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker cp container:${DEPLOY_FILE} ./ ; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv sparkleshare*.tar.gz sparkleshare-linux-nightly-${TRAVIS_COMMIT}.tar.gz ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mv SparkleShare/Mac/bin/ReleaseMac/SparkleShare.app . ; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then zip --recurse-paths sparkleshare-mac-nightly-${TRAVIS_COMMIT}.zip SparkleShare.app ; fi notifications: webhooks: @@ -78,3 +31,4 @@ notifications: on_success: change on_failure: always on_start: never + diff --git a/SparkleShare.sln b/SparkleShare.sln index 10d04666b..56aabe88a 100644 --- a/SparkleShare.sln +++ b/SparkleShare.sln @@ -1,6 +1,8 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31729.503 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sparkles", "Sparkles\Sparkles.csproj", "{2C914413-B31C-4362-93C7-1AE34F09112A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sparkles.Git", "Sparkles\Git\Sparkles.Git.csproj", "{009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}" @@ -14,58 +16,87 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare.Mac", "SparkleShare\Mac\SparkleShare.Mac.csproj", "{8FCDF699-E2C3-4CB3-AF98-44198972AFC0}" EndProject Global + GlobalSection(SharedMSBuildProjectFiles) = preSolution + SparkleShare\Common\SparkleShare.projitems*{728483aa-e34b-4441-bf2c-c8bc2901e4e0}*SharedItemsImports = 4 + SparkleShare\Common\SparkleShare.projitems*{8fcdf699-e2c3-4cb3-af98-44198972afc0}*SharedItemsImports = 4 + SparkleShare\Common\SparkleShare.projitems*{f16e3683-b622-4654-b799-99c8d68aa963}*SharedItemsImports = 13 + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution - Release|Any CPU = Release|Any CPU Debug|Any CPU = Debug|Any CPU + DebugMac|Any CPU = DebugMac|Any CPU + DebugWindows|Any CPU = DebugWindows|Any CPU + Release|Any CPU = Release|Any CPU ReleaseDist|Any CPU = ReleaseDist|Any CPU ReleaseMac|Any CPU = ReleaseMac|Any CPU - DebugMac|Any CPU = DebugMac|Any CPU + ReleaseWindows|Any CPU = ReleaseWindows|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.Release|Any CPU.Build.0 = Release|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseDist|Any CPU.Build.0 = Release|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU - {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU {2C914413-B31C-4362-93C7-1AE34F09112A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2C914413-B31C-4362-93C7-1AE34F09112A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU {2C914413-B31C-4362-93C7-1AE34F09112A}.Release|Any CPU.ActiveCfg = Release|Any CPU {2C914413-B31C-4362-93C7-1AE34F09112A}.Release|Any CPU.Build.0 = Release|Any CPU {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseDist|Any CPU.Build.0 = Release|Any CPU {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU - {2C914413-B31C-4362-93C7-1AE34F09112A}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {2C914413-B31C-4362-93C7-1AE34F09112A}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.Release|Any CPU.Build.0 = Release|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseDist|Any CPU.Build.0 = Release|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {009FDCD7-1D57-4202-BB6D-8477D8C6B8EE}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.DebugWindows|Any CPU.ActiveCfg = DebugWindows|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.DebugWindows|Any CPU.Build.0 = DebugWindows|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Release|Any CPU.Build.0 = Release|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseWindows|Any CPU + {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseWindows|Any CPU.Build.0 = ReleaseWindows|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU + {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.DebugWindows|Any CPU.ActiveCfg = DebugMac|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.Release|Any CPU.ActiveCfg = Release|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.Release|Any CPU.Build.0 = Release|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU - {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.Release|Any CPU.Build.0 = Release|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseDist|Any CPU.ActiveCfg = Release|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU - {728483AA-E34B-4441-BF2C-C8BC2901E4E0}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU - {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.Release|Any CPU.Build.0 = Release|Any CPU + {5714D3CA-88A6-4330-A29D-4CA90D1D193C}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseMac|Any CPU {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.DebugWindows|Any CPU.ActiveCfg = DebugMac|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.Release|Any CPU.Build.0 = Release|Any CPU {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.ReleaseDist|Any CPU.ActiveCfg = ReleaseDist|Any CPU {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.ReleaseDist|Any CPU.Build.0 = ReleaseDist|Any CPU {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.ReleaseMac|Any CPU.ActiveCfg = ReleaseMac|Any CPU {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.ReleaseMac|Any CPU.Build.0 = ReleaseMac|Any CPU - {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.DebugMac|Any CPU.ActiveCfg = DebugMac|Any CPU - {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.DebugMac|Any CPU.Build.0 = DebugMac|Any CPU + {8FCDF699-E2C3-4CB3-AF98-44198972AFC0}.ReleaseWindows|Any CPU.ActiveCfg = ReleaseMac|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7AC5D80F-C164-4892-9228-2AAF8C4B5FCE} EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 diff --git a/SparkleShare/Common/BaseController.cs b/SparkleShare/Common/BaseController.cs index 138142231..4353cc52b 100644 --- a/SparkleShare/Common/BaseController.cs +++ b/SparkleShare/Common/BaseController.cs @@ -224,6 +224,10 @@ public virtual void Initialize () Logger.LogInfo ("Environment", "SparkleShare " + version); Logger.LogInfo ("Environment", "Git LFS " + Sparkles.Git.GitCommand.GitLFSVersion); Logger.LogInfo ("Environment", "Git " + Sparkles.Git.GitCommand.GitVersion); + Logger.LogInfo ("Environment", "SSH " + Sparkles.SSHCommand.SSHVersion); + Logger.LogInfo ("Environment", "SSH-KeyGen " + Sparkles.SSHCommand.KeygenVersion); + Logger.LogInfo ("Environment", "SSH-KeyScan " + Sparkles.SSHCommand.KeyscanVersion); + Logger.LogInfo ("Environment", Sparkles.OpenSSLCommand.OpenSSLVersion); Logger.LogInfo ("Environment", InstallationInfo.OperatingSystem + " " + InstallationInfo.OperatingSystemVersion); UserAuthenticationInfo = new SSHAuthenticationInfo (); diff --git a/SparkleShare/Mac/Controller.cs b/SparkleShare/Mac/Controller.cs index db7510baf..fe4e7d52f 100644 --- a/SparkleShare/Mac/Controller.cs +++ b/SparkleShare/Mac/Controller.cs @@ -42,15 +42,7 @@ public Controller (Configuration config) { NSApplication.Init (); - GitCommand.GitPath = Path.Combine (NSBundle.MainBundle.ResourcePath, "git", "libexec", "git-core", "git"); - GitCommand.ExecPath = Path.Combine (NSBundle.MainBundle.ResourcePath, "git", "libexec", "git-core"); - - bool overwite = true; - - File.Copy ( - Path.Combine (GitCommand.ExecPath, "git-lfs"), - Path.Combine (Config.BinPath, "git-lfs"), - overwite); + Command.SetSearchPath(Path.Combine (NSBundle.MainBundle.ResourcePath, "git", "libexec", "git-core")); NSWorkspace.Notifications.ObserveDidWake((object sender, NSNotificationEventArgs e) => { Console.Write ("Detected wake from sleep, checking for updates\n"); diff --git a/SparkleShare/Mac/packReleaseDist.sh b/SparkleShare/Mac/packReleaseDist.sh index 352c60259..faeb8e09f 100755 --- a/SparkleShare/Mac/packReleaseDist.sh +++ b/SparkleShare/Mac/packReleaseDist.sh @@ -10,7 +10,9 @@ export MONO_PATH=`readlink /Library/Frameworks/Mono.framework/Versions/Current` export PKG_CONFIG_PATH=/usr/lib/pkgconfig:${MONO_PATH}/lib/pkgconfig export PATH=/usr/local/bin:/opt/local/bin:/Library/Frameworks/Mono.framework/Versions/Current/bin:/usr/bin:/bin +mkdir -p cd ${bundle}/Contents/MonoBundle/ cd ${bundle}/Contents/MonoBundle/ +assemblyPath=$(dirname $(dirname $(dirname $(pwd)))) # merge all Assemblies into one Mac binary mkbundle \ @@ -20,5 +22,5 @@ mkbundle \ --library libxammac.dylib \ --library libmono-native-compat.0.dylib \ -o ../MacOS/SparkleShare \ - SparkleShare.exe Sparkles.dll Sparkles.Git.dll + ${assemblyPath}/SparkleShare.exe ${assemblyPath}/Sparkles.dll ${assemblyPath}/Sparkles.Git.dll rm *.dll *.exe diff --git a/SparkleShare/Windows/SparkleShare.Windows.csproj b/SparkleShare/Windows/SparkleShare.Windows.csproj index bb0b729f8..3596f15d6 100644 --- a/SparkleShare/Windows/SparkleShare.Windows.csproj +++ b/SparkleShare/Windows/SparkleShare.Windows.csproj @@ -1,4 +1,4 @@ - + Debug @@ -37,7 +37,7 @@ pdbonly true - ..\..\bin + .\bin prompt 4 AllRules.ruleset @@ -47,7 +47,7 @@ false - ..\..\bin\ + .\bin\ TRACE;DEBUG prompt full @@ -56,18 +56,9 @@ false false - - true - ..\..\bin\ - TRACE;DEBUG - full - AnyCPU - prompt - MinimumRecommendedRules.ruleset - true - ..\..\bin\ + .\bin TRACE true pdbonly @@ -75,18 +66,9 @@ prompt AllRules.ruleset - - ..\..\bin\ - TRACE;DEBUG - prompt - full - true - 4 - false - true - ..\..\bin\ + .\bin TRACE;DEBUG full AnyCPU @@ -94,6 +76,15 @@ MinimumRecommendedRules.ruleset true + + ..\..\bin\ + TRACE;DEBUG + prompt + full + true + 4 + false + @@ -293,6 +284,6 @@ - "$(ProjectDir)\postBuild.cmd" "$(TargetDir)\msysgit" + "$(ProjectDir)\postBuild.cmd" "$(TargetDir)git_scm" diff --git a/SparkleShare/Windows/SparkleShare.wxs b/SparkleShare/Windows/SparkleShare.wxs index 61a382f50..63ab853ce 100644 --- a/SparkleShare/Windows/SparkleShare.wxs +++ b/SparkleShare/Windows/SparkleShare.wxs @@ -19,9 +19,8 @@ - - + @@ -62,7 +61,7 @@ - + diff --git a/SparkleShare/Windows/UserInterface/Controller.cs b/SparkleShare/Windows/UserInterface/Controller.cs index b2adfacc5..d7bf0f3c9 100644 --- a/SparkleShare/Windows/UserInterface/Controller.cs +++ b/SparkleShare/Windows/UserInterface/Controller.cs @@ -47,27 +47,14 @@ public override string PresetsPath public override void Initialize () { - // Add msysgit to path, as we cannot asume it is added to the path - // Asume it is installed in @"\msysgit\bin" - string executable_path = Path.GetDirectoryName (Forms.Application.ExecutablePath); - string msysgit_path = Path.Combine (executable_path, "msysgit"); - + string[] search_path = new string[] { Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),"git_scm","mingw64", "bin"), + Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),"git_scm","mingw32", "bin"), + Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),"git_scm","usr","bin"), + Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),"git_scm","cmd")}; + Command.SetSearchPath(search_path); Environment.SetEnvironmentVariable ("HOME", Environment.GetFolderPath (Environment.SpecialFolder.UserProfile)); - SSHCommand.SSHPath = Path.Combine(msysgit_path, "usr","bin"); - SSHFetcher.SSHKeyScan = Path.Combine(msysgit_path, "usr", "bin", "ssh-keyscan.exe"); - GitCommand.GitPath = Path.Combine (msysgit_path, "cmd", "git"); - GitFetcher.OpenSSLPath = Path.Combine(msysgit_path, "usr", "bin", "ssl.exe"); base.Initialize (); - try - { - File.Copy(Path.Combine(msysgit_path, "mingw64", "libexec", "git-core", "git-lfs.exe"), Path.Combine(Config.BinPath, "git-lfs.exe"), true); - } - catch(Exception e) - { - Console.WriteLine(e); - } - } @@ -98,28 +85,31 @@ public override void SetFolderIcon () string app_path = Path.GetDirectoryName (Forms.Application.ExecutablePath); string icon_file_path = Path.Combine (app_path, "Images", "sparkleshare-folder.ico"); - if (!File.Exists (icon_file_path)) + if (File.Exists (icon_file_path)) { string ini_file_path = Path.Combine (FoldersPath, "desktop.ini"); - string n = Environment.NewLine; - - string ini_file = "[.ShellClassInfo]" + n + - "IconFile=" + icon_file_path + n + - "IconIndex=0" + n + - "InfoTip=SparkleShare"; - - try - { - File.Create (ini_file_path).Close (); - File.WriteAllText (ini_file_path, ini_file); - - File.SetAttributes (ini_file_path, - File.GetAttributes (ini_file_path) | FileAttributes.Hidden | FileAttributes.System); - - } - catch (IOException e) + if (!File.Exists(ini_file_path)) { - Logger.LogInfo ("Config", "Failed setting icon for '" + FoldersPath + "': " + e.Message); + string n = Environment.NewLine; + + string ini_file = "[.ShellClassInfo]" + n + + "IconFile=" + icon_file_path + n + + "IconIndex=0" + n + + "InfoTip=SparkleShare"; + + try + { + File.Create(ini_file_path).Close(); + File.WriteAllText(ini_file_path, ini_file); + + File.SetAttributes(ini_file_path, + File.GetAttributes(ini_file_path) | FileAttributes.Hidden | FileAttributes.System); + + } + catch (IOException e) + { + Logger.LogInfo("Config", "Failed setting icon for '" + FoldersPath + "': " + e.Message); + } } } } diff --git a/SparkleShare/Windows/build.cmd b/SparkleShare/Windows/build.cmd index 9b5ef7ac2..afae00644 100644 --- a/SparkleShare/Windows/build.cmd +++ b/SparkleShare/Windows/build.cmd @@ -5,22 +5,22 @@ set msbuild="%WinDirNet%\v4.0\msbuild.exe" if not exist %msbuild% set msbuild="%WinDirNet%\v4.0.30319\msbuild.exe" set WIX=C:\Program Files (x86)\WiX Toolset v3.11 set wixBinDir=%WIX%\bin -if not exist %~dp0\..\..\bin mkdir %~dp0\..\..\bin -copy %~dp0\Images\sparkleshare-app.ico %~dp0\..\..\bin\ +set OutputDir=%~dp0bin +if not exist "%OutputDir%" mkdir "%OutputDir%" -%msbuild% "%~dp0\..\..\SparkleShare.sln" /target:SparkleShare_Windows:Rebuild /p:Configuration=Release /p:Platform="Any CPU" +%msbuild% "%~dp0..\..\SparkleShare.sln" /target:SparkleShare_Windows:Rebuild /p:Configuration=ReleaseWindows /p:Platform="Any CPU" -m if "%1"=="installer" ( if exist "%wixBinDir%" ( if exist "%~dp0\SparkleShare.msi" del "%~dp0\SparkleShare.msi" - "%wixBinDir%\heat.exe" dir "%~dp0\..\..\bin\msysgit" -cg msysGitComponentGroup -gg -scom -sreg -sfrag -srd -dr MSYSGIT_DIR -var wix.msysgitpath -o "%~dp0\msysgit.wxs" - "%wixBinDir%\heat.exe" dir "%~dp0\..\..\bin\Images" -cg ImagesComponentGroup -gg -scom -sreg -sfrag -srd -dr IMAGES_DIR -var wix.imagespath -o "%~dp0\images.wxs" - "%wixBinDir%\heat.exe" dir "%~dp0\..\..\bin\Presets" -cg PresetsComponentGroup -gg -scom -sreg -sfrag -srd -dr PRESETS_DIR -var wix.presetspath -o "%~dp0\presets.wxs" + "%wixBinDir%\heat.exe" dir "%OutputDir%\git_scm" -cg gitScmComponentGroup -gg -scom -sreg -sfrag -srd -dr GITSCM_DIR -var wix.gitscmpath -o "%~dp0\git_scm.wxs" + "%wixBinDir%\heat.exe" dir "%OutputDir%\Images" -cg ImagesComponentGroup -gg -scom -sreg -sfrag -srd -dr IMAGES_DIR -var wix.imagespath -o "%~dp0\images.wxs" + "%wixBinDir%\heat.exe" dir "%OutputDir%\Presets" -cg PresetsComponentGroup -gg -scom -sreg -sfrag -srd -dr PRESETS_DIR -var wix.presetspath -o "%~dp0\presets.wxs" "%wixBinDir%\candle" "%~dp0\SparkleShare.wxs" -ext WixUIExtension -ext WixUtilExtension -o "%~dp0\" - "%wixBinDir%\candle" "%~dp0\msysgit.wxs" -ext WixUIExtension -ext WixUtilExtension -o "%~dp0\" + "%wixBinDir%\candle" "%~dp0\git_scm.wxs" -ext WixUIExtension -ext WixUtilExtension -o "%~dp0\" "%wixBinDir%\candle" "%~dp0\images.wxs" -ext WixUIExtension -ext WixUtilExtension -o "%~dp0\" "%wixBinDir%\candle" "%~dp0\presets.wxs" -ext WixUIExtension -ext WixUtilExtension -o "%~dp0\" - "%wixBinDir%\light" -ext WixUIExtension -ext WixUtilExtension "%~dp0\Sparkleshare.wixobj" "%~dp0\msysgit.wixobj" "%~dp0\images.wixobj" "%~dp0\presets.wixobj" -droot="%~dp0\..\.." -dmsysgitpath="%~dp0\..\..\bin\msysgit" -dimagespath="%~dp0\..\..\bin\Images" -dpresetspath="%~dp0\..\..\bin\Presets" -o "%~dp0\SparkleShare.msi" + "%wixBinDir%\light" -ext WixUIExtension -ext WixUtilExtension "%~dp0Sparkleshare.wixobj" "%~dp0git_scm.wixobj" "%~dp0images.wixobj" "%~dp0presets.wixobj" -droot="%~dp0." -dgitscmpath="%OutputDir%\git_scm" -dimagespath="%OutputDir%\Images" -dpresetspath="%OutputDir%\Presets" -o "%~dp0SparkleShare.msi" if exist "%~dp0\SparkleShare.msi" echo SparkleShare.msi created. ) else ( echo Not building installer ^(could not find wix, Windows Installer XML toolset^) diff --git a/SparkleShare/Windows/git.download b/SparkleShare/Windows/git.download index ed49e9f2f..b033dfca4 100644 --- a/SparkleShare/Windows/git.download +++ b/SparkleShare/Windows/git.download @@ -1 +1 @@ -https://github.com/desktop/dugite-native/releases/download/v2.16.2/dugite-native-v2.16.2-win32-119.tar.gz c84d31baa8d5c782bbf2a421c0231895c8515b09f698653d70e491b4ffdc1db3 +https://github.com/git-for-windows/git/releases/download/v2.26.1.windows.1/PortableGit-2.26.1-32-bit.7z.exe 862fa87cb4c00872055efbdbf3ed0d5e87838605bb0c3024bed3b32acf43cc0c diff --git a/SparkleShare/Windows/postBuild.cmd b/SparkleShare/Windows/postBuild.cmd index 11d780bea..c00dacb2d 100644 --- a/SparkleShare/Windows/postBuild.cmd +++ b/SparkleShare/Windows/postBuild.cmd @@ -1,37 +1,17 @@ @ECHO ON setlocal enableDelayedExpansion REM if no target directory is passed use default on -IF [%1]==[] (SET OUTDIR="%~dp0..\..\bin\msysgit") ELSE (SET OUTDIR=""%~1) +IF [%1]==[] (SET "OUTDIR=%~dp0bin\git_scm") ELSE (SET OUTDIR="%~1") -IF EXIST %OUTDIR%\cmd GOTO skipgitdownload +IF EXIST %OUTDIR% GOTO skipgitdownload ECHO installing git REM download git -FOR /F "usebackq tokens=1" %%i IN ("%~dp0\git.download") DO SET url=%%i -FOR /F "usebackq tokens=2" %%i IN ("%~dp0\git.download") DO SET md5hash=%%i -CALL :downloadandverify %url% %~dp0\git.tar.gz %md5hash% -mkdir %OUTDIR% -REM check if tar is available else use tartool and unzip -IF EXIST C:\Windows\System32\TAR.exe ( - C:\Windows\System32\TAR -zxvf %~dp0\git.tar.gz -C %OUTDIR% -) ELSE ( - tartool %~dp0\git.tar.gz %OUTDIR% -) -DEL /s /q %~dp0\git.tar.gz - -curl -L https://github.com/PowerShell/Win32-OpenSSH/releases/download/V8.6.0.0p1-Beta/OpenSSH-Win32.zip -o %~dp0\OpenSSH-Win32.zip -REM check if tar is available else use tartool and unzip -IF EXIST C:\Windows\System32\TAR.exe ( - C:\Windows\System32\TAR -zxvf %~dp0\OpenSSH-Win32.zip -C %~dp0 -) ELSE ( - echo "Using linux / GitBash tar arguments" - unzip %~dp0\OpenSSH-Win32.zip -d %~dp0 -) -DEL /s /q %~dp0\OpenSSH-Win32.zip -XCOPY %~dp0\OpenSSH-Win32\ssh-keygen.exe %OUTDIR%\usr\bin /Y -XCOPY %~dp0\OpenSSH-Win32\ssh-keyscan.exe %OUTDIR%\usr\bin /Y -XCOPY %~dp0\OpenSSH-Win32\ssh.exe %OUTDIR%\usr\bin /Y -XCOPY %~dp0\OpenSSH-Win32\libcrypto.dll %OUTDIR%\usr\bin /Y -RMDIR /s /q %~dp0\OpenSSH-Win32 +FOR /F "usebackq tokens=1" %%i IN ("%~dp0git.download") DO SET url=%%i +FOR /F "usebackq tokens=2" %%i IN ("%~dp0git.download") DO SET md5hash=%%i +CALL :downloadandverify %url% "%~dp0PortableGit.7z.exe" %md5hash% +"%~dp0PortableGit.7z.exe" -o %OUTDIR% -y +DEL "%~dp0PortableGit.7z.exe" +DEL /s /q "%~dp0OpenSSH-Win32.zip" :skipgitdownload SET ERRORLEVEL=0 @@ -41,15 +21,14 @@ ECHO ready endlocal EXIT /B %ERRORLEVEL% - :downloadandverify REM first parameter url to download REM second parameter local filename REM third parameter md5string -curl -L %~1 -o %~2 +curl -L %~1 -o "%~2" set "SHA256=" -for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile %~2 SHA256') do ( +for /f "skip=1 tokens=* delims=" %%# in ('certutil -hashfile "%~2" SHA256') do ( if not defined SHA256 ( for %%Z in (%%#) do set "SHA256=!SHA256!%%Z" ) diff --git a/Sparkles/Command.cs b/Sparkles/Command.cs index 472348669..9a2712246 100644 --- a/Sparkles/Command.cs +++ b/Sparkles/Command.cs @@ -18,13 +18,25 @@ using System; using System.Diagnostics; using System.IO; +using System.Reflection; +using System.Collections.Generic; namespace Sparkles { public class Command : Process { bool write_output; + static string[] extended_search_path; + public static void SetSearchPath(string[] pathes) + { + extended_search_path = pathes; + } + + public static void SetSearchPath(string path) + { + SetSearchPath(new string[] { path}); + } public Command (string path, string args) : this (path, args, write_output: true) { @@ -117,20 +129,31 @@ public void SetEnvironmentVariable (string variable, string content) protected static string LocateCommand (string name) { - string [] possible_command_paths = { - Environment.GetFolderPath (Environment.SpecialFolder.Personal) + "/bin/" + name, - InstallationInfo.Directory + "/bin/" + name, - "/usr/local/bin/" + name, - "/usr/bin/" + name, - "/opt/local/bin/" + name + string[] possible_command_paths = { + Path.Combine(Environment.GetFolderPath (Environment.SpecialFolder.Personal), "bin"), + Path.Combine(InstallationInfo.Directory, "bin"), + "/usr/local/bin/", + "/usr/bin/", + "/opt/local/bin/" }; - foreach (string path in possible_command_paths) { - if (File.Exists (path)) + List command_paths = new List(); + command_paths.AddRange(extended_search_path); + command_paths.AddRange(possible_command_paths); + + foreach (string path in command_paths) { + if (File.Exists(Path.Combine(path,name))) + { return path; + } + else if (File.Exists(Path.Combine(path, name + ".exe"))) + { + return Path.Combine(path, name + ".exe"); + } } return name; } + } } diff --git a/Sparkles/Configuration.cs b/Sparkles/Configuration.cs index 83f5bb359..037b9331c 100644 --- a/Sparkles/Configuration.cs +++ b/Sparkles/Configuration.cs @@ -42,7 +42,6 @@ public class Configuration : XmlDocument { public readonly string DirectoryPath; public readonly string FilePath; public readonly string TmpPath; - public readonly string BinPath; public string AvatarProvider; public readonly string LogFilePath; @@ -73,11 +72,6 @@ public Configuration (string config_path, string config_file_name) FilePath = Path.Combine (config_path, config_file_name); DirectoryPath = config_path; - BinPath = Path.Combine (config_path, "bin"); - - if (!Directory.Exists (BinPath)) - Directory.CreateDirectory (BinPath); - string logs_path = Path.Combine (config_path, "logs"); int i = 1; diff --git a/Sparkles/Git/Git.Command.cs b/Sparkles/Git/Git.Command.cs index ffec4f603..4a4c44765 100644 --- a/Sparkles/Git/Git.Command.cs +++ b/Sparkles/Git/Git.Command.cs @@ -27,11 +27,12 @@ public class GitCommand : SSHCommand { static string git_path; - + static string git_lfs_path; + public static string GitPath { get { if (git_path == null) - git_path = LocateCommand ("git"); + git_path = LocateCommand ("git").Replace("\\", "/"); return git_path; } @@ -41,7 +42,19 @@ public static string GitPath { } } + public static string GitLfsPath { + get { + if (git_lfs_path == null) + git_lfs_path = LocateCommand ("git-lfs").Replace("\\","/"); + + return git_lfs_path; + } + set { + git_lfs_path = value; + } + } + public static string GitVersion { get { if (GitPath == null) @@ -221,9 +234,9 @@ static ErrorStatus FindError (string line) public static string FormatGitSSHCommand (SSHAuthenticationInfo auth_info) { - return SSHCommandPath + " " + - "-i " + auth_info.PrivateKeyFilePath.Replace ("\\", "/").Replace (" ", "\\ ") + " " + - "-o UserKnownHostsFile=" + auth_info.KnownHostsFilePath.Replace ("\\", "/").Replace (" ", "\\ ") + " " + + return "\""+SSHCommandPath + "\" " + + "-i \"" + auth_info.PrivateKeyFilePath.Replace ("\\", "/").Replace (" ", "\\ ") + "\" " + + "-o UserKnownHostsFile=\"" + auth_info.KnownHostsFilePath.Replace ("\\", "/").Replace (" ", "\\ ") + "\" " + "-o IdentitiesOnly=yes" + " " + // Don't fall back to other keys on the system "-o PasswordAuthentication=no" + " " + // Don't hang on possible password prompts "-F /dev/null"; // Ignore the system's SSH config file diff --git a/Sparkles/Git/Git.Fetcher.cs b/Sparkles/Git/Git.Fetcher.cs index 53d62a6cd..671cdd176 100644 --- a/Sparkles/Git/Git.Fetcher.cs +++ b/Sparkles/Git/Git.Fetcher.cs @@ -25,15 +25,7 @@ public class GitFetcher : SSHFetcher { GitCommand git_clone; SSHAuthenticationInfo auth_info; - public static string OpenSSLPath = ""; - public static string OpenSSLCommandPath - { - get - { - return Path.Combine(OpenSSLPath, "openssl").Replace("\\", "/"); - } - } string password_salt = Path.GetRandomFileName ().SHA256 ().Substring (0, 16); @@ -184,6 +176,12 @@ public override string Complete (StorageType selected_storage_type) File.WriteAllText (identifier_path, identifier); File.SetAttributes (identifier_path, FileAttributes.Hidden); + + var git_config = new GitCommand(TargetFolder, "config user.name \"SparkleShare\""); + git_config.StartAndWaitForExit(); + git_config = new GitCommand(TargetFolder, "config user.email \"info@sparkleshare.org\""); + git_config.StartAndWaitForExit(); + // We can't do the "commit --all" shortcut because it doesn't add untracked files var git_add = new GitCommand (TargetFolder, "add .sparkleshare"); var git_commit = new GitCommand (TargetFolder, @@ -245,10 +243,10 @@ public override void EnableFetchedRepoCrypto (string password) var git_config_required = new GitCommand (TargetFolder, "config filter.encryption.required true"); var git_config_smudge = new GitCommand (TargetFolder, "config filter.encryption.smudge " + - string.Format ("\"{0} enc -d -aes-256-cbc -base64 -S {1} -pass file:{2} -md sha256\"", OpenSSLCommandPath, password_salt, password_file)); + string.Format ("\"'{0}' enc -d -aes-256-cbc -base64 -S {1} -pass file:{2} -md sha256\"", OpenSSLCommand.OpenSSLCommandPath, password_salt, password_file)); var git_config_clean = new GitCommand (TargetFolder, "config filter.encryption.clean " + - string.Format ("\"{0} enc -e -aes-256-cbc -base64 -S {1} -pass file:{2} -md sha256\"", OpenSSLCommandPath, password_salt, password_file)); + string.Format ("\"'{0}' enc -e -aes-256-cbc -base64 -S {1} -pass file:{2} -md sha256\"", OpenSSLCommand.OpenSSLCommandPath, password_salt, password_file)); git_config_required.StartAndWaitForExit (); git_config_smudge.StartAndWaitForExit (); @@ -280,7 +278,7 @@ public override bool IsFetchedRepoPasswordCorrect (string password) string args = string.Format ("enc -d -aes-256-cbc -base64 -S {0} -pass pass:{1} -in \"{2}\" -md sha256", password_salt, password.SHA256 (password_salt), password_check_file_path); - var process = new Command (OpenSSLCommandPath, args); + var process = new OpenSSLCommand (args); process.StartInfo.WorkingDirectory = TargetFolder; process.StartAndWaitForExit (); @@ -428,16 +426,10 @@ void InstallGitLFS () string smudge_command; string clean_command; - if (InstallationInfo.OperatingSystem == OS.macOS || InstallationInfo.OperatingSystem == OS.Windows) { - smudge_command = "env GIT_SSH_COMMAND='" + GIT_SSH_COMMAND + "' " + - Path.Combine (Configuration.DefaultConfiguration.BinPath, "git-lfs").Replace ("\\", "/") + " smudge %f"; - clean_command = Path.Combine (Configuration.DefaultConfiguration.BinPath, "git-lfs").Replace ("\\", "/") + " clean %f"; + smudge_command = "env GIT_SSH_COMMAND='" + GIT_SSH_COMMAND.Replace("\"", "\\\"") + "' '" + GitCommand.GitLfsPath + "' smudge %f"; + clean_command = "'" + GitCommand.GitLfsPath + "' clean %f"; - } else { - smudge_command = "env GIT_SSH_COMMAND='" + GIT_SSH_COMMAND + "' git-lfs smudge %f"; - clean_command = "git-lfs clean %f"; - } var git_config_smudge = new GitCommand (TargetFolder, string.Format ("config filter.lfs.smudge \"{0}\"", smudge_command)); diff --git a/Sparkles/Git/Git.Repository.cs b/Sparkles/Git/Git.Repository.cs index ac19964cf..40485b380 100644 --- a/Sparkles/Git/Git.Repository.cs +++ b/Sparkles/Git/Git.Repository.cs @@ -79,7 +79,7 @@ public GitRepository (string path, Configuration config, SSHAuthenticationInfo a git_config = new GitCommand (LocalPath, "config remote.origin.url \"" + RemoteUrl + "\""); git_config.StartAndWaitForExit (); - git_config = new GitCommand (LocalPath, "config core.sshCommand " + GitCommand.FormatGitSSHCommand (auth_info)); + git_config = new GitCommand (LocalPath, "config core.sshCommand \"" + GitCommand.FormatGitSSHCommand (auth_info).Replace("\"", "\\\"") + "\""); git_config.StartAndWaitForExit(); PrepareGitLFS (); @@ -893,18 +893,11 @@ void PrepareGitLFS () string pre_push_hook_path = Path.Combine (LocalPath, ".git", "hooks", "pre-push"); string pre_push_hook_content; - if (InstallationInfo.OperatingSystem == OS.macOS || InstallationInfo.OperatingSystem == OS.Windows) { - pre_push_hook_content = - "#!/bin/sh" + Environment.NewLine + - "env GIT_SSH_COMMAND='" + GitCommand.FormatGitSSHCommand (auth_info) + "' " + - Path.Combine (Configuration.DefaultConfiguration.BinPath, "git-lfs").Replace ("\\", "/") + " pre-push \"$@\""; + pre_push_hook_content = + "#!/bin/sh" + Environment.NewLine + + "env GIT_SSH_COMMAND='" + GitCommand.FormatGitSSHCommand (auth_info) + "' " + "'"+ + GitCommand.GitLfsPath + "' pre-push \"$@\""; - } else { - pre_push_hook_content = - "#!/bin/sh" + Environment.NewLine + - "env GIT_SSH_COMMAND='" + GitCommand.FormatGitSSHCommand (auth_info) + "' " + - "git-lfs pre-push \"$@\""; - } if (InstallationInfo.OperatingSystem != OS.Windows) { // TODO: Use proper API diff --git a/Sparkles/OpenSSLCommand.cs b/Sparkles/OpenSSLCommand.cs new file mode 100644 index 000000000..fb6453783 --- /dev/null +++ b/Sparkles/OpenSSLCommand.cs @@ -0,0 +1,54 @@ +// SparkleShare, a collaboration and sharing tool. +// Copyright (C) 2010 Hylke Bons +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + + +using System.IO; + +namespace Sparkles +{ + public class OpenSSLCommand : Command + { + public static string OpenSSLBinary = "openssl"; + public static string OpenSSLPath = Path.GetDirectoryName(LocateCommand(OpenSSLBinary)).Replace("\\", "/"); + + public static string OpenSSLCommandPath + { + get + { + return LocateCommand(OpenSSLBinary).Replace("\\", "/"); + } + } + + + public OpenSSLCommand(string command, string args) : + base(Path.Combine(OpenSSLPath, command), args) + { + } + public OpenSSLCommand(string args) : base(OpenSSLCommandPath, args) + { + } + public static string OpenSSLVersion + { + get + { + var openssl_version = new Command(OpenSSLCommandPath, "version", false); + + string version = openssl_version.StartAndReadStandardOutput(); + return version.Replace("OpenSSL ", "").Split(' ')[0]; + } + } + } +} diff --git a/Sparkles/SSHAuthenticationInfo.cs b/Sparkles/SSHAuthenticationInfo.cs index 0724a241d..6c51e71cc 100644 --- a/Sparkles/SSHAuthenticationInfo.cs +++ b/Sparkles/SSHAuthenticationInfo.cs @@ -100,7 +100,7 @@ bool CreateKeyPair () "-C \"" + computer_name + " (SparkleShare)\" " + // Key comment "-f \"" + key_file_name + "\""; - var ssh_keygen = new SSHCommand ("ssh-keygen", arguments); + var ssh_keygen = new SSHCommand (SSHCommand.SSHKeyGenCommandPath, arguments); ssh_keygen.StartInfo.WorkingDirectory = Path; ssh_keygen.StartAndWaitForExit (); diff --git a/Sparkles/SSHCommand.cs b/Sparkles/SSHCommand.cs index 3dd2f24b4..8425c7764 100644 --- a/Sparkles/SSHCommand.cs +++ b/Sparkles/SSHCommand.cs @@ -21,11 +21,25 @@ namespace Sparkles { public class SSHCommand : Command { - public static string SSHPath = ""; + public static string SSHPath = Path.GetDirectoryName(LocateCommand("ssh")).Replace("\\", "/"); public static string SSHCommandPath { get { - return Path.Combine (SSHPath, "ssh").Replace ("\\", "/"); + return LocateCommand("ssh").Replace ("\\", "/"); + } + } + public static string SSHKeyScanCommandPath + { + get + { + return LocateCommand("ssh-keyscan").Replace("\\", "/"); + } + } + public static string SSHKeyGenCommandPath + { + get + { + return LocateCommand("ssh-keygen").Replace("\\", "/"); } } @@ -36,8 +50,51 @@ public SSHCommand (string command, string args) : this (command, args, null) public SSHCommand (string command, string args, SSHAuthenticationInfo auth_info) : - base (Path.Combine (SSHPath, command), args) + base (command, args) + { + } + public static string SSHVersion { + get + { + var ssh_version = new Command(SSHCommandPath, "-V", false); + string version = ssh_version.StartAndReadStandardError(); //the version is written to StandardError instead of StanderdOutput! + return version.Replace("SSH ", "").Split(',')[0]; + } + } + public static string KeyscanVersion + { + get + { + var ssh_version = new Command(SSHKeyScanCommandPath, "",false); + ssh_version.StartAndWaitForExit(); // call to check if exists + return "found"; + } } + public static string KeygenVersion + { + get + { + // since keygen has no version output try to create testkey, if keygen is not found Comand will exit + string arguments = + "-t rsa " + // Crypto type + "-b 4096 " + // Key size + "-P \"\" " + // No password + "-C \"test\" " + // Key comment + "-f \"" + System.IO.Path.Combine(Configuration.DefaultConfiguration.DirectoryPath, "tmp", "testkey") + "\""; + var ssh_version = new Command(SSHKeyGenCommandPath, arguments,false); + ssh_version.StartAndWaitForExit(); // call to check if exists + if (File.Exists(System.IO.Path.Combine(Configuration.DefaultConfiguration.DirectoryPath, "tmp", "testkey"))) + { + File.Delete(System.IO.Path.Combine(Configuration.DefaultConfiguration.DirectoryPath, "tmp", "testkey")); + } + if (File.Exists(System.IO.Path.Combine(Configuration.DefaultConfiguration.DirectoryPath, "tmp", "testkey.pub"))) + { + File.Delete(System.IO.Path.Combine(Configuration.DefaultConfiguration.DirectoryPath, "tmp", "testkey.pub")); + } + return "found"; + } + } + } } diff --git a/Sparkles/SSHFetcher.cs b/Sparkles/SSHFetcher.cs index d7950b357..f7a96f475 100644 --- a/Sparkles/SSHFetcher.cs +++ b/Sparkles/SSHFetcher.cs @@ -23,9 +23,6 @@ namespace Sparkles { public abstract class SSHFetcher : BaseFetcher { - public static string SSHKeyScan = "ssh-keyscan"; - - protected SSHFetcher (SparkleFetcherInfo info) : base (info) { } @@ -68,7 +65,7 @@ public override bool Fetch () string FetchHostKey () { Logger.LogInfo ("Auth", string.Format ("Fetching host key for {0}", RemoteUrl.Host)); - var ssh_keyscan = new Command (SSHKeyScan, string.Format ("-t rsa -p 22 {0}", RemoteUrl.Host)); + var ssh_keyscan = new SSHCommand (SSHCommand.SSHKeyScanCommandPath, string.Format ("-t rsa -p 22 {0}", RemoteUrl.Host)); if (RemoteUrl.Port > 0) ssh_keyscan.StartInfo.Arguments = string.Format ("-t rsa -p {0} {1}", RemoteUrl.Port, RemoteUrl.Host); diff --git a/Sparkles/Sparkles.csproj b/Sparkles/Sparkles.csproj index e9c3bc995..54cfd66a6 100644 --- a/Sparkles/Sparkles.csproj +++ b/Sparkles/Sparkles.csproj @@ -45,13 +45,13 @@ true - ..\bin\ + .\Windows\bin\ DEBUG AnyCPU MinimumRecommendedRules.ruleset - ..\bin\ + .\Windows\bin\ true AnyCPU prompt @@ -76,6 +76,9 @@ Component + + Component + Component diff --git a/Sparkles/meson.build b/Sparkles/meson.build index e4261c561..5a6cbf68f 100644 --- a/Sparkles/meson.build +++ b/Sparkles/meson.build @@ -22,7 +22,8 @@ sparkles_src = ['AuthenticationInfo.cs', 'SSHFetcher.cs', 'TcpListener.cs', 'User.cs', - 'Watcher.cs'] + 'Watcher.cs', + 'OpenSSLCommand.cs'] sparkles = library('Sparkles', @@ -30,4 +31,3 @@ sparkles = library('Sparkles', cs_args: '-r:System.Xml.Linq', install: true, install_dir: install_dir) -