Skip to content

Commit

Permalink
v1.2.3 initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertMN committed Mar 24, 2019
1 parent 6b5f272 commit 7774430
Show file tree
Hide file tree
Showing 26 changed files with 118 additions and 89 deletions.
Binary file modified Advanced Installer/Advanced Installer-SetupFiles/ACCsetup.exe
Binary file not shown.
Binary file not shown.
Binary file modified Advanced Installer/Advanced Installer-cache/cacheIndex.txt
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 6 additions & 6 deletions Advanced Installer/Advanced Installer.aip
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<ROW Property="AI_PROPPATH_DIR_PERBUILD_AssistantComputerControl.exe.config" Value="..\AssistantComputerControl\bin\Release"/>
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Microsoft.WindowsAPICodePack.Shell.dll" Value="..\packages\Microsoft.WindowsAPICodePack.Shell.1.1.0\lib"/>
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Microsoft.WindowsAPICodePack.dll" Value="..\packages\Microsoft.WindowsAPICodePack.Core.1.1.0\lib"/>
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Newtonsoft.Json.dll" Value="..\packages\Newtonsoft.Json.11.0.2\lib\net45"/>
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Sentry.PlatformAbstractions.dll" Value="..\packages\Sentry.PlatformAbstractions.1.0.0-rc\lib\net45"/>
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Sentry.Protocol.dll" Value="..\packages\Sentry.Protocol.1.0.0-rc2\lib\net46"/>
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Sentry.dll" Value="..\packages\Sentry.1.0.0-rc2\lib\netstandard2.0"/>
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Newtonsoft.Json.dll" Value="..\packages\Newtonsoft.Json.12.0.1\lib\net45"/>
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Sentry.PlatformAbstractions.dll" Value="..\packages\Sentry.PlatformAbstractions.1.0.0\lib\net45"/>
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Sentry.Protocol.dll" Value="..\packages\Sentry.Protocol.1.0.4\lib\net46"/>
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Sentry.dll" Value="..\packages\Sentry.1.1.2\lib\net461"/>
<ROW Property="AI_PROPPATH_DIR_PERBUILD_System.Collections.Immutable.dll" Value="..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0"/>
<ROW Property="AI_PROPPATH_FILENAME_PERBUILD_AssistantComputerControl.exe" Value="AssistantComputerControl.exe"/>
<ROW Property="AI_PROPPATH_FILENAME_PERBUILD_AssistantComputerControl.exe.config" Value="AssistantComputerControl.exe.config"/>
Expand All @@ -37,10 +37,10 @@
<ROW Property="BannerBitmap" Value="banner" MultiBuildValue="DefaultBuild:banner.png" Type="1" MsiKey="BannerBitmap"/>
<ROW Property="DialogBitmap" Value="dialog" MultiBuildValue="DefaultBuild:dialogbitmap.png" Type="1" MsiKey="DialogBitmap"/>
<ROW Property="Manufacturer" Value="Albert MN."/>
<ROW Property="ProductCode" Value="1033:{6A723DD4-5278-4D60-8A57-361116141F86} " Type="16"/>
<ROW Property="ProductCode" Value="1033:{F6AD077F-7B7F-41E0-BC10-8F9257D1E03A} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
<ROW Property="ProductName" Value="AssistantComputerControl"/>
<ROW Property="ProductVersion" Value="1.2.2.0" Type="32"/>
<ROW Property="ProductVersion" Value="1.2.3.0" Type="32"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
<ROW Property="UpgradeCode" Value="{8E6F4399-B513-420B-8E11-36837A8550EE}"/>
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
Expand Down
1 change: 1 addition & 0 deletions AssistantComputerControl/ACC_Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ private static void FileDownloadedCallback(object sender, AsyncCompletedEventArg
MessageBox.Show("Failed to download new version. Try again later!", "Error | " + MainProgram.messageBoxTitle);
}

Thread.Sleep(500);
Thread.CurrentThread.Abort();
}
}
Expand Down
8 changes: 8 additions & 0 deletions AssistantComputerControl/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Sentry.Protocol" publicKeyToken="fba2ec45388e2af0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.4.0" newVersion="1.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
16 changes: 8 additions & 8 deletions AssistantComputerControl/AssistantComputerControl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{404B42F4-E135-4D2F-8FD0-20A590814930}</ProjectGuid>
<OutputType>Exe</OutputType>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AssistantComputerControl</RootNamespace>
<AssemblyName>AssistantComputerControl</AssemblyName>
Expand Down Expand Up @@ -99,19 +99,19 @@
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.WindowsAPICodePack.Shell.1.1.0\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="Sentry, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
<HintPath>..\packages\Sentry.1.0.0-rc2\lib\netstandard2.0\Sentry.dll</HintPath>
<Reference Include="Sentry, Version=1.1.2.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
<HintPath>..\packages\Sentry.1.1.2\lib\net461\Sentry.dll</HintPath>
</Reference>
<Reference Include="Sentry.PlatformAbstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
<HintPath>..\packages\Sentry.PlatformAbstractions.1.0.0-rc\lib\net45\Sentry.PlatformAbstractions.dll</HintPath>
<HintPath>..\packages\Sentry.PlatformAbstractions.1.0.0\lib\net45\Sentry.PlatformAbstractions.dll</HintPath>
</Reference>
<Reference Include="Sentry.Protocol, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
<HintPath>..\packages\Sentry.Protocol.1.0.0-rc2\lib\net46\Sentry.Protocol.dll</HintPath>
<Reference Include="Sentry.Protocol, Version=1.0.4.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
<HintPath>..\packages\Sentry.Protocol.1.0.4\lib\net46\Sentry.Protocol.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
Expand Down
138 changes: 73 additions & 65 deletions AssistantComputerControl/MainProgram.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* AssistantComputerControl
* Made by Albert MN.
* Updated: v1.2.2, 10-02-2019
* Updated: v1.2.3, 10-02-2019
*
* Use:
* - Main class. Starts everything.
Expand All @@ -24,8 +24,8 @@

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

static public string currentLocationFull = Assembly.GetEntryAssembly().Location,
defaultActionFolder = CheckPath(),

currentLocation = Path.GetDirectoryName(currentLocationFull),
dataFolderLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "AssistantComputerControl"),
Expand All @@ -66,60 +65,22 @@ public enum TestStatus {
[STAThread]
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
static void Main(string[] args) {
hasAnalyticsClass = Type.GetType("AssistantComputerControl.AnalyticsSettings") != null;

string sentryToken = "super_secret";

if (hasAnalyticsClass) {
#if (HasAnalyticsClass)
sentryToken = AnalyticsSettings.sentryToken;
#endif
}

if (sentryToken != "super_secret") {
//Tracking issues with Sentry.IO - not forked from GitHub (official version)
bool sentryOK = false;
try {
if (Properties.Settings.Default.UID != "") {
SentrySdk.ConfigureScope(scope => {
scope.User = new Sentry.Protocol.User {
Id = Properties.Settings.Default.UID
};
});
}

using (SentrySdk.Init(sentryToken)) {
sentryOK = true;
}
} catch {
//Sentry failed. Error sentry's side or invalid key - don't let this stop the app from running
DoDebug("Sentry initiation failed");
ActualMain();
}

if (sentryOK) {
using (SentrySdk.Init(sentryToken)) {
DoDebug("Sentry initiated");
ActualMain();
}
}
} else {
//Code is (most likely) forked - skip issue tracking
ActualMain();
}
Console.WriteLine("Log location; " + logFilePath);

void ActualMain() {
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
//AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

SetupDataFolder();
if (File.Exists(logFilePath))
if (File.Exists(logFilePath)) {
try {
File.WriteAllText(logFilePath, string.Empty);
} catch {
// Don't let this being DENIED crash the software
}
else
} else {
Console.WriteLine("Trying to create log");
CreateLogFile();
}

//Check if software already runs, if so kill this instance
var otherACCs = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(currentLocationFull));
Expand Down Expand Up @@ -243,6 +204,48 @@ void ActualMain() {
SystemEvents.SessionSwitch += new SessionSwitchEventHandler(SystemEvents_SessionSwitch); //On wake up from sleep
Application.Run();
}

hasAnalyticsClass = Type.GetType("AssistantComputerControl.AnalyticsSettings") != null;

string sentryToken = "super_secret";

if (hasAnalyticsClass) {
#if (HasAnalyticsClass)
sentryToken = AnalyticsSettings.sentryToken;
#endif
}

if (sentryToken != "super_secret") {
//Tracking issues with Sentry.IO - not forked from GitHub (official version)
bool sentryOK = false;
try {
if (Properties.Settings.Default.UID != "") {
SentrySdk.ConfigureScope(scope => {
scope.User = new Sentry.Protocol.User {
Id = Properties.Settings.Default.UID
};
});
}

using (SentrySdk.Init(sentryToken)) {
sentryOK = true;
}
} catch {
//Sentry failed. Error sentry's side or invalid key - don't let this stop the app from running
DoDebug("Sentry initiation failed");
ActualMain();
}

if (sentryOK) {
using (SentrySdk.Init(sentryToken)) {
DoDebug("Sentry initiated");
ActualMain();
}
}
} else {
//Code is (most likely) forked - skip issue tracking
ActualMain();
}
}
//End main function

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

int totalExecutions = 0;
foreach(int action in Properties.Settings.Default.TotalActionsExecuted) {
foreach (int action in Properties.Settings.Default.TotalActionsExecuted) {
totalExecutions += action;
}
if (File.Exists(errorLogLoc))
Expand Down Expand Up @@ -338,15 +341,18 @@ private static void CurrentDomain_UnhandledException(object sender, UnhandledExc
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");
}

private static void CreateLogFile() {
private static bool CreateLogFile() {
try {
using (var tw = new StreamWriter(logFilePath, true)) {
tw.WriteLine(string.Empty);
tw.Close();
}
} catch {
DoDebug("Could not clear log file.");
} catch (Exception e) {
Console.WriteLine("Could not create/clear log file; " + e.Message);
return false;
}

return true;
}

public static void SetupListener() {
Expand Down Expand Up @@ -592,33 +598,35 @@ public static string CheckPath() {
path = Properties.Settings.Default.ActionFilePath;
}
} else {
string dropboxFolder = GetDropboxFolder();
if (dropboxFolder == "" || dropboxFolder == null || !Directory.Exists(dropboxFolder)) {
if (Properties.Settings.Default.HasCompletedTutorial && gettingStarted is null && !hasAskedForSetupAgain) {
//Dropbox not found & no custom filepath, go through setup again?
hasAskedForSetupAgain = true;
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);
if (msgBox == DialogResult.Yes) {
ShowGettingStarted();
}
/*string dropboxFolder = GetDropboxFolder();
if (dropboxFolder == "" || dropboxFolder == null || !Directory.Exists(dropboxFolder)) {*/
if (Properties.Settings.Default.HasCompletedTutorial && gettingStarted is null && !hasAskedForSetupAgain) {
//Dropbox not found & no custom filepath, go through setup again?
hasAskedForSetupAgain = true;
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);
if (msgBox == DialogResult.Yes) {
ShowGettingStarted();
}
} else {
}
/*} else {
string dropboxACCpath = dropboxFolder + @"\AssistantComputerControl";
if (!Directory.Exists(dropboxACCpath)) {
DirectoryInfo di = Directory.CreateDirectory(dropboxACCpath);
di.Attributes = FileAttributes.Directory | FileAttributes.Hidden;
}
path = dropboxACCpath;
}
}*/
}

return Path.HasExtension(path) ? Path.GetDirectoryName(path) : path;
}

public static void DoDebug(string str) {
try {
if (!File.Exists(logFilePath)) {
CreateLogFile();
Console.WriteLine("Log file does not exist, trying to create it");
if (!CreateLogFile())
return;
}
File.AppendAllText(logFilePath, DateTime.Now.ToString() + ": " + str + Environment.NewLine);
if (debug) {
Expand Down
4 changes: 2 additions & 2 deletions AssistantComputerControl/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// 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("1.2.2.0")]
[assembly: AssemblyFileVersion("1.2.2.0")]
[assembly: AssemblyVersion("1.2.3.0")]
[assembly: AssemblyFileVersion("1.2.3.0")]
[assembly: NeutralResourcesLanguage("en")]

12 changes: 8 additions & 4 deletions AssistantComputerControl/WebFiles/AboutVersion.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<img style="width:125px;position:fixed;bottom:0;left:0;margin-left:20px;" src="assets/acc_logo.png">
</div>
<div class="col-9">
<b>Version 1.2.2</b>
<b>Version 1.2.3</b>
<ul>
<li><b>Released:</b> 06-01-2019</li>
<li><b>Released:</b> 24-03-2019</li>
</ul>
<p>
<a href="https://assistantcomputercontrol.com/">Website</a> |
Expand All @@ -36,15 +36,19 @@
<b>New this version;</b>
<div class="scroller card card-body">
<ul>
<li><i>Hotfix 1.2.2 release notes;</i>
<li>
<i>Hotfix 1.2.2 & Hotfix 1.2.3 release notes;</i>
<ul>
<li>Re-release of 1.2.2 as 1.2.3</li>
<li>Fixed critial issues that made 1.2.2 crash for all new users</li>
<li>Sleep-repetition issue; fixed PC being able to go into a sleep-loop</li>
<li>Fixed links in setup guide for Google Drive and OneDrive shutdown applets (all pointed to Dropbox)</li>
<li>Please report bugs <a href="https://github.com/AlbertMN/AssistantComputerControl/issues">here</a> or in the Discord server!</li>
<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>
</ul>
</li>
<li><i>Hotfix 1.2.1 release notes;</i>
<li>
<i>Hotfix 1.2.1 release notes;</i>
<ul>
<li>Fixed bug where PC would be stuck in shutdown loop after shutdown or restart action - sorry for the inconvenience</li>
<li>Please report bugs <a href="https://github.com/AlbertMN/AssistantComputerControl/issues">here</a> or in the Discord server!</li>
Expand Down
Loading

0 comments on commit 7774430

Please sign in to comment.