mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-24 15:15:49 +02:00
Move custom build script from F# to MSBuild directives and Powershell
This commit is contained in:
parent
d38e525fed
commit
0d3d744d94
@ -1,195 +0,0 @@
|
||||
open System
|
||||
open System.Collections.Generic
|
||||
open System.Diagnostics
|
||||
open System.IO
|
||||
open System.Threading.Tasks
|
||||
|
||||
// "$(DevEnvDir)CommonExtensions\Microsoft\FSharp\fsi.exe" "$(ProjectDir)Resources\PostBuild.fsx" --exec --nologo -- "$(TargetDir)\" "$(ProjectDir)\" "$(ConfigurationName)"
|
||||
// "$(ProjectDir)bld\post_build.exe" "$(TargetDir)\" "$(ProjectDir)\" "$(ConfigurationName)"
|
||||
|
||||
exception ArgumentUsage of string
|
||||
|
||||
#if !INTERACTIVE
|
||||
[<EntryPoint>]
|
||||
#endif
|
||||
let main (argv: string[]) =
|
||||
try
|
||||
if argv.Length < 2 then
|
||||
#if INTERACTIVE
|
||||
raise (ArgumentUsage "fsi.exe PostBuild.fsx --exec --nologo -- <TargetDir> <ProjectDir> [ConfigurationName] [VersionTag]")
|
||||
#else
|
||||
raise (ArgumentUsage "PostBuild.exe <TargetDir> <ProjectDir> [ConfigurationName] [VersionTag]")
|
||||
#endif
|
||||
|
||||
let _time name func =
|
||||
let sw = Stopwatch.StartNew()
|
||||
func()
|
||||
sw.Stop()
|
||||
printfn "[%s took %i ms]" name (int (Math.Round(sw.Elapsed.TotalMilliseconds)))
|
||||
|
||||
let (+/) path1 path2 =
|
||||
Path.Combine(path1, path2)
|
||||
|
||||
let sw = Stopwatch.StartNew()
|
||||
|
||||
// Setup
|
||||
|
||||
let targetDir = argv.[0]
|
||||
let projectDir = argv.[1]
|
||||
|
||||
let configuration = if argv.Length >= 3 then argv.[2]
|
||||
else "Release"
|
||||
|
||||
let version = if argv.Length >= 4 then argv.[3]
|
||||
else ((targetDir +/ "TweetDuck.exe") |> FileVersionInfo.GetVersionInfo).FileVersion
|
||||
|
||||
printfn "--------------------------"
|
||||
printfn "TweetDuck version %s" version
|
||||
printfn "--------------------------"
|
||||
|
||||
let guideDir = targetDir +/ "guide"
|
||||
let localesDir = targetDir +/ "locales"
|
||||
let pluginsDir = targetDir +/ "plugins"
|
||||
let resourcesDir = targetDir +/ "resources"
|
||||
|
||||
// Functions (File Management)
|
||||
|
||||
let copyFile source target =
|
||||
File.Copy(source, target, true)
|
||||
|
||||
let createDirectory path =
|
||||
Directory.CreateDirectory(path) |> ignore
|
||||
|
||||
let rec copyDirectoryContentsFiltered source target (filter: string -> bool) =
|
||||
if not (Directory.Exists(target)) then
|
||||
Directory.CreateDirectory(target) |> ignore
|
||||
|
||||
let src = DirectoryInfo(source)
|
||||
|
||||
for file in src.EnumerateFiles() do
|
||||
if filter file.Name then
|
||||
file.CopyTo(target +/ file.Name) |> ignore
|
||||
|
||||
for dir in src.EnumerateDirectories() do
|
||||
if filter dir.Name then
|
||||
copyDirectoryContentsFiltered dir.FullName (target +/ dir.Name) filter
|
||||
|
||||
let copyDirectoryContents source target =
|
||||
copyDirectoryContentsFiltered source target (fun _ -> true)
|
||||
|
||||
// Functions (File Processing)
|
||||
|
||||
let byPattern path pattern =
|
||||
Directory.EnumerateFiles(path, pattern, SearchOption.AllDirectories)
|
||||
|
||||
let exceptEndingWith (name: string) =
|
||||
Seq.filter (fun (file: string) -> not (file.EndsWith(name)))
|
||||
|
||||
let iterateFiles (files: string seq) (func: string -> unit) =
|
||||
Parallel.ForEach(files, func) |> ignore
|
||||
|
||||
let readFile file = seq {
|
||||
use stream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 0x1000, FileOptions.SequentialScan)
|
||||
use reader = new StreamReader(stream)
|
||||
let mutable cont = true
|
||||
|
||||
while cont do
|
||||
let line = reader.ReadLine()
|
||||
|
||||
if line = null then
|
||||
cont <- false
|
||||
else
|
||||
yield line
|
||||
}
|
||||
|
||||
let writeFile (fullPath: string) (lines: string seq) =
|
||||
let relativePath = fullPath.[(targetDir.Length)..]
|
||||
File.WriteAllLines(fullPath, lines |> Seq.toArray)
|
||||
printfn "Processed %s" relativePath
|
||||
|
||||
let processFiles (files: string seq) (extProcessors: IDictionary<string, (string seq -> string seq)>) =
|
||||
let rec processFileContents file =
|
||||
readFile file
|
||||
|> extProcessors.[Path.GetExtension(file)]
|
||||
|
||||
iterateFiles files (fun file ->
|
||||
processFileContents file
|
||||
|> (writeFile file)
|
||||
)
|
||||
|
||||
// Build
|
||||
|
||||
copyFile (projectDir +/ "bld/Resources/LICENSES.txt") (targetDir +/ "LICENSES.txt")
|
||||
|
||||
copyDirectoryContents (projectDir +/ "Resources/Guide") guideDir
|
||||
copyDirectoryContents (projectDir +/ "Resources/Content") resourcesDir
|
||||
|
||||
createDirectory (pluginsDir +/ "official")
|
||||
createDirectory (pluginsDir +/ "user")
|
||||
|
||||
copyDirectoryContentsFiltered
|
||||
(projectDir +/ "Resources/Plugins")
|
||||
(pluginsDir +/ "official")
|
||||
(fun name -> name <> ".debug" && name <> "emoji-instructions.txt")
|
||||
|
||||
if configuration = "Debug" then
|
||||
copyDirectoryContents
|
||||
(projectDir +/ "Resources/Plugins/.debug")
|
||||
(pluginsDir +/ "user/.debug")
|
||||
|
||||
if Directory.Exists(localesDir) || configuration = "Release" then
|
||||
Directory.EnumerateFiles(localesDir, "*.pak")
|
||||
|> exceptEndingWith @"\en-US.pak"
|
||||
|> Seq.iter File.Delete
|
||||
|
||||
// Validation
|
||||
|
||||
if File.ReadAllText(pluginsDir +/ "official/emoji-keyboard/emoji-ordering.txt").IndexOf('\r') <> -1 then
|
||||
raise (FormatException("emoji-ordering.txt must not have any carriage return characters"))
|
||||
else
|
||||
printfn "Verified emoji-ordering.txt"
|
||||
|
||||
// Processing
|
||||
|
||||
let fileProcessors =
|
||||
dict [
|
||||
".js", id;
|
||||
".css", id;
|
||||
".html", id;
|
||||
".meta", (fun (lines: string seq) ->
|
||||
lines
|
||||
|> Seq.map (fun line -> line.Replace("{version}", version))
|
||||
);
|
||||
]
|
||||
|
||||
processFiles (byPattern targetDir "*.js") fileProcessors
|
||||
processFiles (byPattern targetDir "*.css") fileProcessors
|
||||
processFiles (byPattern targetDir "*.html") fileProcessors
|
||||
processFiles (byPattern pluginsDir "*.meta") fileProcessors
|
||||
|
||||
// Finished
|
||||
|
||||
sw.Stop()
|
||||
printfn "------------------"
|
||||
printfn "Finished in %i ms" (int (Math.Round(sw.Elapsed.TotalMilliseconds)))
|
||||
printfn "------------------"
|
||||
0
|
||||
|
||||
with
|
||||
| ArgumentUsage message ->
|
||||
printfn ""
|
||||
printfn "Build script usage:"
|
||||
printfn "%s" message
|
||||
printfn ""
|
||||
1
|
||||
| ex ->
|
||||
printfn ""
|
||||
printfn "Encountered an error while running PostBuild:"
|
||||
printfn "%A" ex
|
||||
printfn ""
|
||||
1
|
||||
|
||||
#if INTERACTIVE
|
||||
printfn "Running PostBuild in interpreter..."
|
||||
main (fsi.CommandLineArgs |> Array.skip (1 + (fsi.CommandLineArgs |> Array.findIndex (fun arg -> arg = "--"))))
|
||||
#endif
|
67
Resources/PostBuild.ps1
Normal file
67
Resources/PostBuild.ps1
Normal file
@ -0,0 +1,67 @@
|
||||
Param(
|
||||
[Parameter(Mandatory = $True, Position = 1)][string] $targetDir,
|
||||
[Parameter(Position = 2)][string] $version = ""
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
try {
|
||||
$sw = [Diagnostics.Stopwatch]::StartNew()
|
||||
|
||||
if ($version.Equals("")) {
|
||||
$version = (Get-Item (Join-Path $targetDir "TweetDuck.exe")).VersionInfo.FileVersion
|
||||
}
|
||||
|
||||
Write-Host "--------------------------"
|
||||
Write-Host "TweetDuck version" $version
|
||||
Write-Host "--------------------------"
|
||||
|
||||
# Helper functions
|
||||
|
||||
function Check-Carriage-Return {
|
||||
Param([Parameter(Mandatory = $True, Position = 1)] $file)
|
||||
|
||||
if (!(Test-Path $file)) {
|
||||
Throw "$file does not exist"
|
||||
}
|
||||
|
||||
if ((Get-Content -Path $file -Raw).Contains("`r")) {
|
||||
Throw "$file must not have any carriage return characters"
|
||||
}
|
||||
|
||||
Write-Host "Verified" $file.Substring($targetDir.Length)
|
||||
}
|
||||
|
||||
function Rewrite-File {
|
||||
Param([Parameter(Mandatory = $True, Position = 1)] $file,
|
||||
[Parameter(Mandatory = $True, Position = 2)] $lines)
|
||||
|
||||
$relativePath = $file.FullName.Substring($targetDir.Length)
|
||||
[IO.File]::WriteAllLines($file.FullName, $lines)
|
||||
Write-Host "Processed" $relativePath
|
||||
}
|
||||
|
||||
# Validation
|
||||
|
||||
Check-Carriage-Return (Join-Path $targetDir "plugins\official\emoji-keyboard\emoji-ordering.txt")
|
||||
|
||||
# Processing
|
||||
|
||||
foreach ($file in Get-ChildItem -Path (Join-Path $targetDir "plugins") -Filter "*.meta" -Recurse) {
|
||||
$lines = [IO.File]::ReadLines($file.FullName)
|
||||
$lines = $lines -Replace '\{version\}', $version
|
||||
Rewrite-File $file $lines
|
||||
}
|
||||
|
||||
# Finished
|
||||
|
||||
$sw.Stop()
|
||||
Write-Host "------------------"
|
||||
Write-Host "Finished in" $([math]::Round($sw.Elapsed.TotalMilliseconds)) "ms"
|
||||
Write-Host "------------------"
|
||||
|
||||
} catch {
|
||||
Write-Host "Encountered an error while running PostBuild.ps1 on line" $_.InvocationInfo.ScriptLineNumber
|
||||
Write-Host $_
|
||||
Exit 1
|
||||
}
|
@ -7,7 +7,7 @@ namespace TweetDuck.Resources {
|
||||
static class ResourceHotSwap {
|
||||
private static readonly string HotSwapProjectRoot = FixPathSlash(Path.GetFullPath(Path.Combine(App.ProgramPath, "../../../")));
|
||||
private static readonly string HotSwapTargetDir = FixPathSlash(Path.Combine(HotSwapProjectRoot, "bin", "tmp"));
|
||||
private static readonly string HotSwapRebuildScript = Path.Combine(HotSwapProjectRoot, "bld", "post_build.exe");
|
||||
private static readonly string HotSwapRebuildScript = Path.Combine(HotSwapProjectRoot, "Resources", "PostBuild.ps1");
|
||||
|
||||
private static string FixPathSlash(string path) {
|
||||
return path.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar) + '\\';
|
||||
@ -23,12 +23,18 @@ public static void Run() {
|
||||
|
||||
DeleteHotSwapFolder();
|
||||
Directory.CreateDirectory(HotSwapTargetDir);
|
||||
Directory.CreateDirectory(Path.Combine(HotSwapTargetDir, "plugins"));
|
||||
Directory.CreateDirectory(Path.Combine(HotSwapTargetDir, "plugins", "user"));
|
||||
CopyDirectory(Path.Combine(HotSwapProjectRoot, "Resources", "Content"), Path.Combine(HotSwapTargetDir, "resources"));
|
||||
CopyDirectory(Path.Combine(HotSwapProjectRoot, "Resources", "Guide"), Path.Combine(HotSwapTargetDir, "guide"));
|
||||
CopyDirectory(Path.Combine(HotSwapProjectRoot, "Resources", "Plugins"), Path.Combine(HotSwapTargetDir, "plugins", "official"));
|
||||
Directory.Move(Path.Combine(HotSwapTargetDir, "plugins", "official", ".debug"), Path.Combine(HotSwapTargetDir, "plugins", "user", ".debug"));
|
||||
|
||||
Stopwatch sw = Stopwatch.StartNew();
|
||||
|
||||
using (Process process = Process.Start(new ProcessStartInfo {
|
||||
FileName = HotSwapRebuildScript,
|
||||
Arguments = $"\"{HotSwapTargetDir}\\\" \"{HotSwapProjectRoot}\\\" \"Debug\" \"{Program.VersionTag}\"",
|
||||
FileName = "powershell",
|
||||
Arguments = $"-NoProfile -ExecutionPolicy Unrestricted -File \"{HotSwapRebuildScript}\" \"{HotSwapTargetDir}\\\" \"{Program.VersionTag}\"",
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
})) {
|
||||
// ReSharper disable once PossibleNullReferenceException
|
||||
@ -46,9 +52,11 @@ public static void Run() {
|
||||
Debug.WriteLine($"Finished rebuild script in {sw.ElapsedMilliseconds} ms");
|
||||
|
||||
Directory.Delete(App.ResourcesPath, true);
|
||||
Directory.Delete(App.GuidePath, true);
|
||||
Directory.Delete(App.PluginPath, true);
|
||||
|
||||
Directory.Move(Path.Combine(HotSwapTargetDir, "resources"), App.ResourcesPath);
|
||||
Directory.Move(Path.Combine(HotSwapTargetDir, "guide"), App.GuidePath);
|
||||
Directory.Move(Path.Combine(HotSwapTargetDir, "plugins"), App.PluginPath);
|
||||
|
||||
DeleteHotSwapFolder();
|
||||
@ -59,6 +67,18 @@ private static void DeleteHotSwapFolder() {
|
||||
Directory.Delete(HotSwapTargetDir, true);
|
||||
} catch (DirectoryNotFoundException) {}
|
||||
}
|
||||
|
||||
private static void CopyDirectory(string from, string to) {
|
||||
foreach (var directory in Directory.GetDirectories(from)) {
|
||||
string name = Path.GetFileName(directory);
|
||||
Directory.CreateDirectory(Path.Combine(to, name));
|
||||
CopyDirectory(directory, Path.Combine(to, name));
|
||||
}
|
||||
|
||||
foreach (var file in Directory.GetFiles(from)) {
|
||||
File.Copy(file, Path.Combine(to, Path.GetFileName(file)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
334
TweetDuck.csproj
334
TweetDuck.csproj
@ -61,6 +61,32 @@
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="lib\TweetLib.Browser\TweetLib.Browser.csproj">
|
||||
<Project>{eefb1f37-7cad-46bd-8042-66e7b502ab02}</Project>
|
||||
<Name>TweetLib.Browser</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="lib\TweetLib.Core\TweetLib.Core.csproj">
|
||||
<Project>{93ba3cb4-a812-4949-b07d-8d393fb38937}</Project>
|
||||
<Name>TweetLib.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="lib\TweetLib.Utils\TweetLib.Utils.csproj">
|
||||
<Project>{476b1007-b12c-447f-b855-9886048201d6}</Project>
|
||||
<Name>TweetLib.Utils</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="subprocess\TweetDuck.Browser.csproj">
|
||||
<Project>{b10b0017-819e-4f71-870f-8256b36a26aa}</Project>
|
||||
<Name>TweetDuck.Browser</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="video\TweetDuck.Video.csproj">
|
||||
<Project>{278b2d11-402d-44b6-b6a1-8fa67db65565}</Project>
|
||||
<Name>TweetDuck.Video</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="lib\TweetLib.Communication\TweetLib.Communication.csproj">
|
||||
<Project>{72473763-4b9d-4fb6-a923-9364b2680f06}</Project>
|
||||
<Name>TweetLib.Communication</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Application\FileDialogs.cs" />
|
||||
<Compile Include="Application\MessageDialogs.cs" />
|
||||
@ -311,14 +337,122 @@
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Resources\Content\.all.js" />
|
||||
<None Include="Resources\Content\api\bridge.js" />
|
||||
<None Include="Resources\Content\api\jquery.js" />
|
||||
<None Include="Resources\Content\api\patch.js" />
|
||||
<None Include="Resources\Content\api\ready.js" />
|
||||
<None Include="Resources\Content\api\td.js" />
|
||||
<None Include="Resources\Content\api\utils.js" />
|
||||
<None Include="Resources\Content\bootstrap.js" />
|
||||
<None Include="Resources\Content\error\error.html" />
|
||||
<None Include="Resources\Content\images\logo.png" />
|
||||
<None Include="Resources\Content\images\spinner.apng" />
|
||||
<None Include="Resources\Content\introduction\introduction.css" />
|
||||
<None Include="Resources\Content\introduction\introduction.js" />
|
||||
<None Include="Resources\Content\load.js" />
|
||||
<None Include="Resources\Content\login\hide_cookie_bar.js" />
|
||||
<None Include="Resources\Content\login\login.css" />
|
||||
<None Include="Resources\Content\login\redirect_plain_twitter_com.js" />
|
||||
<None Include="Resources\Content\login\setup_document_attributes.js" />
|
||||
<None Include="Resources\Content\notification\add_skip_button.js" />
|
||||
<None Include="Resources\Content\notification\disable_clipboard_formatting.js" />
|
||||
<None Include="Resources\Content\notification\example\example.html" />
|
||||
<None Include="Resources\Content\notification\expand_links_or_show_tooltip.js" />
|
||||
<None Include="Resources\Content\notification\handle_links.js" />
|
||||
<None Include="Resources\Content\notification\handle_show_this_thread_link.js" />
|
||||
<None Include="Resources\Content\notification\notification.css" />
|
||||
<None Include="Resources\Content\notification\recalculate_tweet_sent_time.js" />
|
||||
<None Include="Resources\Content\notification\reset_scroll_position_on_load.js" />
|
||||
<None Include="Resources\Content\notification\screenshot\screenshot.js" />
|
||||
<None Include="Resources\Content\notification\scroll_smoothly.js" />
|
||||
<None Include="Resources\Content\notification\setup_body_hover_class.js" />
|
||||
<None Include="Resources\Content\plugins\base.js" />
|
||||
<None Include="Resources\Content\plugins\notification\plugins.js" />
|
||||
<None Include="Resources\Content\plugins\setup.js" />
|
||||
<None Include="Resources\Content\plugins\tweetdeck\plugins.js" />
|
||||
<None Include="Resources\Content\tweetdeck\add_tweetduck_to_settings_menu.js" />
|
||||
<None Include="Resources\Content\tweetdeck\bypass_t.co_links.js" />
|
||||
<None Include="Resources\Content\tweetdeck\clear_search_input.js" />
|
||||
<None Include="Resources\Content\tweetdeck\configure_first_day_of_week.js" />
|
||||
<None Include="Resources\Content\tweetdeck\configure_language_for_translations.js" />
|
||||
<None Include="Resources\Content\tweetdeck\disable_clipboard_formatting.js" />
|
||||
<None Include="Resources\Content\tweetdeck\disable_td_metrics.js" />
|
||||
<None Include="Resources\Content\tweetdeck\drag_links_onto_columns.js" />
|
||||
<None Include="Resources\Content\tweetdeck\expand_links_or_show_tooltip.js" />
|
||||
<None Include="Resources\Content\tweetdeck\fix_dm_input_box_focus.js" />
|
||||
<None Include="Resources\Content\tweetdeck\fix_horizontal_scrolling_of_column_container.js" />
|
||||
<None Include="Resources\Content\tweetdeck\fix_marking_dm_as_read_when_replying.js" />
|
||||
<None Include="Resources\Content\tweetdeck\fix_media_preview_urls.js" />
|
||||
<None Include="Resources\Content\tweetdeck\fix_missing_bing_translator_languages.js" />
|
||||
<None Include="Resources\Content\tweetdeck\fix_os_name.js" />
|
||||
<None Include="Resources\Content\tweetdeck\fix_scheduled_tweets_not_appearing.js" />
|
||||
<None Include="Resources\Content\tweetdeck\fix_youtube_previews.js" />
|
||||
<None Include="Resources\Content\tweetdeck\focus_composer_after_alt_tab.js" />
|
||||
<None Include="Resources\Content\tweetdeck\focus_composer_after_image_upload.js" />
|
||||
<None Include="Resources\Content\tweetdeck\focus_composer_after_switching_account.js" />
|
||||
<None Include="Resources\Content\tweetdeck\globals\apply_rot13.js" />
|
||||
<None Include="Resources\Content\tweetdeck\globals\get_class_style_property.js" />
|
||||
<None Include="Resources\Content\tweetdeck\globals\get_column_name.js" />
|
||||
<None Include="Resources\Content\tweetdeck\globals\get_hovered_column.js" />
|
||||
<None Include="Resources\Content\tweetdeck\globals\get_hovered_tweet.js" />
|
||||
<None Include="Resources\Content\tweetdeck\globals\inject_mustache.js" />
|
||||
<None Include="Resources\Content\tweetdeck\globals\prioritize_newest_event.js" />
|
||||
<None Include="Resources\Content\tweetdeck\globals\reload_browser.js" />
|
||||
<None Include="Resources\Content\tweetdeck\globals\reload_columns.js" />
|
||||
<None Include="Resources\Content\tweetdeck\globals\retrieve_tweet.js" />
|
||||
<None Include="Resources\Content\tweetdeck\globals\show_tweet_detail.js" />
|
||||
<None Include="Resources\Content\tweetdeck\handle_extra_mouse_buttons.js" />
|
||||
<None Include="Resources\Content\tweetdeck\hook_theme_settings.js" />
|
||||
<None Include="Resources\Content\tweetdeck\inject_css.js" />
|
||||
<None Include="Resources\Content\tweetdeck\keep_like_follow_dialogs_open.js" />
|
||||
<None Include="Resources\Content\tweetdeck\limit_loaded_dm_count.js" />
|
||||
<None Include="Resources\Content\tweetdeck\make_retweets_lowercase.js" />
|
||||
<None Include="Resources\Content\tweetdeck\middle_click_tweet_icon_actions.js" />
|
||||
<None Include="Resources\Content\tweetdeck\move_accounts_above_hashtags_in_search.js" />
|
||||
<None Include="Resources\Content\tweetdeck\offline_notification.js" />
|
||||
<None Include="Resources\Content\tweetdeck\open_search_externally.js" />
|
||||
<None Include="Resources\Content\tweetdeck\open_search_in_first_column.js" />
|
||||
<None Include="Resources\Content\tweetdeck\paste_images_from_clipboard.js" />
|
||||
<None Include="Resources\Content\tweetdeck\perform_search.js" />
|
||||
<None Include="Resources\Content\tweetdeck\pin_composer_icon.js" />
|
||||
<None Include="Resources\Content\tweetdeck\ready_plugins.js" />
|
||||
<None Include="Resources\Content\tweetdeck\register_composer_active_event.js" />
|
||||
<None Include="Resources\Content\tweetdeck\register_global_functions.js" />
|
||||
<None Include="Resources\Content\tweetdeck\register_global_functions_jquery.js" />
|
||||
<None Include="Resources\Content\tweetdeck\restore_cleared_column.js" />
|
||||
<None Include="Resources\Content\tweetdeck\screenshot_tweet.js" />
|
||||
<None Include="Resources\Content\tweetdeck\setup_column_type_attributes.js" />
|
||||
<None Include="Resources\Content\tweetdeck\setup_desktop_notifications.js" />
|
||||
<None Include="Resources\Content\tweetdeck\setup_link_context_menu.js" />
|
||||
<None Include="Resources\Content\tweetdeck\setup_sound_notifications.js" />
|
||||
<None Include="Resources\Content\tweetdeck\setup_tweet_context_menu.js" />
|
||||
<None Include="Resources\Content\tweetdeck\setup_tweetduck_account_bamboozle.js" />
|
||||
<None Include="Resources\Content\tweetdeck\setup_video_player.js" />
|
||||
<None Include="Resources\Content\tweetdeck\skip_pre_login_page.js" />
|
||||
<None Include="Resources\Content\tweetdeck\tweetdeck.css" />
|
||||
<None Include="Resources\Content\update\update.css" />
|
||||
<None Include="Resources\Content\update\update.js" />
|
||||
<None Include="Resources\Guide\img\app-menu.png" />
|
||||
<None Include="Resources\Guide\img\column-clear-header.png" />
|
||||
<None Include="Resources\Guide\img\column-clear-preferences.png" />
|
||||
<None Include="Resources\Guide\img\column-preferences.png" />
|
||||
<None Include="Resources\Guide\img\icon.ico" />
|
||||
<None Include="Resources\Guide\img\new-tweet-emoji.png" />
|
||||
<None Include="Resources\Guide\img\new-tweet-pin.png" />
|
||||
<None Include="Resources\Guide\img\new-tweet-template-advanced.png" />
|
||||
<None Include="Resources\Guide\img\new-tweet-template-basic.png" />
|
||||
<None Include="Resources\Guide\img\options-manage-export.png" />
|
||||
<None Include="Resources\Guide\img\options-manage-reset.png" />
|
||||
<None Include="Resources\Guide\img\options-manage.png" />
|
||||
<None Include="Resources\Guide\img\options-notifications-location.png" />
|
||||
<None Include="Resources\Guide\img\options-notifications-size.png" />
|
||||
<None Include="Resources\Guide\img\options-sounds.png" />
|
||||
<None Include="Resources\Guide\img\settings-dropdown.png" />
|
||||
<None Include="Resources\Guide\img\settings-editdesign.png" />
|
||||
<None Include="Resources\Guide\index.html" />
|
||||
<None Include="Resources\Guide\script.js" />
|
||||
<None Include="Resources\Guide\style.css" />
|
||||
<None Include="Resources\Images\icon-muted.ico" />
|
||||
<None Include="Resources\Images\icon-small.ico" />
|
||||
<None Include="Resources\Images\icon-tray-muted.ico" />
|
||||
@ -346,174 +480,56 @@
|
||||
<None Include="Resources\Plugins\templates\modal.html" />
|
||||
<None Include="Resources\Plugins\timeline-polls\.meta" />
|
||||
<None Include="Resources\Plugins\timeline-polls\browser.js" />
|
||||
<None Include="Resources\PostBuild.fsx" />
|
||||
<None Include="Resources\PostBuild.ps1" />
|
||||
<None Include="Resources\PostCefUpdate.ps1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourcesContent Include="$(ProjectDir)Resources\Content\**\*.*" Visible="false" />
|
||||
<ResourcesGuide Include="$(ProjectDir)Resources\Guide\**\*.*" Visible="false" />
|
||||
<ResourcesPlugins Include="$(ProjectDir)Resources\Plugins\**\*.*" Visible="false" />
|
||||
<ResourcesPlugins Remove="$(ProjectDir)Resources\Plugins\.debug\**\*.*" />
|
||||
<ResourcesPlugins Remove="$(ProjectDir)Resources\Plugins\emoji-keyboard\emoji-instructions.txt" />
|
||||
<ResourcesPluginsDebug Include="$(ProjectDir)Resources\Plugins\.debug\**\*.*" Visible="false" />
|
||||
<Redist Include="$(ProjectDir)bld\Redist\*.*" Visible="false" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="lib\TweetLib.Browser\TweetLib.Browser.csproj">
|
||||
<Project>{eefb1f37-7cad-46bd-8042-66e7b502ab02}</Project>
|
||||
<Name>TweetLib.Browser</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="lib\TweetLib.Core\TweetLib.Core.csproj">
|
||||
<Project>{93ba3cb4-a812-4949-b07d-8d393fb38937}</Project>
|
||||
<Name>TweetLib.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="lib\TweetLib.Utils\TweetLib.Utils.csproj">
|
||||
<Project>{476b1007-b12c-447f-b855-9886048201d6}</Project>
|
||||
<Name>TweetLib.Utils</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="subprocess\TweetDuck.Browser.csproj">
|
||||
<Project>{b10b0017-819e-4f71-870f-8256b36a26aa}</Project>
|
||||
<Name>TweetDuck.Browser</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="video\TweetDuck.Video.csproj">
|
||||
<Project>{278b2d11-402d-44b6-b6a1-8fa67db65565}</Project>
|
||||
<Name>TweetDuck.Video</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="lib\TweetLib.Communication\TweetLib.Communication.csproj">
|
||||
<Project>{72473763-4b9d-4fb6-a923-9364b2680f06}</Project>
|
||||
<Name>TweetLib.Communication</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\Content\.all.js" />
|
||||
<Content Include="Resources\Content\api\bridge.js" />
|
||||
<Content Include="Resources\Content\api\jquery.js" />
|
||||
<Content Include="Resources\Content\api\patch.js" />
|
||||
<Content Include="Resources\Content\api\ready.js" />
|
||||
<Content Include="Resources\Content\api\td.js" />
|
||||
<Content Include="Resources\Content\api\utils.js" />
|
||||
<Content Include="Resources\Content\bootstrap.js" />
|
||||
<Content Include="Resources\Content\introduction\introduction.css" />
|
||||
<Content Include="Resources\Content\introduction\introduction.js" />
|
||||
<Content Include="Resources\Content\load.js" />
|
||||
<Content Include="Resources\Content\login\hide_cookie_bar.js" />
|
||||
<Content Include="Resources\Content\login\login.css" />
|
||||
<Content Include="Resources\Content\login\redirect_plain_twitter_com.js" />
|
||||
<Content Include="Resources\Content\login\setup_document_attributes.js" />
|
||||
<Content Include="Resources\Content\notification\add_skip_button.js" />
|
||||
<Content Include="Resources\Content\notification\disable_clipboard_formatting.js" />
|
||||
<Content Include="Resources\Content\notification\expand_links_or_show_tooltip.js" />
|
||||
<Content Include="Resources\Content\notification\handle_links.js" />
|
||||
<Content Include="Resources\Content\notification\handle_show_this_thread_link.js" />
|
||||
<Content Include="Resources\Content\notification\recalculate_tweet_sent_time.js" />
|
||||
<Content Include="Resources\Content\notification\reset_scroll_position_on_load.js" />
|
||||
<Content Include="Resources\Content\notification\scroll_smoothly.js" />
|
||||
<Content Include="Resources\Content\notification\setup_body_hover_class.js" />
|
||||
<Content Include="Resources\Content\plugins\base.js" />
|
||||
<Content Include="Resources\Content\plugins\setup.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\add_tweetduck_to_settings_menu.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\bypass_t.co_links.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\clear_search_input.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\configure_first_day_of_week.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\configure_language_for_translations.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\disable_clipboard_formatting.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\disable_td_metrics.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\drag_links_onto_columns.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\expand_links_or_show_tooltip.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\fix_dm_input_box_focus.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\fix_horizontal_scrolling_of_column_container.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\fix_marking_dm_as_read_when_replying.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\fix_media_preview_urls.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\fix_missing_bing_translator_languages.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\fix_os_name.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\fix_scheduled_tweets_not_appearing.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\fix_youtube_previews.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\focus_composer_after_alt_tab.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\focus_composer_after_image_upload.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\focus_composer_after_switching_account.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\globals\apply_rot13.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\globals\get_class_style_property.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\globals\get_column_name.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\globals\get_hovered_column.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\globals\get_hovered_tweet.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\globals\inject_mustache.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\globals\prioritize_newest_event.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\globals\reload_browser.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\globals\reload_columns.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\globals\retrieve_tweet.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\globals\show_tweet_detail.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\handle_extra_mouse_buttons.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\hook_theme_settings.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\inject_css.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\keep_like_follow_dialogs_open.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\limit_loaded_dm_count.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\make_retweets_lowercase.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\middle_click_tweet_icon_actions.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\move_accounts_above_hashtags_in_search.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\offline_notification.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\open_search_externally.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\open_search_in_first_column.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\paste_images_from_clipboard.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\perform_search.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\pin_composer_icon.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\ready_plugins.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\register_composer_active_event.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\register_global_functions.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\register_global_functions_jquery.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\restore_cleared_column.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\screenshot_tweet.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\setup_column_type_attributes.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\setup_desktop_notifications.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\setup_link_context_menu.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\setup_sound_notifications.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\setup_tweetduck_account_bamboozle.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\setup_tweet_context_menu.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\setup_video_player.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\skip_pre_login_page.js" />
|
||||
<Content Include="Resources\Content\tweetdeck\tweetdeck.css" />
|
||||
<Content Include="Resources\Content\update\update.js" />
|
||||
<Content Include="Resources\Content\update\update.css" />
|
||||
<Content Include="Resources\Guide\img\app-menu.png" />
|
||||
<Content Include="Resources\Guide\img\column-clear-header.png" />
|
||||
<Content Include="Resources\Guide\img\column-clear-preferences.png" />
|
||||
<Content Include="Resources\Guide\img\column-preferences.png" />
|
||||
<Content Include="Resources\Guide\img\icon.ico" />
|
||||
<Content Include="Resources\Guide\img\new-tweet-emoji.png" />
|
||||
<Content Include="Resources\Guide\img\new-tweet-pin.png" />
|
||||
<Content Include="Resources\Guide\img\new-tweet-template-advanced.png" />
|
||||
<Content Include="Resources\Guide\img\new-tweet-template-basic.png" />
|
||||
<Content Include="Resources\Guide\img\options-manage-export.png" />
|
||||
<Content Include="Resources\Guide\img\options-manage-reset.png" />
|
||||
<Content Include="Resources\Guide\img\options-manage.png" />
|
||||
<Content Include="Resources\Guide\img\options-notifications-location.png" />
|
||||
<Content Include="Resources\Guide\img\options-notifications-size.png" />
|
||||
<Content Include="Resources\Guide\img\options-sounds.png" />
|
||||
<Content Include="Resources\Guide\img\settings-dropdown.png" />
|
||||
<Content Include="Resources\Guide\img\settings-editdesign.png" />
|
||||
<Content Include="Resources\Guide\index.html" />
|
||||
<Content Include="Resources\Guide\script.js" />
|
||||
<Content Include="Resources\Guide\style.css" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>rmdir "$(ProjectDir)bin\Debug"
|
||||
rmdir "$(ProjectDir)bin\Release"
|
||||
|
||||
rmdir "$(TargetDir)guide" /S /Q
|
||||
rmdir "$(TargetDir)plugins" /S /Q
|
||||
rmdir "$(TargetDir)resources" /S /Q
|
||||
|
||||
"$(ProjectDir)bld\post_build.exe" "$(TargetDir)\" "$(ProjectDir)\" "$(ConfigurationName)"
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Target Name="BeforeBuild" Condition="(!$([System.IO.File]::Exists("$(ProjectDir)bld\post_build.exe")) OR ($([System.IO.File]::GetLastWriteTime("$(ProjectDir)Resources\PostBuild.fsx").Ticks) > $([System.IO.File]::GetLastWriteTime("$(ProjectDir)bld\post_build.exe").Ticks)))">
|
||||
<Exec Command="powershell -NoProfile -ExecutionPolicy Bypass -File "$(ProjectDir)bld\POST BUILD.ps1" "$(DevEnvDir)\CommonExtensions\Microsoft\FSharp"" WorkingDirectory="$(ProjectDir)bld\" IgnoreExitCode="true" />
|
||||
</Target>
|
||||
<Target Name="AfterBuild" Condition="$(ConfigurationName) == Release">
|
||||
<Exec Command="del "$(TargetDir)*.pdb"" />
|
||||
<Exec Command="del "$(TargetDir)*.xml"" />
|
||||
<Delete Files="$(TargetDir)CefSharp.BrowserSubprocess.exe" />
|
||||
<Delete Files="$(TargetDir)widevinecdmadapter.dll" />
|
||||
<Copy SourceFiles="@(Redist)" DestinationFolder="$(TargetDir)" />
|
||||
<Exec Command="start "" /B "ISCC.exe" /Q "$(ProjectDir)bld\gen_upd.iss"" WorkingDirectory="$(ProjectDir)bld\" IgnoreExitCode="true" />
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>powershell -NoProfile -Command "$ErrorActionPreference = 'SilentlyContinue'; (Get-Process TweetDuck.Browser | Where-Object {$_.Path -eq '$(TargetDir)TweetDuck.Browser.exe'}).Kill(); Exit 0"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Target Name="CopyResources" AfterTargets="Build">
|
||||
<ItemGroup>
|
||||
<LocalesToDelete Include="$(TargetDir)locales\*.pak" Exclude="$(TargetDir)locales\en-US.pak" Visible="false" />
|
||||
</ItemGroup>
|
||||
<Delete Files="@(LocalesToDelete)" />
|
||||
<RemoveDir Directories="$(TargetDir)resources" />
|
||||
<RemoveDir Directories="$(TargetDir)guide" />
|
||||
<RemoveDir Directories="$(TargetDir)plugins" />
|
||||
<MakeDir Directories="$(TargetDir)plugins\official" />
|
||||
<MakeDir Directories="$(TargetDir)plugins\user" />
|
||||
<Copy SourceFiles="@(ResourcesContent)" DestinationFiles="@(ResourcesContent->'$(TargetDir)\resources\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Copy SourceFiles="@(ResourcesGuide)" DestinationFiles="@(ResourcesGuide->'$(TargetDir)\guide\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Copy SourceFiles="@(ResourcesPlugins)" DestinationFiles="@(ResourcesPlugins->'$(TargetDir)\plugins\official\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
<Exec Command="powershell -NoProfile -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild.ps1" "$(TargetDir)\"" IgnoreExitCode="false" />
|
||||
</Target>
|
||||
<Target Name="FinalizeDebug" AfterTargets="CopyResources" Condition="$(ConfigurationName) == Debug">
|
||||
<Copy SourceFiles="@(ResourcesPluginsDebug)" DestinationFiles="@(ResourcesPluginsDebug->'$(TargetDir)\plugins\user\.debug\%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
<Target Name="FinalizeRelease" AfterTargets="CopyResources" Condition="$(ConfigurationName) == Release">
|
||||
<ItemGroup>
|
||||
<PdbFiles Include="$(TargetDir)*.pdb" Visible="false" />
|
||||
<XmlFiles Include="$(TargetDir)*.xml" Visible="false" />
|
||||
<TxtFiles Include="$(TargetDir)*.txt" Visible="false" />
|
||||
</ItemGroup>
|
||||
<RemoveDir Directories="$(TargetDir)plugins\official\.debug" />
|
||||
<Delete Files="$(TargetDir)CefSharp.BrowserSubprocess.exe" />
|
||||
<Delete Files="$(TargetDir)widevinecdmadapter.dll" />
|
||||
<Delete Files="@(PdbFiles)" />
|
||||
<Delete Files="@(XmlFiles)" />
|
||||
<Delete Files="@(TxtFiles)" />
|
||||
<Copy SourceFiles="@(Redist)" DestinationFolder="$(TargetDir)" />
|
||||
<Copy SourceFiles="$(ProjectDir)bld\Resources\LICENSES.txt" DestinationFolder="$(TargetDir)" />
|
||||
<Exec Command="start "" /B "ISCC.exe" /Q "$(ProjectDir)bld\gen_upd.iss"" WorkingDirectory="$(ProjectDir)bld\" IgnoreExitCode="true" />
|
||||
</Target>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<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>
|
||||
|
@ -1,22 +0,0 @@
|
||||
if ([IO.File]::Exists("post_build.exe")) {
|
||||
[IO.File]::Delete("post_build.exe");
|
||||
}
|
||||
|
||||
$fs = $args[0];
|
||||
$fsc = "";
|
||||
|
||||
if ([IO.File]::Exists("$fs\fsc.exe")) {
|
||||
$fsc = "$fs\fsc.exe";
|
||||
}
|
||||
|
||||
if ([IO.File]::Exists("$fs\Tools\fsc.exe")) {
|
||||
$fsc = "$fs\Tools\fsc.exe";
|
||||
}
|
||||
|
||||
if ($fsc -eq "") {
|
||||
Write-Host "fsc.exe not found"
|
||||
$Host.SetShouldExit(1);
|
||||
exit
|
||||
}
|
||||
|
||||
& $fsc --standalone --deterministic --preferreduilang:en-US --platform:x86 --target:exe --out:post_build.exe "$PSScriptRoot\..\Resources\PostBuild.fsx"
|
@ -67,6 +67,7 @@ Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\GPUCache"
|
||||
[InstallDelete]
|
||||
Type: files; Name: "{app}\CEFSHARP-LICENSE.txt"
|
||||
Type: files; Name: "{app}\LICENSE.txt"
|
||||
Type: files; Name: "{app}\README.txt"
|
||||
Type: files; Name: "{app}\natives_blob.bin"
|
||||
Type: files; Name: "{app}\cef.pak"
|
||||
Type: files; Name: "{app}\cef_100_percent.pak"
|
||||
|
Loading…
Reference in New Issue
Block a user