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

Remove Single Node #159

Merged
merged 12 commits into from Jul 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions scripts/opts-doc-gen/generate-documentation.ps1
Expand Up @@ -8,10 +8,9 @@ $documentationGenPath = Join-Path $toolsDirectory (Join-Path "documentation-gene
try {
Push-Location $baseDirectory

$eventStoreSingleNodePath = Join-Path $baseDirectory "bin\singlenode"
$eventStoreClusterNodePath = Join-Path $baseDirectory "bin\clusternode"

Start-Process -NoNewWindow -Wait -FilePath $documentationGenPath -ArgumentList @("-b $eventStoreSingleNodePath,$eventStoreClusterNodePath -o $documentationOutputPath")
Start-Process -NoNewWindow -Wait -FilePath $documentationGenPath -ArgumentList @("-b $eventStoreClusterNodePath -o $documentationOutputPath")

} finally {
Pop-Location
Expand Down
3 changes: 1 addition & 2 deletions scripts/opts-doc-gen/generate-documentation.sh
Expand Up @@ -6,7 +6,6 @@ BASEDIR=$SCRIPTDIR/../..
DOCUMENTATIONOUTPUT_PATH=$SCRIPTDIR/documentation.md
DOCUMENTATIONGEN_PATH="$BASEDIR/tools/documentation-generation/EventStore.Documentation.exe"

EVENTSTORESINGLENODE_PATH=$BASEDIR/bin/singlenode
EVENTSTORECLUSTERNODE_PATH=$BASEDIR/bin/clusternode

$DOCUMENTATIONGEN_PATH -b $EVENTSTORESINGLENODE_PATH -o $DOCUMENTATIONOUTPUT_PATH
$DOCUMENTATIONGEN_PATH -b $EVENTSTORECLUSTERNODE_PATH -o $DOCUMENTATIONOUTPUT_PATH
27 changes: 1 addition & 26 deletions scripts/package-mono/package-mono.sh
Expand Up @@ -110,31 +110,6 @@ fi
mkdir $PACKAGEDIRECTORY


pushd $SCRIPTDIR/../../bin/singlenode/

if [[ $OS == "Darwin" ]] ; then
mkbundle -c -o singlenode.c -oo singlenode.a EventStore.SingleNode.exe EventStore.Core.dll EventStore.BufferManagement.dll EventStore.Common.dll EventStore.Projections.Core.dll EventStore.SingleNode.Web.dll EventStore.Transport.Http.dll EventStore.Transport.Tcp.dll Newtonsoft.Json.dll NLog.dll protobuf-net.dll EventStore.Web.dll Mono.Security.dll --static --deps --config /opt/mono/etc/mono/config --machine-config /opt/mono/etc/mono/4.0/machine.config
gcc -o singlenode $ES_COMPILE_FLAGS singlenode.c singlenode.a $MONOPREFIX/lib/libmonosgen-2.0.a $MONOPREFIX/lib/libMonoPosixHelper.a
else
mkbundle -c -o singlenode.c -oo singlenode.a EventStore.SingleNode.exe EventStore.Core.dll EventStore.BufferManagement.dll EventStore.Common.dll EventStore.Projections.Core.dll EventStore.SingleNode.Web.dll EventStore.Transport.Http.dll EventStore.Transport.Tcp.dll Newtonsoft.Json.dll NLog.dll protobuf-net.dll EventStore.Web.dll Mono.Security.dll --static --deps --config $MONOCONFIG --machine-config $MACHINECONFIG
cc -o singlenode -Wall `pkg-config --cflags monosgen-2` singlenode.c `pkg-config --libs-only-L monosgen-2` -Wl,-Bstatic -lmonosgen-2.0 -Wl,-Bdynamic `pkg-config --libs-only-l monosgen-2 | sed -e "s/\-lmono-2.0 //"` singlenode.a
fi

cp -r es-common-web $PACKAGEDIRECTORY/
cp -r singlenode-web $PACKAGEDIRECTORY/
cp -r Prelude $PACKAGEDIRECTORY/
cp -r web-resources $PACKAGEDIRECTORY/
cp -r Users $PACKAGEDIRECTORY/
cp libjs1.$soext $PACKAGEDIRECTORY/
cp libv8.$soext $PACKAGEDIRECTORY/
cp libicui18n.$soext $PACKAGEDIRECTORY/
cp libicuuc.$soext $PACKAGEDIRECTORY/
cp singlenode $PACKAGEDIRECTORY/
cp NLog.config $PACKAGEDIRECTORY/
cp $SCRIPTDIR/singlenode.sh $PACKAGEDIRECTORY/run-singlenode.sh

popd

pushd $SCRIPTDIR/../../bin/clusternode/

if [[ $OS == "Darwin" ]] ; then
Expand All @@ -156,7 +131,7 @@ cp libicui18n.$soext $PACKAGEDIRECTORY/
cp libicuuc.$soext $PACKAGEDIRECTORY/
cp clusternode $PACKAGEDIRECTORY/
cp NLog.config $PACKAGEDIRECTORY/
cp $SCRIPTDIR/clusternode.sh $PACKAGEDIRECTORY/run-clusternode.sh
cp $SCRIPTDIR/run-node.sh $PACKAGEDIRECTORY/run-node.sh

popd

Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions scripts/package-mono/singlenode.sh

This file was deleted.

43 changes: 0 additions & 43 deletions scripts/package-windows/merge-assemblies.ps1
Expand Up @@ -8,48 +8,6 @@ if ((Test-Path $mergedDirectory) -eq $false) {
New-Item -Path $mergedDirectory -ItemType Directory > $null
}

Function Merge-SingleNode
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)][string]$BuildDirectory,
[Parameter(Mandatory=$true)][string]$OutputDirectory,
[Parameter(Mandatory=$false)][string]$Executable = "EventStore.SingleNode.exe",
[Parameter(Mandatory=$false)][string[]]$ExcludeAssemblies = @("js1.dll", "js1.pdb"),
[Parameter(Mandatory=$false)][string]$IlMergeToolPath = (Join-Path $toolsDirectory "ilmerge\ilmerge.exe")
)

# Find the build directory as a relative path to here (in case it's absolute)
$relativeBuildDirectory = Resolve-Path -Relative -Path $BuildDirectory

# If the executable name isn't absolute, try searching for it in the build directory
if ((Test-Path $Executable) -eq $false) {
$Executable = Join-Path $relativeBuildDirectory $Executable

if ((Test-Path $Executable) -eq $false) {
throw "Cannot find executable '$Executable'"
}
}

# Find other assemblies to merge (with some specifically excluded for e.g. native code)
$otherAssemblies = Get-ChildItem $relativeBuildDirectory -Filter *.dll -Exclude $ExcludeAssemblies -Name |
% { Join-Path $relativeBuildDirectory $_ } |
Join-String -Separator " "

# Find the path of the .NET Framework DLLs
$platformPath = (Join-Path (Get-Item 'Env:ProgramFiles(x86)').Value 'Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0')

$outputName = "EventStore-SingleNode.exe"
$outputPath = Join-Path (Resolve-Path -Relative $OutputDirectory) $outputName

Start-Process -Wait -NoNewWindow -FilePath $IlMergeToolPath -ArgumentList @("/internalize", "/targetPlatform:v4,""$platformPath""", "/out:$outputPath", $Executable, $otherAssemblies)

if ($ExcludeAssemblies.Count -gt 0) {
Get-ChildItem -Recurse -Path $relativeBuildDirectory -Include $ExcludeAssemblies |
Foreach-Object { Copy-Item -Force -Path $_.FullName -Destination $mergedDirectory }
}
}

Function Merge-ClusterNode
{
[CmdletBinding()]
Expand Down Expand Up @@ -260,7 +218,6 @@ Function Merge-ClientAPI
}
}

Merge-SingleNode -BuildDirectory (Join-Path $binDirectory "singlenode") -OutputDirectory $mergedDirectory
Merge-ClusterNode -BuildDirectory (Join-Path $binDirectory "clusternode") -OutputDirectory $mergedDirectory
Merge-TestClient -BuildDirectory (Join-Path $binDirectory "testclient") -OutputDirectory $mergedDirectory
Merge-PAdmin -BuildDirectory (Join-Path $binDirectory "padmin") -OutputDirectory $mergedDirectory
Expand Down
14 changes: 1 addition & 13 deletions scripts/package-windows/package-windows.ps1
Expand Up @@ -44,23 +44,11 @@ Function Stage-Build() {
Get-ChildItem -Path $mergedAssembliesPath |
ForEach-Object { Copy-Item $_.FullName $stagingDirectory }

Write-Host "Staging supporting files from single-node..."

#Stage single node files
$singleNodeDirectory = Join-Path $binDirectory "singlenode"
Copy-Item (Join-Path $singleNodeDirectory "NLog.config") $stagingDirectory
Copy-Item -Recurse -Force (Join-Path $singleNodeDirectory "es-common-web") $stagingDirectory
Copy-Item -Recurse -Force (Join-Path $singleNodeDirectory "Prelude") $stagingDirectory
Copy-Item -Recurse -Force (Join-Path $singleNodeDirectory "singlenode-web") $stagingDirectory
Copy-Item -Recurse -Force (Join-Path $singleNodeDirectory "Users") $stagingDirectory
Copy-Item -Recurse -Force (Join-Path $singleNodeDirectory "web-resources") $stagingDirectory

Write-Host "Staging supporting files from cluster-node..."

#Stage cluster node files
$clusterNodeDirectory = Join-Path $binDirectory "clusternode"
Copy-Item (Join-Path $singleNodeDirectory "NLog.config") $stagingDirectory
Copy-Item -Recurse -Force (Join-Path $clusterNodeDirectory "es-common-web") $stagingDirectory
Copy-Item (Join-Path $clusterNodeDirectory "NLog.config") $stagingDirectory
Copy-Item -Recurse -Force (Join-Path $clusterNodeDirectory "Prelude") $stagingDirectory
Copy-Item -Recurse -Force (Join-Path $clusterNodeDirectory "clusternode-web") $stagingDirectory
Copy-Item -Recurse -Force (Join-Path $clusterNodeDirectory "Users") $stagingDirectory
Expand Down
4 changes: 2 additions & 2 deletions src/EventStore.ClientAPI/EventStore.ClientAPI.csproj
Expand Up @@ -17,11 +17,11 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\bin\anycpu\</OutputPath>
<OutputPath>..\..\bin\clientapi\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>..\..\bin\eventstore\debug\anycpu\EventStore.ClientAPI.xml</DocumentationFile>
<DocumentationFile>..\..\bin\clientapi\EventStore.ClientAPI.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
Expand Down