Permalink
Browse files

Merge remote-tracking branch 'dropbox/master' into ironpython

  • Loading branch information...
2 parents 885825e + f29ae4a commit 8f3368ba8e5a89c98507ca837d1f556e0550b3e9 @brunomlopes committed Aug 15, 2011
View
@@ -2,9 +2,9 @@
#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
-*.obj
-*.exe
-*.pdb
+src/*/*.obj
+src/*/*.exe
+src/*/*.pdb
*.user
*.aps
*.pch
@@ -19,11 +19,11 @@ Thumbs.db
*.cache
*.ilk
*.log
-[Bb]in
-[Dd]ebug*/
+src/*/[Bb]in
+src/*/[Dd]ebug*/
*.lib
*.sbr
-obj/
+src/*/obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
View
@@ -25,7 +25,6 @@ Task Build-Package -depends Update-Solution-Assembly-Info -description "Builds a
Remove-Item $outputDir -recurse -force
}
$packageDir = $package_path
- $appcast_path = "$packageDir\appcast.xml"
Exec { msbuild /t:clean /p:Configuration=Release /p:OutDir=$outputDir\ }
Exec { msbuild /t:build /p:Configuration=Release /p:OutDir=$outputDir\ }
@@ -48,7 +47,8 @@ Task Build-Package -depends Update-Solution-Assembly-Info -description "Builds a
$zip = Write-Zip .\* $package_path -level 9
Pop-Location
Write-Host "File is up at $zip"
-
+
+ $appcast_path = "$packageDir\appcast.xml"
Generate-Appcast-Item `
-version $version `
-package_url $dropbox_base_url `
@@ -181,7 +181,12 @@ function Get-Next-Version
$last_versions = $last_version_tag.split("_")[1].split(".") | foreach { [int]$_}
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)
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
-64fec695ceb6b7f3e6cc4c7af36c7a95132cbd52
+d2271a684ded08d1ae2bb1e44b397866c679b28f
@@ -119,6 +119,8 @@ protected override void ConfigureContainer(ContainerBuilder builder)
builder.RegisterType<ScheduleUpdateCheckJob>().As<IStartupTask>();
builder.RegisterType<IronPythonCommandsMefExport>().As<IStartupTask>();
+ builder.RegisterType<Shutdown>().AsSelf();
+
builder.RegisterType<SeparateIndexesDirectoryFactory>()
.As<IDirectoryFactory>().WithParameter("root", indexStorageLocation)
.SingleInstance();
@@ -152,10 +154,7 @@ private void ExecuteStartupTasks()
protected override void OnExit(object sender, EventArgs e)
{
- Container.Resolve<IScheduler>().Shutdown();
- var elevatedChannel = new ElevatedChannel<IStopTheElevationHelper>();
- if (elevatedChannel.ElevationProcessExists())
- elevatedChannel.GetElevatedHandler().Stop();
+ Container.Resolve<Shutdown>().Now();
base.OnExit(sender, e);
}
@@ -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();
+ }
+ }
+}
View
@@ -144,6 +144,7 @@
<Compile Include="Infrastructure\ListWithCurrentSelection.cs" />
<Compile Include="Infrastructure\ListWithCurrentSelectionExtensions.cs" />
<Compile Include="Infrastructure\OnCaliburnMicroUiThread.cs" />
+ <Compile Include="Infrastructure\Shutdown.cs" />
<Compile Include="Infrastructure\TypedAutofacBootStrapper.cs" />
<Compile Include="Loggers\DebugLogger.cs" />
<Compile Include="Loggers\BindableCollectionMemoryTarget.cs" />
@@ -28,19 +28,23 @@ public class MainWindowViewModel : PropertyChangedBase
private readonly Logger _log;
private readonly UpdateManagerAdapter _updateManager;
private readonly IWindowManager _windowManager;
+ private readonly Shutdown _shutdown;
private CancellationTokenSource _cancelationTokenSource;
[Import]
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;
_getActionsForItem = getActionsForItem;
_log = log;
_updateManager = updateManager;
_windowManager = windowManager;
+ _shutdown = shutdown;
_updateManager.UpdatesAvailable += (sender, args) =>
{
{
@@ -161,6 +165,8 @@ public Visibility ArgumentOptionsVisibility
public void Update()
{
Status.SetMessage(this, "Applying update");
+ _shutdown.Now();
+
_updateManager.ApplyUpdates();
}

0 comments on commit 8f3368b

Please sign in to comment.