mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-09-14 10:32:10 +02:00
Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
00acc677e6 | |||
1a799881e8 | |||
f75677593a | |||
19e3bd19f0 | |||
85701b0a3c | |||
014cb18dcb | |||
e71e1c853f | |||
ee9d9196f5 | |||
53c8272e01 | |||
7f7b6b1e2a | |||
405777e0f5 | |||
df2b624cb5 | |||
8a48d5c2f9 | |||
c55ee71442 | |||
3f82745f5b | |||
404187a1ae | |||
2b7b3f586b | |||
04959a3493 | |||
97cf4932ae | |||
b0d88a0a37 | |||
67a2e40622 |
@@ -1,7 +1,8 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using TweetDck.Core.Utils;
|
||||
|
||||
namespace TweetDck.Configuration{
|
||||
sealed class LockManager{
|
||||
@@ -114,25 +115,45 @@ namespace TweetDck.Configuration{
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool CloseLockingProcess(int timeout){
|
||||
public bool CloseLockingProcess(int closeTimeout, int killTimeout){
|
||||
if (LockingProcess != null){
|
||||
LockingProcess.CloseMainWindow();
|
||||
try{
|
||||
if (LockingProcess.CloseMainWindow()){
|
||||
WindowsUtils.TrySleepUntil(CheckLockingProcessExited, closeTimeout, 250);
|
||||
}
|
||||
|
||||
for(int waited = 0; waited < timeout && !LockingProcess.HasExited; waited += 250){
|
||||
LockingProcess.Refresh();
|
||||
Thread.Sleep(250);
|
||||
}
|
||||
if (!LockingProcess.HasExited){
|
||||
LockingProcess.Kill();
|
||||
WindowsUtils.TrySleepUntil(CheckLockingProcessExited, killTimeout, 250);
|
||||
}
|
||||
|
||||
if (LockingProcess.HasExited){
|
||||
LockingProcess.Dispose();
|
||||
LockingProcess = null;
|
||||
return true;
|
||||
if (LockingProcess.HasExited){
|
||||
LockingProcess.Dispose();
|
||||
LockingProcess = null;
|
||||
return true;
|
||||
}
|
||||
}catch(Exception ex){
|
||||
if (ex is InvalidOperationException || ex is Win32Exception){
|
||||
if (LockingProcess != null){
|
||||
LockingProcess.Refresh();
|
||||
|
||||
bool hasExited = LockingProcess.HasExited;
|
||||
LockingProcess.Dispose();
|
||||
return hasExited;
|
||||
}
|
||||
}
|
||||
else throw;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool CheckLockingProcessExited(){
|
||||
LockingProcess.Refresh();
|
||||
return LockingProcess.HasExited;
|
||||
}
|
||||
|
||||
// Utility functions
|
||||
|
||||
private static void WriteIntToStream(Stream stream, int value){
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<package id="cef.redist.x64" version="3.2785.1486" targetFramework="net452" />
|
||||
<package id="cef.redist.x86" version="3.2785.1486" targetFramework="net452" />
|
||||
<package id="CefSharp.Common" version="53.0.1" targetFramework="net452" />
|
||||
<package id="CefSharp.WinForms" version="53.0.1" targetFramework="net452" />
|
||||
<package id="Microsoft.VC120.CRT.JetBrains" version="12.0.21005.2" targetFramework="net452" />
|
||||
<package id="cef.redist.x64" version="3.2883.1552" targetFramework="net452" xmlns="" />
|
||||
<package id="cef.redist.x86" version="3.2883.1552" targetFramework="net452" xmlns="" />
|
||||
<package id="CefSharp.Common" version="55.0.0" targetFramework="net452" xmlns="" />
|
||||
<package id="CefSharp.WinForms" version="55.0.0" targetFramework="net452" xmlns="" />
|
||||
<package id="Microsoft.VC120.CRT.JetBrains" version="12.0.21005.2" targetFramework="net452" xmlns="" />
|
||||
</packages>
|
@@ -27,13 +27,13 @@ namespace TweetDck.Core.Bridge{
|
||||
}
|
||||
|
||||
public void LoadFontSizeClass(string fsClass){
|
||||
form.InvokeSafe(() => {
|
||||
form.InvokeAsyncSafe(() => {
|
||||
TweetNotification.SetFontSizeClass(fsClass);
|
||||
});
|
||||
}
|
||||
|
||||
public void LoadNotificationHeadContents(string headContents){
|
||||
form.InvokeSafe(() => {
|
||||
form.InvokeAsyncSafe(() => {
|
||||
TweetNotification.SetHeadTag(headContents);
|
||||
});
|
||||
}
|
||||
@@ -62,7 +62,7 @@ namespace TweetDck.Core.Bridge{
|
||||
}
|
||||
|
||||
public void OnTweetPopup(string tweetHtml, string tweetUrl, int tweetCharacters){
|
||||
notification.InvokeSafe(() => {
|
||||
notification.InvokeAsyncSafe(() => {
|
||||
form.OnTweetNotification();
|
||||
notification.ShowNotification(new TweetNotification(tweetHtml, tweetUrl, tweetCharacters));
|
||||
});
|
||||
@@ -109,15 +109,7 @@ namespace TweetDck.Core.Bridge{
|
||||
}
|
||||
|
||||
public void ClickUploadImage(int offsetX, int offsetY){
|
||||
form.InvokeSafe(() => {
|
||||
Point prevPos = Cursor.Position;
|
||||
|
||||
Cursor.Position = form.PointToScreen(new Point(offsetX, offsetY));
|
||||
NativeMethods.SimulateMouseClick(NativeMethods.MouseButton.Left);
|
||||
Cursor.Position = prevPos;
|
||||
|
||||
form.OnImagePastedFinish();
|
||||
});
|
||||
form.InvokeAsyncSafe(() => form.TriggerImageUpload(offsetX, offsetY));
|
||||
}
|
||||
|
||||
public void ScreenshotTweet(string html, int width, int height){
|
||||
|
@@ -17,6 +17,7 @@ using TweetDck.Core.Bridge;
|
||||
using TweetDck.Core.Notification;
|
||||
using TweetDck.Core.Notification.Screenshot;
|
||||
using TweetDck.Updates.Events;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace TweetDck.Core{
|
||||
sealed partial class FormBrowser : Form{
|
||||
@@ -230,7 +231,7 @@ namespace TweetDck.Core{
|
||||
}
|
||||
|
||||
private void plugins_Reloaded(object sender, PluginLoadEventArgs e){
|
||||
ReloadBrowser();
|
||||
browser.GetBrowser().Reload();
|
||||
}
|
||||
|
||||
private void plugins_PluginChangedState(object sender, PluginChangedStateEventArgs e){
|
||||
@@ -243,6 +244,7 @@ namespace TweetDck.Core{
|
||||
FormUpdateDownload downloadForm = new FormUpdateDownload(e.UpdateInfo);
|
||||
downloadForm.MoveToCenter(this);
|
||||
downloadForm.ShowDialog();
|
||||
downloadForm.Dispose();
|
||||
|
||||
if (downloadForm.UpdateStatus == FormUpdateDownload.Status.Succeeded){
|
||||
UpdateInstallerPath = downloadForm.InstallerPath;
|
||||
@@ -263,7 +265,12 @@ namespace TweetDck.Core{
|
||||
|
||||
protected override void WndProc(ref Message m){
|
||||
if (isLoaded && m.Msg == Program.WindowRestoreMessage){
|
||||
trayIcon_ClickRestore(trayIcon, new EventArgs());
|
||||
using(Process process = Process.GetCurrentProcess()){
|
||||
if (process.Id == m.WParam.ToInt32()){
|
||||
trayIcon_ClickRestore(trayIcon, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -399,16 +406,14 @@ namespace TweetDck.Core{
|
||||
browser.ExecuteScriptAsync("TDGF_tryPasteImage()");
|
||||
}
|
||||
|
||||
public void OnImagePastedFinish(){
|
||||
browser.ExecuteScriptAsync("TDGF_tryPasteImageFinish()");
|
||||
public void TriggerImageUpload(int offsetX, int offsetY){
|
||||
IBrowserHost host = browser.GetBrowser().GetHost();
|
||||
host.SendMouseClickEvent(offsetX, offsetY, MouseButtonType.Left, false, 1, CefEventFlags.None);
|
||||
host.SendMouseClickEvent(offsetX, offsetY, MouseButtonType.Left, true, 1, CefEventFlags.None);
|
||||
}
|
||||
|
||||
public void TriggerTweetScreenshot(){
|
||||
browser.ExecuteScriptAsync("TDGF_triggerScreenshot()");
|
||||
}
|
||||
|
||||
public void ReloadBrowser(){
|
||||
browser.ExecuteScriptAsync("window.location.reload()");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,11 @@
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using Timer = System.Windows.Forms.Timer;
|
||||
|
||||
namespace TweetDck.Core.Utils{
|
||||
static class WindowsUtils{
|
||||
@@ -45,6 +48,18 @@ namespace TweetDck.Core.Utils{
|
||||
return timer;
|
||||
}
|
||||
|
||||
public static bool TrySleepUntil(Func<bool> test, int timeoutMillis, int timeStepMillis){
|
||||
for(int waited = 0; waited < timeoutMillis; waited += timeStepMillis){
|
||||
if (test()){
|
||||
return true;
|
||||
}
|
||||
|
||||
Thread.Sleep(timeStepMillis);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void ClipboardStripHtmlStyles(){
|
||||
if (!Clipboard.ContainsText(TextDataFormat.Html)){
|
||||
return;
|
||||
|
28
Program.cs
28
Program.cs
@@ -21,8 +21,8 @@ namespace TweetDck{
|
||||
public const string BrandName = "TweetDuck";
|
||||
public const string Website = "https://tweetduck.chylex.com";
|
||||
|
||||
public const string VersionTag = "1.6.4";
|
||||
public const string VersionFull = "1.6.4.0";
|
||||
public const string VersionTag = "1.6.5";
|
||||
public const string VersionFull = "1.6.5.0";
|
||||
|
||||
public static readonly Version Version = new Version(VersionTag);
|
||||
|
||||
@@ -89,21 +89,26 @@ namespace TweetDck{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else{
|
||||
Thread.Sleep(500);
|
||||
}
|
||||
else Thread.Sleep(500);
|
||||
}
|
||||
}
|
||||
else{
|
||||
LockManager.Result lockResult = LockManager.Lock();
|
||||
|
||||
if (lockResult == LockManager.Result.HasProcess){
|
||||
if (LockManager.LockingProcess.MainWindowHandle == IntPtr.Zero && LockManager.LockingProcess.Responding){ // restore if the original process is in tray
|
||||
NativeMethods.SendMessage(NativeMethods.HWND_BROADCAST, WindowRestoreMessage, 0, IntPtr.Zero);
|
||||
return;
|
||||
if (LockManager.LockingProcess.MainWindowHandle == IntPtr.Zero){ // restore if the original process is in tray
|
||||
NativeMethods.SendMessage(NativeMethods.HWND_BROADCAST, WindowRestoreMessage, LockManager.LockingProcess.Id, IntPtr.Zero);
|
||||
|
||||
if (WindowsUtils.TrySleepUntil(() => {
|
||||
LockManager.LockingProcess.Refresh();
|
||||
return LockManager.LockingProcess.HasExited || (LockManager.LockingProcess.MainWindowHandle != IntPtr.Zero && LockManager.LockingProcess.Responding);
|
||||
}, 2000, 250)){
|
||||
return; // should trigger on first attempt if succeeded, but wait just in case
|
||||
}
|
||||
}
|
||||
else if (MessageBox.Show("Another instance of "+BrandName+" is already running.\r\nDo you want to close it?", BrandName+" is Already Running", MessageBoxButtons.YesNo, MessageBoxIcon.Error, MessageBoxDefaultButton.Button2) == DialogResult.Yes){
|
||||
if (!LockManager.CloseLockingProcess(30000)){
|
||||
|
||||
if (MessageBox.Show("Another instance of "+BrandName+" is already running.\r\nDo you want to close it?", BrandName+" is Already Running", MessageBoxButtons.YesNo, MessageBoxIcon.Error, MessageBoxDefaultButton.Button2) == DialogResult.Yes){
|
||||
if (!LockManager.CloseLockingProcess(10000, 5000)){
|
||||
MessageBox.Show("Could not close the other process.", BrandName+" Has Failed :(", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
@@ -166,10 +171,11 @@ namespace TweetDck{
|
||||
if (mainForm.UpdateInstallerPath != null){
|
||||
ExitCleanup();
|
||||
|
||||
// ProgramPath has a trailing backslash
|
||||
string updaterArgs = "/SP- /SILENT /CLOSEAPPLICATIONS /UPDATEPATH=\""+ProgramPath+"\" /RUNARGS=\""+GetArgsClean().ToString().Replace("\"", "^\"")+"\""+(IsPortable ? " /PORTABLE=1" : "");
|
||||
bool runElevated = !IsPortable || !WindowsUtils.CheckFolderWritePermission(ProgramPath);
|
||||
|
||||
WindowsUtils.StartProcess(mainForm.UpdateInstallerPath, updaterArgs, runElevated); // ProgramPath has a trailing backslash
|
||||
WindowsUtils.StartProcess(mainForm.UpdateInstallerPath, updaterArgs, runElevated);
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
|
@@ -1,11 +1,11 @@
|
||||
# Build Instructions
|
||||
|
||||
The program was build using Visual Studio 2013. After opening the solution, make sure you have **CefSharp.WinForms** and **Microsoft.VC120.CRT.JetBrains** included - if not, download them using NuGet. For **CefSharp**, you will need version 53 or newer currently available as a pre-release.
|
||||
The program was build using Visual Studio 2013. After opening the solution, make sure you have **CefSharp.WinForms** and **Microsoft.VC120.CRT.JetBrains** included - if not, download them using NuGet.
|
||||
```
|
||||
PM> Install-Package CefSharp.WinForms -Version 53.0.1
|
||||
PM> Install-Package CefSharp.WinForms -Version 55.0.0
|
||||
PM> Install-Package Microsoft.VC120.CRT.JetBrains
|
||||
```
|
||||
|
||||
After building, run **_postbuild.bat** which deletes unnecessary files that CefSharp adds after post-build events >_>
|
||||
After building, run either `_postbuild.bat` if you want to package the files yourself, or `bld/RUN BUILD.bat` to generate installer files using Inno Setup. Do not run both files consecutively, otherwise the program will crash - if you want to do both, rebuild the project before running each file.
|
||||
|
||||
Built files are then available in **bin/x86** and/or **bin/x64**.
|
||||
Built files are then available in **bin/x86** and/or **bin/x64**, installer files are generated in **bld/Output**. If you decide to release a custom version publicly, please make it clear that it is not the original TweetDuck.
|
||||
|
@@ -344,6 +344,11 @@
|
||||
};
|
||||
|
||||
var clickUpload = function(){
|
||||
$(document).one("uiFilesAdded", function(){
|
||||
getScroller().scrollTop(prevScrollTop);
|
||||
$(".js-drawer").find(".js-compose-text").first()[0].focus();
|
||||
});
|
||||
|
||||
var button = $(".js-add-image-button").first();
|
||||
|
||||
var scroller = getScroller();
|
||||
@@ -395,13 +400,6 @@
|
||||
lastPasteElement = null;
|
||||
}
|
||||
};
|
||||
|
||||
window.TDGF_tryPasteImageFinish = function(){
|
||||
setTimeout(function(){
|
||||
getScroller().scrollTop(prevScrollTop);
|
||||
$(".js-drawer").find(".js-compose-text").first()[0].focus();
|
||||
}, 10);
|
||||
};
|
||||
})();
|
||||
|
||||
//
|
||||
|
@@ -19,6 +19,11 @@
|
||||
//
|
||||
const updateCheckUrlAll = "https://api.github.com/repos/chylex/TweetDuck/releases";
|
||||
|
||||
//
|
||||
// Constant: Fallback url in case the update installer file is missing.
|
||||
//
|
||||
const updateDownloadFallback = "https://tweetduck.chylex.com/#download";
|
||||
|
||||
//
|
||||
// Function: Creates the update notification element. Removes the old one if already exists.
|
||||
//
|
||||
@@ -28,7 +33,7 @@
|
||||
var ele = $("#tweetduck-update");
|
||||
var existed = ele.length > 0;
|
||||
|
||||
if (existed > 0){
|
||||
if (existed){
|
||||
ele.remove();
|
||||
}
|
||||
|
||||
@@ -106,7 +111,13 @@
|
||||
|
||||
buttonDiv.children(".tdu-btn-download").click(function(){
|
||||
ele.remove();
|
||||
$TDU.onUpdateAccepted(version, download);
|
||||
|
||||
if (download){
|
||||
$TDU.onUpdateAccepted(version, download);
|
||||
}
|
||||
else{
|
||||
$TDU.openBrowser(updateDownloadFallback);
|
||||
}
|
||||
});
|
||||
|
||||
buttonDiv.children(".tdu-btn-unsupported").click(function(){
|
||||
@@ -125,12 +136,21 @@
|
||||
return ele;
|
||||
};
|
||||
|
||||
//
|
||||
// Function: Returns milliseconds until the start of the next hour, with an offset in seconds that can skip an hour if the clock would roll over too soon.
|
||||
//
|
||||
var getTimeUntilNextHour = function(offset){
|
||||
var now = new Date();
|
||||
var offset = new Date(+now+offset*1000);
|
||||
return new Date(offset.getFullYear(), offset.getMonth(), offset.getDate(), offset.getHours()+1, 0, 0)-now;
|
||||
};
|
||||
|
||||
//
|
||||
// Function: Runs an update check and updates all DOM elements appropriately.
|
||||
//
|
||||
var runUpdateCheck = function(eventID, versionTag, dismissedVersionTag, allowPre){
|
||||
clearTimeout(updateCheckTimeoutID);
|
||||
updateCheckTimeoutID = setTimeout($TDU.triggerUpdateCheck, 1000*60*60); // 1 hour
|
||||
updateCheckTimeoutID = setTimeout($TDU.triggerUpdateCheck, getTimeUntilNextHour(60*30)); // 30 minute offset
|
||||
|
||||
$.getJSON(allowPre ? updateCheckUrlAll : updateCheckUrlLatest, function(response){
|
||||
var release = allowPre ? response[0] : response;
|
||||
@@ -139,7 +159,7 @@
|
||||
var hasUpdate = tagName !== versionTag && tagName !== dismissedVersionTag && release.assets.length > 0;
|
||||
|
||||
if (hasUpdate){
|
||||
var obj = release.assets.find(asset => asset.name === updateFileName) || release.assets[0];
|
||||
var obj = release.assets.find(asset => asset.name === updateFileName) || { browser_download_url: "" };
|
||||
displayNotification(tagName, obj.browser_download_url);
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.props')" />
|
||||
<Import Project="packages\CefSharp.Common.53.0.1\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.53.0.1\build\CefSharp.Common.props')" />
|
||||
<Import Project="packages\CefSharp.WinForms.55.0.0\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.55.0.0\build\CefSharp.WinForms.props')" />
|
||||
<Import Project="packages\CefSharp.Common.55.0.0\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.55.0.0\build\CefSharp.Common.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -10,11 +10,10 @@
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>TweetDck</RootNamespace>
|
||||
<AssemblyName Condition=" '$(Configuration)' == 'Debug' ">TweetDick</AssemblyName>
|
||||
<AssemblyName Condition=" '$(Configuration)' == 'Release' ">TweetDuck</AssemblyName>
|
||||
<AssemblyName>TweetDuck</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<NuGetPackageImportStamp>783c0e30</NuGetPackageImportStamp>
|
||||
<NuGetPackageImportStamp>886d3074</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
@@ -59,9 +58,6 @@
|
||||
</DefineConstants>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AssemblyName>TweetDuck</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -256,7 +252,6 @@
|
||||
<Compile Include="Resources\ScriptLoader.cs" />
|
||||
<Compile Include="Updates\UpdaterSettings.cs" />
|
||||
<None Include="Configuration\app.config" />
|
||||
<None Include="Configuration\packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
||||
@@ -308,6 +303,7 @@
|
||||
</ContentWithTargetPath>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Configuration\packages.config" />
|
||||
<None Include="Resources\icon-small.ico" />
|
||||
<None Include="Resources\icon-tray-new.ico" />
|
||||
<None Include="Resources\icon-tray.ico" />
|
||||
@@ -329,12 +325,12 @@
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('packages\cef.redist.x86.3.2785.1486\build\cef.redist.x86.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.3.2785.1486\build\cef.redist.x86.targets'))" />
|
||||
<Error Condition="!Exists('packages\cef.redist.x64.3.2785.1486\build\cef.redist.x64.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.3.2785.1486\build\cef.redist.x64.targets'))" />
|
||||
<Error Condition="!Exists('packages\CefSharp.Common.53.0.1\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.53.0.1\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('packages\CefSharp.Common.53.0.1\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.53.0.1\build\CefSharp.Common.targets'))" />
|
||||
<Error Condition="!Exists('packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.props'))" />
|
||||
<Error Condition="!Exists('packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.targets'))" />
|
||||
<Error Condition="!Exists('packages\cef.redist.x86.3.2883.1552\build\cef.redist.x86.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.3.2883.1552\build\cef.redist.x86.targets'))" />
|
||||
<Error Condition="!Exists('packages\cef.redist.x64.3.2883.1552\build\cef.redist.x64.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.3.2883.1552\build\cef.redist.x64.targets'))" />
|
||||
<Error Condition="!Exists('packages\CefSharp.Common.55.0.0\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.55.0.0\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('packages\CefSharp.Common.55.0.0\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.55.0.0\build\CefSharp.Common.targets'))" />
|
||||
<Error Condition="!Exists('packages\CefSharp.WinForms.55.0.0\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.55.0.0\build\CefSharp.WinForms.props'))" />
|
||||
<Error Condition="!Exists('packages\CefSharp.WinForms.55.0.0\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.55.0.0\build\CefSharp.WinForms.targets'))" />
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>del "$(TargetPath).config"
|
||||
@@ -363,10 +359,10 @@ if $(ConfigurationName) == Debug (
|
||||
xcopy "$(ProjectDir)Resources\Plugins\.debug\*" "$(TargetDir)plugins\user\.debug\" /E /Y
|
||||
)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="packages\cef.redist.x86.3.2785.1486\build\cef.redist.x86.targets" Condition="Exists('packages\cef.redist.x86.3.2785.1486\build\cef.redist.x86.targets')" />
|
||||
<Import Project="packages\cef.redist.x64.3.2785.1486\build\cef.redist.x64.targets" Condition="Exists('packages\cef.redist.x64.3.2785.1486\build\cef.redist.x64.targets')" />
|
||||
<Import Project="packages\CefSharp.Common.53.0.1\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.53.0.1\build\CefSharp.Common.targets')" />
|
||||
<Import Project="packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.targets" Condition="Exists('packages\CefSharp.WinForms.53.0.1\build\CefSharp.WinForms.targets')" />
|
||||
<Import Project="packages\cef.redist.x86.3.2883.1552\build\cef.redist.x86.targets" Condition="Exists('packages\cef.redist.x86.3.2883.1552\build\cef.redist.x86.targets')" />
|
||||
<Import Project="packages\cef.redist.x64.3.2883.1552\build\cef.redist.x64.targets" Condition="Exists('packages\cef.redist.x64.3.2883.1552\build\cef.redist.x64.targets')" />
|
||||
<Import Project="packages\CefSharp.Common.55.0.0\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.55.0.0\build\CefSharp.Common.targets')" />
|
||||
<Import Project="packages\CefSharp.WinForms.55.0.0\build\CefSharp.WinForms.targets" Condition="Exists('packages\CefSharp.WinForms.55.0.0\build\CefSharp.WinForms.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Windows.Forms;
|
||||
@@ -69,7 +68,7 @@ namespace TweetDck.Updates{
|
||||
progressDownload.SetValueInstant(1000);
|
||||
}
|
||||
|
||||
labelStatus.Text = (e.BytesReceived/BytesToKB).ToString("0.0", CultureInfo.CurrentCulture)+" kB";
|
||||
labelStatus.Text = (long)(e.BytesReceived/BytesToKB)+" kB";
|
||||
}
|
||||
else{
|
||||
if (progressDownload.Style != ProgressBarStyle.Continuous){
|
||||
@@ -77,7 +76,7 @@ namespace TweetDck.Updates{
|
||||
}
|
||||
|
||||
progressDownload.SetValueInstant(e.ProgressPercentage*10);
|
||||
labelStatus.Text = (e.BytesReceived/BytesToKB).ToString("0.0", CultureInfo.CurrentCulture)+" / "+(e.TotalBytesToReceive/BytesToKB).ToString("0.0", CultureInfo.CurrentCulture)+" kB";
|
||||
labelStatus.Text = (long)(e.BytesReceived/BytesToKB)+" / "+(long)(e.TotalBytesToReceive/BytesToKB)+" kB";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -67,12 +67,12 @@ namespace TweetDck.Updates{
|
||||
|
||||
private void TriggerUpdateAcceptedEvent(UpdateAcceptedEventArgs args){
|
||||
if (UpdateAccepted != null){
|
||||
form.InvokeSafe(() => UpdateAccepted(this, args));
|
||||
form.InvokeAsyncSafe(() => UpdateAccepted(this, args));
|
||||
}
|
||||
}
|
||||
|
||||
private void TriggerUpdateDismissedEvent(UpdateDismissedEventArgs args){
|
||||
form.InvokeSafe(() => {
|
||||
form.InvokeAsyncSafe(() => {
|
||||
settings.DismissedUpdate = args.VersionTag;
|
||||
|
||||
if (UpdateDismissed != null){
|
||||
@@ -83,7 +83,7 @@ namespace TweetDck.Updates{
|
||||
|
||||
private void TriggerCheckFinishedEvent(UpdateCheckEventArgs args){
|
||||
if (CheckFinished != null){
|
||||
form.InvokeSafe(() => CheckFinished(this, args));
|
||||
form.InvokeAsyncSafe(() => CheckFinished(this, args));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
del "bin\x86\Release\*.xml"
|
||||
del "bin\x86\Release\*.pdb"
|
||||
del "bin\x86\Release\devtools_resources.pak"
|
||||
del "bin\x86\Release\d3dcompiler_43.dll"
|
||||
del "bin\x86\Release\widevinecdmadapter.dll"
|
||||
|
@@ -39,7 +39,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
|
||||
|
||||
[Files]
|
||||
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,devtools_resources.pak,d3dcompiler_43.dll,widevinecdmadapter.dll,debug.js"
|
||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,*.pdb,devtools_resources.pak,d3dcompiler_43.dll,widevinecdmadapter.dll,debug.js"
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: TDIsUninstallable
|
||||
|
@@ -36,7 +36,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[Files]
|
||||
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,devtools_resources.pak,d3dcompiler_43.dll,widevinecdmadapter.dll,debug.js"
|
||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,*.pdb,devtools_resources.pak,d3dcompiler_43.dll,widevinecdmadapter.dll,debug.js"
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall shellexec
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
#define MyAppID "8C25A716-7E11-4AAD-9992-8B5D0C78AE06"
|
||||
#define MyAppVersion GetFileVersion("..\bin\x86\Release\TweetDuck.exe")
|
||||
#define CefVersion "3.2785.1486.0"
|
||||
#define CefVersion "3.2883.1552.0"
|
||||
|
||||
[Setup]
|
||||
AppId={{{#MyAppID}}
|
||||
@@ -41,7 +41,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[Files]
|
||||
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,*.dll,*.pak,*.bin,*.dat,debug.js"
|
||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,*.pdb,*.dll,*.pak,*.bin,*.dat,debug.js"
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: TDIsUninstallable
|
||||
|
Reference in New Issue
Block a user