From 5b6aaec48c16be2e1b29fb5044765783127ca3c9 Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Sun, 12 Aug 2018 15:56:14 +0200 Subject: [PATCH] Reorganize installer batch files --- README.md | 8 ++++---- TweetDuck.csproj | 4 ++-- bld/{GEN EVERYTHING.bat => GEN INSTALLERS.bat} | 0 bld/GEN UPDATE ONLY.bat | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) rename bld/{GEN EVERYTHING.bat => GEN INSTALLERS.bat} (100%) delete mode 100644 bld/GEN UPDATE ONLY.bat diff --git a/README.md b/README.md index 91b46a99..bc728892 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Open **Batch Build**, tick all `Release` configurations with `x86` platform, and After the build succeeds, the `bin/x86/Release` folder will contain files intended for distribution (no debug symbols or other unnecessary files). You may package these files yourself, or see the [Installers](#installers) section for automated installer generation. -The `Release` configuration omits debug symbols and other unnecessary files. You can modify this behavior by opening `TweetDuck.csproj`, and editing the `<Target Name="AfterBuild" Condition="$(ConfigurationName) == Release">` section. +The `Release` configuration omits debug symbols and other unnecessary files, and it will automatically build the update [installer](#installers) if possible. You can modify this behavior by opening `TweetDuck.csproj`, and editing the `<Target Name="AfterBuild" Condition="$(ConfigurationName) == Release">` section. If you decide to publicly release a custom version, please make it clear that it is not an official release of TweetDuck. There are many references to the official website and this repository, especially in the update system, so search for `chylex.com` and `github.com` in all files and replace them appropriately. @@ -55,7 +55,7 @@ TweetDuck uses **Inno Setup** for installers and updates. First, download and in Next, add the Inno Setup installation folder (usually `C:\Program Files (x86)\Inno Setup 5`) into your **PATH** environment variable. You may need to restart File Explorer for the change to take place. -Now you can generate installers by running `bld/GEN EVERYTHING.bat`. Note that this will only package the files, you still need to run the [release build](#release) in Visual Studio! +Now you can generate installers by running `bld/GEN INSTALLERS.bat`. Note that this will only package the files, you still need to run the [release build](#release) in Visual Studio! After the window closes, three installers will be generated inside the `bld/Output` folder: * **TweetDuck.exe** @@ -73,6 +73,6 @@ The installers are built for GitHub Releases, where the main and portable instal > When opening **Batch Build**, you will also see `x64` and `AnyCPU` configurations. These are visible due to what I consider a Visual Studio bug, and will not work without significant changes to the project. Manually running the `Resources/PostCefUpdate.ps1` PowerShell script modifies the downloaded CefSharp packages, and removes the invalid configurations. -> There is a small chance running `GEN EVERYTHING.bat` immediately shows a resource error. If that happens, close the console window (which terminates all Inno Setup processes and leaves corrupted installers in the output folder), and run it again. +> There is a small chance running `GEN INSTALLERS.bat` immediately shows a resource error. If that happens, close the console window (which terminates all Inno Setup processes and leaves corrupted installers in the output folder), and run it again. -> Running `GEN EVERYTHING.bat` uses about 400 MB of RAM due to high compression. You can lower this to about 140 MB by opening `gen_full.iss` and `gen_port.iss`, and changing `LZMADictionarySize=15360` to `LZMADictionarySize=4096`. +> Running `GEN INSTALLERS.bat` uses about 400 MB of RAM due to high compression. You can lower this to about 140 MB by opening `gen_full.iss` and `gen_port.iss`, and changing `LZMADictionarySize=15360` to `LZMADictionarySize=4096`. diff --git a/TweetDuck.csproj b/TweetDuck.csproj index 89f89939..2991c762 100644 --- a/TweetDuck.csproj +++ b/TweetDuck.csproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="packages\CefSharp.WinForms.67.0.0-pre01\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.67.0.0-pre01\build\CefSharp.WinForms.props')" /> <Import Project="packages\CefSharp.Common.67.0.0-pre01\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.67.0.0-pre01\build\CefSharp.Common.props')" /> @@ -411,7 +411,7 @@ IF EXIST "$(ProjectDir)bld\post_build.exe" ( <Exec Command="del "$(TargetDir)*.xml"" /> <Delete Files="$(TargetDir)CefSharp.BrowserSubprocess.exe" /> <Delete Files="$(TargetDir)widevinecdmadapter.dll" /> - <Exec Command=""$(ProjectDir)bld\GEN UPDATE ONLY.bat"" WorkingDirectory="$(ProjectDir)bld\" IgnoreExitCode="true" /> + <Exec Command="start "" /B "ISCC.exe" /Q "$(ProjectDir)bld\gen_upd.iss"" WorkingDirectory="$(ProjectDir)bld\" IgnoreExitCode="true" /> </Target> <PropertyGroup> <PreBuildEvent>powershell Get-Process TweetDuck.Browser -ErrorAction SilentlyContinue ^| Where-Object {$_.Path -eq '$(TargetDir)TweetDuck.Browser.exe'} ^| Stop-Process; Exit 0</PreBuildEvent> diff --git a/bld/GEN EVERYTHING.bat b/bld/GEN INSTALLERS.bat similarity index 100% rename from bld/GEN EVERYTHING.bat rename to bld/GEN INSTALLERS.bat diff --git a/bld/GEN UPDATE ONLY.bat b/bld/GEN UPDATE ONLY.bat deleted file mode 100644 index 5b073aa1..00000000 --- a/bld/GEN UPDATE ONLY.bat +++ /dev/null @@ -1 +0,0 @@ -start "" /B "ISCC.exe" /Q "gen_upd.iss"