Skip to content

Commit

Permalink
Update Obsidian icon, fix installer and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaoses-Ib committed Oct 16, 2023
1 parent 9a5656e commit 812166d
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 25 deletions.
58 changes: 48 additions & 10 deletions Installer/ObsidianShell.aip

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Installer/Settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 2 additions & 2 deletions ObsidianShell.CLI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.4.0.0")]
[assembly: AssemblyFileVersion("0.4.0.0")]
[assembly: AssemblyVersion("0.5.0.0")]
[assembly: AssemblyFileVersion("0.5.0.0")]
4 changes: 2 additions & 2 deletions ObsidianShell.ContextMenu/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.4.0.0")]
[assembly: AssemblyFileVersion("0.4.0.0")]
[assembly: AssemblyVersion("0.5.0.0")]
[assembly: AssemblyFileVersion("0.5.0.0")]
Binary file modified ObsidianShell.ContextMenu/Resources/Obsidian_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ObsidianShell.GUI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.4.0.0")]
[assembly: AssemblyFileVersion("0.4.0.0")]
[assembly: AssemblyVersion("0.5.0.0")]
[assembly: AssemblyFileVersion("0.5.0.0")]
27 changes: 20 additions & 7 deletions ObsidianShell/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.IO;
using System.Reflection;
using System.ComponentModel;
using System.Windows.Forms;

namespace ObsidianShell
{
Expand Down Expand Up @@ -44,16 +45,28 @@ public class Settings : INotifyPropertyChanged

private static string GetPath()
{
string path = Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName, "Settings.json");
if (File.Exists(path))
return path;
string portablePath = Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName, "Settings.json");
if (File.Exists(portablePath))
return portablePath;

path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Chaoses Ib", "ObsidianShell", "Settings.json");
if (!File.Exists(path))
string installedPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Chaoses Ib", "ObsidianShell", "Settings.json");
if (File.Exists(installedPath))
return installedPath;

// Portable version is not released with an empty settings file, because users may overwrite existing settings during upgrade.
// So we need to try to create at the portable path first.
try
{
File.WriteAllText(portablePath, "{}");
return portablePath;
}
catch (Exception e)
{
File.WriteAllText(path, "{}");
MessageBox.Show($"Failed to create settings file at {portablePath}:\n{e}", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
return path;

File.WriteAllText(installedPath, "{}");
return installedPath;
}

public static Settings Load()
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
- `ObsidianShell.ContextMenu/Properties/AssemblyInfo.cs`
- `ObsidianShell.GUI/Properties/AssemblyInfo.cs`
2. Build the solution
3. Copy files from `bin\Release` to `Installer\bin` (without PDB and XML files) and make a `Settings.json`
3. Copy files from `bin\Release` to `Installer\bin` (without PDB and XML files)
4. Build the installer by Advanced Installer
5. Pack files in `Installer\bin` as the protable version (in a directory named `ObsidianShell`)
5. Pack files in `Installer\bin` as the protable version (in a directory named `ObsidianShell`)
Binary file modified images/ContextMenu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/File list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/Obsidian.ico
Binary file not shown.
Binary file modified resources/Obsidian_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 812166d

Please sign in to comment.