Skip to content

Commit

Permalink
Merge remote-tracking branch 'dropbox/master' into ironpython
Browse files Browse the repository at this point in the history
  • Loading branch information
brunomlopes committed Aug 15, 2011
2 parents 885825e + f29ae4a commit 8f3368b
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 15 deletions.
12 changes: 6 additions & 6 deletions .gitignore
Expand Up @@ -2,9 +2,9 @@
#ignore thumbnails created by windows #ignore thumbnails created by windows
Thumbs.db Thumbs.db
#Ignore files build by Visual Studio #Ignore files build by Visual Studio
*.obj src/*/*.obj
*.exe src/*/*.exe
*.pdb src/*/*.pdb
*.user *.user
*.aps *.aps
*.pch *.pch
Expand All @@ -19,11 +19,11 @@ Thumbs.db
*.cache *.cache
*.ilk *.ilk
*.log *.log
[Bb]in src/*/[Bb]in
[Dd]ebug*/ src/*/[Dd]ebug*/
*.lib *.lib
*.sbr *.sbr
obj/ src/*/obj/
[Rr]elease*/ [Rr]elease*/
_ReSharper*/ _ReSharper*/
[Tt]est[Rr]esult* [Tt]est[Rr]esult*
Expand Down
11 changes: 8 additions & 3 deletions default.ps1
Expand Up @@ -25,7 +25,6 @@ Task Build-Package -depends Update-Solution-Assembly-Info -description "Builds a
Remove-Item $outputDir -recurse -force Remove-Item $outputDir -recurse -force
} }
$packageDir = $package_path $packageDir = $package_path
$appcast_path = "$packageDir\appcast.xml"


Exec { msbuild /t:clean /p:Configuration=Release /p:OutDir=$outputDir\ } Exec { msbuild /t:clean /p:Configuration=Release /p:OutDir=$outputDir\ }
Exec { msbuild /t:build /p:Configuration=Release /p:OutDir=$outputDir\ } Exec { msbuild /t:build /p:Configuration=Release /p:OutDir=$outputDir\ }
Expand All @@ -48,7 +47,8 @@ Task Build-Package -depends Update-Solution-Assembly-Info -description "Builds a
$zip = Write-Zip .\* $package_path -level 9 $zip = Write-Zip .\* $package_path -level 9
Pop-Location Pop-Location
Write-Host "File is up at $zip" Write-Host "File is up at $zip"


$appcast_path = "$packageDir\appcast.xml"
Generate-Appcast-Item ` Generate-Appcast-Item `
-version $version ` -version $version `
-package_url $dropbox_base_url ` -package_url $dropbox_base_url `
Expand Down Expand Up @@ -181,7 +181,12 @@ function Get-Next-Version


$last_versions = $last_version_tag.split("_")[1].split(".") | foreach { [int]$_} $last_versions = $last_version_tag.split("_")[1].split(".") | foreach { [int]$_}
if ($description.Length -eq 3) { if ($description.Length -eq 3) {
$last_versions[$version_index_to_increase]++ $last_versions[$version_index_to_increase] += 1
$i = $version_index_to_increase+1
while($i -lt 4){
$last_versions[$i] = 0
$i += 1
}
} }


return [string]::join(".", $last_versions) return [string]::join(".", $last_versions)
Expand Down
Binary file modified lib/nappupdate/NAppUpdate.Framework.dll
Binary file not shown.
Binary file added lib/nappupdate/NAppUpdate.Framework.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/nappupdate/version.txt
@@ -1 +1 @@
64fec695ceb6b7f3e6cc4c7af36c7a95132cbd52 d2271a684ded08d1ae2bb1e44b397866c679b28f
7 changes: 3 additions & 4 deletions src/Shell/ApplicationBootstrapper.cs
Expand Up @@ -119,6 +119,8 @@ protected override void ConfigureContainer(ContainerBuilder builder)
builder.RegisterType<ScheduleUpdateCheckJob>().As<IStartupTask>(); builder.RegisterType<ScheduleUpdateCheckJob>().As<IStartupTask>();
builder.RegisterType<IronPythonCommandsMefExport>().As<IStartupTask>(); builder.RegisterType<IronPythonCommandsMefExport>().As<IStartupTask>();


builder.RegisterType<Shutdown>().AsSelf();

builder.RegisterType<SeparateIndexesDirectoryFactory>() builder.RegisterType<SeparateIndexesDirectoryFactory>()
.As<IDirectoryFactory>().WithParameter("root", indexStorageLocation) .As<IDirectoryFactory>().WithParameter("root", indexStorageLocation)
.SingleInstance(); .SingleInstance();
Expand Down Expand Up @@ -152,10 +154,7 @@ private void ExecuteStartupTasks()


protected override void OnExit(object sender, EventArgs e) protected override void OnExit(object sender, EventArgs e)
{ {
Container.Resolve<IScheduler>().Shutdown(); Container.Resolve<Shutdown>().Now();
var elevatedChannel = new ElevatedChannel<IStopTheElevationHelper>();
if (elevatedChannel.ElevationProcessExists())
elevatedChannel.GetElevatedHandler().Stop();


base.OnExit(sender, e); base.OnExit(sender, e);
} }
Expand Down
24 changes: 24 additions & 0 deletions src/Shell/Infrastructure/Shutdown.cs
@@ -0,0 +1,24 @@
using ElevationHelper.Services;
using ElevationHelper.Services.Infrastructure;
using Quartz;

namespace ILoveLucene.Infrastructure
{
public class Shutdown
{
private readonly IScheduler _scheduler;

public Shutdown(IScheduler scheduler)
{
_scheduler = scheduler;
}

public void Now()
{
_scheduler.Shutdown(false);
var elevatedChannel = new ElevatedChannel<IStopTheElevationHelper>();
if (elevatedChannel.ElevationProcessExists())
elevatedChannel.GetElevatedHandler().Stop();
}
}
}
1 change: 1 addition & 0 deletions src/Shell/Shell.csproj
Expand Up @@ -144,6 +144,7 @@
<Compile Include="Infrastructure\ListWithCurrentSelection.cs" /> <Compile Include="Infrastructure\ListWithCurrentSelection.cs" />
<Compile Include="Infrastructure\ListWithCurrentSelectionExtensions.cs" /> <Compile Include="Infrastructure\ListWithCurrentSelectionExtensions.cs" />
<Compile Include="Infrastructure\OnCaliburnMicroUiThread.cs" /> <Compile Include="Infrastructure\OnCaliburnMicroUiThread.cs" />
<Compile Include="Infrastructure\Shutdown.cs" />
<Compile Include="Infrastructure\TypedAutofacBootStrapper.cs" /> <Compile Include="Infrastructure\TypedAutofacBootStrapper.cs" />
<Compile Include="Loggers\DebugLogger.cs" /> <Compile Include="Loggers\DebugLogger.cs" />
<Compile Include="Loggers\BindableCollectionMemoryTarget.cs" /> <Compile Include="Loggers\BindableCollectionMemoryTarget.cs" />
Expand Down
8 changes: 7 additions & 1 deletion src/Shell/ViewModels/MainWindowViewModel.cs
Expand Up @@ -28,19 +28,23 @@ public class MainWindowViewModel : PropertyChangedBase
private readonly Logger _log; private readonly Logger _log;
private readonly UpdateManagerAdapter _updateManager; private readonly UpdateManagerAdapter _updateManager;
private readonly IWindowManager _windowManager; private readonly IWindowManager _windowManager;
private readonly Shutdown _shutdown;
private CancellationTokenSource _cancelationTokenSource; private CancellationTokenSource _cancelationTokenSource;


[Import] [Import]
public StatusMessage Status { get; set; } public StatusMessage Status { get; set; }


public MainWindowViewModel(AutoCompleteBasedOnLucene autoCompleteText, IGetActionsForItem getActionsForItem, Logger log, UpdateManagerAdapter updateManager, IWindowManager windowManager) public MainWindowViewModel(AutoCompleteBasedOnLucene autoCompleteText, IGetActionsForItem getActionsForItem,
Logger log, UpdateManagerAdapter updateManager, IWindowManager windowManager,
Shutdown shutdown)
{ {
_autoCompleteText = autoCompleteText; _autoCompleteText = autoCompleteText;
_getActionsForItem = getActionsForItem; _getActionsForItem = getActionsForItem;
_log = log; _log = log;


_updateManager = updateManager; _updateManager = updateManager;
_windowManager = windowManager; _windowManager = windowManager;
_shutdown = shutdown;
_updateManager.UpdatesAvailable += (sender, args) => _updateManager.UpdatesAvailable += (sender, args) =>
{ {
{ {
Expand Down Expand Up @@ -161,6 +165,8 @@ public Visibility ArgumentOptionsVisibility
public void Update() public void Update()
{ {
Status.SetMessage(this, "Applying update"); Status.SetMessage(this, "Applying update");
_shutdown.Now();

_updateManager.ApplyUpdates(); _updateManager.ApplyUpdates();
} }


Expand Down

0 comments on commit 8f3368b

Please sign in to comment.