Skip to content

Commit 3e5f61c

Browse files
committed
Alpha 6
Fixed the way the app.config is read, should improve stability
1 parent 79fbbdc commit 3e5f61c

File tree

8 files changed

+19
-21
lines changed

8 files changed

+19
-21
lines changed

.vs/OculusHomeIconChanger/v14/.suo

4 KB
Binary file not shown.

OculusHomeIconChanger/App.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
55
</startup>
66
<appSettings>
7-
<add key="manifestlocation" value="D:\Oculus\CoreData\Manifests" />
8-
<add key="imageslocation" value="D:\Oculus\CoreData\Software\StoreAssets" />
7+
<add key="manifestlocation" value="[DefaultManifestLocationReplaceIfYouWantToCustomize]" />
8+
<add key="imageslocation" value="[DefaultImagesLocationReplaceIfYouWantToCustomize]" />
99
</appSettings>
1010
</configuration>

OculusHomeIconChanger/OculusHomeIconChanger.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

OculusHomeIconChanger/OculusHomeIconChanger.cs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,19 @@ public OculusHomeIconChanger()
4141

4242
_oculusHomeAppsList = new List<OculusHomeAppListItem>();
4343
_oculusHomeLocation = GetOculusDirFromRegistry();
44-
_oculusHomeManifestLocation = _oculusHomeLocation + @"\CoreData\Manifests";
45-
_oculusHomeImagesLocation = _oculusHomeLocation + @"\CoreData\Software\StoreAssets";
44+
string appDataManifestLocation = ConfigurationManager.AppSettings["manifestlocation"];
45+
string appdataImagesLocation = ConfigurationManager.AppSettings["imageslocation"];
4646

47-
// Fix for legacy pre-dash (rift core 2.0) Oculus home
48-
if (!Directory.Exists(_oculusHomeImagesLocation))
47+
// Check if the appData config has been changed by user, if so just use those direct paths, nothing else
48+
if (appDataManifestLocation != "[DefaultManifestLocationReplaceIfYouWantToCustomize]" && appdataImagesLocation != "[DefaultImagesLocationReplaceIfYouWantToCustomize]")
4949
{
50-
_oculusHomeManifestLocation = _oculusHomeLocation + @"\Software\Manifests";
51-
_oculusHomeImagesLocation = _oculusHomeLocation + @"\Software\StoreAssets";
50+
_oculusHomeManifestLocation = appDataManifestLocation;
51+
_oculusHomeImagesLocation = appdataImagesLocation;
52+
}
53+
else
54+
{
55+
_oculusHomeManifestLocation = _oculusHomeLocation + @"\CoreData\Manifests";
56+
_oculusHomeImagesLocation = _oculusHomeLocation + @"\CoreData\Software\StoreAssets";
5257
}
5358

5459
this.Text += " - WARNING: backup your \"" + _oculusHomeLocation + "\\CoreData\" Folder";
@@ -59,18 +64,11 @@ public OculusHomeIconChanger()
5964
#region "Main Form Load"
6065
private void OculusHomeIconChanger_Load(object sender, EventArgs e)
6166
{
62-
// Check for the manifest and images locations based on what we found in constructor
67+
// Prevent an unhandled exception by asking user to configure the directory in the app.config
6368
if (!Directory.Exists(_oculusHomeManifestLocation) || !Directory.Exists(_oculusHomeImagesLocation))
6469
{
65-
_oculusHomeManifestLocation = ConfigurationManager.AppSettings["manifestlocation"];
66-
_oculusHomeImagesLocation = ConfigurationManager.AppSettings["imageslocation"];
67-
68-
// Prevent an unhandled exception by asking user to configure the directory in the app.config
69-
if (!Directory.Exists(_oculusHomeManifestLocation) || !Directory.Exists(_oculusHomeImagesLocation))
70-
{
71-
MessageBox.Show("ERROR: could not find the oculus home manifest files\r\n\r\nYou can configure OculusHomeIconChanger.exe.config yourself, there are two directories to manually set and notes in the file.\r\n\r\nOculus Home location found: " + _oculusHomeLocation, "Oculus Home Manifest Files Not Found", MessageBoxButtons.OK, MessageBoxIcon.Error);
72-
return;
73-
}
70+
MessageBox.Show("ERROR: could not find the oculus home manifest files\r\n\r\nYou can configure OculusHomeIconChanger.exe.config yourself, there are two directories to manually set and notes in the file.\r\n\r\nOculus Home location found: " + _oculusHomeLocation, "Oculus Home Manifest Files Not Found", MessageBoxButtons.OK, MessageBoxIcon.Error);
71+
return;
7472
}
7573

7674
string[] oculusHomeAssetsManifestFiles = Directory.GetFiles(_oculusHomeManifestLocation, "*_assets.json");

OculusHomeIconChanger/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("0.0.5.0")]
36-
[assembly: AssemblyFileVersion("0.0.5.0")]
35+
[assembly: AssemblyVersion("0.0.6.0")]
36+
[assembly: AssemblyFileVersion("0.0.6.0")]
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)