Skip to content

Commit 7774430

Browse files
committed
v1.2.3 initial release
1 parent 6b5f272 commit 7774430

26 files changed

+118
-89
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Advanced Installer/Advanced Installer.aip

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<ROW Property="AI_PROPPATH_DIR_PERBUILD_AssistantComputerControl.exe.config" Value="..\AssistantComputerControl\bin\Release"/>
1111
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Microsoft.WindowsAPICodePack.Shell.dll" Value="..\packages\Microsoft.WindowsAPICodePack.Shell.1.1.0\lib"/>
1212
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Microsoft.WindowsAPICodePack.dll" Value="..\packages\Microsoft.WindowsAPICodePack.Core.1.1.0\lib"/>
13-
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Newtonsoft.Json.dll" Value="..\packages\Newtonsoft.Json.11.0.2\lib\net45"/>
14-
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Sentry.PlatformAbstractions.dll" Value="..\packages\Sentry.PlatformAbstractions.1.0.0-rc\lib\net45"/>
15-
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Sentry.Protocol.dll" Value="..\packages\Sentry.Protocol.1.0.0-rc2\lib\net46"/>
16-
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Sentry.dll" Value="..\packages\Sentry.1.0.0-rc2\lib\netstandard2.0"/>
13+
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Newtonsoft.Json.dll" Value="..\packages\Newtonsoft.Json.12.0.1\lib\net45"/>
14+
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Sentry.PlatformAbstractions.dll" Value="..\packages\Sentry.PlatformAbstractions.1.0.0\lib\net45"/>
15+
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Sentry.Protocol.dll" Value="..\packages\Sentry.Protocol.1.0.4\lib\net46"/>
16+
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Sentry.dll" Value="..\packages\Sentry.1.1.2\lib\net461"/>
1717
<ROW Property="AI_PROPPATH_DIR_PERBUILD_System.Collections.Immutable.dll" Value="..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0"/>
1818
<ROW Property="AI_PROPPATH_FILENAME_PERBUILD_AssistantComputerControl.exe" Value="AssistantComputerControl.exe"/>
1919
<ROW Property="AI_PROPPATH_FILENAME_PERBUILD_AssistantComputerControl.exe.config" Value="AssistantComputerControl.exe.config"/>
@@ -37,10 +37,10 @@
3737
<ROW Property="BannerBitmap" Value="banner" MultiBuildValue="DefaultBuild:banner.png" Type="1" MsiKey="BannerBitmap"/>
3838
<ROW Property="DialogBitmap" Value="dialog" MultiBuildValue="DefaultBuild:dialogbitmap.png" Type="1" MsiKey="DialogBitmap"/>
3939
<ROW Property="Manufacturer" Value="Albert MN."/>
40-
<ROW Property="ProductCode" Value="1033:{6A723DD4-5278-4D60-8A57-361116141F86} " Type="16"/>
40+
<ROW Property="ProductCode" Value="1033:{F6AD077F-7B7F-41E0-BC10-8F9257D1E03A} " Type="16"/>
4141
<ROW Property="ProductLanguage" Value="1033"/>
4242
<ROW Property="ProductName" Value="AssistantComputerControl"/>
43-
<ROW Property="ProductVersion" Value="1.2.2.0" Type="32"/>
43+
<ROW Property="ProductVersion" Value="1.2.3.0" Type="32"/>
4444
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
4545
<ROW Property="UpgradeCode" Value="{8E6F4399-B513-420B-8E11-36837A8550EE}"/>
4646
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>

AssistantComputerControl/ACC_Updater.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ private static void FileDownloadedCallback(object sender, AsyncCompletedEventArg
201201
MessageBox.Show("Failed to download new version. Try again later!", "Error | " + MainProgram.messageBoxTitle);
202202
}
203203

204+
Thread.Sleep(500);
204205
Thread.CurrentThread.Abort();
205206
}
206207
}

AssistantComputerControl/App.config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@
9191
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
9292
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
9393
</dependentAssembly>
94+
<dependentAssembly>
95+
<assemblyIdentity name="Sentry.Protocol" publicKeyToken="fba2ec45388e2af0" culture="neutral" />
96+
<bindingRedirect oldVersion="0.0.0.0-1.0.4.0" newVersion="1.0.4.0" />
97+
</dependentAssembly>
98+
<dependentAssembly>
99+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
100+
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
101+
</dependentAssembly>
94102
</assemblyBinding>
95103
</runtime>
96104
</configuration>

AssistantComputerControl/AssistantComputerControl.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
77
<ProjectGuid>{404B42F4-E135-4D2F-8FD0-20A590814930}</ProjectGuid>
8-
<OutputType>Exe</OutputType>
8+
<OutputType>WinExe</OutputType>
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>AssistantComputerControl</RootNamespace>
1111
<AssemblyName>AssistantComputerControl</AssemblyName>
@@ -99,19 +99,19 @@
9999
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
100100
<HintPath>..\packages\Microsoft.WindowsAPICodePack.Shell.1.1.0\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
101101
</Reference>
102-
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
103-
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
102+
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
103+
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
104104
</Reference>
105105
<Reference Include="PresentationCore" />
106106
<Reference Include="PresentationFramework" />
107-
<Reference Include="Sentry, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
108-
<HintPath>..\packages\Sentry.1.0.0-rc2\lib\netstandard2.0\Sentry.dll</HintPath>
107+
<Reference Include="Sentry, Version=1.1.2.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
108+
<HintPath>..\packages\Sentry.1.1.2\lib\net461\Sentry.dll</HintPath>
109109
</Reference>
110110
<Reference Include="Sentry.PlatformAbstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
111-
<HintPath>..\packages\Sentry.PlatformAbstractions.1.0.0-rc\lib\net45\Sentry.PlatformAbstractions.dll</HintPath>
111+
<HintPath>..\packages\Sentry.PlatformAbstractions.1.0.0\lib\net45\Sentry.PlatformAbstractions.dll</HintPath>
112112
</Reference>
113-
<Reference Include="Sentry.Protocol, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
114-
<HintPath>..\packages\Sentry.Protocol.1.0.0-rc2\lib\net46\Sentry.Protocol.dll</HintPath>
113+
<Reference Include="Sentry.Protocol, Version=1.0.4.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
114+
<HintPath>..\packages\Sentry.Protocol.1.0.4\lib\net46\Sentry.Protocol.dll</HintPath>
115115
</Reference>
116116
<Reference Include="System" />
117117
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">

AssistantComputerControl/MainProgram.cs

Lines changed: 73 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* AssistantComputerControl
33
* Made by Albert MN.
4-
* Updated: v1.2.2, 10-02-2019
4+
* Updated: v1.2.3, 10-02-2019
55
*
66
* Use:
77
* - Main class. Starts everything.
@@ -24,8 +24,8 @@
2424

2525
namespace AssistantComputerControl {
2626
class MainProgram {
27-
public const string softwareVersion = "1.2.2",
28-
releaseDate = "2019-02-10 19:24:00", //YYYY-MM-DD H:i:s - otherwise it gives an error
27+
public const string softwareVersion = "1.2.3",
28+
releaseDate = "2019-03-24 19:10:00", //YYYY-MM-DD H:i:s - otherwise it gives an error
2929
appName = "AssistantComputerControl";
3030
static public bool debug = true,
3131
unmuteVolumeChange = true,
@@ -46,7 +46,6 @@ public enum TestStatus {
4646
private static FileSystemWatcher watcher;
4747

4848
static public string currentLocationFull = Assembly.GetEntryAssembly().Location,
49-
defaultActionFolder = CheckPath(),
5049

5150
currentLocation = Path.GetDirectoryName(currentLocationFull),
5251
dataFolderLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "AssistantComputerControl"),
@@ -66,60 +65,22 @@ public enum TestStatus {
6665
[STAThread]
6766
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
6867
static void Main(string[] args) {
69-
hasAnalyticsClass = Type.GetType("AssistantComputerControl.AnalyticsSettings") != null;
70-
71-
string sentryToken = "super_secret";
72-
73-
if (hasAnalyticsClass) {
74-
#if (HasAnalyticsClass)
75-
sentryToken = AnalyticsSettings.sentryToken;
76-
#endif
77-
}
78-
79-
if (sentryToken != "super_secret") {
80-
//Tracking issues with Sentry.IO - not forked from GitHub (official version)
81-
bool sentryOK = false;
82-
try {
83-
if (Properties.Settings.Default.UID != "") {
84-
SentrySdk.ConfigureScope(scope => {
85-
scope.User = new Sentry.Protocol.User {
86-
Id = Properties.Settings.Default.UID
87-
};
88-
});
89-
}
90-
91-
using (SentrySdk.Init(sentryToken)) {
92-
sentryOK = true;
93-
}
94-
} catch {
95-
//Sentry failed. Error sentry's side or invalid key - don't let this stop the app from running
96-
DoDebug("Sentry initiation failed");
97-
ActualMain();
98-
}
99-
100-
if (sentryOK) {
101-
using (SentrySdk.Init(sentryToken)) {
102-
DoDebug("Sentry initiated");
103-
ActualMain();
104-
}
105-
}
106-
} else {
107-
//Code is (most likely) forked - skip issue tracking
108-
ActualMain();
109-
}
68+
Console.WriteLine("Log location; " + logFilePath);
11069

11170
void ActualMain() {
112-
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
71+
//AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
11372

11473
SetupDataFolder();
115-
if (File.Exists(logFilePath))
74+
if (File.Exists(logFilePath)) {
11675
try {
11776
File.WriteAllText(logFilePath, string.Empty);
11877
} catch {
11978
// Don't let this being DENIED crash the software
12079
}
121-
else
80+
} else {
81+
Console.WriteLine("Trying to create log");
12282
CreateLogFile();
83+
}
12384

12485
//Check if software already runs, if so kill this instance
12586
var otherACCs = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(currentLocationFull));
@@ -243,6 +204,48 @@ void ActualMain() {
243204
SystemEvents.SessionSwitch += new SessionSwitchEventHandler(SystemEvents_SessionSwitch); //On wake up from sleep
244205
Application.Run();
245206
}
207+
208+
hasAnalyticsClass = Type.GetType("AssistantComputerControl.AnalyticsSettings") != null;
209+
210+
string sentryToken = "super_secret";
211+
212+
if (hasAnalyticsClass) {
213+
#if (HasAnalyticsClass)
214+
sentryToken = AnalyticsSettings.sentryToken;
215+
#endif
216+
}
217+
218+
if (sentryToken != "super_secret") {
219+
//Tracking issues with Sentry.IO - not forked from GitHub (official version)
220+
bool sentryOK = false;
221+
try {
222+
if (Properties.Settings.Default.UID != "") {
223+
SentrySdk.ConfigureScope(scope => {
224+
scope.User = new Sentry.Protocol.User {
225+
Id = Properties.Settings.Default.UID
226+
};
227+
});
228+
}
229+
230+
using (SentrySdk.Init(sentryToken)) {
231+
sentryOK = true;
232+
}
233+
} catch {
234+
//Sentry failed. Error sentry's side or invalid key - don't let this stop the app from running
235+
DoDebug("Sentry initiation failed");
236+
ActualMain();
237+
}
238+
239+
if (sentryOK) {
240+
using (SentrySdk.Init(sentryToken)) {
241+
DoDebug("Sentry initiated");
242+
ActualMain();
243+
}
244+
}
245+
} else {
246+
//Code is (most likely) forked - skip issue tracking
247+
ActualMain();
248+
}
246249
}
247250
//End main function
248251

@@ -290,7 +293,7 @@ private static void CurrentDomain_UnhandledException(object sender, UnhandledExc
290293
string rawWindowsVersion = Environment.OSVersion.ToString();
291294

292295
int totalExecutions = 0;
293-
foreach(int action in Properties.Settings.Default.TotalActionsExecuted) {
296+
foreach (int action in Properties.Settings.Default.TotalActionsExecuted) {
294297
totalExecutions += action;
295298
}
296299
if (File.Exists(errorLogLoc))
@@ -338,15 +341,18 @@ private static void CurrentDomain_UnhandledException(object sender, UnhandledExc
338341
MessageBox.Show("A critical error occurred. The developer has been notified and will resolve this issue ASAP! Try and start ACC again, and avoid whatever just made it crash (for now) :)", "ACC | Error");
339342
}
340343

341-
private static void CreateLogFile() {
344+
private static bool CreateLogFile() {
342345
try {
343346
using (var tw = new StreamWriter(logFilePath, true)) {
344347
tw.WriteLine(string.Empty);
345348
tw.Close();
346349
}
347-
} catch {
348-
DoDebug("Could not clear log file.");
350+
} catch (Exception e) {
351+
Console.WriteLine("Could not create/clear log file; " + e.Message);
352+
return false;
349353
}
354+
355+
return true;
350356
}
351357

352358
public static void SetupListener() {
@@ -592,33 +598,35 @@ public static string CheckPath() {
592598
path = Properties.Settings.Default.ActionFilePath;
593599
}
594600
} else {
595-
string dropboxFolder = GetDropboxFolder();
596-
if (dropboxFolder == "" || dropboxFolder == null || !Directory.Exists(dropboxFolder)) {
597-
if (Properties.Settings.Default.HasCompletedTutorial && gettingStarted is null && !hasAskedForSetupAgain) {
598-
//Dropbox not found & no custom filepath, go through setup again?
599-
hasAskedForSetupAgain = true;
600-
var msgBox = MessageBox.Show("Dropbox (required) doesn't seem to be installed... Do you want to go through the setup guide again?", "[ERROR] No folder specified | " + messageBoxTitle, MessageBoxButtons.YesNo);
601-
if (msgBox == DialogResult.Yes) {
602-
ShowGettingStarted();
603-
}
601+
/*string dropboxFolder = GetDropboxFolder();
602+
if (dropboxFolder == "" || dropboxFolder == null || !Directory.Exists(dropboxFolder)) {*/
603+
if (Properties.Settings.Default.HasCompletedTutorial && gettingStarted is null && !hasAskedForSetupAgain) {
604+
//Dropbox not found & no custom filepath, go through setup again?
605+
hasAskedForSetupAgain = true;
606+
var msgBox = MessageBox.Show("You do not seem to have chosen a cloud-service. Do you want to go through the setup guide again?", "[ERROR] No folder specified | AssistantComputerControl", MessageBoxButtons.YesNo);
607+
if (msgBox == DialogResult.Yes) {
608+
ShowGettingStarted();
604609
}
605-
} else {
610+
}
611+
/*} else {
606612
string dropboxACCpath = dropboxFolder + @"\AssistantComputerControl";
607613
if (!Directory.Exists(dropboxACCpath)) {
608614
DirectoryInfo di = Directory.CreateDirectory(dropboxACCpath);
609615
di.Attributes = FileAttributes.Directory | FileAttributes.Hidden;
610616
}
611617
path = dropboxACCpath;
612-
}
618+
}*/
613619
}
614-
620+
615621
return Path.HasExtension(path) ? Path.GetDirectoryName(path) : path;
616622
}
617623

618624
public static void DoDebug(string str) {
619625
try {
620626
if (!File.Exists(logFilePath)) {
621-
CreateLogFile();
627+
Console.WriteLine("Log file does not exist, trying to create it");
628+
if (!CreateLogFile())
629+
return;
622630
}
623631
File.AppendAllText(logFilePath, DateTime.Now.ToString() + ": " + str + Environment.NewLine);
624632
if (debug) {

AssistantComputerControl/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
// You can specify all the values or you can default the Build and Revision Numbers
3434
// by using the '*' as shown below:
3535
// [assembly: AssemblyVersion("1.0.*")]
36-
[assembly: AssemblyVersion("1.2.2.0")]
37-
[assembly: AssemblyFileVersion("1.2.2.0")]
36+
[assembly: AssemblyVersion("1.2.3.0")]
37+
[assembly: AssemblyFileVersion("1.2.3.0")]
3838
[assembly: NeutralResourcesLanguage("en")]
3939

AssistantComputerControl/WebFiles/AboutVersion.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
<img style="width:125px;position:fixed;bottom:0;left:0;margin-left:20px;" src="assets/acc_logo.png">
2424
</div>
2525
<div class="col-9">
26-
<b>Version 1.2.2</b>
26+
<b>Version 1.2.3</b>
2727
<ul>
28-
<li><b>Released:</b> 06-01-2019</li>
28+
<li><b>Released:</b> 24-03-2019</li>
2929
</ul>
3030
<p>
3131
<a href="https://assistantcomputercontrol.com/">Website</a> |
@@ -36,15 +36,19 @@
3636
<b>New this version;</b>
3737
<div class="scroller card card-body">
3838
<ul>
39-
<li><i>Hotfix 1.2.2 release notes;</i>
39+
<li>
40+
<i>Hotfix 1.2.2 & Hotfix 1.2.3 release notes;</i>
4041
<ul>
42+
<li>Re-release of 1.2.2 as 1.2.3</li>
43+
<li>Fixed critial issues that made 1.2.2 crash for all new users</li>
4144
<li>Sleep-repetition issue; fixed PC being able to go into a sleep-loop</li>
4245
<li>Fixed links in setup guide for Google Drive and OneDrive shutdown applets (all pointed to Dropbox)</li>
4346
<li>Please report bugs <a href="https://github.com/AlbertMN/AssistantComputerControl/issues">here</a> or in the Discord server!</li>
4447
<li>If you wish to support the development of the project, you can donate <a href="https://www.paypal.me/albermn">here</a> or leave a star on GitHub!</li>
4548
</ul>
4649
</li>
47-
<li><i>Hotfix 1.2.1 release notes;</i>
50+
<li>
51+
<i>Hotfix 1.2.1 release notes;</i>
4852
<ul>
4953
<li>Fixed bug where PC would be stuck in shutdown loop after shutdown or restart action - sorry for the inconvenience</li>
5054
<li>Please report bugs <a href="https://github.com/AlbertMN/AssistantComputerControl/issues">here</a> or in the Discord server!</li>

0 commit comments

Comments
 (0)