Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/windows build #1947

Draft
wants to merge 31 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bab1f99
Defined security protokol that validation works
uenz Jun 27, 2020
7ac1185
Fixed relative path
uenz Jun 27, 2020
1f2beb4
Added additional debug output
uenz Jun 27, 2020
7f11518
Added scripts for git / openssh installation during post build
uenz Jun 27, 2020
026e50a
Added additional debug output
uenz Jun 27, 2020
f3fdba2
Corrected path for tartool download
uenz Jun 27, 2020
52d8362
Changed build requirements
uenz Jun 27, 2020
d89e440
BugFix: exit application and dont call base.Quit, because that leads …
uenz Jun 29, 2020
c6097fa
Merge branch 'master' into fix/WindowsBuild
uenz May 21, 2021
f054c2f
Removed external dependency
uenz May 21, 2021
e2b1024
Removed sha256 wrapper for certutil
uenz Jul 26, 2021
67f5bc2
Removed sha256 wrapper for certutil
uenz Jul 26, 2021
b170e22
Added storage page
uenz Jul 26, 2021
e24c261
Made eventlog visible
uenz Jul 26, 2021
5fb2b68
Use ms openssh only for ssh-keyscan
uenz Jul 26, 2021
a780b90
Fixes windows build process for setup.exe
uenz Jul 26, 2021
7ae0f69
Made openssl available
uenz Jul 26, 2021
7905a69
Merge branch 'hbons:master' into fix/WindowsBuild
uenz Aug 3, 2021
e9be00c
Updated creating installer section
uenz Aug 3, 2021
390c022
Update README.md
uenz Aug 4, 2021
ccd7820
Install OpenSSH.Client and Openssh.Server from installer
uenz Aug 6, 2021
41f707f
Set link to recent wix toolset
uenz Aug 6, 2021
39804f5
Fixes for automated windows build
uenz Sep 6, 2021
cac14c6
changes for automated macos build
uenz Sep 6, 2021
68a379e
Updated travis.yml to jobs syntaqx and added deployment
uenz Sep 6, 2021
4ef45c3
Deleted unused file
uenz Sep 6, 2021
f969033
Deleted unused file
uenz Sep 6, 2021
ec4fb45
Merged 'origin/master' into fix/WindowsBuild
uenz Nov 1, 2021
200b5d5
Changed git engine to git-scm
uenz Nov 1, 2021
8b4e52e
Merged 'origin/master' into fix/WindowsBuild
uenz Nov 2, 2021
d4ac657
Merge branch 'hbons:master' into fix/WindowsBuild
uenz Sep 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 66 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -31,4 +78,3 @@ notifications:
on_success: change
on_failure: always
on_start: never

28 changes: 18 additions & 10 deletions SparkleShare.sln
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ 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
{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}.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
Expand All @@ -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

4 changes: 3 additions & 1 deletion SparkleShare/Common/AboutController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -78,5 +80,5 @@ void CheckForNewVersion ()
UpdateLabelEvent ("Couldn’t check for updates\t");
}
}
}
}
}
13 changes: 9 additions & 4 deletions SparkleShare/Mac/checkGit.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
#!/bin/sh
set -x
function abspath()
{
case "${1}" in
Expand Down Expand Up @@ -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
12 changes: 4 additions & 8 deletions SparkleShare/Windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -16,13 +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

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\
Expand All @@ -40,4 +37,3 @@ Remove `My Documents\SparkleShare` and `AppData\Roaming\org.sparkleshare.Sparkle
### Uninstalling

You can uninstall SparkleShare through the Windows Control Panel.

53 changes: 11 additions & 42 deletions SparkleShare/Windows/SparkleShare.Windows.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -41,7 +41,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>x86</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<Prefer32Bit>false</Prefer32Bit>
Expand Down Expand Up @@ -97,39 +97,6 @@
<Import Project="..\Common\SparkleShare.projitems" Label="Shared" Condition="Exists('..\Common\SparkleShare.projitems')" />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Reference Include="DeltaCompressionDotNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1d14d6e5194e7f4a, processorArchitecture=MSIL">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.dll</HintPath>
</Reference>
<Reference Include="DeltaCompressionDotNet.MsDelta, Version=1.0.0.0, Culture=neutral, PublicKeyToken=46b2138a390abf55, processorArchitecture=MSIL">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.MsDelta.dll</HintPath>
</Reference>
<Reference Include="DeltaCompressionDotNet.PatchApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3e8888ee913ed789, processorArchitecture=MSIL">
<HintPath>..\..\packages\DeltaCompressionDotNet.1.0.0\lib\net45\DeltaCompressionDotNet.PatchApi.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\squirrel.windows.1.5.2\lib\Net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Mdb, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Mdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Pdb, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Pdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Rocks, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Rocks.dll</HintPath>
</Reference>
<Reference Include="NuGet.Squirrel, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\squirrel.windows.1.5.2\lib\Net45\NuGet.Squirrel.dll</HintPath>
</Reference>
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath>
</Reference>
<Reference Include="Squirrel, Version=1.5.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\squirrel.windows.1.5.2\lib\Net45\Squirrel.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
Expand Down Expand Up @@ -211,23 +178,23 @@
<Link>Images\user-icon-default.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\document-added-12.png">
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\12x12\status\document-added.png">
<Link>Images\document-added-12.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\document-deleted-12.png">
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\12x12\status\document-deleted.png">
<Link>Images\document-deleted-12.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\document-edited-12.png">
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\12x12\status\document-edited.png">
<Link>Images\document-edited-12.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\document-moved-12.png">
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\12x12\status\document-moved.png">
<Link>Images\document-moved-12.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\process-working-22.png">
<EmbeddedResource Include="..\Linux\Images\icons\hicolor\22x22\status\process-working.png">
<Link>Images\process-working-22.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
Expand Down Expand Up @@ -266,7 +233,6 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="..\Common\Presets\bitbucket.xml">
Expand Down Expand Up @@ -326,4 +292,7 @@
<Name>Sparkles.Git</Name>
</ProjectReference>
</ItemGroup>
</Project>
<PropertyGroup>
<PostBuildEvent>"$(ProjectDir)\postBuild.cmd" "$(TargetDir)\msysgit"</PostBuildEvent>
</PropertyGroup>
</Project>
Loading