Skip to content

Commit ff5e863

Browse files
committed
Revert errant installer change
Deal with race condition to be able to track progress reliably. Remove unnecessary tracking of intermediate updates.
1 parent c71c5fd commit ff5e863

File tree

5 files changed

+200
-184
lines changed

5 files changed

+200
-184
lines changed

src/Installer/Installer.wxs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<!--Don't even think of EVER changing this, despite the counter-intuitive name. What it is: "a shared identifier that represents multiple versions of an application" -->
77
<?define Property_UpgradeCode = "{CBCDEE93-B8EF-445e-98A9-B8CAF9502F0D}" ?>
88

9-
<?define OutputDir = "..\..\src\SayMore\bin\x64\$(var.Configuration)\net48\" ?>
10-
<?define NativeAssetsDir = "..\..\output\x64\$(var.Configuration)\net48\lib\win-x64\" ?>
9+
<?define OutputDir = "..\..\output\x64\$(var.Configuration)\net48\" ?>
10+
<?define NativeAssetsDir = "$(var.OutputDir)lib\win-x64\" ?>
1111

1212
<!-- good intro to the component vs. file thing, and why each file here is a separate component:
1313
http://blogs.msdn.com/robmen/archive/2003/10/04/56479.aspx -->

src/SayMore/Model/Files/DataGathering/BackgroundFileProcessor.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,11 @@ protected virtual bool GetDoIncludeFile(string path)
122122
/// ------------------------------------------------------------------------------------
123123
public virtual void Start()
124124
{
125-
_workerThread = new Thread(StartWorking);
126-
_workerThread.Name = GetType().Name;
127-
_workerThread.Priority = ThreadPriority;
125+
_workerThread = new Thread(StartWorking)
126+
{
127+
Name = GetType().Name,
128+
Priority = ThreadPriority
129+
};
128130
_workerThread.TrySetApartmentState(ApartmentState.STA);//needed in case we eventually show an error & need to talk to email.
129131
_workerThread.Start();
130132
}
@@ -140,7 +142,7 @@ private void StartWorking()
140142
{
141143
try
142144
{
143-
Status = kWorkingStatus; //NB: this helps simplify unit tests, if go to the busy state before returning
145+
Status = kWorkingStatus; //NB: this helps simplify unit tests, if we go to the busy state before returning
144146

145147
using (var watcher = new FileSystemWatcher(RootDirectoryPath))
146148
{
@@ -175,7 +177,7 @@ private void StartWorking()
175177
}
176178
catch (ThreadAbortException)
177179
{
178-
//this is fine, it happens when we quit
180+
// This is fine, it happens when we quit
179181
}
180182
catch (Exception error)
181183
{
@@ -339,7 +341,7 @@ public virtual void ProcessAllFilesInFolder(string folder)
339341
/// ------------------------------------------------------------------------------------
340342
public virtual void ProcessAllFiles()
341343
{
342-
// Now that the watcher is up and running, gather up all existing files
344+
// Now that the watcher is up and running, gather all existing files
343345
lock (((ICollection)_fileToDataDictionary).SyncRoot)
344346
{
345347
_fileToDataDictionary.Clear();

0 commit comments

Comments
 (0)