Skip to content

Commit

Permalink
v2.8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
phw198 committed Jan 23, 2021
1 parent f351ce6 commit 7d64553
Show file tree
Hide file tree
Showing 13 changed files with 88 additions and 47 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ If you find a bug, [help squash it](https://github.com/phw198/OutlookGoogleCalen
     ![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.0-beta/OutlookGoogleCalendarSync-2.8.0-beta-full.nupkg.svg)
     ![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.0-beta/OutlookGoogleCalendarSync-2.8.0-beta-delta.nupkg.svg)

### Latest Alpha Release: [![Latest Release](https://img.shields.io/github/release/phw198/OutlookGoogleCalendarSync/all.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/tag/v2.8.5-alpha) [![Latest Release downloads](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.5-alpha/total.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/v2.8.5-alpha)
### Latest Alpha Release: [![Latest Release](https://img.shields.io/github/release/phw198/OutlookGoogleCalendarSync/all.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/tag/v2.8.6-alpha) [![Latest Release downloads](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.6-alpha/total.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/v2.8.6-alpha)

:floppy_disk: [Installer](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.5-alpha/Setup.exe)
     [![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.5-alpha/Setup.exe.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.5-alpha/Setup.exe)
:floppy_disk: [Installer](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.6-alpha/Setup.exe)
     [![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.6-alpha/Setup.exe.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.6-alpha/Setup.exe)

:package: [Portable ZIP](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.5-alpha/Portable_OGCS_v2.8.5.zip)
     [![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.5-alpha/Portable_OGCS_v2.8.5.zip.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.5-alpha/Portable_OGCS_v2.8.5.zip)
:package: [Portable ZIP](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.6-alpha/Portable_OGCS_v2.8.6.zip)
     [![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.6-alpha/Portable_OGCS_v2.8.6.zip.svg)](https://github.com/phw198/OutlookGoogleCalendarSync/releases/download/v2.8.6-alpha/Portable_OGCS_v2.8.6.zip)

:information_source: Upgrades to this release
     ![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.5-alpha/OutlookGoogleCalendarSync-2.8.5-alpha-full.nupkg.svg)
     ![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.5-alpha/OutlookGoogleCalendarSync-2.8.5-alpha-delta.nupkg.svg)
     ![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.6-alpha/OutlookGoogleCalendarSync-2.8.6-alpha-full.nupkg.svg)
     ![](https://img.shields.io/github/downloads/phw198/outlookgooglecalendarsync/v2.8.6-alpha/OutlookGoogleCalendarSync-2.8.6-alpha-delta.nupkg.svg)

## Functionality
- Supports all versions of Outlook from 2003 to 2019 64-bit!
Expand Down
19 changes: 19 additions & 0 deletions docs/Release Notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
| Release Notes |
|:---|

# v2.8.6.0 - Alpha

**Enhancements**
- Optionally exclude declined Google invitiations from sync
- Additional colour sync setting to only sync single category to Outlook
- Don't set Outlook category to default Google calendar colour (unless mapped)
- Retrieve all Google calendars, not just first 30

**Bugfix**
- Outlook 2003: Retain recurring items starting before, but spanning sync date range
- Cater for nothing being returned when getting Google item recurrences
- Handle Google error code 410 [Gone]
- Correctly delay next sync when quota exhausted
- Google calendar colours in dropdown may be offset incorrectly by 1
- Handle failure to get email address from Exchange meeting attendee
- Fixed regression of network failure preventing future automated sync
- Telemetry popup box every time OGCS starts in system tray
- Default Google reminder errors if only email notification set on event

# v2.8.5.0 - Alpha

**Enhancements**
Expand Down
2 changes: 1 addition & 1 deletion docs/latest_zip_release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Latest ZIP Release
**Alpha**: [v2.8.5.0](https://github.com/phw198/OutlookGoogleCalendarSync/releases/tag/v2.8.5-alpha)
**Alpha**: [v2.8.6.0](https://github.com/phw198/OutlookGoogleCalendarSync/releases/tag/v2.8.6-alpha)
**Beta**: [v2.8.0.0](https://github.com/phw198/OutlookGoogleCalendarSync/releases/latest)
18 changes: 9 additions & 9 deletions nuget-build.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set RELEASE=2.8.5-alpha
set RELEASE=2.8.6-alpha

cd src
del Releases\OutlookGoogleCalendarSync-%RELEASE%-full.nupkg
Expand All @@ -11,22 +11,22 @@ REM src\packages\squirrel.windows.1.9.0\tools\signtool.exe sign /n "Open Source

REM In VS Package Manager
REM PM> Install-Package squirrel.windows -Version 1.9.0
REM PM> packages\squirrel.windows.1.9.0\tools\Squirrel --releasify OutlookGoogleCalendarSync.2.8.5-alpha.nupkg --no-msi --loadingGif=..\docs\images\ogcs128x128-animated.gif
REM PM> packages\squirrel.windows.1.9.0\tools\Squirrel --releasify OutlookGoogleCalendarSync.2.8.6-alpha.nupkg --no-msi --loadingGif=..\docs\images\ogcs128x128-animated.gif

REM Sign the Squirrel install executable
REM src\packages\squirrel.windows.1.9.0\tools\signtool.exe sign /n "Open Source Developer, Paul Woolcock" /tr http://time.certum.pl/ /td sha256 /fd sha256 /v src\Releases\Setup.exe

REM Build ZIP
PAUSE
cd src\OutlookGoogleCalendarSync\bin\Release
"c:\Program Files\7-Zip\7z.exe" u Portable_OGCS_v2.8.4.zip -u- -up0q0r2x2y2z1w2!Portable_OGCS_v2.8.5.zip *.dll *.ps1 ErrorReportingTemplate.json logger.xml tzdb.nzd OutlookGoogleCalendarSync.exe OutlookGoogleCalendarSync.exe.config OutlookGoogleCalendarSync.pdb Console\*
"c:\Program Files\7-Zip\7z.exe" u Portable_OGCS_v2.8.5.zip -u- -up0q0r2x2y2z1w2!Portable_OGCS_v2.8.6.zip *.dll *.ps1 ErrorReportingTemplate.json logger.xml tzdb.nzd OutlookGoogleCalendarSync.exe OutlookGoogleCalendarSync.exe.config OutlookGoogleCalendarSync.pdb Console\*

"c:\Program Files\7-Zip\7z.exe" e Portable_OGCS_v2.8.4.zip Microsoft.Office.Interop.Outlook.DLL
"c:\Program Files\7-Zip\7z.exe" e Portable_OGCS_v2.8.4.zip stdole.dll
"c:\Program Files\7-Zip\7z.exe" e Portable_OGCS_v2.8.4.zip "Windows Defender SmartScreen Unblock.ps1"
"c:\Program Files\7-Zip\7z.exe" e -y Portable_OGCS_v2.8.5.zip Microsoft.Office.Interop.Outlook.DLL
"c:\Program Files\7-Zip\7z.exe" e -y Portable_OGCS_v2.8.5.zip stdole.dll
"c:\Program Files\7-Zip\7z.exe" e -y Portable_OGCS_v2.8.5.zip "Windows Defender SmartScreen Unblock.ps1"

"c:\Program Files\7-Zip\7z.exe" a Portable_OGCS_v2.8.5.zip Microsoft.Office.Interop.Outlook.DLL
"c:\Program Files\7-Zip\7z.exe" a Portable_OGCS_v2.8.5.zip stdole.dll
"c:\Program Files\7-Zip\7z.exe" a Portable_OGCS_v2.8.5.zip "Windows Defender SmartScreen Unblock.ps1"
"c:\Program Files\7-Zip\7z.exe" a Portable_OGCS_v2.8.6.zip Microsoft.Office.Interop.Outlook.DLL
"c:\Program Files\7-Zip\7z.exe" a Portable_OGCS_v2.8.6.zip stdole.dll
"c:\Program Files\7-Zip\7z.exe" a Portable_OGCS_v2.8.6.zip "Windows Defender SmartScreen Unblock.ps1"

cd ..\..\..\..
1 change: 1 addition & 0 deletions src/OutlookGoogleCalendarSync/Forms/ColourMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public ColourMap() {

InitializeComponent();
loadConfig();
OutlookOgcs.Calendar.Disconnect(true);
}

private void loadConfig() {
Expand Down
2 changes: 2 additions & 0 deletions src/OutlookGoogleCalendarSync/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,7 @@ void Save_Click(object sender, EventArgs e) {
} finally {
bSave.Enabled = true;
bSave.Text = "Save";
OutlookOgcs.Calendar.Disconnect(true);
}
}

Expand Down Expand Up @@ -1077,6 +1078,7 @@ private void tbOutlookDateFormat_Leave(object sender, EventArgs e) {
private void btTestOutlookFilter_Click(object sender, EventArgs e) {
log.Debug("Testing the Outlook filter string.");
int filterCount = OutlookOgcs.Calendar.Instance.FilterCalendarEntries(OutlookOgcs.Calendar.Instance.UseOutlookCalendar.Items, false).Count();
OutlookOgcs.Calendar.Disconnect(true);
String msg = "The format '" + tbOutlookDateFormat.Text + "' returns " + filterCount + " calendar items within the date range ";
msg += Settings.Instance.SyncStart.ToString(System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern);
msg += " and " + Settings.Instance.SyncEnd.ToString(System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern);
Expand Down
4 changes: 2 additions & 2 deletions src/OutlookGoogleCalendarSync/GoogleOgcs/GoogleCalendar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ public List<Event> GetCalendarEntriesInRecurrence(String recurringEventId) {
return result;

} catch (System.Exception ex) {
Forms.Main.Instance.Console.UpdateWithError("Failed to retrieve recurring events", OGCSexception.LogAsFail(ex));
OGCSexception.Analyse(ex);
Forms.Main.Instance.Console.UpdateWithError("Failed to retrieve recurring events.", OGCSexception.LogAsFail(ex));
OGCSexception.Analyse("recurringEventId: " + recurringEventId, ex);
return null;
}
}
Expand Down
33 changes: 16 additions & 17 deletions src/OutlookGoogleCalendarSync/OutlookGoogleCalendarSync.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>OutlookGoogleCalendarSync</id>
<version>2.8.5-alpha</version>
<version>2.8.6-alpha</version>
<title>Outlook Google Calendar Sync</title>
<authors>Paul Woolcock</authors>
<owners>phw198</owners>
Expand All @@ -12,28 +12,27 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Sync Outlook and Google calendars.</description>
<releaseNotes>
# What's New In v2.8.5?
# What's New In v2.8.6?

&lt;i class="em em-high_brightness"&gt;&lt;/i&gt; **Enhancements**

- Improved detection of Outlook versions after 2016
- Option to exclude sync of Google 'goals'
- Option to set exact type of availablity in Outlook (eg Out of Office)
- Sync deletion in Outlook on first two-way sync (not second)
- Log exact code location of any errors
- Log Google 500 errors as `FAIL` to avoid error reporting
- Further masking of Outlook profile email address in log file
**Enhancements**
- Optionally exclude declined Google invitiations from sync
- Additional colour sync setting to only sync single category to Outlook
- Don't set Outlook category to default Google calendar colour (unless mapped)
- Retrieve all Google calendars, not just first 30

&lt;i class="em em-beetle"&gt;&lt;/i&gt; **Bugfix**

- Quota limit error updated to match changed Google error
- Reclaim calendar entries in both Google _and_ Outlook at start of sync
- Proper calculation of recurrence end time from organiser's local time
- Compare recurrence rule if number of elements have changed
- Compare attendee cloaked email addresses properly after config change
- Handle configured category mappings for categories that no longer exist in Outlook
- Don't error if log file deletion fails
- Improved support for Outlook2003
- Outlook 2003: Retain recurring items starting before, but spanning sync date range
- Cater for nothing being returned when getting Google item recurrences
- Handle Google error code 410 [Gone]
- Correctly delay next sync when quota exhausted
- Google calendar colours in dropdown may be offset incorrectly by 1
- Handle failure to get email address from Exchange meeting attendee
- Fixed regression of network failure preventing future automated sync
- Telemetry popup box every time OGCS starts in system tray
- Default Google reminder errors if only email notification set on event
</releaseNotes>
<copyright>Copyright 2020</copyright>
<tags>Outlook Google Calendar Sync 2-way Two-way Bidirection</tags>
Expand Down
27 changes: 20 additions & 7 deletions src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookCategories.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,24 @@ public void BuildPicker(ref System.Windows.Forms.CheckedListBox clb) {
public Outlook.OlCategoryColor? OutlookColour(String categoryName) {
if (string.IsNullOrEmpty(categoryName)) log.Warn("Category name is empty.");

if (this.categories == null)
OutlookOgcs.Calendar.Instance.IOutlook.RefreshCategories();
try {
if (this.categories != null && this.categories.Count > 0) { }
} catch (System.Exception ex) {
OGCSexception.Analyse("Categories are not accessible!", OGCSexception.LogAsFail(ex));
this.categories = null;
}

foreach (Outlook.Category category in this.categories) {
if (category.Name == categoryName.Trim()) return category.Color;
}
if (this.categories == null || OutlookOgcs.Calendar.Categories == null) {
OutlookOgcs.Calendar.Instance.IOutlook.RefreshCategories();
this.categories = Calendar.Categories.categories;
}

foreach (Outlook.Category category in this.categories) {
if (category.Name == categoryName.Trim()) return category.Color;
}

log.Warn("Could not convert category name '" + categoryName + "' into Outlook category type.");
return null;
log.Warn("Could not convert category name '" + categoryName + "' into Outlook category type.");
return null;
}

/// <summary>
Expand All @@ -186,6 +195,10 @@ private List<String> getNames() {
/// <returns>List to be used in dropdown, for example</returns>
public List<OutlookOgcs.Categories.ColourInfo> DropdownItems() {
List<OutlookOgcs.Categories.ColourInfo> items = new List<OutlookOgcs.Categories.ColourInfo>();
if (this.categories == null) {
OutlookOgcs.Calendar.Instance.IOutlook.RefreshCategories();
this.categories = Calendar.Categories.categories;
}
if (this.categories != null) {
foreach (Outlook.Category category in this.categories) {
items.Add(new OutlookOgcs.Categories.ColourInfo(category.Color, Categories.Map.RgbColour(category.Color), category.Name));
Expand Down
9 changes: 8 additions & 1 deletion src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookNew.cs
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,14 @@ public String GetGlobalApptID(AppointmentItem ai) {

public void RefreshCategories() {
log.Debug("Refreshing categories...");
OutlookOgcs.Calendar.Categories.Get(oApp, useOutlookCalendar);
try {
OutlookOgcs.Calendar.Categories.Get(oApp, useOutlookCalendar);
} catch (System.Exception ex) {
if (OGCSexception.GetErrorCode(ex) == "0x800706BA") { //RPC Server Unavailable
OutlookOgcs.Calendar.AttachToOutlook(ref oApp);
OutlookOgcs.Calendar.Categories.Get(oApp, useOutlookCalendar);
}
}
Forms.Main.Instance.ddOutlookColour.AddColourItems();
foreach (OutlookOgcs.Categories.ColourInfo cInfo in Forms.Main.Instance.ddOutlookColour.Items) {
if (cInfo.OutlookCategory.ToString() == Settings.Instance.SetEntriesColourValue &&
Expand Down
2 changes: 1 addition & 1 deletion src/OutlookGoogleCalendarSync/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private static Dictionary<String, String> parseArgument(String[] args, char arg)
throw new ApplicationException("The /" + arg + " parameter must be used with a filename.");
}
details["Directory"] = System.IO.Path.GetDirectoryName(argVal.TrimStart(("/" + arg + ":").ToCharArray()));
if (!System.IO.Directory.Exists(details["Directory"])) {
if (!string.IsNullOrEmpty(details["Directory"]) && !System.IO.Directory.Exists(details["Directory"])) {
throw new ApplicationException("The specified directory '" + details["Directory"] + "' does not exist.\r\n" +
"Please correct the parameter value passed or create the directory.");
}
Expand Down
2 changes: 1 addition & 1 deletion src/OutlookGoogleCalendarSync/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("2.8.*")]
[assembly: AssemblyFileVersion("2.8.5.0")]
[assembly: AssemblyFileVersion("2.8.6.0")]

[assembly: AssemblyMetadata("SquirrelAwareVersion", "1")]
2 changes: 1 addition & 1 deletion src/OutlookGoogleCalendarSync/Recurrence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ public static void UpdateGoogleExceptions(AppointmentItem ai, Event ev, Boolean
}
}
} else {
log.Debug("No matching Google Event recurrence found.");
log.Warn("No matching Google Event recurrence found.");
if (oIsDeleted) log.Debug("The Outlook appointment is deleted, so not a problem.");
}
} finally {
Expand Down

0 comments on commit 7d64553

Please sign in to comment.