v3 Binaries
This commit is contained in:
parent
ef70df1db3
commit
adaf428aa7
build.sh
macOS
osx/Sonarr.app/Contents/Resources
setup
src
NzbDrone.Api.Test
NzbDrone.Api
NzbDrone.App.Test
NzbDrone.Automation.Test
NzbDrone.Common.Test
NzbDrone.Common
Composition
ConsoleService.csEnvironmentInfo
Extensions
NzbDrone.Common.csprojProcesses
Properties
Reflection
ServiceProvider.csNzbDrone.Console
NzbDrone.Core.Test
NzbDrone.Core
NzbDrone.Host
NzbDrone.Integration.Test
NzbDrone.Libraries.Test
NzbDrone.Mono.Test
NzbDrone.Mono
NzbDrone.SignalR
NzbDrone.Test.Common
NzbDrone.Test.Dummy
NzbDrone.Update.Test
NzbDrone.Update.Test.csprojProgramFixture.cs
Properties
StartNzbDroneService.csUpdateProviderStartFixture.csNzbDrone.Update
NzbDrone.Windows.Test
NzbDrone.Windows
NzbDrone
ServiceHelpers
Sonarr.Api.V3/Properties
170
build.sh
170
build.sh
|
@ -1,15 +1,15 @@
|
|||
#! /bin/bash
|
||||
msBuild='/c/Program Files (x86)/MSBuild/14.0/Bin'
|
||||
outputFolder='./_output'
|
||||
outputFolderMono='./_output_mono'
|
||||
outputFolderOsx='./_output_osx'
|
||||
outputFolderOsxApp='./_output_osx_app'
|
||||
outputFolderLinux='./_output_linux'
|
||||
outputFolderMacOS='./_output_macos'
|
||||
outputFolderMacOSApp='./_output_macos_app'
|
||||
testPackageFolder='./_tests/'
|
||||
testSearchPattern='*.Test/bin/x86/Release'
|
||||
sourceFolder='./src'
|
||||
slnFile=$sourceFolder/NzbDrone.sln
|
||||
updateFolder=$outputFolder/NzbDrone.Update
|
||||
updateFolderMono=$outputFolderMono/NzbDrone.Update
|
||||
slnFile=$sourceFolder/Sonarr.sln
|
||||
updateFolder=$outputFolder/Sonarr.Update
|
||||
updateFolderMono=$outputFolderLinux/Sonarr.Update
|
||||
|
||||
nuget='tools/nuget/nuget.exe';
|
||||
CheckExitCode()
|
||||
|
@ -23,12 +23,23 @@ CheckExitCode()
|
|||
return $status
|
||||
}
|
||||
|
||||
ProgressStart()
|
||||
{
|
||||
echo "##teamcity[blockOpened name='$1']"
|
||||
echo "##teamcity[progressStart '$1']"
|
||||
}
|
||||
|
||||
ProgressEnd()
|
||||
{
|
||||
echo "##teamcity[progressFinish '$1']"
|
||||
echo "##teamcity[blockClosed name='$1']"
|
||||
}
|
||||
|
||||
CleanFolder()
|
||||
{
|
||||
local path=$1
|
||||
local keepConfigFiles=$2
|
||||
|
||||
|
||||
find $path -name "*.transform" -exec rm "{}" \;
|
||||
|
||||
if [ $keepConfigFiles != true ] ; then
|
||||
|
@ -67,7 +78,7 @@ BuildWithXbuild()
|
|||
|
||||
Build()
|
||||
{
|
||||
echo "##teamcity[progressStart 'Build']"
|
||||
ProgressStart 'Build'
|
||||
|
||||
rm -rf $outputFolder
|
||||
|
||||
|
@ -82,7 +93,7 @@ Build()
|
|||
echo "Removing Mono.Posix.dll"
|
||||
rm $outputFolder/Mono.Posix.dll
|
||||
|
||||
echo "##teamcity[progressFinish 'Build']"
|
||||
ProgressEnd 'Build'
|
||||
}
|
||||
|
||||
RunGulp()
|
||||
|
@ -91,9 +102,9 @@ RunGulp()
|
|||
yarn install
|
||||
ProgressEnd 'yarn install'
|
||||
|
||||
echo "##teamcity[progressStart 'Running gulp']"
|
||||
ProgressStart 'Running gulp'
|
||||
CheckExitCode yarn run build --production
|
||||
echo "##teamcity[progressFinish 'Running gulp']"
|
||||
ProgressEnd 'Running gulp'
|
||||
}
|
||||
|
||||
CreateMdbs()
|
||||
|
@ -115,79 +126,103 @@ CreateMdbs()
|
|||
|
||||
PackageMono()
|
||||
{
|
||||
echo "##teamcity[progressStart 'Creating Mono Package']"
|
||||
rm -rf $outputFolderMono
|
||||
cp -r $outputFolder $outputFolderMono
|
||||
ProgressStart 'Creating Mono Package'
|
||||
|
||||
rm -rf $outputFolderLinux
|
||||
|
||||
echo "Copying Binaries"
|
||||
cp -r $outputFolder $outputFolderLinux
|
||||
|
||||
echo "Creating MDBs"
|
||||
CreateMdbs $outputFolderMono
|
||||
CreateMdbs $outputFolderLinux
|
||||
|
||||
echo "Removing PDBs"
|
||||
find $outputFolderMono -name "*.pdb" -exec rm "{}" \;
|
||||
find $outputFolderLinux -name "*.pdb" -exec rm "{}" \;
|
||||
|
||||
echo "Removing Service helpers"
|
||||
rm -f $outputFolderMono/ServiceUninstall.*
|
||||
rm -f $outputFolderMono/ServiceInstall.*
|
||||
rm -f $outputFolderLinux/ServiceUninstall.*
|
||||
rm -f $outputFolderLinux/ServiceInstall.*
|
||||
|
||||
echo "Removing native windows binaries Sqlite, MediaInfo"
|
||||
rm -f $outputFolderMono/sqlite3.*
|
||||
rm -f $outputFolderMono/MediaInfo.*
|
||||
rm -f $outputFolderLinux/sqlite3.*
|
||||
rm -f $outputFolderLinux/MediaInfo.*
|
||||
|
||||
echo "Adding NzbDrone.Core.dll.config (for dllmap)"
|
||||
cp $sourceFolder/NzbDrone.Core/NzbDrone.Core.dll.config $outputFolderMono
|
||||
echo "Adding Sonarr.Core.dll.config (for dllmap)"
|
||||
cp $sourceFolder/NzbDrone.Core/Sonarr.Core.dll.config $outputFolderLinux
|
||||
|
||||
echo "Adding CurlSharp.dll.config (for dllmap)"
|
||||
cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $outputFolderMono
|
||||
cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $outputFolderLinux
|
||||
|
||||
echo "Renaming NzbDrone.Console.exe to NzbDrone.exe"
|
||||
rm $outputFolderMono/NzbDrone.exe*
|
||||
for file in $outputFolderMono/NzbDrone.Console.exe*; do
|
||||
echo "Renaming Sonarr.Console.exe to Sonarr.exe"
|
||||
rm $outputFolderLinux/Sonarr.exe*
|
||||
for file in $outputFolderLinux/Sonarr.Console.exe*; do
|
||||
mv "$file" "${file//.Console/}"
|
||||
done
|
||||
|
||||
echo "Removing NzbDrone.Windows"
|
||||
rm $outputFolderMono/NzbDrone.Windows.*
|
||||
echo "Removing Sonarr.Windows"
|
||||
rm $outputFolderLinux/Sonarr.Windows.*
|
||||
|
||||
echo "Adding NzbDrone.Mono to UpdatePackage"
|
||||
cp $outputFolderMono/NzbDrone.Mono.* $updateFolderMono
|
||||
echo "Adding Sonarr.Mono to UpdatePackage"
|
||||
cp $outputFolderLinux/Sonarr.Mono.* $updateFolderMono
|
||||
|
||||
echo "##teamcity[progressFinish 'Creating Mono Package']"
|
||||
ProgressEnd 'Creating Mono Package'
|
||||
}
|
||||
|
||||
PackageOsx()
|
||||
PackageMacOS()
|
||||
{
|
||||
echo "##teamcity[progressStart 'Creating OS X Package']"
|
||||
rm -rf $outputFolderOsx
|
||||
cp -r $outputFolderMono $outputFolderOsx
|
||||
ProgressStart 'Creating MacOS Package'
|
||||
|
||||
echo "Adding sqlite dylibs"
|
||||
cp $sourceFolder/Libraries/Sqlite/*.dylib $outputFolderOsx
|
||||
|
||||
echo "Adding MediaInfo dylib"
|
||||
cp $sourceFolder/Libraries/MediaInfo/*.dylib $outputFolderOsx
|
||||
rm -rf $outputFolderMacOS
|
||||
mkdir $outputFolderMacOS
|
||||
|
||||
echo "Adding Startup script"
|
||||
cp ./osx/Sonarr $outputFolderOsx
|
||||
cp ./macOS/Sonarr $outputFolderMacOS
|
||||
dos2unix $outputFolderMacOS/Sonarr
|
||||
|
||||
echo "##teamcity[progressFinish 'Creating OS X Package']"
|
||||
echo "Copying Binaries"
|
||||
cp -r $outputFolderLinux/* $outputFolderMacOS
|
||||
|
||||
echo "Adding sqlite dylibs"
|
||||
cp $sourceFolder/Libraries/Sqlite/*.dylib $outputFolderMacOS
|
||||
|
||||
echo "Adding MediaInfo dylib"
|
||||
cp $sourceFolder/Libraries/MediaInfo/*.dylib $outputFolderMacOS
|
||||
|
||||
ProgressEnd 'Creating MacOS Package'
|
||||
}
|
||||
|
||||
PackageOsxApp()
|
||||
PackageMacOSApp()
|
||||
{
|
||||
echo "##teamcity[progressStart 'Creating OS X App Package']"
|
||||
rm -rf $outputFolderOsxApp
|
||||
mkdir $outputFolderOsxApp
|
||||
ProgressStart 'Creating macOS App Package'
|
||||
|
||||
cp -r ./osx/Sonarr.app $outputFolderOsxApp
|
||||
cp -r $outputFolderOsx $outputFolderOsxApp/Sonarr.app/Contents/MacOS
|
||||
rm -rf $outputFolderMacOSApp
|
||||
mkdir $outputFolderMacOSApp
|
||||
cp -r ./macOS/Sonarr.app $outputFolderMacOSApp
|
||||
mkdir -p $outputFolderMacOSApp/Sonarr.app/Contents/MacOS
|
||||
|
||||
echo "##teamcity[progressFinish 'Creating OS X App Package']"
|
||||
echo "Adding Startup script"
|
||||
cp ./macOS/Sonarr $outputFolderMacOSApp/Sonarr.app/Contents/MacOS
|
||||
dos2unix $outputFolderMacOSApp/Sonarr.app/Contents/MacOS/Sonarr
|
||||
|
||||
echo "Copying Binaries"
|
||||
cp -r $outputFolderLinux/* $outputFolderMacOSApp/Sonarr.app/Contents/MacOS
|
||||
|
||||
echo "Adding sqlite dylibs"
|
||||
cp $sourceFolder/Libraries/Sqlite/*.dylib $outputFolderMacOSApp/Sonarr.app/Contents/MacOS
|
||||
|
||||
echo "Adding MediaInfo dylib"
|
||||
cp $sourceFolder/Libraries/MediaInfo/*.dylib $outputFolderMacOSApp/Sonarr.app/Contents/MacOS
|
||||
|
||||
echo "Removing Update Folder"
|
||||
rm -r $outputFolderMacOSApp/Sonarr.app/Contents/MacOS/Sonarr.Update
|
||||
|
||||
ProgressEnd 'Creating macOS App Package'
|
||||
}
|
||||
|
||||
PackageTests()
|
||||
{
|
||||
echo "Packaging Tests"
|
||||
echo "##teamcity[progressStart 'Creating Test Package']"
|
||||
ProgressStart 'Creating Test Package'
|
||||
|
||||
rm -rf $testPackageFolder
|
||||
mkdir $testPackageFolder
|
||||
|
||||
|
@ -209,8 +244,8 @@ PackageTests()
|
|||
|
||||
CleanFolder $testPackageFolder true
|
||||
|
||||
echo "Adding NzbDrone.Core.dll.config (for dllmap)"
|
||||
cp $sourceFolder/NzbDrone.Core/NzbDrone.Core.dll.config $testPackageFolder
|
||||
echo "Adding Sonarr.Core.dll.config (for dllmap)"
|
||||
cp $sourceFolder/NzbDrone.Core/Sonarr.Core.dll.config $testPackageFolder
|
||||
|
||||
echo "Adding CurlSharp.dll.config (for dllmap)"
|
||||
cp $sourceFolder/NzbDrone.Common/CurlSharp.dll.config $testPackageFolder
|
||||
|
@ -218,16 +253,30 @@ PackageTests()
|
|||
echo "Copying CurlSharp libraries"
|
||||
cp $sourceFolder/ExternalModules/CurlSharp/libs/i386/* $testPackageFolder
|
||||
|
||||
echo "##teamcity[progressFinish 'Creating Test Package']"
|
||||
ProgressEnd 'Creating Test Package'
|
||||
}
|
||||
|
||||
CleanupWindowsPackage()
|
||||
{
|
||||
echo "Removing NzbDrone.Mono"
|
||||
rm -f $outputFolder/NzbDrone.Mono.*
|
||||
ProgressStart 'Cleaning Windows Package'
|
||||
|
||||
echo "Adding NzbDrone.Windows to UpdatePackage"
|
||||
cp $outputFolder/NzbDrone.Windows.* $updateFolder
|
||||
echo "Removing Sonarr.Mono"
|
||||
rm -f $outputFolder/Sonarr.Mono.*
|
||||
|
||||
echo "Adding Sonarr.Windows to UpdatePackage"
|
||||
cp $outputFolder/Sonarr.Windows.* $updateFolder
|
||||
|
||||
ProgressEnd 'Cleaning Windows Package'
|
||||
}
|
||||
|
||||
PublishArtifacts()
|
||||
{
|
||||
echo "##teamcity[publishArtifacts '_tests/** => tests.zip']"
|
||||
echo "##teamcity[publishArtifacts '$outputFolder/** => Sonarr.$BRANCH.$BUILD_NUMBER.windows.zip!Sonarr']"
|
||||
echo "##teamcity[publishArtifacts '$outputFolderLinux/** => Sonarr.$BRANCH.$BUILD_NUMBER.linux.tar.gz!Sonarr']"
|
||||
echo "##teamcity[publishArtifacts '$outputFolderMacOS/** => Sonarr.$BRANCH.$BUILD_NUMBER.macos.tar.gz!Sonarr']"
|
||||
echo "##teamcity[publishArtifacts '$outputFolderMacOSApp/** => Sonarr.$BRANCH.$BUILD_NUMBER.macos.zip']"
|
||||
echo "##teamcity[publishArtifacts 'debian => debian.zip/debian']"
|
||||
}
|
||||
|
||||
# Use mono or .net depending on OS
|
||||
|
@ -245,7 +294,8 @@ esac
|
|||
Build
|
||||
RunGulp
|
||||
PackageMono
|
||||
PackageOsx
|
||||
PackageOsxApp
|
||||
PackageMacOS
|
||||
PackageMacOSApp
|
||||
PackageTests
|
||||
CleanupWindowsPackage
|
||||
PublishArtifacts
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
DIR=$(cd "$(dirname "$0")"; pwd)
|
||||
|
||||
#change these values to match your app
|
||||
EXE_PATH="$DIR/NzbDrone.exe"
|
||||
EXE_PATH="$DIR/Sonarr.exe"
|
||||
APPNAME="Sonarr"
|
||||
|
||||
#set up environment
|
||||
|
@ -31,8 +31,8 @@ fi
|
|||
export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$HOME/lib:/usr/local/lib:/lib:/usr/lib"
|
||||
|
||||
#mono version check
|
||||
REQUIRED_MAJOR=3
|
||||
REQUIRED_MINOR=10
|
||||
REQUIRED_MAJOR=4
|
||||
REQUIRED_MINOR=6
|
||||
|
||||
VERSION_TITLE="Cannot launch $APPNAME"
|
||||
VERSION_MSG="$APPNAME requires Mono Runtime Environment(MRE) $REQUIRED_MAJOR.$REQUIRED_MINOR or later."
|
|
@ -23,11 +23,11 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0</string>
|
||||
<string>3.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>xmmd</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.0</string>
|
||||
<string>3.0</string>
|
||||
<key>NSAppleScriptEnabled</key>
|
||||
<string>YES</string>
|
||||
</dict>
|
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,7 @@
|
|||
REM SET BUILD_NUMBER=1
|
||||
REM SET branch=develop
|
||||
REM SET BRANCH=develop
|
||||
echo ##teamcity[progressStart 'Building setup file']
|
||||
inno\ISCC.exe nzbdrone.iss
|
||||
echo ##teamcity[progressFinish 'Building setup file']
|
||||
|
||||
echo ##teamcity[publishArtifacts 'setup\output\*.exe']
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
#define AppPublisher "Team Sonarr"
|
||||
#define AppURL "https://sonarr.tv/"
|
||||
#define ForumsURL "https://forums.sonarr.tv/"
|
||||
#define AppExeName "NzbDrone.exe"
|
||||
#define AppExeName "Sonarr.exe"
|
||||
#define BuildNumber "2.0"
|
||||
#define BuildNumber GetEnv('BUILD_NUMBER')
|
||||
#define BranchName GetEnv('branch')
|
||||
#define BranchName GetEnv('BRANCH')
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
|
@ -16,20 +16,21 @@
|
|||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
AppId={{56C1065D-3523-4025-B76D-6F73F67F7F71}
|
||||
AppName={#AppName}
|
||||
AppVersion=2.0
|
||||
AppVersion=3.0
|
||||
AppPublisher={#AppPublisher}
|
||||
AppPublisherURL={#AppURL}
|
||||
AppSupportURL={#ForumsURL}
|
||||
AppUpdatesURL={#AppURL}
|
||||
DefaultDirName={commonappdata}\NzbDrone\bin
|
||||
UsePreviousAppDir=no
|
||||
DefaultDirName={commonappdata}\Sonarr\bin
|
||||
DisableDirPage=yes
|
||||
DefaultGroupName={#AppName}
|
||||
DisableProgramGroupPage=yes
|
||||
OutputBaseFilename=NzbDrone.{#BranchName}.{#BuildNumber}
|
||||
OutputBaseFilename=Sonarr.{#BranchName}.{#BuildNumber}.windows
|
||||
SolidCompression=yes
|
||||
AppCopyright=Creative Commons 3.0 License
|
||||
AllowUNCPath=False
|
||||
UninstallDisplayIcon={app}\NzbDrone.exe
|
||||
UninstallDisplayIcon={app}\Sonarr.exe
|
||||
DisableReadyPage=True
|
||||
CompressionThreads=2
|
||||
Compression=lzma2/normal
|
||||
|
@ -45,22 +46,32 @@ Name: "windowsService"; Description: "Install Windows Service (Starts when the c
|
|||
Name: "startupShortcut"; Description: "Create shortcut in Startup folder (Starts when you log into Windows)"; GroupDescription: "Start automatically"; Flags: exclusive unchecked
|
||||
Name: "none"; Description: "Do not start automatically"; GroupDescription: "Start automatically"; Flags: exclusive unchecked
|
||||
|
||||
|
||||
[Files]
|
||||
Source: "..\_output\NzbDrone.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\_output\Sonarr.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\_output\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Parameters: "/icon"
|
||||
Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Parameters: "/icon"
|
||||
Name: "{userstartup}\{#AppName}"; Filename: "{app}\NzbDrone.exe"; WorkingDir: "{app}"; Tasks: startupShortcut
|
||||
Name: "{userstartup}\{#AppName}"; Filename: "{app}\Sonarr.exe"; WorkingDir: "{app}"; Tasks: startupShortcut
|
||||
|
||||
[InstallDelete]
|
||||
Name: "{commonappdata}\NzbDrone\bin"; Type: filesandordirs
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\nzbdrone.console.exe"; Parameters: "/u"; Flags: runhidden waituntilterminated;
|
||||
Filename: "{app}\nzbdrone.console.exe"; Parameters: "/i"; Flags: runhidden waituntilterminated; Tasks: windowsService
|
||||
Filename: "{app}\NzbDrone.exe"; Description: "Open Sonarr"; Flags: postinstall skipifsilent nowait; Tasks: windowsService;
|
||||
Filename: "{app}\NzbDrone.exe"; Description: "Start Sonarr"; Flags: postinstall skipifsilent nowait; Tasks: startupShortcut none;
|
||||
Filename: "{app}\Sonarr.Console.exe"; Parameters: "/u"; Flags: runhidden waituntilterminated;
|
||||
Filename: "{app}\Sonarr.Console.exe"; Parameters: "/i"; Flags: runhidden waituntilterminated; Tasks: windowsService
|
||||
Filename: "{app}\Sonarr.exe"; Description: "Open Sonarr Web UI"; Flags: postinstall skipifsilent nowait; Tasks: windowsService;
|
||||
Filename: "{app}\Sonarr.exe"; Description: "Start Sonarr"; Flags: postinstall skipifsilent nowait; Tasks: startupShortcut none;
|
||||
|
||||
[UninstallRun]
|
||||
Filename: "{app}\nzbdrone.console.exe"; Parameters: "/u"; Flags: waituntilterminated skipifdoesntexist
|
||||
Filename: "{app}\Sonarr.Console.exe"; Parameters: "/u"; Flags: runhidden waituntilterminated skipifdoesntexist
|
||||
|
||||
[Code]
|
||||
function PrepareToInstall(var NeedsRestart: Boolean): String;
|
||||
var
|
||||
ResultCode: Integer;
|
||||
begin
|
||||
Exec(ExpandConstant('{commonappdata}\NzbDrone\bin\NzbDrone.Console.exe'), '/u', '', 0, ewWaitUntilTerminated, ResultCode)
|
||||
end;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Api.Test</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Api.Test</AssemblyName>
|
||||
<AssemblyName>Sonarr.Api.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Api.Test")]
|
||||
[assembly: AssemblyTitle("Sonarr.Api.Test")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Api.Test")]
|
||||
[assembly: AssemblyProduct("Sonarr.Api.Test")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Api</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Api</AssemblyName>
|
||||
<AssemblyName>Sonarr.Api</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle("NzbDrone.Api")]
|
||||
[assembly: AssemblyTitle("Sonarr.Api")]
|
||||
|
||||
[assembly: Guid("4c0922d7-979e-4ff7-b44b-b8ac2100eeb5")]
|
||||
|
||||
[assembly: AssemblyVersion("10.0.0.*")]
|
||||
|
||||
[assembly: InternalsVisibleTo("NzbDrone.Core")]
|
||||
[assembly: InternalsVisibleTo("Sonarr.Core")]
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.App.Test</RootNamespace>
|
||||
<AssemblyName>NzbDrone.App.Test</AssemblyName>
|
||||
<AssemblyName>Sonarr.App.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -20,11 +20,11 @@ namespace NzbDrone.App.Test
|
|||
.Returns(new ProcessInfo() { Id = CURRENT_PROCESS_ID });
|
||||
|
||||
Mocker.GetMock<IProcessProvider>()
|
||||
.Setup(s => s.FindProcessByName(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME))
|
||||
.Setup(s => s.FindProcessByName(ProcessProvider.SONARR_CONSOLE_PROCESS_NAME))
|
||||
.Returns(new List<ProcessInfo>());
|
||||
|
||||
Mocker.GetMock<IProcessProvider>()
|
||||
.Setup(s => s.FindProcessByName(ProcessProvider.NZB_DRONE_PROCESS_NAME))
|
||||
.Setup(s => s.FindProcessByName(ProcessProvider.SONARR_PROCESS_NAME))
|
||||
.Returns(new List<ProcessInfo>());
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ namespace NzbDrone.App.Test
|
|||
public void should_enforce_if_another_console_is_running()
|
||||
{
|
||||
Mocker.GetMock<IProcessProvider>()
|
||||
.Setup(c => c.FindProcessByName(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME))
|
||||
.Setup(c => c.FindProcessByName(ProcessProvider.SONARR_CONSOLE_PROCESS_NAME))
|
||||
.Returns(new List<ProcessInfo>
|
||||
{
|
||||
new ProcessInfo {Id = 10},
|
||||
|
@ -63,7 +63,7 @@ namespace NzbDrone.App.Test
|
|||
public void should_return_false_if_another_gui_is_running()
|
||||
{
|
||||
Mocker.GetMock<IProcessProvider>()
|
||||
.Setup(c => c.FindProcessByName(ProcessProvider.NZB_DRONE_PROCESS_NAME))
|
||||
.Setup(c => c.FindProcessByName(ProcessProvider.SONARR_PROCESS_NAME))
|
||||
.Returns(new List<ProcessInfo>
|
||||
{
|
||||
new ProcessInfo {Id = CURRENT_PROCESS_ID},
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.App.Test")]
|
||||
[assembly: AssemblyTitle("Sonarr.App.Test")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("NzbDrone.App.Test")]
|
||||
[assembly: AssemblyProduct("Sonarr.App.Test")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -3,6 +3,7 @@ using Moq;
|
|||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Common.Processes;
|
||||
using NzbDrone.Host;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
|
@ -22,14 +23,18 @@ namespace NzbDrone.App.Test
|
|||
public void Route_should_call_install_service_when_application_mode_is_install()
|
||||
{
|
||||
var serviceProviderMock = Mocker.GetMock<IServiceProvider>(MockBehavior.Strict);
|
||||
serviceProviderMock.Setup(c => c.Install(ServiceProvider.NZBDRONE_SERVICE_NAME));
|
||||
serviceProviderMock.Setup(c => c.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME)).Returns(false);
|
||||
serviceProviderMock.Setup(c => c.Start(ServiceProvider.NZBDRONE_SERVICE_NAME));
|
||||
serviceProviderMock.Setup(c => c.ServiceExist(ServiceProvider.SERVICE_NAME)).Returns(false);
|
||||
serviceProviderMock.Setup(c => c.Install(ServiceProvider.SERVICE_NAME));
|
||||
serviceProviderMock.Setup(c => c.SetPermissions(ServiceProvider.SERVICE_NAME));
|
||||
|
||||
Mocker.GetMock<IProcessProvider>()
|
||||
.Setup(c => c.SpawnNewProcess("sc.exe", It.IsAny<string>(), null, true));
|
||||
|
||||
Mocker.GetMock<IRuntimeInfo>().SetupGet(c => c.IsUserInteractive).Returns(true);
|
||||
|
||||
Subject.Route(ApplicationModes.InstallService);
|
||||
|
||||
serviceProviderMock.Verify(c => c.Install(ServiceProvider.NZBDRONE_SERVICE_NAME), Times.Once());
|
||||
serviceProviderMock.Verify(c => c.Install(ServiceProvider.SERVICE_NAME), Times.Once());
|
||||
}
|
||||
|
||||
|
||||
|
@ -37,13 +42,13 @@ namespace NzbDrone.App.Test
|
|||
public void Route_should_call_uninstall_service_when_application_mode_is_uninstall()
|
||||
{
|
||||
var serviceProviderMock = Mocker.GetMock<IServiceProvider>();
|
||||
serviceProviderMock.Setup(c => c.UnInstall(ServiceProvider.NZBDRONE_SERVICE_NAME));
|
||||
serviceProviderMock.Setup(c => c.UnInstall(ServiceProvider.SERVICE_NAME));
|
||||
Mocker.GetMock<IRuntimeInfo>().SetupGet(c => c.IsUserInteractive).Returns(true);
|
||||
serviceProviderMock.Setup(c => c.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME)).Returns(true);
|
||||
serviceProviderMock.Setup(c => c.ServiceExist(ServiceProvider.SERVICE_NAME)).Returns(true);
|
||||
|
||||
Subject.Route(ApplicationModes.UninstallService);
|
||||
|
||||
serviceProviderMock.Verify(c => c.UnInstall(ServiceProvider.NZBDRONE_SERVICE_NAME), Times.Once());
|
||||
serviceProviderMock.Verify(c => c.UnInstall(ServiceProvider.SERVICE_NAME), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -82,7 +87,7 @@ namespace NzbDrone.App.Test
|
|||
Mocker.GetMock<IRuntimeInfo>().SetupGet(c => c.IsUserInteractive).Returns(true);
|
||||
|
||||
consoleMock.Setup(c => c.PrintServiceAlreadyExist());
|
||||
serviceMock.Setup(c => c.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME)).Returns(true);
|
||||
serviceMock.Setup(c => c.ServiceExist(ServiceProvider.SERVICE_NAME)).Returns(true);
|
||||
|
||||
Subject.Route(ApplicationModes.InstallService);
|
||||
|
||||
|
@ -96,7 +101,7 @@ namespace NzbDrone.App.Test
|
|||
Mocker.GetMock<IRuntimeInfo>().SetupGet(c => c.IsUserInteractive).Returns(true);
|
||||
|
||||
consoleMock.Setup(c => c.PrintServiceDoesNotExist());
|
||||
serviceMock.Setup(c => c.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME)).Returns(false);
|
||||
serviceMock.Setup(c => c.ServiceExist(ServiceProvider.SERVICE_NAME)).Returns(false);
|
||||
|
||||
Subject.Route(ApplicationModes.UninstallService);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Automation.Test</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Automation.Test</AssemblyName>
|
||||
<AssemblyName>Sonarr.Automation.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Automation.Test")]
|
||||
[assembly: AssemblyTitle("Sonarr.Automation.Test")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Automation.Test")]
|
||||
[assembly: AssemblyProduct("Sonarr.Automation.Test")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Common.Test</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Common.Test</AssemblyName>
|
||||
<AssemblyName>Sonarr.Common.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.IO;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
|
@ -19,7 +19,7 @@ namespace NzbDrone.Common.Test
|
|||
{
|
||||
var fakeEnvironment = new Mock<IAppFolderInfo>();
|
||||
|
||||
fakeEnvironment.SetupGet(c => c.AppDataFolder).Returns(@"C:\NzbDrone\".AsOsAgnostic());
|
||||
fakeEnvironment.SetupGet(c => c.AppDataFolder).Returns(@"C:\Sonarr\".AsOsAgnostic());
|
||||
|
||||
fakeEnvironment.SetupGet(c => c.TempFolder).Returns(@"C:\Temp\".AsOsAgnostic());
|
||||
|
||||
|
@ -234,43 +234,43 @@ namespace NzbDrone.Common.Test
|
|||
[Test]
|
||||
public void AppDataDirectory_path_test()
|
||||
{
|
||||
GetIAppDirectoryInfo().GetAppDataPath().Should().BeEquivalentTo(@"C:\NzbDrone\".AsOsAgnostic());
|
||||
GetIAppDirectoryInfo().GetAppDataPath().Should().BeEquivalentTo(@"C:\Sonarr\".AsOsAgnostic());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Config_path_test()
|
||||
{
|
||||
GetIAppDirectoryInfo().GetConfigPath().Should().BeEquivalentTo(@"C:\NzbDrone\Config.xml".AsOsAgnostic());
|
||||
GetIAppDirectoryInfo().GetConfigPath().Should().BeEquivalentTo(@"C:\Sonarr\Config.xml".AsOsAgnostic());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Sandbox()
|
||||
{
|
||||
GetIAppDirectoryInfo().GetUpdateSandboxFolder().Should().BeEquivalentTo(@"C:\Temp\nzbdrone_update\".AsOsAgnostic());
|
||||
GetIAppDirectoryInfo().GetUpdateSandboxFolder().Should().BeEquivalentTo(@"C:\Temp\sonarr_update\".AsOsAgnostic());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetUpdatePackageFolder()
|
||||
{
|
||||
GetIAppDirectoryInfo().GetUpdatePackageFolder().Should().BeEquivalentTo(@"C:\Temp\nzbdrone_update\NzbDrone\".AsOsAgnostic());
|
||||
GetIAppDirectoryInfo().GetUpdatePackageFolder().Should().BeEquivalentTo(@"C:\Temp\sonarr_update\Sonarr\".AsOsAgnostic());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetUpdateClientFolder()
|
||||
{
|
||||
GetIAppDirectoryInfo().GetUpdateClientFolder().Should().BeEquivalentTo(@"C:\Temp\nzbdrone_update\NzbDrone\NzbDrone.Update\".AsOsAgnostic());
|
||||
GetIAppDirectoryInfo().GetUpdateClientFolder().Should().BeEquivalentTo(@"C:\Temp\sonarr_update\Sonarr\Sonarr.Update\".AsOsAgnostic());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetUpdateClientExePath()
|
||||
{
|
||||
GetIAppDirectoryInfo().GetUpdateClientExePath().Should().BeEquivalentTo(@"C:\Temp\nzbdrone_update\NzbDrone.Update.exe".AsOsAgnostic());
|
||||
GetIAppDirectoryInfo().GetUpdateClientExePath().Should().BeEquivalentTo(@"C:\Temp\sonarr_update\Sonarr.Update.exe".AsOsAgnostic());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetUpdateLogFolder()
|
||||
{
|
||||
GetIAppDirectoryInfo().GetUpdateLogFolder().Should().BeEquivalentTo(@"C:\NzbDrone\UpdateLogs\".AsOsAgnostic());
|
||||
GetIAppDirectoryInfo().GetUpdateLogFolder().Should().BeEquivalentTo(@"C:\Sonarr\UpdateLogs\".AsOsAgnostic());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common.Reflection;
|
||||
|
@ -12,7 +12,7 @@ namespace NzbDrone.Common.Test.ReflectionTests
|
|||
[Test]
|
||||
public void should_get_properties_from_models()
|
||||
{
|
||||
var models = Assembly.Load("NzbDrone.Core").ImplementationsOf<ModelBase>();
|
||||
var models = Assembly.Load("Sonarr.Core").ImplementationsOf<ModelBase>();
|
||||
|
||||
foreach (var model in models)
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ namespace NzbDrone.Common.Test.ReflectionTests
|
|||
[Test]
|
||||
public void should_be_able_to_get_implementations()
|
||||
{
|
||||
var models = Assembly.Load("NzbDrone.Core").ImplementationsOf<ModelBase>();
|
||||
var models = Assembly.Load("Sonarr.Core").ImplementationsOf<ModelBase>();
|
||||
|
||||
models.Should().NotBeEmpty();
|
||||
}
|
||||
|
|
|
@ -76,8 +76,8 @@ namespace NzbDrone.Common.Test
|
|||
[ManualTest]
|
||||
public void UnInstallService()
|
||||
{
|
||||
Subject.UnInstall(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
Subject.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME).Should().BeFalse();
|
||||
Subject.UnInstall(ServiceProvider.SERVICE_NAME);
|
||||
Subject.ServiceExist(ServiceProvider.SERVICE_NAME).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
@ -18,8 +18,8 @@ namespace NzbDrone.Common.Composition
|
|||
{
|
||||
_loadedTypes = new List<Type>();
|
||||
|
||||
assemblies.Add(OsInfo.IsWindows ? "NzbDrone.Windows" : "NzbDrone.Mono");
|
||||
assemblies.Add("NzbDrone.Common");
|
||||
assemblies.Add(OsInfo.IsWindows ? "Sonarr.Windows" : "Sonarr.Mono");
|
||||
assemblies.Add("Sonarr.Common");
|
||||
|
||||
foreach (var assembly in assemblies)
|
||||
{
|
||||
|
|
|
@ -21,8 +21,8 @@ namespace NzbDrone.Common
|
|||
Console.WriteLine();
|
||||
Console.WriteLine(" Usage: {0} <command> ", Process.GetCurrentProcess().MainModule.ModuleName);
|
||||
Console.WriteLine(" Commands:");
|
||||
Console.WriteLine(" /{0} Install the application as a Windows Service ({1}).", StartupContext.INSTALL_SERVICE, ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
Console.WriteLine(" /{0} Uninstall already installed Windows Service ({1}).", StartupContext.UNINSTALL_SERVICE, ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
Console.WriteLine(" /{0} Install the application as a Windows Service ({1}).", StartupContext.INSTALL_SERVICE, ServiceProvider.SERVICE_NAME);
|
||||
Console.WriteLine(" /{0} Uninstall already installed Windows Service ({1}).", StartupContext.UNINSTALL_SERVICE, ServiceProvider.SERVICE_NAME);
|
||||
Console.WriteLine(" /{0} Don't open Sonarr in a browser", StartupContext.NO_BROWSER);
|
||||
Console.WriteLine(" /{0} Start Sonarr terminating any other instances", StartupContext.TERMINATE);
|
||||
Console.WriteLine(" /{0}=path Path to use as the AppData location (stores database, config, logs, etc)", StartupContext.APPDATA);
|
||||
|
@ -31,12 +31,12 @@ namespace NzbDrone.Common
|
|||
|
||||
public void PrintServiceAlreadyExist()
|
||||
{
|
||||
Console.WriteLine("A service with the same name ({0}) already exists. Aborting installation", ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
Console.WriteLine("A service with the same name ({0}) already exists. Aborting installation", ServiceProvider.SERVICE_NAME);
|
||||
}
|
||||
|
||||
public void PrintServiceDoesNotExist()
|
||||
{
|
||||
Console.WriteLine("Can't find service ({0})", ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
Console.WriteLine("Can't find service ({0})", ServiceProvider.SERVICE_NAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@ namespace NzbDrone.Common.EnvironmentInfo
|
|||
|
||||
IsWindowsService = !IsUserInteractive &&
|
||||
OsInfo.IsWindows &&
|
||||
serviceProvider.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME) &&
|
||||
serviceProvider.GetStatus(ServiceProvider.NZBDRONE_SERVICE_NAME) == ServiceControllerStatus.StartPending;
|
||||
serviceProvider.ServiceExist(ServiceProvider.SERVICE_NAME) &&
|
||||
serviceProvider.GetStatus(ServiceProvider.SERVICE_NAME) == ServiceControllerStatus.StartPending;
|
||||
|
||||
//Guarded to avoid issues when running in a non-managed process
|
||||
var entry = Assembly.GetEntryAssembly();
|
||||
|
@ -29,7 +29,7 @@ namespace NzbDrone.Common.EnvironmentInfo
|
|||
if (entry != null)
|
||||
{
|
||||
ExecutingApplication = entry.Location;
|
||||
IsWindowsTray = entry.ManifestModule.Name == $"{ProcessProvider.NZB_DRONE_PROCESS_NAME}.exe";
|
||||
IsWindowsTray = entry.ManifestModule.Name == $"{ProcessProvider.SONARR_PROCESS_NAME}.exe";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ namespace NzbDrone.Common.EnvironmentInfo
|
|||
{
|
||||
if (OsInfo.IsWindows)
|
||||
{
|
||||
return IsUserInteractive && Process.GetCurrentProcess().ProcessName.Equals(ProcessProvider.NZB_DRONE_PROCESS_NAME, StringComparison.InvariantCultureIgnoreCase);
|
||||
return IsUserInteractive && Process.GetCurrentProcess().ProcessName.Equals(ProcessProvider.SONARR_PROCESS_NAME, StringComparison.InvariantCultureIgnoreCase);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -11,17 +11,17 @@ namespace NzbDrone.Common.Extensions
|
|||
public static class PathExtensions
|
||||
{
|
||||
private const string APP_CONFIG_FILE = "config.xml";
|
||||
private const string NZBDRONE_DB = "nzbdrone.db";
|
||||
private const string NZBDRONE_LOG_DB = "logs.db";
|
||||
private const string DB = "sonarr.db";
|
||||
private const string LOG_DB = "logs.db";
|
||||
private const string NLOG_CONFIG_FILE = "nlog.config";
|
||||
private const string UPDATE_CLIENT_EXE = "NzbDrone.Update.exe";
|
||||
private const string UPDATE_CLIENT_EXE = "Sonarr.Update.exe";
|
||||
private const string BACKUP_FOLDER = "Backups";
|
||||
|
||||
private static readonly string UPDATE_SANDBOX_FOLDER_NAME = "nzbdrone_update" + Path.DirectorySeparatorChar;
|
||||
private static readonly string UPDATE_PACKAGE_FOLDER_NAME = "NzbDrone" + Path.DirectorySeparatorChar;
|
||||
private static readonly string UPDATE_BACKUP_FOLDER_NAME = "nzbdrone_backup" + Path.DirectorySeparatorChar;
|
||||
private static readonly string UPDATE_BACKUP_APPDATA_FOLDER_NAME = "nzbdrone_appdata_backup" + Path.DirectorySeparatorChar;
|
||||
private static readonly string UPDATE_CLIENT_FOLDER_NAME = "NzbDrone.Update" + Path.DirectorySeparatorChar;
|
||||
private static readonly string UPDATE_SANDBOX_FOLDER_NAME = "sonarr_update" + Path.DirectorySeparatorChar;
|
||||
private static readonly string UPDATE_PACKAGE_FOLDER_NAME = "Sonarr" + Path.DirectorySeparatorChar;
|
||||
private static readonly string UPDATE_BACKUP_FOLDER_NAME = "sonarr_backup" + Path.DirectorySeparatorChar;
|
||||
private static readonly string UPDATE_BACKUP_APPDATA_FOLDER_NAME = "sonarr_appdata_backup" + Path.DirectorySeparatorChar;
|
||||
private static readonly string UPDATE_CLIENT_FOLDER_NAME = "Sonarr.Update" + Path.DirectorySeparatorChar;
|
||||
private static readonly string UPDATE_LOG_FOLDER_NAME = "UpdateLogs" + Path.DirectorySeparatorChar;
|
||||
|
||||
public static string CleanFilePath(this string path)
|
||||
|
@ -256,7 +256,7 @@ namespace NzbDrone.Common.Extensions
|
|||
|
||||
public static string GetUpdateBackupDatabase(this IAppFolderInfo appFolderInfo)
|
||||
{
|
||||
return Path.Combine(GetUpdateBackUpAppDataFolder(appFolderInfo), NZBDRONE_DB);
|
||||
return Path.Combine(GetUpdateBackUpAppDataFolder(appFolderInfo), DB);
|
||||
}
|
||||
|
||||
public static string GetUpdatePackageFolder(this IAppFolderInfo appFolderInfo)
|
||||
|
@ -279,14 +279,14 @@ namespace NzbDrone.Common.Extensions
|
|||
return Path.Combine(GetAppDataPath(appFolderInfo), BACKUP_FOLDER);
|
||||
}
|
||||
|
||||
public static string GetNzbDroneDatabase(this IAppFolderInfo appFolderInfo)
|
||||
public static string GetDatabase(this IAppFolderInfo appFolderInfo)
|
||||
{
|
||||
return Path.Combine(GetAppDataPath(appFolderInfo), NZBDRONE_DB);
|
||||
return Path.Combine(GetAppDataPath(appFolderInfo), DB);
|
||||
}
|
||||
|
||||
public static string GetLogDatabase(this IAppFolderInfo appFolderInfo)
|
||||
{
|
||||
return Path.Combine(GetAppDataPath(appFolderInfo), NZBDRONE_LOG_DB);
|
||||
return Path.Combine(GetAppDataPath(appFolderInfo), LOG_DB);
|
||||
}
|
||||
|
||||
public static string GetNlogConfigPath(this IAppFolderInfo appFolderInfo)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Common</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Common</AssemblyName>
|
||||
<AssemblyName>Sonarr.Common</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.IO;
|
||||
using NLog;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
|
@ -31,7 +31,7 @@ namespace NzbDrone.Common.Processes
|
|||
return;
|
||||
}
|
||||
|
||||
var filename = Path.Combine(_appFolderInfo.AppDataFolder, "nzbdrone.pid");
|
||||
var filename = Path.Combine(_appFolderInfo.AppDataFolder, "sonarr.pid");
|
||||
try
|
||||
{
|
||||
File.WriteAllText(filename, _processProvider.GetCurrentProcessId().ToString());
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
|
@ -8,7 +8,6 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Model;
|
||||
|
||||
namespace NzbDrone.Common.Processes
|
||||
|
@ -36,8 +35,8 @@ namespace NzbDrone.Common.Processes
|
|||
{
|
||||
private readonly Logger _logger;
|
||||
|
||||
public const string NZB_DRONE_PROCESS_NAME = "NzbDrone";
|
||||
public const string NZB_DRONE_CONSOLE_PROCESS_NAME = "NzbDrone.Console";
|
||||
public const string SONARR_PROCESS_NAME = "Sonarr";
|
||||
public const string SONARR_CONSOLE_PROCESS_NAME = "Sonarr.Console";
|
||||
|
||||
public ProcessProvider(Logger logger)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Common")]
|
||||
[assembly: AssemblyTitle("Sonarr.Common")]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("b6eaa144-e13b-42e5-a738-c60d89c0f728")]
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyConfiguration("debug")]
|
||||
|
||||
[assembly: AssemblyCompany("sonarr.tv")]
|
||||
[assembly: AssemblyProduct("NzbDrone")]
|
||||
[assembly: AssemblyProduct("Sonarr")]
|
||||
[assembly: AssemblyCopyright("GNU General Public v3")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
@ -7,7 +7,7 @@ namespace NzbDrone.Common.Reflection
|
|||
{
|
||||
public static class ReflectionExtensions
|
||||
{
|
||||
public static readonly Assembly CoreAssembly = Assembly.Load("NzbDrone.Core");
|
||||
public static readonly Assembly CoreAssembly = Assembly.Load("Sonarr.Core");
|
||||
|
||||
public static List<PropertyInfo> GetSimpleProperties(this Type type)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Configuration.Install;
|
||||
using System.Diagnostics;
|
||||
|
@ -25,7 +25,7 @@ namespace NzbDrone.Common
|
|||
|
||||
public class ServiceProvider : IServiceProvider
|
||||
{
|
||||
public const string NZBDRONE_SERVICE_NAME = "NzbDrone";
|
||||
public const string SERVICE_NAME = "Sonarr";
|
||||
|
||||
private readonly IProcessProvider _processProvider;
|
||||
private readonly Logger _logger;
|
||||
|
@ -78,7 +78,7 @@ namespace NzbDrone.Common
|
|||
serviceInstaller.Context = context;
|
||||
serviceInstaller.DisplayName = serviceName;
|
||||
serviceInstaller.ServiceName = serviceName;
|
||||
serviceInstaller.Description = "NzbDrone Application Server";
|
||||
serviceInstaller.Description = "Sonarr Application Server";
|
||||
serviceInstaller.StartType = ServiceStartMode.Automatic;
|
||||
serviceInstaller.ServicesDependedOn = new[] { "EventLog", "Tcpip", "http" };
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Console</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Console</AssemblyName>
|
||||
<AssemblyName>Sonarr.Console</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile>
|
||||
|
|
|
@ -5,7 +5,7 @@ using System.Runtime.InteropServices;
|
|||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
[assembly: AssemblyTitle("NzbDrone.Host")]
|
||||
[assembly: AssemblyTitle("Sonarr.Host")]
|
||||
[assembly: Guid("67AADCD9-89AA-4D95-8281-3193740E70E5")]
|
||||
|
||||
[assembly: AssemblyVersion("10.0.0.*")]
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Core.Test</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Core.Test</AssemblyName>
|
||||
<AssemblyName>Sonarr.Core.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
@ -6,11 +6,11 @@ using System.Runtime.InteropServices;
|
|||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
[assembly: AssemblyTitle("NzbDrone.Core.Test")]
|
||||
[assembly: AssemblyTitle("Sonarr.Core.Test")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Core.Test")]
|
||||
[assembly: AssemblyProduct("Sonarr.Core.Test")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
@ -27,4 +27,4 @@ using System.Runtime.InteropServices;
|
|||
|
||||
[assembly: AssemblyVersion("10.0.0.*")]
|
||||
|
||||
[assembly: InternalsVisibleTo("NzbDrone.Core")]
|
||||
[assembly: InternalsVisibleTo("Sonarr.Core")]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using FluentAssertions;
|
||||
|
@ -52,14 +52,14 @@ namespace NzbDrone.Core.Test.UpdateTests
|
|||
}
|
||||
|
||||
Mocker.GetMock<IAppFolderInfo>().SetupGet(c => c.TempFolder).Returns(TempFolder);
|
||||
Mocker.GetMock<IAppFolderInfo>().SetupGet(c => c.StartUpFolder).Returns(@"C:\NzbDrone".AsOsAgnostic);
|
||||
Mocker.GetMock<IAppFolderInfo>().SetupGet(c => c.AppDataFolder).Returns(@"C:\ProgramData\NzbDrone".AsOsAgnostic);
|
||||
Mocker.GetMock<IAppFolderInfo>().SetupGet(c => c.StartUpFolder).Returns(@"C:\Sonarr".AsOsAgnostic);
|
||||
Mocker.GetMock<IAppFolderInfo>().SetupGet(c => c.AppDataFolder).Returns(@"C:\ProgramData\Sonarr".AsOsAgnostic);
|
||||
|
||||
Mocker.GetMock<ICheckUpdateService>().Setup(c => c.AvailableUpdate()).Returns(_updatePackage);
|
||||
Mocker.GetMock<IVerifyUpdates>().Setup(c => c.Verify(It.IsAny<UpdatePackage>(), It.IsAny<string>())).Returns(true);
|
||||
|
||||
Mocker.GetMock<IProcessProvider>().Setup(c => c.GetCurrentProcess()).Returns(new ProcessInfo { Id = 12 });
|
||||
Mocker.GetMock<IRuntimeInfo>().Setup(c => c.ExecutingApplication).Returns(@"C:\Test\NzbDrone.exe");
|
||||
Mocker.GetMock<IRuntimeInfo>().Setup(c => c.ExecutingApplication).Returns(@"C:\Test\Sonarr.exe");
|
||||
|
||||
Mocker.GetMock<IConfigFileProvider>()
|
||||
.SetupGet(s => s.UpdateAutomatically)
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace NzbDrone.Core.Datastore
|
|||
{
|
||||
public ConnectionStringFactory(IAppFolderInfo appFolderInfo)
|
||||
{
|
||||
MainDbConnectionString = GetConnectionString(appFolderInfo.GetNzbDroneDatabase());
|
||||
MainDbConnectionString = GetConnectionString(appFolderInfo.GetDatabase());
|
||||
LogDbConnectionString = GetConnectionString(appFolderInfo.GetLogDatabase());
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace NzbDrone.Core.Download.Clients.Deluge
|
||||
namespace NzbDrone.Core.Download.Clients.Deluge
|
||||
{
|
||||
class DelugeTorrentStatus
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace NzbDrone.Core.Lifecycle
|
|||
|
||||
if (_runtimeInfo.IsWindowsService)
|
||||
{
|
||||
_serviceProvider.Stop(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
_serviceProvider.Stop(ServiceProvider.SERVICE_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ namespace NzbDrone.Core.Lifecycle
|
|||
|
||||
if (_runtimeInfo.IsWindowsService)
|
||||
{
|
||||
_serviceProvider.Restart(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
_serviceProvider.Restart(ServiceProvider.SERVICE_NAME);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Core</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Core</AssemblyName>
|
||||
<AssemblyName>Sonarr.Core</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
|
@ -1281,7 +1281,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="NzbDrone.Core.dll.config">
|
||||
<None Include="Sonarr.Core.dll.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
|
|
|
@ -6,11 +6,11 @@ using System.Runtime.InteropServices;
|
|||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
[assembly: AssemblyTitle("NzbDrone.Core")]
|
||||
[assembly: AssemblyTitle("Sonarr.Core")]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("3C29FEF7-4B07-49ED-822E-1C29DC49BFAB")]
|
||||
|
||||
[assembly: AssemblyVersion("10.0.0.*")]
|
||||
|
||||
[assembly: InternalsVisibleTo("NzbDrone.Core.Test")]
|
||||
[assembly: InternalsVisibleTo("Sonarr.Core.Test")]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using NLog;
|
||||
|
@ -167,7 +167,7 @@ namespace NzbDrone.Core.Update
|
|||
throw new UpdateFailedException("Update Script: '{0}' does not exist", scriptPath);
|
||||
}
|
||||
|
||||
_logger.Info("Removing NzbDrone.Update");
|
||||
_logger.Info("Removing Sonarr.Update");
|
||||
_diskProvider.DeleteFolder(_appFolderInfo.GetUpdateClientFolder(), true);
|
||||
|
||||
_logger.ProgressInfo("Starting update script: {0}", _configFileProvider.UpdateScriptPath);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Nancy.Bootstrapper;
|
||||
using Sonarr.Http;
|
||||
using NzbDrone.Common.Composition;
|
||||
|
@ -14,10 +14,10 @@ namespace NzbDrone.Host
|
|||
{
|
||||
var assemblies = new List<string>
|
||||
{
|
||||
"NzbDrone.Host",
|
||||
"NzbDrone.Core",
|
||||
"NzbDrone.Api",
|
||||
"NzbDrone.SignalR",
|
||||
"Sonarr.Host",
|
||||
"Sonarr.Core",
|
||||
"Sonarr.Api",
|
||||
"Sonarr.SignalR",
|
||||
"Sonarr.Api.V3",
|
||||
"Sonarr.Http"
|
||||
};
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Host</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Host</AssemblyName>
|
||||
<AssemblyName>Sonarr.Host</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
[assembly: AssemblyTitle("NzbDrone.exe")]
|
||||
[assembly: AssemblyTitle("Sonarr.exe")]
|
||||
[assembly: Guid("C2172AF4-F9A6-4D91-BAEE-C2E4EE680613")]
|
||||
|
||||
[assembly: AssemblyVersion("10.0.0.*")]
|
||||
|
|
|
@ -51,27 +51,27 @@ namespace NzbDrone.Host
|
|||
case ApplicationModes.InstallService:
|
||||
{
|
||||
_logger.Debug("Install Service selected");
|
||||
if (_serviceProvider.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME))
|
||||
if (_serviceProvider.ServiceExist(ServiceProvider.SERVICE_NAME))
|
||||
{
|
||||
_consoleService.PrintServiceAlreadyExist();
|
||||
}
|
||||
else
|
||||
{
|
||||
_serviceProvider.Install(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
_serviceProvider.Start(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
_serviceProvider.Install(ServiceProvider.SERVICE_NAME);
|
||||
_serviceProvider.Start(ServiceProvider.SERVICE_NAME);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ApplicationModes.UninstallService:
|
||||
{
|
||||
_logger.Debug("Uninstall Service selected");
|
||||
if (!_serviceProvider.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME))
|
||||
if (!_serviceProvider.ServiceExist(ServiceProvider.SERVICE_NAME))
|
||||
{
|
||||
_consoleService.PrintServiceDoesNotExist();
|
||||
}
|
||||
else
|
||||
{
|
||||
_serviceProvider.UnInstall(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
_serviceProvider.UnInstall(ServiceProvider.SERVICE_NAME);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -65,8 +65,8 @@ namespace NzbDrone.Host
|
|||
{
|
||||
var currentId = _processProvider.GetCurrentProcess().Id;
|
||||
|
||||
var otherProcesses = _processProvider.FindProcessByName(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME)
|
||||
.Union(_processProvider.FindProcessByName(ProcessProvider.NZB_DRONE_PROCESS_NAME))
|
||||
var otherProcesses = _processProvider.FindProcessByName(ProcessProvider.SONARR_CONSOLE_PROCESS_NAME)
|
||||
.Union(_processProvider.FindProcessByName(ProcessProvider.SONARR_PROCESS_NAME))
|
||||
.Select(c => c.Id)
|
||||
.Except(new[] { currentId })
|
||||
.ToList();
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Integration.Test</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Integration.Test</AssemblyName>
|
||||
<AssemblyName>Sonarr.Integration.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Smoke.Test")]
|
||||
[assembly: AssemblyTitle("Sonarr.Smoke.Test")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Smoke.Test")]
|
||||
[assembly: AssemblyProduct("Sonarr.Smoke.Test")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Libraries.Test</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Libraries.Test</AssemblyName>
|
||||
<AssemblyName>Sonarr.Libraries.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Libraries.Test")]
|
||||
[assembly: AssemblyTitle("Sonarr.Libraries.Test")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Libraries.Test")]
|
||||
[assembly: AssemblyProduct("Sonarr.Libraries.Test")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Mono.Test</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Mono.Test</AssemblyName>
|
||||
<AssemblyName>Sonarr.Mono.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Mono.Test")]
|
||||
[assembly: AssemblyTitle("Sonarr.Mono.Test")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Mono.Test")]
|
||||
[assembly: AssemblyProduct("Sonarr.Mono.Test")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Mono</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Mono</AssemblyName>
|
||||
<AssemblyName>Sonarr.Mono</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Mono")]
|
||||
[assembly: AssemblyTitle("Sonarr.Mono")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Mono")]
|
||||
[assembly: AssemblyProduct("Sonarr.Mono")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.SignalR</RootNamespace>
|
||||
<AssemblyName>NzbDrone.SignalR</AssemblyName>
|
||||
<AssemblyName>Sonarr.SignalR</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.SignalR")]
|
||||
[assembly: AssemblyTitle("Sonarr.SignalR")]
|
||||
[assembly: Guid("98bd985a-4f23-4201-8ed3-f6f3d7f2a5fe")]
|
||||
|
||||
[assembly: AssemblyVersion("10.0.0.*")]
|
||||
|
|
|
@ -171,11 +171,11 @@ namespace NzbDrone.Test.Common.AutoMoq
|
|||
|
||||
private void RegisterPlatformLibrary(IUnityContainer container)
|
||||
{
|
||||
var assemblyName = "NzbDrone.Windows";
|
||||
var assemblyName = "Sonarr.Windows";
|
||||
|
||||
if (OsInfo.IsNotWindows)
|
||||
{
|
||||
assemblyName = "NzbDrone.Mono";
|
||||
assemblyName = "Sonarr.Mono";
|
||||
}
|
||||
|
||||
if (!File.Exists(assemblyName + ".dll"))
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Test.Common</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Test.Common</AssemblyName>
|
||||
<AssemblyName>Sonarr.Test.Common</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
@ -32,20 +32,15 @@ namespace NzbDrone.Test.Common
|
|||
{
|
||||
AppData = Path.Combine(TestContext.CurrentContext.TestDirectory, "_intg_" + DateTime.Now.Ticks);
|
||||
|
||||
var nzbdroneConsoleExe = "NzbDrone.Console.exe";
|
||||
|
||||
if (OsInfo.IsNotWindows)
|
||||
{
|
||||
nzbdroneConsoleExe = "NzbDrone.exe";
|
||||
}
|
||||
var sonarrConsoleExe = OsInfo.IsWindows ? "Sonarr.Console.exe" : "Sonarr.exe";
|
||||
|
||||
if (BuildInfo.IsDebug)
|
||||
{
|
||||
Start(Path.Combine(TestContext.CurrentContext.TestDirectory, "..\\..\\..\\..\\..\\_output\\NzbDrone.Console.exe"));
|
||||
Start(Path.Combine(TestContext.CurrentContext.TestDirectory, "..\\..\\..\\..\\..\\_output\\Sonarr.Console.exe"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Start(Path.Combine("bin", nzbdroneConsoleExe));
|
||||
Start(Path.Combine("bin", sonarrConsoleExe));
|
||||
}
|
||||
|
||||
while (true)
|
||||
|
@ -84,8 +79,8 @@ namespace NzbDrone.Test.Common
|
|||
_processProvider.Kill(_nzbDroneProcess.Id);
|
||||
}
|
||||
|
||||
_processProvider.KillAll(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME);
|
||||
_processProvider.KillAll(ProcessProvider.NZB_DRONE_PROCESS_NAME);
|
||||
_processProvider.KillAll(ProcessProvider.SONARR_CONSOLE_PROCESS_NAME);
|
||||
_processProvider.KillAll(ProcessProvider.SONARR_PROCESS_NAME);
|
||||
}
|
||||
|
||||
private void Start(string outputNzbdroneConsoleExe)
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Test.Common")]
|
||||
[assembly: AssemblyTitle("Sonarr.Test.Common")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Test.Common")]
|
||||
[assembly: AssemblyProduct("Sonarr.Test.Common")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace NzbDrone.Test.Dummy
|
||||
{
|
||||
public class DummyApp
|
||||
{
|
||||
public const string DUMMY_PROCCESS_NAME = "NzbDrone.Test.Dummy";
|
||||
public const string DUMMY_PROCCESS_NAME = "Sonarr.Test.Dummy";
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Test.Dummy</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Test.Dummy</AssemblyName>
|
||||
<AssemblyName>Sonarr.Test.Dummy</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Test.Dummy")]
|
||||
[assembly: AssemblyTitle("Sonarr.Test.Dummy")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Test.Dummy")]
|
||||
[assembly: AssemblyProduct("Sonarr.Test.Dummy")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Update.Test</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Update.Test</AssemblyName>
|
||||
<AssemblyName>Sonarr.Update.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common.Model;
|
||||
|
@ -34,7 +34,7 @@ namespace NzbDrone.Update.Test
|
|||
[Test]
|
||||
public void should_call_update_with_correct_path()
|
||||
{
|
||||
var ProcessPath = @"C:\NzbDrone\nzbdrone.exe".AsOsAgnostic();
|
||||
var ProcessPath = @"C:\Sonarr\Sonarr.exe".AsOsAgnostic();
|
||||
|
||||
Mocker.GetMock<IProcessProvider>().Setup(c => c.GetProcessById(12))
|
||||
.Returns(new ProcessInfo() { StartPath = ProcessPath });
|
||||
|
@ -43,7 +43,7 @@ namespace NzbDrone.Update.Test
|
|||
Subject.Start(new[] { "12", "", ProcessPath });
|
||||
|
||||
|
||||
Mocker.GetMock<IInstallUpdateService>().Verify(c => c.Start(@"C:\NzbDrone".AsOsAgnostic(), 12), Times.Once());
|
||||
Mocker.GetMock<IInstallUpdateService>().Verify(c => c.Start(@"C:\Sonarr".AsOsAgnostic(), 12), Times.Once());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Update.Test")]
|
||||
[assembly: AssemblyTitle("Sonarr.Update.Test")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Update.Test")]
|
||||
[assembly: AssemblyProduct("Sonarr.Update.Test")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common;
|
||||
|
@ -16,23 +16,23 @@ namespace NzbDrone.Update.Test
|
|||
[Test]
|
||||
public void should_start_service_if_app_type_was_serivce()
|
||||
{
|
||||
const string targetFolder = "c:\\NzbDrone\\";
|
||||
const string targetFolder = "c:\\Sonarr\\";
|
||||
|
||||
Subject.Start(AppType.Service, targetFolder);
|
||||
|
||||
Mocker.GetMock<IServiceProvider>().Verify(c => c.Start(ServiceProvider.NZBDRONE_SERVICE_NAME), Times.Once());
|
||||
Mocker.GetMock<IServiceProvider>().Verify(c => c.Start(ServiceProvider.SERVICE_NAME), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_start_console_if_app_type_was_service_but_start_failed_because_of_permissions()
|
||||
{
|
||||
const string targetFolder = "c:\\NzbDrone\\";
|
||||
const string targetFolder = "c:\\Sonarr\\";
|
||||
|
||||
Mocker.GetMock<IServiceProvider>().Setup(c => c.Start(ServiceProvider.NZBDRONE_SERVICE_NAME)).Throws(new InvalidOperationException());
|
||||
Mocker.GetMock<IServiceProvider>().Setup(c => c.Start(ServiceProvider.SERVICE_NAME)).Throws(new InvalidOperationException());
|
||||
|
||||
Subject.Start(AppType.Service, targetFolder);
|
||||
|
||||
Mocker.GetMock<IProcessProvider>().Verify(c => c.SpawnNewProcess("c:\\NzbDrone\\NzbDrone.Console.exe", "/" + StartupContext.NO_BROWSER, null), Times.Once());
|
||||
Mocker.GetMock<IProcessProvider>().Verify(c => c.SpawnNewProcess("c:\\Sonarr\\Sonarr.Console.exe", "/" + StartupContext.NO_BROWSER, null), Times.Once());
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
@ -42,14 +42,14 @@ namespace NzbDrone.Update.Test
|
|||
private void WithInstalledService()
|
||||
{
|
||||
Mocker.GetMock<IServiceProvider>()
|
||||
.Setup(c => c.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME))
|
||||
.Setup(c => c.ServiceExist(ServiceProvider.SERVICE_NAME))
|
||||
.Returns(true);
|
||||
}
|
||||
|
||||
private void WithServiceRunning(bool state)
|
||||
{
|
||||
Mocker.GetMock<IServiceProvider>()
|
||||
.Setup(c => c.IsServiceRunning(ServiceProvider.NZBDRONE_SERVICE_NAME)).Returns(state);
|
||||
.Setup(c => c.IsServiceRunning(ServiceProvider.SERVICE_NAME)).Returns(state);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -62,7 +62,7 @@ namespace NzbDrone.Update.Test
|
|||
Mocker.Resolve<InstallUpdateService>().Start(TARGET_FOLDER);
|
||||
|
||||
|
||||
Mocker.GetMock<IServiceProvider>().Verify(c => c.Stop(ServiceProvider.NZBDRONE_SERVICE_NAME), Times.Once());
|
||||
Mocker.GetMock<IServiceProvider>().Verify(c => c.Stop(ServiceProvider.SERVICE_NAME), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -75,7 +75,7 @@ namespace NzbDrone.Update.Test
|
|||
Mocker.Resolve<InstallUpdateService>().Start(TARGET_FOLDER);
|
||||
|
||||
|
||||
Mocker.GetMock<IServiceProvider>().Verify(c => c.Stop(ServiceProvider.NZBDRONE_SERVICE_NAME), Times.Never());
|
||||
Mocker.GetMock<IServiceProvider>().Verify(c => c.Stop(ServiceProvider.SERVICE_NAME), Times.Never());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -220,7 +220,7 @@ namespace NzbDrone.Update.Test
|
|||
private void VerifyServiceRestart()
|
||||
{
|
||||
Mocker.GetMock<IServiceProvider>()
|
||||
.Verify(c => c.Start(ServiceProvider.NZBDRONE_SERVICE_NAME), Times.Once());
|
||||
.Verify(c => c.Start(ServiceProvider.SERVICE_NAME), Times.Once());
|
||||
|
||||
Mocker.GetMock<IProcessProvider>()
|
||||
.Verify(c => c.Start(It.IsAny<string>()), Times.Never());
|
||||
|
@ -232,7 +232,7 @@ namespace NzbDrone.Update.Test
|
|||
.Verify(c => c.Start(It.IsAny<string>()), Times.Never());
|
||||
|
||||
Mocker.GetMock<IProcessProvider>()
|
||||
.Verify(c => c.Start(TARGET_FOLDER + "NzbDrone.exe"), Times.Once());
|
||||
.Verify(c => c.Start(TARGET_FOLDER + "Sonarr.exe"), Times.Once());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Update</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Update</AssemblyName>
|
||||
<AssemblyName>Sonarr.Update</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\_output\NzbDrone.Update\</OutputPath>
|
||||
<OutputPath>..\..\_output\Sonarr.Update\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\_output\NzbDrone.Update\</OutputPath>
|
||||
<OutputPath>..\..\_output\Sonarr.Update\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Update")]
|
||||
[assembly: AssemblyTitle("Sonarr.Update")]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("e4560a3d-8053-4d57-a260-bfe52f4cc357")]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Common.Composition;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Common.Http.Dispatchers;
|
||||
|
@ -17,7 +17,7 @@ namespace NzbDrone.Update
|
|||
{
|
||||
var assemblies = new List<string>
|
||||
{
|
||||
"NzbDrone.Update"
|
||||
"Sonarr.Update"
|
||||
};
|
||||
|
||||
return new UpdateContainerBuilder(startupContext, assemblies).Container;
|
||||
|
|
|
@ -43,11 +43,10 @@ namespace NzbDrone.Update.UpdateEngine
|
|||
_diskProvider.CreateFolder(backupFolderAppData);
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
_diskTransferService.TransferFile(_appFolderInfo.GetConfigPath(), _appFolderInfo.GetUpdateBackupConfigFile(), TransferMode.Copy);
|
||||
_diskTransferService.TransferFile(_appFolderInfo.GetNzbDroneDatabase(), _appFolderInfo.GetUpdateBackupDatabase(), TransferMode.Copy);
|
||||
_diskTransferService.TransferFile(_appFolderInfo.GetDatabase(), _appFolderInfo.GetUpdateBackupDatabase(), TransferMode.Copy);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -28,13 +28,13 @@ namespace NzbDrone.Update.UpdateEngine
|
|||
return AppType.Normal;
|
||||
}
|
||||
|
||||
if (_serviceProvider.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME)
|
||||
&& _serviceProvider.IsServiceRunning(ServiceProvider.NZBDRONE_SERVICE_NAME))
|
||||
if (_serviceProvider.ServiceExist(ServiceProvider.SERVICE_NAME)
|
||||
&& _serviceProvider.IsServiceRunning(ServiceProvider.SERVICE_NAME))
|
||||
{
|
||||
return AppType.Service;
|
||||
}
|
||||
|
||||
if (_processProvider.Exists(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME))
|
||||
if (_processProvider.Exists(ProcessProvider.SONARR_CONSOLE_PROCESS_NAME))
|
||||
{
|
||||
return AppType.Console;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace NzbDrone.Update.UpdateEngine
|
|||
{
|
||||
try
|
||||
{
|
||||
var targetExecutable = Path.Combine(targetFolder, "NzbDrone.exe");
|
||||
var targetExecutable = Path.Combine(targetFolder, "Sonarr.exe");
|
||||
|
||||
if (File.Exists(targetExecutable))
|
||||
{
|
||||
|
|
|
@ -86,8 +86,8 @@ namespace NzbDrone.Update.UpdateEngine
|
|||
|
||||
var appType = _detectApplicationType.GetAppType();
|
||||
|
||||
_processProvider.FindProcessByName(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME);
|
||||
_processProvider.FindProcessByName(ProcessProvider.NZB_DRONE_PROCESS_NAME);
|
||||
_processProvider.FindProcessByName(ProcessProvider.SONARR_CONSOLE_PROCESS_NAME);
|
||||
_processProvider.FindProcessByName(ProcessProvider.SONARR_PROCESS_NAME);
|
||||
|
||||
if (OsInfo.IsWindows)
|
||||
{
|
||||
|
@ -101,7 +101,7 @@ namespace NzbDrone.Update.UpdateEngine
|
|||
|
||||
if (OsInfo.IsWindows)
|
||||
{
|
||||
if (_processProvider.Exists(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME) || _processProvider.Exists(ProcessProvider.NZB_DRONE_PROCESS_NAME))
|
||||
if (_processProvider.Exists(ProcessProvider.SONARR_CONSOLE_PROCESS_NAME) || _processProvider.Exists(ProcessProvider.SONARR_PROCESS_NAME))
|
||||
{
|
||||
_logger.Error("Sonarr was restarted prematurely by external process.");
|
||||
return;
|
||||
|
@ -141,14 +141,14 @@ namespace NzbDrone.Update.UpdateEngine
|
|||
{
|
||||
System.Threading.Thread.Sleep(1000);
|
||||
|
||||
if (_processProvider.Exists(ProcessProvider.NZB_DRONE_PROCESS_NAME))
|
||||
if (_processProvider.Exists(ProcessProvider.SONARR_PROCESS_NAME))
|
||||
{
|
||||
_logger.Info("Sonarr was restarted by external process.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!_processProvider.Exists(ProcessProvider.NZB_DRONE_PROCESS_NAME))
|
||||
if (!_processProvider.Exists(ProcessProvider.SONARR_PROCESS_NAME))
|
||||
{
|
||||
_startNzbDrone.Start(appType, installationFolder);
|
||||
}
|
||||
|
|
|
@ -57,17 +57,17 @@ namespace NzbDrone.Update.UpdateEngine
|
|||
private void StartService()
|
||||
{
|
||||
_logger.Info("Starting NzbDrone service");
|
||||
_serviceProvider.Start(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
_serviceProvider.Start(ServiceProvider.SERVICE_NAME);
|
||||
}
|
||||
|
||||
private void StartWinform(string installationFolder)
|
||||
{
|
||||
Start(installationFolder, "NzbDrone.exe");
|
||||
Start(installationFolder, "Sonarr.exe");
|
||||
}
|
||||
|
||||
private void StartConsole(string installationFolder)
|
||||
{
|
||||
Start(installationFolder, "NzbDrone.Console.exe");
|
||||
Start(installationFolder, "Sonarr.Console.exe");
|
||||
}
|
||||
|
||||
private void Start(string installationFolder, string fileName)
|
||||
|
|
|
@ -31,13 +31,13 @@ namespace NzbDrone.Update.UpdateEngine
|
|||
{
|
||||
_logger.Info("Stopping all running services");
|
||||
|
||||
if (_serviceProvider.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME)
|
||||
&& _serviceProvider.IsServiceRunning(ServiceProvider.NZBDRONE_SERVICE_NAME))
|
||||
if (_serviceProvider.ServiceExist(ServiceProvider.SERVICE_NAME)
|
||||
&& _serviceProvider.IsServiceRunning(ServiceProvider.SERVICE_NAME))
|
||||
{
|
||||
try
|
||||
{
|
||||
_logger.Info("NzbDrone Service is installed and running");
|
||||
_serviceProvider.Stop(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||
_serviceProvider.Stop(ServiceProvider.SERVICE_NAME);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -47,15 +47,15 @@ namespace NzbDrone.Update.UpdateEngine
|
|||
|
||||
_logger.Info("Killing all running processes");
|
||||
|
||||
_processProvider.KillAll(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME);
|
||||
_processProvider.KillAll(ProcessProvider.NZB_DRONE_PROCESS_NAME);
|
||||
_processProvider.KillAll(ProcessProvider.SONARR_CONSOLE_PROCESS_NAME);
|
||||
_processProvider.KillAll(ProcessProvider.SONARR_PROCESS_NAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.Info("Killing all running processes");
|
||||
|
||||
_processProvider.KillAll(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME);
|
||||
_processProvider.KillAll(ProcessProvider.NZB_DRONE_PROCESS_NAME);
|
||||
_processProvider.KillAll(ProcessProvider.SONARR_CONSOLE_PROCESS_NAME);
|
||||
_processProvider.KillAll(ProcessProvider.SONARR_PROCESS_NAME);
|
||||
|
||||
_processProvider.Kill(processId);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Windows.Test</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Windows.Test</AssemblyName>
|
||||
<AssemblyName>Sonarr.Windows.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Windows.Test")]
|
||||
[assembly: AssemblyTitle("Sonarr.Windows.Test")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Windows.Test")]
|
||||
[assembly: AssemblyProduct("Sonarr.Windows.Test")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone.Windows</RootNamespace>
|
||||
<AssemblyName>NzbDrone.Windows</AssemblyName>
|
||||
<AssemblyName>Sonarr.Windows</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Runtime.InteropServices;
|
|||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("NzbDrone.Windows")]
|
||||
[assembly: AssemblyTitle("Sonarr.Windows")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NzbDrone.Windows")]
|
||||
[assembly: AssemblyProduct("Sonarr.Windows")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NzbDrone</RootNamespace>
|
||||
<AssemblyName>NzbDrone</AssemblyName>
|
||||
<AssemblyName>Sonarr</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
[assembly: AssemblyTitle("NzbDrone.exe")]
|
||||
[assembly: AssemblyTitle("Sonarr.exe")]
|
||||
[assembly: Guid("67AADCD9-89AA-4D95-8281-3193740E70E5")]
|
||||
|
||||
[assembly: AssemblyVersion("10.0.0.*")]
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace ServiceInstall
|
|||
{
|
||||
public static class ServiceHelper
|
||||
{
|
||||
private static string NzbDroneExe => Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName, "NzbDrone.Console.exe");
|
||||
private static string SonarrExe => Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName, "Sonarr.Console.exe");
|
||||
|
||||
private static bool IsAnAdministrator()
|
||||
{
|
||||
|
@ -18,9 +18,9 @@ namespace ServiceInstall
|
|||
|
||||
public static void Run(string arg)
|
||||
{
|
||||
if (!File.Exists(NzbDroneExe))
|
||||
if (!File.Exists(SonarrExe))
|
||||
{
|
||||
Console.WriteLine("Unable to find NzbDrone.Console.exe in the current directory.");
|
||||
Console.WriteLine("Unable to find Sonarr.Console.exe in the current directory.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace ServiceInstall
|
|||
|
||||
var startInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = NzbDroneExe,
|
||||
FileName = SonarrExe,
|
||||
Arguments = arg,
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace ServiceUninstall
|
|||
{
|
||||
public static class ServiceHelper
|
||||
{
|
||||
private static string NzbDroneExe => Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName, "NzbDrone.Console.exe");
|
||||
private static string SonarrExe => Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName, "Sonarr.Console.exe");
|
||||
|
||||
private static bool IsAnAdministrator()
|
||||
{
|
||||
|
@ -18,9 +18,9 @@ namespace ServiceUninstall
|
|||
|
||||
public static void Run(string arg)
|
||||
{
|
||||
if (!File.Exists(NzbDroneExe))
|
||||
if (!File.Exists(SonarrExe))
|
||||
{
|
||||
Console.WriteLine("Unable to find NzbDrone.exe in the current directory.");
|
||||
Console.WriteLine("Unable to find Sonarr.exe in the current directory.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace ServiceUninstall
|
|||
|
||||
var startInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = NzbDroneExe,
|
||||
FileName = SonarrExe,
|
||||
Arguments = arg,
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle("NzbDrone.Api")]
|
||||
[assembly: AssemblyTitle("Sonarr.Api")]
|
||||
|
||||
[assembly: Guid("4c0922d7-979e-4ff7-b44b-b8ac2100eeb5")]
|
||||
|
||||
[assembly: AssemblyVersion("10.0.0.*")]
|
||||
|
||||
[assembly: InternalsVisibleTo("NzbDrone.Core")]
|
||||
[assembly: InternalsVisibleTo("Sonarr.Core")]
|
||||
|
|
Loading…
Reference in New Issue