Skip to content

Commit 53d6941

Browse files
committed
Fix github issue 182: Error when changing from roaming to local (1st time use).
1 parent f9ed0c2 commit 53d6941

File tree

7 files changed

+29
-13
lines changed

7 files changed

+29
-13
lines changed

publish.cmd

+4-6
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ for /f "usebackq" %%i in (`xsl -e -s src\Version\version.xsl src\Version\version
88
set VERSION=%%i
99
)
1010

11-
set WINGET=1
12-
1311
echo ### Publishing version %VERSION%...
1412
set WINGET=1
1513
set GITRELEASE=1
@@ -31,9 +29,6 @@ if not EXIST src\XmlNotepadSetup\bin\Release\XmlNotepadSetup.msi goto :nomsi
3129
if EXIST src\XmlNotepadSetup\bin\Release\XmlNotepadSetup.zip del src\XmlNotepadSetup\bin\Release\XmlNotepadSetup.zip
3230
if "%LOVETTSOFTWARE_STORAGE_CONNECTION_STRING%" == "" goto :nokey
3331

34-
where wingetcreate > nul 2>&1
35-
if ERRORLEVEL 1 winget install wingetcreate
36-
3732
copy /y src\Updates\Updates.xml publish\
3833
if ERRORLEVEL 1 goto :eof
3934
copy /y src\Updates\Updates.xslt publish\
@@ -65,13 +60,16 @@ del notes.txt
6560
if "%UPLOAD%" == "0" goto :winget
6661

6762
echo Uploading ClickOnce installer to XmlNotepad
68-
call AzurePublishClickOnce.cmd %~dp0publish downloads/XmlNotepad "%LOVETTSOFTWARE_STORAGE_CONNECTION_STRING%"
63+
call AzurePublishClickOnce.cmd publish downloads/XmlNotepad "%LOVETTSOFTWARE_STORAGE_CONNECTION_STRING%"
6964
if ERRORLEVEL 1 goto :uploadfailed
7065

7166

7267
echo ============ Done publishing ClickOnce installer to XmlNotepad ==============
7368
:winget
7469

70+
where wingetcreate > nul 2>&1
71+
if ERRORLEVEL 1 winget install wingetcreate
72+
7573
if "%WINGET%"=="0" goto :skipwinget
7674
if not exist %WINGET_SRC% goto :nowinget
7775

src/Updates/Updates.xml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
<history>https://github.com/microsoft/XmlNotepad/blob/master/src/Updates/Updates.xml</history>
1010
<frequency>1.00:00:00</frequency>
1111
</application>
12+
<version number="2.8.0.57">
13+
<feature>Fix bug 182: Error when changing from roaming to local (1st time use).</feature>
14+
</version>
1215
<version number="2.8.0.56">
1316
<feature>Add support for a XmlNotepad.template.settings file that can provide default settings in an enterprise wide deployment of XmlNotepad.</feature>
1417
</version>

src/Version/Version.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
// Build Number
1616
// Revision
1717
//
18-
[assembly: AssemblyVersion("2.8.0.56")]
19-
[assembly: AssemblyFileVersion("2.8.0.56")]
18+
[assembly: AssemblyVersion("2.8.0.57")]
19+
[assembly: AssemblyFileVersion("2.8.0.57")]

src/Version/Version.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<ApplicationRevision>56</ApplicationRevision>
5-
<ApplicationVersion>2.8.0.56</ApplicationVersion>
4+
<ApplicationRevision>57</ApplicationRevision>
5+
<ApplicationVersion>2.8.0.57</ApplicationVersion>
66
</PropertyGroup>
77
</Project>

src/XmlNotepad/SettingsLoader.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ public void MoveSettings(Settings settings)
140140
{
141141
File.Delete(newLocation);
142142
}
143-
File.Move(existingLocation, newLocation);
143+
if (File.Exists(existingLocation))
144+
{
145+
File.Move(existingLocation, newLocation);
146+
}
144147
settings.FileName = newLocation;
145148
this._settingsLocation = location;
146149
}

src/XmlNotepadPackage/Package.appxmanifest

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap rescap">
3-
<Identity Name="5632ff08-aa93-439a-b09f-677eb3664250" Publisher="CN=Chris Lovett, O=Chris Lovett, STREET=18606 201st Ave NE, L=Woodinville, S=WA, PostalCode=98077, C=US" Version="2.8.0.56" />
3+
<Identity Name="5632ff08-aa93-439a-b09f-677eb3664250" Publisher="CN=Chris Lovett, O=Chris Lovett, STREET=18606 201st Ave NE, L=Woodinville, S=WA, PostalCode=98077, C=US" Version="2.8.0.57" />
44
<Properties>
55
<DisplayName>XML Notepad</DisplayName>
66
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>

src/XmlNotepadSetup/Product.wxs

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3-
<Product Id="*" Name="XmlNotepad" Language="1033" Version="2.8.0.56" Manufacturer="Lovett Software" UpgradeCode="14C1B5E8-3198-4AF2-B4BC-351017A109D3">
3+
<Product Id="*" Name="XmlNotepad" Language="1033" Version="2.8.0.57" Manufacturer="Lovett Software" UpgradeCode="14C1B5E8-3198-4AF2-B4BC-351017A109D3">
44
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
55
<MajorUpgrade Schedule="afterInstallFinalize" DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="yes" />
66
<MediaTemplate />
@@ -54,6 +54,15 @@
5454
<Component Id="SgmlReaderDll.dll" Guid="70c0cd62-a6e5-4da4-9336-3fcef1bfb0d1">
5555
<File Id="SgmlReaderDll.dll" KeyPath="yes" Checksum="yes" />
5656
</Component>
57+
<Component Id="Newtonsoft.Json.dll" Guid="D7A433F2-C782-4BF0-AD2C-1BA25B82F15D">
58+
<File Id="Newtonsoft.Json.dll" KeyPath="yes" Checksum="yes" />
59+
</Component>
60+
<Component Id="System.Security.AccessControl.dll" Guid="D1AD74AB-E816-410E-866B-1E8C02717C11">
61+
<File Id="System.Security.AccessControl.dll" KeyPath="yes" Checksum="yes" />
62+
</Component>
63+
<Component Id="System.Security.Principal.Windows.dll" Guid="65319865-B926-422C-93A3-C1938A0DEAC7">
64+
<File Id="System.Security.Principal.Windows.dll" KeyPath="yes" Checksum="yes" />
65+
</Component>
5766
<Component Id="Microsoft.Web.WebView2.Core.dll" Guid="e2a18224-f75d-4a1b-ba41-10b2700f5db6">
5867
<File Id="Microsoft.Web.WebView2.Core.dll" KeyPath="yes" Checksum="yes" />
5968
</Component>
@@ -273,6 +282,9 @@
273282
<ComponentRef Id="FontBuilder.dll" />
274283
<ComponentRef Id="SimpleGoogleAnalytics.dll" />
275284
<ComponentRef Id="SgmlReaderDll.dll" />
285+
<ComponentRef Id="Newtonsoft.Json.dll" />
286+
<ComponentRef Id="System.Security.AccessControl.dll" />
287+
<ComponentRef Id="System.Security.Principal.Windows.dll" />
276288
<ComponentRef Id="Microsoft.Web.WebView2.Core.dll" />
277289
<ComponentRef Id="Microsoft.Web.WebView2.WinForms.dll" />
278290
<ComponentRef Id="design.htm" />

0 commit comments

Comments
 (0)