mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-09-14 10:32:10 +02:00
Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
1bce5e4342 | |||
68f586e104 | |||
d27a66202e | |||
07de2f450c | |||
3c03726634 | |||
6fb2643063 | |||
5eef6c8196 | |||
829c332e13 | |||
47eec14bca | |||
e7ee1d6be7 | |||
e41b5e5ff7 | |||
ba1bacd08c | |||
1029ea5840 | |||
339eaf0195 | |||
aa1e1549d8 | |||
1f8ae9ef80 | |||
65165de060 | |||
485836d2ce | |||
64c07c14d9 | |||
b6313c2b72 | |||
58124b5821 | |||
b6a599f8a6 | |||
19a6bc0dbd | |||
8cb81d44ee | |||
22d0a372d8 | |||
988fae75c3 |
@@ -195,15 +195,15 @@ namespace TweetDuck.Core.Handling{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void DeselectAll(IFrame frame){
|
protected static void DeselectAll(IFrame frame){
|
||||||
ScriptLoader.ExecuteScript(frame, "window.getSelection().removeAllRanges()", "gen:deselect");
|
ScriptLoader.ExecuteScript(frame, "window.getSelection().removeAllRanges()", "gen:deselect");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void OpenBrowser(Control control, string url){
|
protected static void OpenBrowser(Control control, string url){
|
||||||
control.InvokeAsyncSafe(() => BrowserUtils.OpenExternalBrowser(url));
|
control.InvokeAsyncSafe(() => BrowserUtils.OpenExternalBrowser(url));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void SetClipboardText(Control control, string text){
|
protected static void SetClipboardText(Control control, string text){
|
||||||
control.InvokeAsyncSafe(() => WindowsUtils.SetClipboard(text, TextDataFormat.UnicodeText));
|
control.InvokeAsyncSafe(() => WindowsUtils.SetClipboard(text, TextDataFormat.UnicodeText));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using CefSharp;
|
using CefSharp;
|
||||||
|
using CefSharp.Enums;
|
||||||
|
|
||||||
namespace TweetDuck.Core.Handling{
|
namespace TweetDuck.Core.Handling{
|
||||||
sealed class DragHandlerBrowser : IDragHandler{
|
sealed class DragHandlerBrowser : IDragHandler{
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
using System.Windows.Forms;
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using CefSharp;
|
||||||
using TweetDuck.Core.Controls;
|
using TweetDuck.Core.Controls;
|
||||||
using TweetDuck.Plugins;
|
using TweetDuck.Plugins;
|
||||||
using TweetDuck.Resources;
|
using TweetDuck.Resources;
|
||||||
@@ -21,9 +23,13 @@ namespace TweetDuck.Core.Notification.Example{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public event EventHandler Ready;
|
||||||
|
|
||||||
private readonly TweetNotification exampleNotification;
|
private readonly TweetNotification exampleNotification;
|
||||||
|
|
||||||
public FormNotificationExample(FormBrowser owner, PluginManager pluginManager) : base(owner, pluginManager, false){
|
public FormNotificationExample(FormBrowser owner, PluginManager pluginManager) : base(owner, pluginManager, false){
|
||||||
|
browser.LoadingStateChanged += browser_LoadingStateChanged;
|
||||||
|
|
||||||
string exampleTweetHTML = ScriptLoader.LoadResource("pages/example.html", true)?.Replace("{avatar}", TweetNotification.AppLogo.Url) ?? string.Empty;
|
string exampleTweetHTML = ScriptLoader.LoadResource("pages/example.html", true)?.Replace("{avatar}", TweetNotification.AppLogo.Url) ?? string.Empty;
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -33,6 +39,13 @@ namespace TweetDuck.Core.Notification.Example{
|
|||||||
exampleNotification = TweetNotification.Example(exampleTweetHTML, 176);
|
exampleNotification = TweetNotification.Example(exampleTweetHTML, 176);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void browser_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e){
|
||||||
|
if (!e.IsLoading){
|
||||||
|
Ready?.Invoke(this, EventArgs.Empty);
|
||||||
|
browser.LoadingStateChanged -= browser_LoadingStateChanged;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void HideNotification(){
|
public override void HideNotification(){
|
||||||
Location = ControlExtensions.InvisibleLocation;
|
Location = ControlExtensions.InvisibleLocation;
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
using CefSharp;
|
using CefSharp.WinForms;
|
||||||
using CefSharp.WinForms;
|
|
||||||
using System;
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using TweetDuck.Configuration;
|
using TweetDuck.Configuration;
|
||||||
@@ -65,7 +63,7 @@ namespace TweetDuck.Core.Notification{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsNotificationVisible => Location != ControlExtensions.InvisibleLocation;
|
protected bool IsNotificationVisible => Location != ControlExtensions.InvisibleLocation;
|
||||||
protected virtual bool CanDragWindow => true;
|
protected virtual bool CanDragWindow => true;
|
||||||
|
|
||||||
public new Point Location{
|
public new Point Location{
|
||||||
@@ -109,15 +107,13 @@ namespace TweetDuck.Core.Notification{
|
|||||||
public string CurrentQuoteUrl => currentNotification?.QuoteUrl;
|
public string CurrentQuoteUrl => currentNotification?.QuoteUrl;
|
||||||
|
|
||||||
public bool CanViewDetail => currentNotification != null && !string.IsNullOrEmpty(currentNotification.ColumnId) && !string.IsNullOrEmpty(currentNotification.ChirpId);
|
public bool CanViewDetail => currentNotification != null && !string.IsNullOrEmpty(currentNotification.ColumnId) && !string.IsNullOrEmpty(currentNotification.ChirpId);
|
||||||
public bool IsPaused => pauseCounter > 0;
|
|
||||||
|
|
||||||
|
protected bool IsPaused => pauseCounter > 0;
|
||||||
protected bool IsCursorOverBrowser => browser.Bounds.Contains(PointToClient(Cursor.Position));
|
protected bool IsCursorOverBrowser => browser.Bounds.Contains(PointToClient(Cursor.Position));
|
||||||
|
|
||||||
public bool FreezeTimer { get; set; }
|
public bool FreezeTimer { get; set; }
|
||||||
public bool ContextMenuOpen { get; set; }
|
public bool ContextMenuOpen { get; set; }
|
||||||
|
|
||||||
public event EventHandler Initialized;
|
|
||||||
|
|
||||||
protected FormNotificationBase(FormBrowser owner, bool enableContextMenu){
|
protected FormNotificationBase(FormBrowser owner, bool enableContextMenu){
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
@@ -133,7 +129,6 @@ namespace TweetDuck.Core.Notification{
|
|||||||
|
|
||||||
this.browser.Dock = DockStyle.None;
|
this.browser.Dock = DockStyle.None;
|
||||||
this.browser.ClientSize = ClientSize;
|
this.browser.ClientSize = ClientSize;
|
||||||
this.browser.IsBrowserInitializedChanged += browser_IsBrowserInitializedChanged;
|
|
||||||
|
|
||||||
browser.SetupResourceHandler(TwitterUtils.TweetDeckURL, this.resourceHandler);
|
browser.SetupResourceHandler(TwitterUtils.TweetDeckURL, this.resourceHandler);
|
||||||
browser.SetupResourceHandler(TweetNotification.AppLogo);
|
browser.SetupResourceHandler(TweetNotification.AppLogo);
|
||||||
@@ -165,12 +160,6 @@ namespace TweetDuck.Core.Notification{
|
|||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void browser_IsBrowserInitializedChanged(object sender, IsBrowserInitializedChangedEventArgs e){
|
|
||||||
if (e.IsBrowserInitialized){
|
|
||||||
Initialized?.Invoke(this, EventArgs.Empty);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// notification methods
|
// notification methods
|
||||||
|
|
||||||
public virtual void HideNotification(){
|
public virtual void HideNotification(){
|
||||||
|
@@ -70,7 +70,7 @@ namespace TweetDuck.Core.Notification{
|
|||||||
build.Append(' ').Append(bodyClasses);
|
build.Append(' ').Append(bodyClasses);
|
||||||
}
|
}
|
||||||
|
|
||||||
build.Append('\'').Append(isExample ? " td-example-notification" : "").Append("><div class='column' style='width:100%!important;height:auto!important;overflow:initial!important;'>");
|
build.Append('\'').Append(isExample ? " td-example-notification" : "").Append("><div class='column' style='width:100%!important;min-height:100vh!important;height:auto!important;overflow:initial!important;'>");
|
||||||
build.Append(html);
|
build.Append(html);
|
||||||
build.Append("</div></body>");
|
build.Append("</div></body>");
|
||||||
build.Append("</html>");
|
build.Append("</html>");
|
||||||
|
@@ -42,7 +42,6 @@ namespace TweetDuck.Core.Other.Analytics{
|
|||||||
{ "Clear Cache Threshold" , Exact(SysConfig.ClearCacheThreshold) },
|
{ "Clear Cache Threshold" , Exact(SysConfig.ClearCacheThreshold) },
|
||||||
0,
|
0,
|
||||||
{ "Expand Links" , Bool(UserConfig.ExpandLinksOnHover) },
|
{ "Expand Links" , Bool(UserConfig.ExpandLinksOnHover) },
|
||||||
{ "Switch Account Selectors" , Bool(false) }, // TODO remove in next major update
|
|
||||||
{ "Search In First Column" , Bool(UserConfig.OpenSearchInFirstColumn) },
|
{ "Search In First Column" , Bool(UserConfig.OpenSearchInFirstColumn) },
|
||||||
{ "Keep Like Follow Dialogs Open" , Bool(UserConfig.KeepLikeFollowDialogsOpen) },
|
{ "Keep Like Follow Dialogs Open" , Bool(UserConfig.KeepLikeFollowDialogsOpen) },
|
||||||
{ "Best Image Quality" , Bool(UserConfig.BestImageQuality) },
|
{ "Best Image Quality" , Bool(UserConfig.BestImageQuality) },
|
||||||
|
@@ -8,6 +8,7 @@ using TweetDuck.Core.Handling;
|
|||||||
using TweetDuck.Core.Handling.General;
|
using TweetDuck.Core.Handling.General;
|
||||||
using TweetDuck.Core.Utils;
|
using TweetDuck.Core.Utils;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using TweetDuck.Data;
|
||||||
using TweetDuck.Resources;
|
using TweetDuck.Resources;
|
||||||
|
|
||||||
namespace TweetDuck.Core.Other{
|
namespace TweetDuck.Core.Other{
|
||||||
@@ -15,6 +16,8 @@ namespace TweetDuck.Core.Other{
|
|||||||
private const string GuideUrl = "https://tweetduck.chylex.com/guide/v2/";
|
private const string GuideUrl = "https://tweetduck.chylex.com/guide/v2/";
|
||||||
private const string GuidePathRegex = @"^guide(?:/v\d+)?(?:/(#.*))?";
|
private const string GuidePathRegex = @"^guide(?:/v\d+)?(?:/(#.*))?";
|
||||||
|
|
||||||
|
private static readonly ResourceLink DummyPage = new ResourceLink("http://td/dummy", ResourceHandler.FromString(""));
|
||||||
|
|
||||||
public static bool CheckGuideUrl(string url, out string hash){
|
public static bool CheckGuideUrl(string url, out string hash){
|
||||||
if (!url.Contains("//tweetduck.chylex.com/guide")){
|
if (!url.Contains("//tweetduck.chylex.com/guide")){
|
||||||
hash = null;
|
hash = null;
|
||||||
@@ -53,6 +56,7 @@ namespace TweetDuck.Core.Other{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private readonly ChromiumWebBrowser browser;
|
private readonly ChromiumWebBrowser browser;
|
||||||
|
private string nextUrl;
|
||||||
|
|
||||||
private FormGuide(string url, FormBrowser owner){
|
private FormGuide(string url, FormBrowser owner){
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -75,6 +79,9 @@ namespace TweetDuck.Core.Other{
|
|||||||
browser.BrowserSettings.BackgroundColor = (uint)BackColor.ToArgb();
|
browser.BrowserSettings.BackgroundColor = (uint)BackColor.ToArgb();
|
||||||
browser.Dock = DockStyle.None;
|
browser.Dock = DockStyle.None;
|
||||||
browser.Location = ControlExtensions.InvisibleLocation;
|
browser.Location = ControlExtensions.InvisibleLocation;
|
||||||
|
|
||||||
|
browser.SetupResourceHandler(DummyPage);
|
||||||
|
|
||||||
Controls.Add(browser);
|
Controls.Add(browser);
|
||||||
|
|
||||||
Disposed += (sender, args) => {
|
Disposed += (sender, args) => {
|
||||||
@@ -86,21 +93,26 @@ namespace TweetDuck.Core.Other{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void Reload(string url){
|
private void Reload(string url){
|
||||||
|
nextUrl = url;
|
||||||
browser.LoadingStateChanged += browser_LoadingStateChanged;
|
browser.LoadingStateChanged += browser_LoadingStateChanged;
|
||||||
browser.Dock = DockStyle.None;
|
browser.Dock = DockStyle.None;
|
||||||
browser.Location = ControlExtensions.InvisibleLocation;
|
browser.Location = ControlExtensions.InvisibleLocation;
|
||||||
browser.Load("about:blank");
|
browser.Load(DummyPage.Url);
|
||||||
browser.Load(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void browser_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e){
|
private void browser_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e){
|
||||||
if (!e.IsLoading && browser.Address != "about:blank"){
|
if (!e.IsLoading){
|
||||||
this.InvokeAsyncSafe(() => {
|
if (browser.Address == DummyPage.Url){
|
||||||
browser.Location = Point.Empty;
|
browser.Load(nextUrl);
|
||||||
browser.Dock = DockStyle.Fill;
|
}
|
||||||
});
|
else{
|
||||||
|
this.InvokeAsyncSafe(() => {
|
||||||
|
browser.Location = Point.Empty;
|
||||||
|
browser.Dock = DockStyle.Fill;
|
||||||
|
});
|
||||||
|
|
||||||
browser.LoadingStateChanged -= browser_LoadingStateChanged;
|
browser.LoadingStateChanged -= browser_LoadingStateChanged;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,7 +121,6 @@ namespace TweetDuck.Core.Other{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void browser_FrameLoadEnd(object sender, FrameLoadEndEventArgs e){
|
private void browser_FrameLoadEnd(object sender, FrameLoadEndEventArgs e){
|
||||||
// idiot chromium
|
|
||||||
ScriptLoader.ExecuteScript(e.Frame, "Array.prototype.forEach.call(document.getElementsByTagName('A'), ele => ele.addEventListener('click', e => { e.preventDefault(); window.open(ele.getAttribute('href')); }))", "gen:links");
|
ScriptLoader.ExecuteScript(e.Frame, "Array.prototype.forEach.call(document.getElementsByTagName('A'), ele => ele.addEventListener('click', e => { e.preventDefault(); window.open(ele.getAttribute('href')); }))", "gen:links");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -63,10 +63,10 @@
|
|||||||
this.labelInfo.Location = new System.Drawing.Point(12, 9);
|
this.labelInfo.Location = new System.Drawing.Point(12, 9);
|
||||||
this.labelInfo.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3);
|
this.labelInfo.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3);
|
||||||
this.labelInfo.Name = "labelInfo";
|
this.labelInfo.Name = "labelInfo";
|
||||||
this.labelInfo.Size = new System.Drawing.Size(431, 30);
|
this.labelInfo.Size = new System.Drawing.Size(434, 30);
|
||||||
this.labelInfo.TabIndex = 0;
|
this.labelInfo.TabIndex = 0;
|
||||||
this.labelInfo.Text = "When enabled, this data will be sent over a secure network roughly twice a week.\r" +
|
this.labelInfo.Text = "When enabled, this data will be sent over a secure network roughly every 14 days." +
|
||||||
"\nSome numbers in the report were made imprecise on purpose.";
|
"\r\nSome numbers in the report were made imprecise on purpose.";
|
||||||
//
|
//
|
||||||
// DialogSettingsAnalytics
|
// DialogSettingsAnalytics
|
||||||
//
|
//
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.btnCancel.AutoSize = true;
|
this.btnCancel.AutoSize = true;
|
||||||
this.btnCancel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
this.btnCancel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
this.btnCancel.Location = new System.Drawing.Point(214, 148);
|
this.btnCancel.Location = new System.Drawing.Point(215, 146);
|
||||||
this.btnCancel.Name = "btnCancel";
|
this.btnCancel.Name = "btnCancel";
|
||||||
this.btnCancel.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
this.btnCancel.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
this.btnCancel.Size = new System.Drawing.Size(57, 25);
|
this.btnCancel.Size = new System.Drawing.Size(57, 25);
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
this.btnRestart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.btnRestart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.btnRestart.AutoSize = true;
|
this.btnRestart.AutoSize = true;
|
||||||
this.btnRestart.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
this.btnRestart.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||||
this.btnRestart.Location = new System.Drawing.Point(151, 148);
|
this.btnRestart.Location = new System.Drawing.Point(152, 146);
|
||||||
this.btnRestart.Name = "btnRestart";
|
this.btnRestart.Name = "btnRestart";
|
||||||
this.btnRestart.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
this.btnRestart.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||||
this.btnRestart.Size = new System.Drawing.Size(57, 25);
|
this.btnRestart.Size = new System.Drawing.Size(57, 25);
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
this.cbLogging.Size = new System.Drawing.Size(70, 19);
|
this.cbLogging.Size = new System.Drawing.Size(70, 19);
|
||||||
this.cbLogging.TabIndex = 0;
|
this.cbLogging.TabIndex = 0;
|
||||||
this.cbLogging.Text = "Logging";
|
this.cbLogging.Text = "Logging";
|
||||||
this.toolTip.SetToolTip(this.cbLogging, "Logging JavaScript output into TD_Console.txt file in the data folder.");
|
this.toolTip.SetToolTip(this.cbLogging, "Logs JavaScript output into TD_Console.txt file in the data folder.");
|
||||||
this.cbLogging.UseVisualStyleBackColor = true;
|
this.cbLogging.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// tbDataFolder
|
// tbDataFolder
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
this.flowPanel.Location = new System.Drawing.Point(9, 9);
|
this.flowPanel.Location = new System.Drawing.Point(9, 9);
|
||||||
this.flowPanel.Margin = new System.Windows.Forms.Padding(0);
|
this.flowPanel.Margin = new System.Windows.Forms.Padding(0);
|
||||||
this.flowPanel.Name = "flowPanel";
|
this.flowPanel.Name = "flowPanel";
|
||||||
this.flowPanel.Size = new System.Drawing.Size(266, 138);
|
this.flowPanel.Size = new System.Drawing.Size(266, 136);
|
||||||
this.flowPanel.TabIndex = 0;
|
this.flowPanel.TabIndex = 0;
|
||||||
this.flowPanel.WrapContents = false;
|
this.flowPanel.WrapContents = false;
|
||||||
//
|
//
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(284, 185);
|
this.ClientSize = new System.Drawing.Size(284, 183);
|
||||||
this.Controls.Add(this.flowPanel);
|
this.Controls.Add(this.flowPanel);
|
||||||
this.Controls.Add(this.btnRestart);
|
this.Controls.Add(this.btnRestart);
|
||||||
this.Controls.Add(this.btnCancel);
|
this.Controls.Add(this.btnCancel);
|
||||||
|
@@ -12,7 +12,7 @@ namespace TweetDuck.Core.Other.Settings.Dialogs{
|
|||||||
|
|
||||||
cbLogging.Checked = currentArgs.HasFlag(Arguments.ArgLogging);
|
cbLogging.Checked = currentArgs.HasFlag(Arguments.ArgLogging);
|
||||||
cbLogging.CheckedChanged += control_Change;
|
cbLogging.CheckedChanged += control_Change;
|
||||||
|
|
||||||
if (Program.IsPortable){
|
if (Program.IsPortable){
|
||||||
tbDataFolder.Text = "Not available in portable version";
|
tbDataFolder.Text = "Not available in portable version";
|
||||||
tbDataFolder.Enabled = false;
|
tbDataFolder.Enabled = false;
|
||||||
@@ -33,7 +33,7 @@ namespace TweetDuck.Core.Other.Settings.Dialogs{
|
|||||||
if (cbLogging.Checked){
|
if (cbLogging.Checked){
|
||||||
Args.AddFlag(Arguments.ArgLogging);
|
Args.AddFlag(Arguments.ArgLogging);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(tbDataFolder.Text) && tbDataFolder.Enabled){
|
if (!string.IsNullOrWhiteSpace(tbDataFolder.Text) && tbDataFolder.Enabled){
|
||||||
Args.SetValue(Arguments.ArgDataFolder, tbDataFolder.Text);
|
Args.SetValue(Arguments.ArgDataFolder, tbDataFolder.Text);
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,7 @@ namespace TweetDuck.Core.Other.Settings{
|
|||||||
|
|
||||||
this.notification = notification;
|
this.notification = notification;
|
||||||
|
|
||||||
this.notification.Initialized += (sender, args) => {
|
this.notification.Ready += (sender, args) => {
|
||||||
this.InvokeAsyncSafe(() => {
|
this.InvokeAsyncSafe(() => {
|
||||||
this.notification.ShowExampleNotification(true);
|
this.notification.ShowExampleNotification(true);
|
||||||
this.notification.Move += notification_Move;
|
this.notification.Move += notification_Move;
|
||||||
|
@@ -11,8 +11,9 @@ using TweetDuck.Data;
|
|||||||
|
|
||||||
namespace TweetDuck.Core.Utils{
|
namespace TweetDuck.Core.Utils{
|
||||||
static class BrowserUtils{
|
static class BrowserUtils{
|
||||||
public static string HeaderUserAgent => Program.BrandName+" "+Application.ProductVersion;
|
public static string UserAgentVanilla => Program.BrandName+" "+Application.ProductVersion;
|
||||||
|
public static string UserAgentChrome => "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/"+Cef.ChromiumVersion+" Safari/537.36";
|
||||||
|
|
||||||
public static void SetupCefArgs(IDictionary<string, string> args){
|
public static void SetupCefArgs(IDictionary<string, string> args){
|
||||||
if (!Program.SystemConfig.HardwareAcceleration){
|
if (!Program.SystemConfig.HardwareAcceleration){
|
||||||
args["disable-gpu"] = "1";
|
args["disable-gpu"] = "1";
|
||||||
@@ -167,7 +168,7 @@ namespace TweetDuck.Core.Utils{
|
|||||||
WindowsUtils.EnsureTLS12();
|
WindowsUtils.EnsureTLS12();
|
||||||
|
|
||||||
WebClient client = new WebClient{ Proxy = null };
|
WebClient client = new WebClient{ Proxy = null };
|
||||||
client.Headers[HttpRequestHeader.UserAgent] = HeaderUserAgent;
|
client.Headers[HttpRequestHeader.UserAgent] = UserAgentVanilla;
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ namespace TweetDuck{
|
|||||||
public const string BrandName = "TweetDuck";
|
public const string BrandName = "TweetDuck";
|
||||||
public const string Website = "https://tweetduck.chylex.com";
|
public const string Website = "https://tweetduck.chylex.com";
|
||||||
|
|
||||||
public const string VersionTag = "1.13.5";
|
public const string VersionTag = "1.14";
|
||||||
|
|
||||||
public static readonly string ProgramPath = AppDomain.CurrentDomain.BaseDirectory;
|
public static readonly string ProgramPath = AppDomain.CurrentDomain.BaseDirectory;
|
||||||
public static readonly bool IsPortable = File.Exists(Path.Combine(ProgramPath, "makeportable"));
|
public static readonly bool IsPortable = File.Exists(Path.Combine(ProgramPath, "makeportable"));
|
||||||
@@ -133,7 +133,7 @@ namespace TweetDuck{
|
|||||||
CefSharpSettings.LegacyJavascriptBindingEnabled = true;
|
CefSharpSettings.LegacyJavascriptBindingEnabled = true;
|
||||||
|
|
||||||
CefSettings settings = new CefSettings{
|
CefSettings settings = new CefSettings{
|
||||||
UserAgent = BrowserUtils.HeaderUserAgent,
|
UserAgent = BrowserUtils.UserAgentChrome,
|
||||||
BrowserSubprocessPath = BrandName+".Browser.exe",
|
BrowserSubprocessPath = BrandName+".Browser.exe",
|
||||||
CachePath = StoragePath,
|
CachePath = StoragePath,
|
||||||
UserDataPath = CefDataPath,
|
UserDataPath = CefDataPath,
|
||||||
@@ -142,7 +142,7 @@ namespace TweetDuck{
|
|||||||
LogSeverity = Arguments.HasFlag(Arguments.ArgLogging) ? LogSeverity.Info : LogSeverity.Disable
|
LogSeverity = Arguments.HasFlag(Arguments.ArgLogging) ? LogSeverity.Info : LogSeverity.Disable
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
CommandLineArgs.ReadCefArguments(UserConfig.CustomCefArgs).ToDictionary(settings.CefCommandLineArgs);
|
CommandLineArgs.ReadCefArguments(UserConfig.CustomCefArgs).ToDictionary(settings.CefCommandLineArgs);
|
||||||
BrowserUtils.SetupCefArgs(settings.CefCommandLineArgs);
|
BrowserUtils.SetupCefArgs(settings.CefCommandLineArgs);
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ namespace TweetDuck{
|
|||||||
ExitCleanup();
|
ExitCleanup();
|
||||||
|
|
||||||
// ProgramPath has a trailing backslash
|
// ProgramPath has a trailing backslash
|
||||||
string updaterArgs = "/SP- /SILENT /CLOSEAPPLICATIONS /UPDATEPATH=\""+ProgramPath+"\" /RUNARGS=\""+Arguments.GetCurrentForInstallerCmd()+"\""+(IsPortable ? " /PORTABLE=1" : "");
|
string updaterArgs = "/SP- /SILENT /FORCECLOSEAPPLICATIONS /UPDATEPATH=\""+ProgramPath+"\" /RUNARGS=\""+Arguments.GetCurrentForInstallerCmd()+"\""+(IsPortable ? " /PORTABLE=1" : "");
|
||||||
bool runElevated = !IsPortable || !WindowsUtils.CheckFolderWritePermission(ProgramPath);
|
bool runElevated = !IsPortable || !WindowsUtils.CheckFolderWritePermission(ProgramPath);
|
||||||
|
|
||||||
if (WindowsUtils.OpenAssociatedProgram(mainForm.UpdateInstallerPath, updaterArgs, runElevated)){
|
if (WindowsUtils.OpenAssociatedProgram(mainForm.UpdateInstallerPath, updaterArgs, runElevated)){
|
||||||
|
@@ -14,7 +14,7 @@ The program was built using Visual Studio 2017. Before opening the solution, ple
|
|||||||
|
|
||||||
After opening the solution, download the following NuGet packages by right-clicking on the solution and selecting **Restore NuGet Packages**, or manually running this command in the **Package Manager Console**:
|
After opening the solution, download the following NuGet packages by right-clicking on the solution and selecting **Restore NuGet Packages**, or manually running this command in the **Package Manager Console**:
|
||||||
```
|
```
|
||||||
PM> Install-Package CefSharp.WinForms -Version 64.0.0-CI2508 -Source https://www.myget.org/F/cefsharp/api/v3/index.json
|
PM> Install-Package CefSharp.WinForms -Version 65.0.0-pre01
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that some pre-release builds of CefSharp are not available on NuGet. To correctly restore packages in that case, open **Package Manager Settings**, and add `https://www.myget.org/F/cefsharp/api/v3/index.json` to the list of package sources.
|
Note that some pre-release builds of CefSharp are not available on NuGet. To correctly restore packages in that case, open **Package Manager Settings**, and add `https://www.myget.org/F/cefsharp/api/v3/index.json` to the list of package sources.
|
||||||
|
@@ -21,10 +21,6 @@ enabled(){
|
|||||||
Object.keys(TD.controller.columnManager.getAll()).forEach(func);
|
Object.keys(TD.controller.columnManager.getAll()).forEach(func);
|
||||||
};
|
};
|
||||||
|
|
||||||
var replaceMustache = (key, search, replace) => {
|
|
||||||
TD.mustaches[key] = TD.mustaches[key].replace(search, replace);
|
|
||||||
};
|
|
||||||
|
|
||||||
var wasShiftPressed = false;
|
var wasShiftPressed = false;
|
||||||
|
|
||||||
var updateShiftState = (pressed) => {
|
var updateShiftState = (pressed) => {
|
||||||
@@ -86,22 +82,21 @@ enabled(){
|
|||||||
</a>`;
|
</a>`;
|
||||||
|
|
||||||
// add column buttons and keyboard shortcut info to UI
|
// add column buttons and keyboard shortcut info to UI
|
||||||
replaceMustache("column/column_header.mustache", "</header>", `
|
window.TDPF_injectMustache("column/column_header.mustache", "prepend", "</header>", `
|
||||||
{{^isTemporary}}
|
{{^isTemporary}}
|
||||||
<a class="column-header-link td-clear-column-shortcut" href="#" data-action="td-clearcolumns-dosingle" style="right:34px">
|
<a class="column-header-link td-clear-column-shortcut" href="#" data-action="td-clearcolumns-dosingle" style="right:34px">
|
||||||
<i class="icon icon-clear-timeline js-show-tip" data-placement="bottom" data-original-title="Clear column (hold Shift to restore)"></i>
|
<i class="icon icon-clear-timeline js-show-tip" data-placement="bottom" data-original-title="Clear column (hold Shift to restore)"></i>
|
||||||
</a>
|
</a>
|
||||||
{{/isTemporary}}
|
{{/isTemporary}}`);
|
||||||
</header>`);
|
|
||||||
|
|
||||||
replaceMustache("keyboard_shortcut_list.mustache", "</dl> <dl", `
|
window.TDPF_injectMustache("keyboard_shortcut_list.mustache", "prepend", "</dl> <dl", `
|
||||||
<dd class="keyboard-shortcut-definition" style="white-space:nowrap">
|
<dd class="keyboard-shortcut-definition" style="white-space:nowrap">
|
||||||
<span class="text-like-keyboard-key">1</span> … <span class="text-like-keyboard-key">9</span> + <span class="text-like-keyboard-key">Del</span> Clear column 1-9
|
<span class="text-like-keyboard-key">1</span> … <span class="text-like-keyboard-key">9</span> + <span class="text-like-keyboard-key">Del</span> Clear column 1-9
|
||||||
</dd><dd class="keyboard-shortcut-definition">
|
</dd><dd class="keyboard-shortcut-definition">
|
||||||
<span class="text-like-keyboard-key">Alt</span> + <span class="text-like-keyboard-key">Del</span> Clear all columns
|
<span class="text-like-keyboard-key">Alt</span> + <span class="text-like-keyboard-key">Del</span> Clear all columns
|
||||||
</dd></dl><dl`);
|
</dd>`);
|
||||||
|
|
||||||
replaceMustache("menus/column_nav_menu.mustache", "{{_i}}Add column{{/i}}</div> </a> </div>", `{{_i}}Add column{{/i}}</div></a>${this.btnClearAllHTML}</div>`)
|
window.TDPF_injectMustache("menus/column_nav_menu.mustache", "replace", "{{_i}}Add column{{/i}}</div> </a> </div>", `{{_i}}Add column{{/i}}</div></a>${this.btnClearAllHTML}</div>`)
|
||||||
|
|
||||||
// load custom style
|
// load custom style
|
||||||
var css = window.TDPF_createCustomStyle(this);
|
var css = window.TDPF_createCustomStyle(this);
|
||||||
|
@@ -151,8 +151,7 @@
|
|||||||
<!-- END -->
|
<!-- END -->
|
||||||
</div>
|
</div>
|
||||||
<footer class="padding-vxl txt-center">
|
<footer class="padding-vxl txt-center">
|
||||||
<button class="js-dismiss btn btn-positive pull-right">
|
<button class="js-dismiss Button--primary pull-right">
|
||||||
<i class="icon icon-check icon-small padding-rs"></i>
|
|
||||||
<span class="label">Done</span>
|
<span class="label">Done</span>
|
||||||
</button>
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
|
@@ -54,7 +54,7 @@ enabled(){
|
|||||||
var buttonHTML = '<button class="needsclick btn btn-on-blue txt-left padding-v--6 padding-h--8 emoji-keyboard-popup-btn"><i class="icon icon-heart"></i></button>';
|
var buttonHTML = '<button class="needsclick btn btn-on-blue txt-left padding-v--6 padding-h--8 emoji-keyboard-popup-btn"><i class="icon icon-heart"></i></button>';
|
||||||
|
|
||||||
this.prevComposeMustache = TD.mustaches["compose/docked_compose.mustache"];
|
this.prevComposeMustache = TD.mustaches["compose/docked_compose.mustache"];
|
||||||
TD.mustaches["compose/docked_compose.mustache"] = TD.mustaches["compose/docked_compose.mustache"].replace('<div class="cf margin-t--12 margin-b--30">', '<div class="cf margin-t--12 margin-b--30">'+buttonHTML);
|
window.TDPF_injectMustache("compose/docked_compose.mustache", "append", '<div class="cf margin-t--12 margin-b--30">', buttonHTML);
|
||||||
|
|
||||||
var maybeDockedComposePanel = $(".js-docked-compose");
|
var maybeDockedComposePanel = $(".js-docked-compose");
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ enabled(){
|
|||||||
var buttonHTML = '<button class="manage-templates-btn needsclick btn btn-on-blue full-width txt-left margin-b--12 padding-v--6 padding-h--12"><i class="icon icon-bookmark"></i><span class="label padding-ls">Manage templates</span></button>';
|
var buttonHTML = '<button class="manage-templates-btn needsclick btn btn-on-blue full-width txt-left margin-b--12 padding-v--6 padding-h--12"><i class="icon icon-bookmark"></i><span class="label padding-ls">Manage templates</span></button>';
|
||||||
|
|
||||||
this.prevComposeMustache = TD.mustaches["compose/docked_compose.mustache"];
|
this.prevComposeMustache = TD.mustaches["compose/docked_compose.mustache"];
|
||||||
TD.mustaches["compose/docked_compose.mustache"] = TD.mustaches["compose/docked_compose.mustache"].replace('<div class="js-tweet-type-button">', buttonHTML+'<div class="js-tweet-type-button">');
|
window.TDPF_injectMustache("compose/docked_compose.mustache", "prepend", '<div class="js-tweet-type-button">', buttonHTML);
|
||||||
|
|
||||||
var dockedComposePanel = $(".js-docked-compose");
|
var dockedComposePanel = $(".js-docked-compose");
|
||||||
|
|
||||||
@@ -267,8 +267,8 @@ enabled(){
|
|||||||
<ul></ul>
|
<ul></ul>
|
||||||
|
|
||||||
<div class="templates-modal-bottom">
|
<div class="templates-modal-bottom">
|
||||||
<button data-action="close" class="btn"><i class="icon icon-close icon-small padding-rs"></i><span class="label">Close</span></button>
|
<button data-action="close" class="Button--secondary"><i class="icon icon-close icon-small padding-rs"></i><span class="label">Close</span></button>
|
||||||
<button data-action="new-template" class="btn btn-positive"><i class="icon icon-plus icon-small padding-rs"></i><span class="label">New Template</span></button>
|
<button data-action="new-template" class="Button--primary"><i class="icon icon-plus icon-small padding-rs"></i><span class="label">New Template</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -300,8 +300,8 @@ enabled(){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="templates-modal-bottom">
|
<div class="templates-modal-bottom">
|
||||||
<button data-action="editor-cancel" class="btn"><i class="icon icon-close icon-small padding-rs"></i><span class="label">Cancel</span></button>
|
<button data-action="editor-cancel" class="Button--secondary"><i class="icon icon-close icon-small padding-rs"></i><span class="label">Cancel</span></button>
|
||||||
<button data-action="editor-confirm" class="btn btn-positive" style="margin-left:4px"><i class="icon icon-check icon-small padding-rs"></i><span class="label">Confirm</span></button>
|
<button data-action="editor-confirm" class="Button--primary" style="margin-left:4px"><i class="icon icon-check icon-small padding-rs"></i><span class="label">Confirm</span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -27,20 +27,19 @@ try{
|
|||||||
|
|
||||||
# Copy resources
|
# Copy resources
|
||||||
|
|
||||||
Copy-Item (Join-Path $projectDir "bld\Resources\CEFSHARP-LICENSE.txt") -Destination $targetDir -Force
|
Copy-Item (Join-Path $projectDir "bld\Resources\LICENSES.txt") -Destination $targetDir -Force
|
||||||
Copy-Item (Join-Path $projectDir "LICENSE.md") -Destination (Join-Path $targetDir "LICENSE.txt") -Force
|
|
||||||
|
|
||||||
New-Item -ItemType directory -Path $targetDir -Name "scripts" | Out-Null
|
New-Item -ItemType directory -Path $targetDir -Name "scripts" | Out-Null
|
||||||
New-Item -ItemType directory -Path $targetDir -Name "plugins" | Out-Null
|
New-Item -ItemType directory -Path $targetDir -Name "plugins" | Out-Null
|
||||||
New-Item -ItemType directory -Path $targetDir -Name "plugins\official" | Out-Null
|
New-Item -ItemType directory -Path $targetDir -Name "plugins\official" | Out-Null
|
||||||
New-Item -ItemType directory -Path $targetDir -Name "plugins\user" | Out-Null
|
New-Item -ItemType directory -Path $targetDir -Name "plugins\user" | Out-Null
|
||||||
|
|
||||||
Copy-Item (Join-Path $projectDir "Resources\Scripts\*") -Destination (Join-Path $targetDir "scripts") -Recurse
|
Copy-Item (Join-Path $projectDir "Resources\Scripts\*") -Recurse -Destination (Join-Path $targetDir "scripts")
|
||||||
Copy-Item (Join-Path $projectDir "Resources\Plugins\*") -Exclude ".debug", "emoji-instructions.txt" -Destination (Join-Path $targetDir "plugins\official") -Recurse
|
Copy-Item (Join-Path $projectDir "Resources\Plugins\*") -Recurse -Destination (Join-Path $targetDir "plugins\official") -Exclude ".debug", "emoji-instructions.txt"
|
||||||
|
|
||||||
if ($configuration -eq "Debug"){
|
if ($configuration -eq "Debug"){
|
||||||
New-Item -ItemType directory -Path $targetDir -Name "plugins\user\.debug" | Out-Null
|
New-Item -ItemType directory -Path $targetDir -Name "plugins\user\.debug" | Out-Null
|
||||||
Copy-Item (Join-Path $projectDir "Resources\Plugins\.debug\*") -Destination (Join-Path $targetDir "plugins\user\.debug") -Recurse
|
Copy-Item (Join-Path $projectDir "Resources\Plugins\.debug\*") -Recurse -Destination (Join-Path $targetDir "plugins\user\.debug")
|
||||||
}
|
}
|
||||||
|
|
||||||
# Helper functions
|
# Helper functions
|
||||||
@@ -62,8 +61,8 @@ try{
|
|||||||
function Rewrite-File{
|
function Rewrite-File{
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
Param(
|
Param(
|
||||||
[Parameter(Mandatory = $True, ValueFromPipeline = $True)][array] $lines,
|
[Parameter(Mandatory = $True, Position = 1)] $file,
|
||||||
[Parameter(Mandatory = $True, Position = 1)] $file
|
[Parameter(Mandatory = $True, Position = 2)] $lines
|
||||||
)
|
)
|
||||||
|
|
||||||
$relativePath = $file.FullName.Substring($targetDir.Length)
|
$relativePath = $file.FullName.Substring($targetDir.Length)
|
||||||
@@ -72,7 +71,9 @@ try{
|
|||||||
$lines = (,("#" + $version) + $lines)
|
$lines = (,("#" + $version) + $lines)
|
||||||
}
|
}
|
||||||
|
|
||||||
$lines | Where { $_ -ne '' } | Set-Content -Path $file.FullName
|
$lines = $lines | Where { $_ -ne '' }
|
||||||
|
|
||||||
|
[IO.File]::WriteAllLines($file.FullName, $lines)
|
||||||
Write-Host "Processed" $relativePath
|
Write-Host "Processed" $relativePath
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,36 +82,38 @@ try{
|
|||||||
Check-Carriage-Return("emoji-ordering.txt")
|
Check-Carriage-Return("emoji-ordering.txt")
|
||||||
|
|
||||||
ForEach($file in Get-ChildItem -Path $targetDir -Filter "*.js" -Exclude "configuration.default.js" -Recurse){
|
ForEach($file in Get-ChildItem -Path $targetDir -Filter "*.js" -Exclude "configuration.default.js" -Recurse){
|
||||||
$lines = Get-Content -Path $file.FullName
|
$lines = [IO.File]::ReadLines($file.FullName)
|
||||||
$lines = $lines | % { $_.TrimStart() }
|
$lines = $lines | % { $_.TrimStart() }
|
||||||
$lines = $lines -Replace '^(.*?)((?<=^|[;{}()])\s?//(?:\s.*|$))?$', '$1'
|
$lines = $lines -Replace '^(.*?)((?<=^|[;{}()])\s?//(?:\s.*|$))?$', '$1'
|
||||||
$lines = $lines -Replace '(?<!\w)return(\s.*?)? if (.*?);', 'if ($2)return$1;'
|
$lines = $lines -Replace '(?<!\w)return(\s.*?)? if (.*?);', 'if ($2)return$1;'
|
||||||
,$lines | Rewrite-File $file
|
Rewrite-File $file $lines
|
||||||
}
|
}
|
||||||
|
|
||||||
ForEach($file in Get-ChildItem -Path $targetDir -Filter "*.css" -Recurse){
|
ForEach($file in Get-ChildItem -Path $targetDir -Filter "*.css" -Recurse){
|
||||||
$lines = Get-Content -Path $file.FullName
|
$lines = [IO.File]::ReadLines($file.FullName)
|
||||||
$lines = $lines -Replace '\s*/\*.*?\*/', ''
|
$lines = $lines -Replace '\s*/\*.*?\*/', ''
|
||||||
$lines = $lines -Replace '^\s+(.+):\s?(.+?)(?:\s?(!important))?;$', '$1:$2$3;'
|
$lines = $lines -Replace '^\s+(.+):\s?(.+?)(?:\s?(!important))?;$', '$1:$2$3;'
|
||||||
$lines = $lines -Replace '^(\S.*?) {$', '$1{'
|
$lines = $lines -Replace '^(\S.*?) {$', '$1{'
|
||||||
@(($lines | Where { $_ -ne '' }) -Join ' ') | Rewrite-File $file
|
$lines = @(($lines | Where { $_ -ne '' }) -Join ' ')
|
||||||
|
Rewrite-File $file $lines
|
||||||
}
|
}
|
||||||
|
|
||||||
ForEach($file in Get-ChildItem -Path $targetDir -Filter "*.html" -Recurse){
|
ForEach($file in Get-ChildItem -Path $targetDir -Filter "*.html" -Recurse){
|
||||||
$lines = Get-Content -Path $file.FullName
|
$lines = [IO.File]::ReadLines($file.FullName)
|
||||||
,($lines | % { $_.TrimStart() }) | Rewrite-File $file
|
$lines = $lines | % { $_.TrimStart() }
|
||||||
|
Rewrite-File $file $lines
|
||||||
}
|
}
|
||||||
|
|
||||||
ForEach($file in Get-ChildItem -Path $targetDir -Filter "*.meta" -Recurse){
|
ForEach($file in Get-ChildItem -Path (Join-Path $targetDir "plugins") -Filter "*.meta" -Recurse){
|
||||||
$lines = Get-Content -Path $file.FullName
|
$lines = [IO.File]::ReadLines($file.FullName)
|
||||||
$lines = $lines -Replace '\{version\}', $version
|
$lines = $lines -Replace '\{version\}', $version
|
||||||
,$lines | Rewrite-File $file
|
Rewrite-File $file $lines
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "-------------------"
|
Write-Host "------------------"
|
||||||
$sw.Stop()
|
$sw.Stop()
|
||||||
Write-Host "Finished in" $([math]::Round($sw.Elapsed.TotalMilliseconds)) "ms"
|
Write-Host "Finished in" $([math]::Round($sw.Elapsed.TotalMilliseconds)) "ms"
|
||||||
Write-Host -------------------
|
Write-Host "------------------"
|
||||||
}catch{
|
}catch{
|
||||||
Write-Host "Encountered an error while running PostBuild.ps1 on line" $_.InvocationInfo.ScriptLineNumber
|
Write-Host "Encountered an error while running PostBuild.ps1 on line" $_.InvocationInfo.ScriptLineNumber
|
||||||
Write-Host $_
|
Write-Host $_
|
||||||
|
@@ -146,7 +146,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
let fixMedia = (html, media) => {
|
let fixMedia = (html, media) => {
|
||||||
return html.find(".js-media a[data-media-entity-id='"+media.mediaId+"']").css("background-image", 'url("'+media.small()+'")').removeClass("is-zoomable");
|
return html.find("a[data-media-entity-id='"+media.mediaId+"'], .media-item").first().removeClass("is-zoomable").css("background-image", 'url("'+media.small()+'")');
|
||||||
};
|
};
|
||||||
|
|
||||||
return function(column, tweet){
|
return function(column, tweet){
|
||||||
@@ -181,13 +181,15 @@
|
|||||||
if (previews){
|
if (previews){
|
||||||
html.find(".reverse-image-search").remove();
|
html.find(".reverse-image-search").remove();
|
||||||
|
|
||||||
|
let container = html.find(".js-media");
|
||||||
|
|
||||||
for(let media of tweet.getMedia()){
|
for(let media of tweet.getMedia()){
|
||||||
fixMedia(html, media);
|
fixMedia(container, media);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tweet.quotedTweet){
|
if (tweet.quotedTweet){
|
||||||
for(let media of tweet.quotedTweet.getMedia()){
|
for(let media of tweet.quotedTweet.getMedia()){
|
||||||
fixMedia(html, media).addClass("media-size-medium");
|
fixMedia(container, media).addClass("media-size-medium");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,6 +213,12 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (tweet.quotedTweet){
|
||||||
|
html.find("p.txt-mute").filter(function(){
|
||||||
|
return $(this).text() === "Show this thread";
|
||||||
|
}).first().remove();
|
||||||
|
}
|
||||||
|
|
||||||
let type = tweet.getChirpType();
|
let type = tweet.getChirpType();
|
||||||
|
|
||||||
if (type === "follow"){
|
if (type === "follow"){
|
||||||
@@ -680,9 +688,9 @@
|
|||||||
html.find("footer").last().remove(); // apparently withTweetActions breaks for certain tweets, nice
|
html.find("footer").last().remove(); // apparently withTweetActions breaks for certain tweets, nice
|
||||||
html.find(".td-screenshot-remove").remove();
|
html.find(".td-screenshot-remove").remove();
|
||||||
|
|
||||||
html.find("p.link-complex-target").filter(function(){
|
html.find("p.link-complex-target,p.txt-mute").filter(function(){
|
||||||
return $(this).text() === "Show this thread";
|
return $(this).text() === "Show this thread";
|
||||||
}).first().remove();
|
}).remove();
|
||||||
|
|
||||||
html.addClass($(document.documentElement).attr("class"));
|
html.addClass($(document.documentElement).attr("class"));
|
||||||
html.addClass($(document.body).attr("class"));
|
html.addClass($(document.body).attr("class"));
|
||||||
@@ -1001,10 +1009,40 @@
|
|||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Block: Setup global function to inject custom HTML into mustache templates.
|
||||||
|
//
|
||||||
|
window.TDGF_injectMustache = function(name, operation, search, custom){
|
||||||
|
let replacement;
|
||||||
|
|
||||||
|
switch(operation){
|
||||||
|
case "replace": replacement = custom; break;
|
||||||
|
case "append": replacement = search+custom; break;
|
||||||
|
case "prepend": replacement = custom+search; break;
|
||||||
|
default: throw "Invalid mustache injection operation. Only 'replace', 'append', 'prepend' are supported.";
|
||||||
|
}
|
||||||
|
|
||||||
|
let prev = TD.mustaches[name];
|
||||||
|
|
||||||
|
if (!prev){
|
||||||
|
$TD.crashDebug("Mustache injection is referencing an invalid mustache: "+name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
TD.mustaches[name] = prev.replace(search, replacement);
|
||||||
|
|
||||||
|
if (prev === TD.mustaches[name]){
|
||||||
|
$TD.crashDebug("Mustache injection had no effect: "+name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// Block: Let's make retweets lowercase again.
|
// Block: Let's make retweets lowercase again.
|
||||||
//
|
//
|
||||||
TD.mustaches["status/tweet_single.mustache"] = TD.mustaches["status/tweet_single.mustache"].replace("{{_i}} Retweeted{{/i}}", "{{_i}} retweeted{{/i}}");
|
window.TDGF_injectMustache("status/tweet_single.mustache", "replace", "{{_i}} Retweeted{{/i}}", "{{_i}} retweeted{{/i}}");
|
||||||
|
|
||||||
if (ensurePropertyExists(TD, "services", "TwitterActionRetweet", "prototype", "generateText")){
|
if (ensurePropertyExists(TD, "services", "TwitterActionRetweet", "prototype", "generateText")){
|
||||||
TD.services.TwitterActionRetweet.prototype.generateText = appendToFunction(TD.services.TwitterActionRetweet.prototype.generateText, function(){
|
TD.services.TwitterActionRetweet.prototype.generateText = appendToFunction(TD.services.TwitterActionRetweet.prototype.generateText, function(){
|
||||||
@@ -1073,7 +1111,8 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
TD.mustaches["status/media_thumb.mustache"] = TD.mustaches["status/media_thumb.mustache"].replace("is-gif", "is-gif is-paused");
|
window.TDGF_injectMustache("status/media_thumb.mustache", "append", "is-gif", " is-paused");
|
||||||
|
|
||||||
TD.mustaches["media/native_video.mustache"] = '<div class="js-media-gif-container media-item nbfc is-video" style="background-image:url({{imageSrc}})"><video class="js-media-gif media-item-gif full-width block {{#isPossiblySensitive}}is-invisible{{/isPossiblySensitive}}" loop src="{{videoUrl}}"></video><a class="js-gif-play pin-all is-actionable">{{> media/video_overlay}}</a></div>';
|
TD.mustaches["media/native_video.mustache"] = '<div class="js-media-gif-container media-item nbfc is-video" style="background-image:url({{imageSrc}})"><video class="js-media-gif media-item-gif full-width block {{#isPossiblySensitive}}is-invisible{{/isPossiblySensitive}}" loop src="{{videoUrl}}"></video><a class="js-gif-play pin-all is-actionable">{{> media/video_overlay}}</a></div>';
|
||||||
|
|
||||||
if (!ensurePropertyExists(TD, "components", "MediaGallery", "prototype", "_loadTweet") ||
|
if (!ensurePropertyExists(TD, "components", "MediaGallery", "prototype", "_loadTweet") ||
|
||||||
|
@@ -93,12 +93,12 @@
|
|||||||
<label for="td-anonymous-data">Send anonymous usage data</label>
|
<label for="td-anonymous-data">Send anonymous usage data</label>
|
||||||
<label> (<a href="https://github.com/chylex/TweetDuck/wiki/Send-anonymous-data" rel="nofollow">learn more</a>)</label>
|
<label> (<a href="https://github.com/chylex/TweetDuck/wiki/Send-anonymous-data" rel="nofollow">learn more</a>)</label>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-positive" data-guide><span class="label">Show Guide</span></button>
|
<button class="Button--primary" data-guide><span class="label">Show Guide</span></button>
|
||||||
<button class="btn btn-positive"><span class="label">Close</span</button>
|
<button class="Button--secondary"><span class="label">Close</span</button>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>`).appendTo(".js-app"); /* TODO btn-positive is removed, check all files again */
|
</div>`).appendTo(".js-app");
|
||||||
|
|
||||||
let tdUser = null;
|
let tdUser = null;
|
||||||
let loadTweetDuckUser = (onSuccess, onError) => {
|
let loadTweetDuckUser = (onSuccess, onError) => {
|
||||||
|
@@ -129,11 +129,10 @@
|
|||||||
// Block: Setup a skip button.
|
// Block: Setup a skip button.
|
||||||
//
|
//
|
||||||
if (!document.body.hasAttribute("td-example-notification")){
|
if (!document.body.hasAttribute("td-example-notification")){
|
||||||
document.body.insertAdjacentHTML("afterbegin", `
|
document.body.children[0].insertAdjacentHTML("beforeend", `
|
||||||
<svg id="td-skip" width="10" height="17" viewBox="0 0 350 600">
|
<svg id="td-skip" width="10" height="17" viewBox="0 0 350 600">
|
||||||
<path fill="#888" d="M0,151.656l102.208-102.22l247.777,247.775L102.208,544.986L0,442.758l145.546-145.547">
|
<path fill="#888" d="M0,151.656l102.208-102.22l247.777,247.775L102.208,544.986L0,442.758l145.546-145.547">
|
||||||
</svg>
|
</svg>`);
|
||||||
`);
|
|
||||||
|
|
||||||
document.getElementById("td-skip").addEventListener("click", function(){
|
document.getElementById("td-skip").addEventListener("click", function(){
|
||||||
$TD.loadNextNotification();
|
$TD.loadNextNotification();
|
||||||
@@ -150,4 +149,9 @@
|
|||||||
document.body.addEventListener("mouseleave", function(){
|
document.body.addEventListener("mouseleave", function(){
|
||||||
document.body.classList.remove("td-hover");
|
document.body.classList.remove("td-hover");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
// Block: Force a reset of scroll position on every load.
|
||||||
|
//
|
||||||
|
history.scrollRestoration = "manual";
|
||||||
})($TD, $TDX);
|
})($TD, $TDX);
|
||||||
|
@@ -121,4 +121,5 @@
|
|||||||
window.TDPF_playVideo = window.TDGF_playVideo;
|
window.TDPF_playVideo = window.TDGF_playVideo;
|
||||||
window.TDPF_reloadColumns = window.TDGF_reloadColumns;
|
window.TDPF_reloadColumns = window.TDGF_reloadColumns;
|
||||||
window.TDPF_prioritizeNewestEvent = window.TDGF_prioritizeNewestEvent;
|
window.TDPF_prioritizeNewestEvent = window.TDGF_prioritizeNewestEvent;
|
||||||
|
window.TDPF_injectMustache = window.TDGF_injectMustache;
|
||||||
})();
|
})();
|
||||||
|
@@ -2,7 +2,9 @@
|
|||||||
/* General */
|
/* General */
|
||||||
/***********/
|
/***********/
|
||||||
|
|
||||||
body.td-notification {
|
html, body {
|
||||||
|
height: auto !important;
|
||||||
|
overflow-x: hidden !important;
|
||||||
overflow-y: auto !important;
|
overflow-y: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,7 +138,7 @@ html[data-td-font='smallest'] .badge-verified:before {
|
|||||||
|
|
||||||
#td-skip {
|
#td-skip {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 30px;
|
left: 29px;
|
||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@@ -60,4 +60,16 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// Block: Fix broken Cancel button on logout page.
|
||||||
|
//
|
||||||
|
else if (location.pathname === "/logout"){
|
||||||
|
document.addEventListener("DOMContentLoaded", function(){
|
||||||
|
let cancel = document.querySelector(".buttons .cancel");
|
||||||
|
|
||||||
|
if (cancel && cancel.tagName === "A"){
|
||||||
|
cancel.href = "https://tweetdeck.twitter.com/";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
<?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">
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="packages\CefSharp.WinForms.64.0.0-CI2508\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.64.0.0-CI2508\build\CefSharp.WinForms.props')" />
|
<Import Project="packages\CefSharp.WinForms.65.0.0-pre01\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.65.0.0-pre01\build\CefSharp.WinForms.props')" />
|
||||||
<Import Project="packages\CefSharp.Common.64.0.0-CI2508\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.64.0.0-CI2508\build\CefSharp.Common.props')" />
|
<Import Project="packages\CefSharp.Common.65.0.0-pre01\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.65.0.0-pre01\build\CefSharp.Common.props')" />
|
||||||
<Import Project="packages\cef.redist.x86.3.3282.1731\build\cef.redist.x86.props" Condition="Exists('packages\cef.redist.x86.3.3282.1731\build\cef.redist.x86.props')" />
|
<Import Project="packages\cef.redist.x86.3.3325.1758\build\cef.redist.x86.props" Condition="Exists('packages\cef.redist.x86.3.3325.1758\build\cef.redist.x86.props')" />
|
||||||
<Import Project="packages\cef.redist.x64.3.3282.1731\build\cef.redist.x64.props" Condition="Exists('packages\cef.redist.x64.3.3282.1731\build\cef.redist.x64.props')" />
|
<Import Project="packages\cef.redist.x64.3.3325.1758\build\cef.redist.x64.props" Condition="Exists('packages\cef.redist.x64.3.3325.1758\build\cef.redist.x64.props')" />
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
@@ -419,7 +419,6 @@ powershell -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild
|
|||||||
<Exec Command="del "$(TargetDir)*.pdb"" />
|
<Exec Command="del "$(TargetDir)*.pdb"" />
|
||||||
<Exec Command="del "$(TargetDir)*.xml"" />
|
<Exec Command="del "$(TargetDir)*.xml"" />
|
||||||
<Delete Files="$(TargetDir)CefSharp.BrowserSubprocess.exe" />
|
<Delete Files="$(TargetDir)CefSharp.BrowserSubprocess.exe" />
|
||||||
<Delete Files="$(TargetDir)devtools_resources.pak" />
|
|
||||||
<Delete Files="$(TargetDir)widevinecdmadapter.dll" />
|
<Delete Files="$(TargetDir)widevinecdmadapter.dll" />
|
||||||
</Target>
|
</Target>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@@ -429,13 +428,13 @@ powershell -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('packages\cef.redist.x64.3.3282.1731\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.3.3282.1731\build\cef.redist.x64.props'))" />
|
<Error Condition="!Exists('packages\cef.redist.x64.3.3325.1758\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x64.3.3325.1758\build\cef.redist.x64.props'))" />
|
||||||
<Error Condition="!Exists('packages\cef.redist.x86.3.3282.1731\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.3.3282.1731\build\cef.redist.x86.props'))" />
|
<Error Condition="!Exists('packages\cef.redist.x86.3.3325.1758\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\cef.redist.x86.3.3325.1758\build\cef.redist.x86.props'))" />
|
||||||
<Error Condition="!Exists('packages\CefSharp.Common.64.0.0-CI2508\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.64.0.0-CI2508\build\CefSharp.Common.props'))" />
|
<Error Condition="!Exists('packages\CefSharp.Common.65.0.0-pre01\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.65.0.0-pre01\build\CefSharp.Common.props'))" />
|
||||||
<Error Condition="!Exists('packages\CefSharp.Common.64.0.0-CI2508\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.64.0.0-CI2508\build\CefSharp.Common.targets'))" />
|
<Error Condition="!Exists('packages\CefSharp.Common.65.0.0-pre01\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.Common.65.0.0-pre01\build\CefSharp.Common.targets'))" />
|
||||||
<Error Condition="!Exists('packages\CefSharp.WinForms.64.0.0-CI2508\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.64.0.0-CI2508\build\CefSharp.WinForms.props'))" />
|
<Error Condition="!Exists('packages\CefSharp.WinForms.65.0.0-pre01\build\CefSharp.WinForms.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.65.0.0-pre01\build\CefSharp.WinForms.props'))" />
|
||||||
<Error Condition="!Exists('packages\CefSharp.WinForms.64.0.0-CI2508\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.64.0.0-CI2508\build\CefSharp.WinForms.targets'))" />
|
<Error Condition="!Exists('packages\CefSharp.WinForms.65.0.0-pre01\build\CefSharp.WinForms.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\CefSharp.WinForms.65.0.0-pre01\build\CefSharp.WinForms.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="packages\CefSharp.Common.64.0.0-CI2508\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.64.0.0-CI2508\build\CefSharp.Common.targets')" />
|
<Import Project="packages\CefSharp.Common.65.0.0-pre01\build\CefSharp.Common.targets" Condition="Exists('packages\CefSharp.Common.65.0.0-pre01\build\CefSharp.Common.targets')" />
|
||||||
<Import Project="packages\CefSharp.WinForms.64.0.0-CI2508\build\CefSharp.WinForms.targets" Condition="Exists('packages\CefSharp.WinForms.64.0.0-CI2508\build\CefSharp.WinForms.targets')" />
|
<Import Project="packages\CefSharp.WinForms.65.0.0-pre01\build\CefSharp.WinForms.targets" Condition="Exists('packages\CefSharp.WinForms.65.0.0-pre01\build\CefSharp.WinForms.targets')" />
|
||||||
</Project>
|
</Project>
|
@@ -22,7 +22,7 @@ namespace TweetDuck.Updates{
|
|||||||
|
|
||||||
this.VersionTag = versionTag;
|
this.VersionTag = versionTag;
|
||||||
this.ReleaseNotes = releaseNotes;
|
this.ReleaseNotes = releaseNotes;
|
||||||
this.InstallerPath = Path.Combine(installerFolder, $"TweetDuck.{versionTag}.exe");;
|
this.InstallerPath = Path.Combine(installerFolder, $"TweetDuck.{versionTag}.exe");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BeginSilentDownload(){
|
public void BeginSilentDownload(){
|
||||||
|
@@ -1,30 +0,0 @@
|
|||||||
// Copyright <20> 2010-2016 The CefSharp Authors
|
|
||||||
//
|
|
||||||
// Redistribution and use in source and binary forms, with or without
|
|
||||||
// modification, are permitted provided that the following conditions are
|
|
||||||
// met:
|
|
||||||
//
|
|
||||||
// * Redistributions of source code must retain the above copyright
|
|
||||||
// notice, this list of conditions and the following disclaimer.
|
|
||||||
//
|
|
||||||
// * Redistributions in binary form must reproduce the above
|
|
||||||
// copyright notice, this list of conditions and the following disclaimer
|
|
||||||
// in the documentation and/or other materials provided with the
|
|
||||||
// distribution.
|
|
||||||
//
|
|
||||||
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
|
||||||
// Framework nor the name CefSharp nor the names of its contributors
|
|
||||||
// may be used to endorse or promote products derived from this software
|
|
||||||
// without specific prior written permission.
|
|
||||||
//
|
|
||||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
||||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
||||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
||||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
||||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,9 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2016
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
98
bld/Resources/LICENSES.txt
Normal file
98
bld/Resources/LICENSES.txt
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
===============================================================================
|
||||||
|
TweetDuck
|
||||||
|
===============================================================================
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2016
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
CefSharp
|
||||||
|
===============================================================================
|
||||||
|
|
||||||
|
// Copyright © 2010-2017 The CefSharp Authors
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions are
|
||||||
|
// met:
|
||||||
|
//
|
||||||
|
// * Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// * Redistributions in binary form must reproduce the above
|
||||||
|
// copyright notice, this list of conditions and the following disclaimer
|
||||||
|
// in the documentation and/or other materials provided with the
|
||||||
|
// distribution.
|
||||||
|
//
|
||||||
|
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||||
|
// Framework nor the name CefSharp nor the names of its contributors
|
||||||
|
// may be used to endorse or promote products derived from this software
|
||||||
|
// without specific prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
===============================================================================
|
||||||
|
Chromium Embedded Framework
|
||||||
|
===============================================================================
|
||||||
|
|
||||||
|
// Copyright (c) 2008-2014 Marshall A. Greenblatt. Portions Copyright (c)
|
||||||
|
// 2006-2009 Google Inc. All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions are
|
||||||
|
// met:
|
||||||
|
//
|
||||||
|
// * Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
// * Redistributions in binary form must reproduce the above
|
||||||
|
// copyright notice, this list of conditions and the following disclaimer
|
||||||
|
// in the documentation and/or other materials provided with the
|
||||||
|
// distribution.
|
||||||
|
// * Neither the name of Google Inc. nor the name Chromium Embedded
|
||||||
|
// Framework nor the names of its contributors may be used to endorse
|
||||||
|
// or promote products derived from this software without specific prior
|
||||||
|
// written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
Binary file not shown.
@@ -24,12 +24,14 @@ DefaultGroupName={#MyAppName}
|
|||||||
OutputBaseFilename={#MyAppName}
|
OutputBaseFilename={#MyAppName}
|
||||||
VersionInfoVersion={#MyAppVersion}
|
VersionInfoVersion={#MyAppVersion}
|
||||||
SetupIconFile=.\Resources\icon.ico
|
SetupIconFile=.\Resources\icon.ico
|
||||||
|
CloseApplicationsFilter=*.exe,*.dll,*.pak
|
||||||
|
RestartApplications=False
|
||||||
Uninstallable=TDIsUninstallable
|
Uninstallable=TDIsUninstallable
|
||||||
UninstallDisplayName={#MyAppName}
|
UninstallDisplayName={#MyAppName}
|
||||||
UninstallDisplayIcon={app}\{#MyAppExeName}
|
UninstallDisplayIcon={app}\{#MyAppExeName}
|
||||||
Compression=lzma
|
Compression=lzma2/ultra
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
InternalCompressLevel=max
|
InternalCompressLevel=normal
|
||||||
MinVersion=0,6.1
|
MinVersion=0,6.1
|
||||||
|
|
||||||
#include <idp.iss>
|
#include <idp.iss>
|
||||||
@@ -38,11 +40,13 @@ MinVersion=0,6.1
|
|||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalTasks}"; Flags: unchecked
|
||||||
|
Name: "devtools"; Description: "{cm:TaskDevTools}"; GroupDescription: "{cm:AdditionalTasks}"; Flags: unchecked
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,*.pdb,CefSharp.BrowserSubprocess.exe,devtools_resources.pak,widevinecdmadapter.dll"
|
Source: "..\bin\x86\Release\devtools_resources.pak"; DestDir: "{app}"; Flags: ignoreversion; Tasks: devtools
|
||||||
|
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "devtools_resources.pak"
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: TDIsUninstallable
|
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: TDIsUninstallable
|
||||||
@@ -58,9 +62,14 @@ Type: filesandordirs; Name: "{app}\scripts"
|
|||||||
Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\Cache"
|
Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\Cache"
|
||||||
Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\GPUCache"
|
Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\GPUCache"
|
||||||
|
|
||||||
|
[CustomMessages]
|
||||||
|
AdditionalTasks=Additional shortcuts and components:
|
||||||
|
TaskDevTools=Install dev tools
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
var UpdatePath: String;
|
var UpdatePath: String;
|
||||||
var ForceRedistPrompt: String;
|
var ForceRedistPrompt: String;
|
||||||
|
var VisitedTasksPage: Boolean;
|
||||||
|
|
||||||
function TDGetNetFrameworkVersion: Cardinal; forward;
|
function TDGetNetFrameworkVersion: Cardinal; forward;
|
||||||
function TDIsVCMissing: Boolean; forward;
|
function TDIsVCMissing: Boolean; forward;
|
||||||
@@ -71,19 +80,20 @@ function InitializeSetup: Boolean;
|
|||||||
begin
|
begin
|
||||||
UpdatePath := ExpandConstant('{param:UPDATEPATH}')
|
UpdatePath := ExpandConstant('{param:UPDATEPATH}')
|
||||||
ForceRedistPrompt := ExpandConstant('{param:PROMPTREDIST}')
|
ForceRedistPrompt := ExpandConstant('{param:PROMPTREDIST}')
|
||||||
|
VisitedTasksPage := False
|
||||||
|
|
||||||
if (TDGetNetFrameworkVersion() < 379893) and (MsgBox('{#MyAppName} requires .NET Framework 4.5.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
if (TDGetNetFrameworkVersion() < 379893) and (MsgBox('{#MyAppName} requires .NET Framework 4.5.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (TDIsVCMissing() or (ForceRedistPrompt = '1')) and (MsgBox('Microsoft Visual C++ 2015 appears to be missing, would you like to automatically install it?', mbConfirmation, MB_YESNO) = IDYES) then
|
if (TDIsVCMissing() or (ForceRedistPrompt = '1')) and (MsgBox('Microsoft Visual C++ 2015 appears to be missing, would you like to automatically install it?', mbConfirmation, MB_YESNO) = IDYES) then
|
||||||
begin
|
begin
|
||||||
idpAddFile('https://github.com/{#MyAppPublisher}/{#MyAppName}/{#VCRedistLink}', ExpandConstant('{tmp}\{#MyAppName}.VC.exe'));
|
idpAddFile('https://github.com/{#MyAppPublisher}/{#MyAppName}/{#VCRedistLink}', ExpandConstant('{tmp}\{#MyAppName}.VC.exe'))
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := True;
|
Result := True
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Set the installation path if updating, and prepare download plugin if there are any files to download. }
|
{ Set the installation path if updating, and prepare download plugin if there are any files to download. }
|
||||||
@@ -91,12 +101,12 @@ procedure InitializeWizard();
|
|||||||
begin
|
begin
|
||||||
if (UpdatePath <> '') then
|
if (UpdatePath <> '') then
|
||||||
begin
|
begin
|
||||||
WizardForm.DirEdit.Text := UpdatePath;
|
WizardForm.DirEdit.Text := UpdatePath
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (idpFilesCount <> 0) then
|
if (idpFilesCount <> 0) then
|
||||||
begin
|
begin
|
||||||
idpDownloadAfter(wpReady);
|
idpDownloadAfter(wpReady)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -106,12 +116,14 @@ begin
|
|||||||
Result := (PageID = wpSelectDir) and (UpdatePath <> '')
|
Result := (PageID = wpSelectDir) and (UpdatePath <> '')
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Check the desktop icon task if not updating. }
|
{ Check the desktop icon task if not updating, and dev tools task if already installed. }
|
||||||
procedure CurPageChanged(CurPageID: Integer);
|
procedure CurPageChanged(CurPageID: Integer);
|
||||||
begin
|
begin
|
||||||
if CurPageID = wpSelectTasks then
|
if (CurPageID = wpSelectTasks) and (not VisitedTasksPage) then
|
||||||
begin
|
begin
|
||||||
WizardForm.TasksList.Checked[WizardForm.TasksList.Items.Count-1] := (UpdatePath = '');
|
WizardForm.TasksList.Checked[WizardForm.TasksList.Items.Count-2] := (UpdatePath = '')
|
||||||
|
WizardForm.TasksList.Checked[WizardForm.TasksList.Items.Count-1] := FileExists(ExpandConstant('{app}\devtools_resources.pak'))
|
||||||
|
VisitedTasksPage := True
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -120,7 +132,7 @@ procedure CurStepChanged(CurStep: TSetupStep);
|
|||||||
begin
|
begin
|
||||||
if CurStep = ssInstall then
|
if CurStep = ssInstall then
|
||||||
begin
|
begin
|
||||||
TDInstallVCRedist();
|
TDInstallVCRedist()
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -137,9 +149,9 @@ begin
|
|||||||
|
|
||||||
if (DirExists(ProfileDataFolder) or DirExists(PluginDataFolder)) and (MsgBox('Do you also want to delete your {#MyAppName} profile and plugins?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES) then
|
if (DirExists(ProfileDataFolder) or DirExists(PluginDataFolder)) and (MsgBox('Do you also want to delete your {#MyAppName} profile and plugins?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES) then
|
||||||
begin
|
begin
|
||||||
DelTree(ProfileDataFolder, True, True, True);
|
DelTree(ProfileDataFolder, True, True, True)
|
||||||
DelTree(PluginDataFolder, True, True, True);
|
DelTree(PluginDataFolder, True, True, True)
|
||||||
DelTree(ExpandConstant('{app}'), True, False, False);
|
DelTree(ExpandConstant('{app}'), True, False, False)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -157,11 +169,11 @@ var FrameworkVersion: Cardinal;
|
|||||||
begin
|
begin
|
||||||
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', FrameworkVersion) then
|
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', FrameworkVersion) then
|
||||||
begin
|
begin
|
||||||
Result := FrameworkVersion;
|
Result := FrameworkVersion
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := 0;
|
Result := 0
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Check if Visual C++ 2015 or 2017 is installed. }
|
{ Check if Visual C++ 2015 or 2017 is installed. }
|
||||||
@@ -176,20 +188,20 @@ begin
|
|||||||
begin
|
begin
|
||||||
for Index := 0 to GetArrayLength(Keys)-1 do
|
for Index := 0 to GetArrayLength(Keys)-1 do
|
||||||
begin
|
begin
|
||||||
Key := Keys[Index];
|
Key := Keys[Index]
|
||||||
|
|
||||||
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\Installer\Dependencies\'+Key, 'DisplayName', DisplayName) then
|
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\Installer\Dependencies\'+Key, 'DisplayName', DisplayName) then
|
||||||
begin
|
begin
|
||||||
if (Pos('Microsoft Visual C++', DisplayName) = 1) and (Pos('(x86)', DisplayName) > 1) and ((Pos(' 2015 ', DisplayName) > 1) or (Pos(' 2017 ', DisplayName) > 1)) then
|
if (Pos('Microsoft Visual C++', DisplayName) = 1) and (Pos('(x86)', DisplayName) > 1) and ((Pos(' 2015 ', DisplayName) > 1) or (Pos(' 2017 ', DisplayName) > 1)) then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := True;
|
Result := True
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Run the Visual C++ installer if downloaded. }
|
{ Run the Visual C++ installer if downloaded. }
|
||||||
@@ -202,26 +214,26 @@ begin
|
|||||||
|
|
||||||
if FileExists(InstallFile) then
|
if FileExists(InstallFile) then
|
||||||
begin
|
begin
|
||||||
WizardForm.ProgressGauge.Style := npbstMarquee;
|
WizardForm.ProgressGauge.Style := npbstMarquee
|
||||||
|
|
||||||
try
|
try
|
||||||
if Exec(InstallFile, '/passive /norestart', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
|
if Exec(InstallFile, '/passive /norestart', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
|
||||||
begin
|
begin
|
||||||
if ResultCode <> 0 then
|
if ResultCode <> 0 then
|
||||||
begin
|
begin
|
||||||
DeleteFile(InstallFile);
|
DeleteFile(InstallFile)
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
MsgBox('Could not run the Visual C++ installer, please visit https://github.com/{#MyAppPublisher}/{#MyAppName}/{#VCRedistLink} and download the latest version manually. Error: '+SysErrorMessage(ResultCode), mbCriticalError, MB_OK);
|
MsgBox('Could not run the Visual C++ installer, please visit https://github.com/{#MyAppPublisher}/{#MyAppName}/{#VCRedistLink} and download the latest version manually. Error: '+SysErrorMessage(ResultCode), mbCriticalError, MB_OK);
|
||||||
|
|
||||||
DeleteFile(InstallFile);
|
DeleteFile(InstallFile)
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
WizardForm.ProgressGauge.Style := npbstNormal;
|
WizardForm.ProgressGauge.Style := npbstNormal
|
||||||
DeleteFile(InstallFile);
|
DeleteFile(InstallFile)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@@ -24,12 +24,14 @@ DefaultGroupName={#MyAppName}
|
|||||||
OutputBaseFilename={#MyAppName}.Portable
|
OutputBaseFilename={#MyAppName}.Portable
|
||||||
VersionInfoVersion={#MyAppVersion}
|
VersionInfoVersion={#MyAppVersion}
|
||||||
SetupIconFile=.\Resources\icon.ico
|
SetupIconFile=.\Resources\icon.ico
|
||||||
|
CloseApplicationsFilter=*.exe,*.dll,*.pak
|
||||||
|
RestartApplications=False
|
||||||
Uninstallable=no
|
Uninstallable=no
|
||||||
UsePreviousAppDir=no
|
UsePreviousAppDir=no
|
||||||
PrivilegesRequired=lowest
|
PrivilegesRequired=lowest
|
||||||
Compression=lzma
|
Compression=lzma2/ultra
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
InternalCompressLevel=max
|
InternalCompressLevel=normal
|
||||||
MinVersion=0,6.1
|
MinVersion=0,6.1
|
||||||
|
|
||||||
#include <idp.iss>
|
#include <idp.iss>
|
||||||
@@ -37,16 +39,25 @@ MinVersion=0,6.1
|
|||||||
[Languages]
|
[Languages]
|
||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
|
[Tasks]
|
||||||
|
Name: "devtools"; Description: "{cm:TaskDevTools}"; GroupDescription: "{cm:AdditionalTasks}"; Flags: unchecked
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,*.pdb,CefSharp.BrowserSubprocess.exe,devtools_resources.pak,widevinecdmadapter.dll"
|
Source: "..\bin\x86\Release\devtools_resources.pak"; DestDir: "{app}"; Flags: ignoreversion; Tasks: devtools
|
||||||
|
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "devtools_resources.pak"
|
||||||
|
|
||||||
[Run]
|
[Run]
|
||||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall shellexec skipifsilent
|
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall shellexec skipifsilent
|
||||||
|
|
||||||
|
[CustomMessages]
|
||||||
|
AdditionalTasks=Additional components:
|
||||||
|
TaskDevTools=Install dev tools
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
var UpdatePath: String;
|
var UpdatePath: String;
|
||||||
var ForceRedistPrompt: String;
|
var ForceRedistPrompt: String;
|
||||||
|
var VisitedTasksPage: Boolean;
|
||||||
|
|
||||||
function TDGetNetFrameworkVersion: Cardinal; forward;
|
function TDGetNetFrameworkVersion: Cardinal; forward;
|
||||||
function TDIsVCMissing: Boolean; forward;
|
function TDIsVCMissing: Boolean; forward;
|
||||||
@@ -57,19 +68,20 @@ function InitializeSetup: Boolean;
|
|||||||
begin
|
begin
|
||||||
UpdatePath := ExpandConstant('{param:UPDATEPATH}')
|
UpdatePath := ExpandConstant('{param:UPDATEPATH}')
|
||||||
ForceRedistPrompt := ExpandConstant('{param:PROMPTREDIST}')
|
ForceRedistPrompt := ExpandConstant('{param:PROMPTREDIST}')
|
||||||
|
VisitedTasksPage := False
|
||||||
|
|
||||||
if (TDGetNetFrameworkVersion() < 379893) and (MsgBox('{#MyAppName} requires .NET Framework 4.5.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
if (TDGetNetFrameworkVersion() < 379893) and (MsgBox('{#MyAppName} requires .NET Framework 4.5.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (TDIsVCMissing() or (ForceRedistPrompt = '1')) and (MsgBox('Microsoft Visual C++ 2015 appears to be missing, would you like to automatically install it?', mbConfirmation, MB_YESNO) = IDYES) then
|
if (TDIsVCMissing() or (ForceRedistPrompt = '1')) and (MsgBox('Microsoft Visual C++ 2015 appears to be missing, would you like to automatically install it?', mbConfirmation, MB_YESNO) = IDYES) then
|
||||||
begin
|
begin
|
||||||
idpAddFile('https://github.com/{#MyAppPublisher}/{#MyAppName}/{#VCRedistLink}', ExpandConstant('{tmp}\{#MyAppName}.VC.exe'));
|
idpAddFile('https://github.com/{#MyAppPublisher}/{#MyAppName}/{#VCRedistLink}', ExpandConstant('{tmp}\{#MyAppName}.VC.exe'))
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := True;
|
Result := True
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Set the installation path if updating, and prepare download plugin if there are any files to download. }
|
{ Set the installation path if updating, and prepare download plugin if there are any files to download. }
|
||||||
@@ -77,12 +89,12 @@ procedure InitializeWizard();
|
|||||||
begin
|
begin
|
||||||
if (UpdatePath <> '') then
|
if (UpdatePath <> '') then
|
||||||
begin
|
begin
|
||||||
WizardForm.DirEdit.Text := UpdatePath;
|
WizardForm.DirEdit.Text := UpdatePath
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (idpFilesCount <> 0) then
|
if (idpFilesCount <> 0) then
|
||||||
begin
|
begin
|
||||||
idpDownloadAfter(wpReady);
|
idpDownloadAfter(wpReady)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -92,6 +104,16 @@ begin
|
|||||||
Result := (PageID = wpSelectDir) and (UpdatePath <> '')
|
Result := (PageID = wpSelectDir) and (UpdatePath <> '')
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ Check the dev tools task if already installed. }
|
||||||
|
procedure CurPageChanged(CurPageID: Integer);
|
||||||
|
begin
|
||||||
|
if (CurPageID = wpSelectTasks) and (not VisitedTasksPage) then
|
||||||
|
begin
|
||||||
|
WizardForm.TasksList.Checked[WizardForm.TasksList.Items.Count-1] := FileExists(ExpandConstant('{app}\devtools_resources.pak'))
|
||||||
|
VisitedTasksPage := True
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ Install VC++ if downloaded, and create a 'makeportable' file for portable installs. }
|
{ Install VC++ if downloaded, and create a 'makeportable' file for portable installs. }
|
||||||
procedure CurStepChanged(CurStep: TSetupStep);
|
procedure CurStepChanged(CurStep: TSetupStep);
|
||||||
begin
|
begin
|
||||||
@@ -104,7 +126,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if MsgBox('Could not create a ''makeportable'' file in the installation folder. If the file is not present, the installation will not be fully portable.', mbCriticalError, MB_RETRYCANCEL) <> IDRETRY then
|
if MsgBox('Could not create a ''makeportable'' file in the installation folder. If the file is not present, the installation will not be fully portable.', mbCriticalError, MB_RETRYCANCEL) <> IDRETRY then
|
||||||
begin
|
begin
|
||||||
break;
|
break
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -117,11 +139,11 @@ var FrameworkVersion: Cardinal;
|
|||||||
begin
|
begin
|
||||||
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', FrameworkVersion) then
|
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', FrameworkVersion) then
|
||||||
begin
|
begin
|
||||||
Result := FrameworkVersion;
|
Result := FrameworkVersion
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := 0;
|
Result := 0
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Check if Visual C++ 2015 or 2017 is installed. }
|
{ Check if Visual C++ 2015 or 2017 is installed. }
|
||||||
@@ -136,20 +158,20 @@ begin
|
|||||||
begin
|
begin
|
||||||
for Index := 0 to GetArrayLength(Keys)-1 do
|
for Index := 0 to GetArrayLength(Keys)-1 do
|
||||||
begin
|
begin
|
||||||
Key := Keys[Index];
|
Key := Keys[Index]
|
||||||
|
|
||||||
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\Installer\Dependencies\'+Key, 'DisplayName', DisplayName) then
|
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Classes\Installer\Dependencies\'+Key, 'DisplayName', DisplayName) then
|
||||||
begin
|
begin
|
||||||
if (Pos('Microsoft Visual C++', DisplayName) = 1) and (Pos('(x86)', DisplayName) > 1) and ((Pos(' 2015 ', DisplayName) > 1) or (Pos(' 2017 ', DisplayName) > 1)) then
|
if (Pos('Microsoft Visual C++', DisplayName) = 1) and (Pos('(x86)', DisplayName) > 1) and ((Pos(' 2015 ', DisplayName) > 1) or (Pos(' 2017 ', DisplayName) > 1)) then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := True;
|
Result := True
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Run the Visual C++ installer if downloaded. }
|
{ Run the Visual C++ installer if downloaded. }
|
||||||
@@ -162,26 +184,26 @@ begin
|
|||||||
|
|
||||||
if FileExists(InstallFile) then
|
if FileExists(InstallFile) then
|
||||||
begin
|
begin
|
||||||
WizardForm.ProgressGauge.Style := npbstMarquee;
|
WizardForm.ProgressGauge.Style := npbstMarquee
|
||||||
|
|
||||||
try
|
try
|
||||||
if Exec(InstallFile, '/passive /norestart', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
|
if Exec(InstallFile, '/passive /norestart', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
|
||||||
begin
|
begin
|
||||||
if ResultCode <> 0 then
|
if ResultCode <> 0 then
|
||||||
begin
|
begin
|
||||||
DeleteFile(InstallFile);
|
DeleteFile(InstallFile)
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
MsgBox('Could not run the Visual C++ installer, please visit https://github.com/{#MyAppPublisher}/{#MyAppName}/{#VCRedistLink} and download the latest version manually. Error: '+SysErrorMessage(ResultCode), mbCriticalError, MB_OK);
|
MsgBox('Could not run the Visual C++ installer, please visit https://github.com/{#MyAppPublisher}/{#MyAppName}/{#VCRedistLink} and download the latest version manually. Error: '+SysErrorMessage(ResultCode), mbCriticalError, MB_OK);
|
||||||
|
|
||||||
DeleteFile(InstallFile);
|
DeleteFile(InstallFile)
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
WizardForm.ProgressGauge.Style := npbstNormal;
|
WizardForm.ProgressGauge.Style := npbstNormal
|
||||||
DeleteFile(InstallFile);
|
DeleteFile(InstallFile)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
140
bld/gen_upd.iss
140
bld/gen_upd.iss
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppId={{{#MyAppID}}
|
AppId={{{#MyAppID}}
|
||||||
AppName={#MyAppName} Update
|
AppName={#MyAppName}
|
||||||
AppVersion={#MyAppVersion}
|
AppVersion={#MyAppVersion}
|
||||||
AppVerName={#MyAppName} {#MyAppVersion}
|
AppVerName={#MyAppName} {#MyAppVersion}
|
||||||
AppPublisher={#MyAppPublisher}
|
AppPublisher={#MyAppPublisher}
|
||||||
@@ -25,6 +25,8 @@ DefaultGroupName={#MyAppName}
|
|||||||
OutputBaseFilename={#MyAppName}.Update
|
OutputBaseFilename={#MyAppName}.Update
|
||||||
VersionInfoVersion={#MyAppVersion}
|
VersionInfoVersion={#MyAppVersion}
|
||||||
SetupIconFile=.\Resources\icon.ico
|
SetupIconFile=.\Resources\icon.ico
|
||||||
|
CloseApplicationsFilter=*.exe,*.dll,*.pak
|
||||||
|
RestartApplications=False
|
||||||
Uninstallable=TDIsUninstallable
|
Uninstallable=TDIsUninstallable
|
||||||
UninstallDisplayName={#MyAppName}
|
UninstallDisplayName={#MyAppName}
|
||||||
UninstallDisplayIcon={app}\{#MyAppExeName}
|
UninstallDisplayIcon={app}\{#MyAppExeName}
|
||||||
@@ -60,63 +62,10 @@ Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\Cache"
|
|||||||
Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\GPUCache"
|
Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\GPUCache"
|
||||||
|
|
||||||
[InstallDelete]
|
[InstallDelete]
|
||||||
Type: files; Name: "{app}\msvcp120.dll"
|
Type: files; Name: "{app}\CEFSHARP-LICENSE.txt"
|
||||||
Type: files; Name: "{app}\msvcr120.dll"
|
Type: files; Name: "{app}\LICENSE.txt"
|
||||||
Type: files; Name: "{app}\TweetLib.Audio.dll"
|
|
||||||
Type: filesandordirs; Name: "{app}\scripts"
|
Type: filesandordirs; Name: "{app}\scripts"
|
||||||
Type: filesandordirs; Name: "{app}\plugins\official"
|
Type: filesandordirs; Name: "{app}\plugins\official"
|
||||||
Type: files; Name: "{app}\locales\am.pak"
|
|
||||||
Type: files; Name: "{app}\locales\ar.pak"
|
|
||||||
Type: files; Name: "{app}\locales\bg.pak"
|
|
||||||
Type: files; Name: "{app}\locales\bn.pak"
|
|
||||||
Type: files; Name: "{app}\locales\ca.pak"
|
|
||||||
Type: files; Name: "{app}\locales\cs.pak"
|
|
||||||
Type: files; Name: "{app}\locales\da.pak"
|
|
||||||
Type: files; Name: "{app}\locales\de.pak"
|
|
||||||
Type: files; Name: "{app}\locales\el.pak"
|
|
||||||
Type: files; Name: "{app}\locales\en-GB.pak"
|
|
||||||
Type: files; Name: "{app}\locales\es-419.pak"
|
|
||||||
Type: files; Name: "{app}\locales\es.pak"
|
|
||||||
Type: files; Name: "{app}\locales\et.pak"
|
|
||||||
Type: files; Name: "{app}\locales\fa.pak"
|
|
||||||
Type: files; Name: "{app}\locales\fi.pak"
|
|
||||||
Type: files; Name: "{app}\locales\fil.pak"
|
|
||||||
Type: files; Name: "{app}\locales\fr.pak"
|
|
||||||
Type: files; Name: "{app}\locales\gu.pak"
|
|
||||||
Type: files; Name: "{app}\locales\he.pak"
|
|
||||||
Type: files; Name: "{app}\locales\hi.pak"
|
|
||||||
Type: files; Name: "{app}\locales\hr.pak"
|
|
||||||
Type: files; Name: "{app}\locales\hu.pak"
|
|
||||||
Type: files; Name: "{app}\locales\id.pak"
|
|
||||||
Type: files; Name: "{app}\locales\it.pak"
|
|
||||||
Type: files; Name: "{app}\locales\ja.pak"
|
|
||||||
Type: files; Name: "{app}\locales\kn.pak"
|
|
||||||
Type: files; Name: "{app}\locales\ko.pak"
|
|
||||||
Type: files; Name: "{app}\locales\lt.pak"
|
|
||||||
Type: files; Name: "{app}\locales\lv.pak"
|
|
||||||
Type: files; Name: "{app}\locales\ml.pak"
|
|
||||||
Type: files; Name: "{app}\locales\mr.pak"
|
|
||||||
Type: files; Name: "{app}\locales\ms.pak"
|
|
||||||
Type: files; Name: "{app}\locales\nb.pak"
|
|
||||||
Type: files; Name: "{app}\locales\nl.pak"
|
|
||||||
Type: files; Name: "{app}\locales\pl.pak"
|
|
||||||
Type: files; Name: "{app}\locales\pt-BR.pak"
|
|
||||||
Type: files; Name: "{app}\locales\pt-PT.pak"
|
|
||||||
Type: files; Name: "{app}\locales\ro.pak"
|
|
||||||
Type: files; Name: "{app}\locales\ru.pak"
|
|
||||||
Type: files; Name: "{app}\locales\sk.pak"
|
|
||||||
Type: files; Name: "{app}\locales\sl.pak"
|
|
||||||
Type: files; Name: "{app}\locales\sr.pak"
|
|
||||||
Type: files; Name: "{app}\locales\sv.pak"
|
|
||||||
Type: files; Name: "{app}\locales\sw.pak"
|
|
||||||
Type: files; Name: "{app}\locales\ta.pak"
|
|
||||||
Type: files; Name: "{app}\locales\te.pak"
|
|
||||||
Type: files; Name: "{app}\locales\th.pak"
|
|
||||||
Type: files; Name: "{app}\locales\tr.pak"
|
|
||||||
Type: files; Name: "{app}\locales\uk.pak"
|
|
||||||
Type: files; Name: "{app}\locales\vi.pak"
|
|
||||||
Type: files; Name: "{app}\locales\zh-CN.pak"
|
|
||||||
Type: files; Name: "{app}\locales\zh-TW.pak"
|
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
function TDIsUninstallable: Boolean; forward;
|
function TDIsUninstallable: Boolean; forward;
|
||||||
@@ -139,33 +88,34 @@ begin
|
|||||||
|
|
||||||
if UpdatePath = '' then
|
if UpdatePath = '' then
|
||||||
begin
|
begin
|
||||||
MsgBox('{#MyAppName} installation could not be found on your system.', mbCriticalError, MB_OK);
|
MsgBox('{#MyAppName} installation could not be found on your system.', mbCriticalError, MB_OK)
|
||||||
Result := False;
|
Result := False
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if not TDIsMatchingCEFVersion() then
|
if not TDIsMatchingCEFVersion() then
|
||||||
begin
|
begin
|
||||||
idpAddFile('https://github.com/{#MyAppPublisher}/{#MyAppName}/releases/download/'+TDGetAppVersionClean()+'/'+TDGetFullDownloadFileName(), ExpandConstant('{tmp}\{#MyAppName}.Full.exe'));
|
idpAddFile('https://github.com/{#MyAppPublisher}/{#MyAppName}/releases/download/'+TDGetAppVersionClean()+'/'+TDGetFullDownloadFileName(), ExpandConstant('{tmp}\{#MyAppName}.Full.exe'))
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (TDGetNetFrameworkVersion() < 379893) and (MsgBox('{#MyAppName} requires .NET Framework 4.5.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
if (TDGetNetFrameworkVersion() < 379893) and (MsgBox('{#MyAppName} requires .NET Framework 4.5.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := True;
|
Result := True
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Prepare download plugin if there are any files to download, and set the installation path. }
|
{ Prepare download plugin if there are any files to download, and set the installation path. }
|
||||||
procedure InitializeWizard();
|
procedure InitializeWizard();
|
||||||
begin
|
begin
|
||||||
WizardForm.DirEdit.Text := UpdatePath;
|
WizardForm.Caption := WizardForm.Caption + ' Update'
|
||||||
|
WizardForm.DirEdit.Text := UpdatePath
|
||||||
|
|
||||||
if idpFilesCount <> 0 then
|
if idpFilesCount <> 0 then
|
||||||
begin
|
begin
|
||||||
idpDownloadAfter(wpReady);
|
idpDownloadAfter(wpReady)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -177,14 +127,14 @@ var PluginDataFolder: String;
|
|||||||
begin
|
begin
|
||||||
if CurUninstallStep = usPostUninstall then
|
if CurUninstallStep = usPostUninstall then
|
||||||
begin
|
begin
|
||||||
ProfileDataFolder := ExpandConstant('{localappdata}\{#MyAppName}');
|
ProfileDataFolder := ExpandConstant('{localappdata}\{#MyAppName}')
|
||||||
PluginDataFolder := ExpandConstant('{app}\plugins');
|
PluginDataFolder := ExpandConstant('{app}\plugins')
|
||||||
|
|
||||||
if (DirExists(ProfileDataFolder) or DirExists(PluginDataFolder)) and (MsgBox('Do you also want to delete your {#MyAppName} profile and plugins?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES) then
|
if (DirExists(ProfileDataFolder) or DirExists(PluginDataFolder)) and (MsgBox('Do you also want to delete your {#MyAppName} profile and plugins?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES) then
|
||||||
begin
|
begin
|
||||||
DelTree(ProfileDataFolder, True, True, True);
|
DelTree(ProfileDataFolder, True, True, True)
|
||||||
DelTree(PluginDataFolder, True, True, True);
|
DelTree(PluginDataFolder, True, True, True)
|
||||||
DelTree(ExpandConstant('{app}'), True, False, False);
|
DelTree(ExpandConstant('{app}'), True, False, False)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -194,12 +144,12 @@ procedure CurStepChanged(CurStep: TSetupStep);
|
|||||||
begin
|
begin
|
||||||
if CurStep = ssInstall then
|
if CurStep = ssInstall then
|
||||||
begin
|
begin
|
||||||
TDExecuteFullDownload();
|
TDExecuteFullDownload()
|
||||||
|
|
||||||
if TDIsUninstallable() then
|
if TDIsUninstallable() then
|
||||||
begin
|
begin
|
||||||
DeleteFile(ExpandConstant('{app}\unins000.dat'));
|
DeleteFile(ExpandConstant('{app}\unins000.dat'))
|
||||||
DeleteFile(ExpandConstant('{app}\unins000.exe'));
|
DeleteFile(ExpandConstant('{app}\unins000.exe'))
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -213,6 +163,7 @@ end;
|
|||||||
{ Returns a string used for arguments when running the app after update. }
|
{ Returns a string used for arguments when running the app after update. }
|
||||||
function TDGetRunArgs(Param: String): String;
|
function TDGetRunArgs(Param: String): String;
|
||||||
var Args: String;
|
var Args: String;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Args := ExpandConstant('{param:RUNARGS}')
|
Args := ExpandConstant('{param:RUNARGS}')
|
||||||
StringChangeEx(Args, '::', '"', True)
|
StringChangeEx(Args, '::', '"', True)
|
||||||
@@ -254,11 +205,11 @@ var FrameworkVersion: Cardinal;
|
|||||||
begin
|
begin
|
||||||
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', FrameworkVersion) then
|
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', FrameworkVersion) then
|
||||||
begin
|
begin
|
||||||
Result := FrameworkVersion;
|
Result := FrameworkVersion
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := 0;
|
Result := 0
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Return the name of the full installer file to download from GitHub. }
|
{ Return the name of the full installer file to download from GitHub. }
|
||||||
@@ -270,15 +221,8 @@ end;
|
|||||||
{ Return whether the version of the installed libcef.dll library matches internal one. }
|
{ Return whether the version of the installed libcef.dll library matches internal one. }
|
||||||
function TDIsMatchingCEFVersion: Boolean;
|
function TDIsMatchingCEFVersion: Boolean;
|
||||||
var CEFVersion: String;
|
var CEFVersion: String;
|
||||||
var TmpTDVersion: String;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if GetVersionNumbersString(UpdatePath+'TweetDuck.exe', TmpTDVersion) and (CompareStr(TmpTDVersion, '1.13.0.0') = 0) then
|
|
||||||
begin
|
|
||||||
Result := False;
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
Result := (GetVersionNumbersString(UpdatePath+'libcef.dll', CEFVersion) and (CompareStr(CEFVersion, '{#CefVersion}') = 0))
|
Result := (GetVersionNumbersString(UpdatePath+'libcef.dll', CEFVersion) and (CompareStr(CEFVersion, '{#CefVersion}') = 0))
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -292,17 +236,17 @@ begin
|
|||||||
|
|
||||||
while True do
|
while True do
|
||||||
begin
|
begin
|
||||||
Substr := Copy(CleanVersion, Length(CleanVersion)-1, 2);
|
Substr := Copy(CleanVersion, Length(CleanVersion)-1, 2)
|
||||||
|
|
||||||
if (CompareStr(Substr, '.0') <> 0) then
|
if (CompareStr(Substr, '.0') <> 0) then
|
||||||
begin
|
begin
|
||||||
break;
|
break
|
||||||
end;
|
end;
|
||||||
|
|
||||||
CleanVersion := Copy(CleanVersion, 1, Length(CleanVersion)-2);
|
CleanVersion := Copy(CleanVersion, 1, Length(CleanVersion)-2)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := CleanVersion;
|
Result := CleanVersion
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Run the full package installer if downloaded. }
|
{ Run the full package installer if downloaded. }
|
||||||
@@ -315,28 +259,28 @@ begin
|
|||||||
|
|
||||||
if FileExists(InstallFile) then
|
if FileExists(InstallFile) then
|
||||||
begin
|
begin
|
||||||
WizardForm.ProgressGauge.Style := npbstMarquee;
|
WizardForm.ProgressGauge.Style := npbstMarquee
|
||||||
|
|
||||||
try
|
try
|
||||||
if Exec(InstallFile, '/SP- /SILENT /MERGETASKS="!desktopicon" /UPDATEPATH="'+UpdatePath+'"', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
|
if Exec(InstallFile, '/SP- /SILENT /FORCECLOSEAPPLICATIONS /UPDATEPATH="'+UpdatePath+'"', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
|
||||||
begin
|
begin
|
||||||
if ResultCode <> 0 then
|
if ResultCode <> 0 then
|
||||||
begin
|
begin
|
||||||
DeleteFile(InstallFile);
|
DeleteFile(InstallFile)
|
||||||
Abort();
|
Abort()
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
MsgBox('Could not run the full installer, please visit {#MyAppURL} and download the latest version manually. Error: '+SysErrorMessage(ResultCode), mbCriticalError, MB_OK);
|
MsgBox('Could not run the full installer, please visit {#MyAppURL} and download the latest version manually. Error: '+SysErrorMessage(ResultCode), mbCriticalError, MB_OK)
|
||||||
|
|
||||||
DeleteFile(InstallFile);
|
DeleteFile(InstallFile)
|
||||||
Abort();
|
Abort()
|
||||||
Exit;
|
Exit
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
WizardForm.ProgressGauge.Style := npbstNormal;
|
WizardForm.ProgressGauge.Style := npbstNormal
|
||||||
DeleteFile(InstallFile);
|
DeleteFile(InstallFile)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="cef.redist.x64" version="3.3282.1731" targetFramework="net452" xmlns="" />
|
<package id="cef.redist.x64" version="3.3325.1758" targetFramework="net452" />
|
||||||
<package id="cef.redist.x86" version="3.3282.1731" targetFramework="net452" xmlns="" />
|
<package id="cef.redist.x86" version="3.3325.1758" targetFramework="net452" />
|
||||||
<package id="CefSharp.Common" version="64.0.0-CI2508" targetFramework="net452" xmlns="" />
|
<package id="CefSharp.Common" version="65.0.0-pre01" targetFramework="net452" />
|
||||||
<package id="CefSharp.WinForms" version="64.0.0-CI2508" targetFramework="net452" xmlns="" />
|
<package id="CefSharp.WinForms" version="65.0.0-pre01" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
@@ -26,9 +26,9 @@
|
|||||||
<StartupObject />
|
<StartupObject />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="CefSharp.BrowserSubprocess.Core, Version=64.0.0.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=x86">
|
<Reference Include="CefSharp.BrowserSubprocess.Core, Version=65.0.0.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=x86">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\CefSharp.Common.64.0.0-CI2508\CefSharp\x86\CefSharp.BrowserSubprocess.Core.dll</HintPath>
|
<HintPath>..\packages\CefSharp.Common.65.0.0-pre01\CefSharp\x86\CefSharp.BrowserSubprocess.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
Reference in New Issue
Block a user