├── .gitattributes
├── .gitignore
├── HyperionScreenCap.sln
├── HyperionScreenCap
├── ApiServer.cs
├── DXCapture.cs
├── FodyWeavers.xml
├── Form1.Designer.cs
├── Form1.cs
├── Form1.resx
├── HyperionMessages.cs
├── HyperionScreenCap.csproj
├── Installation Files
│ ├── InstallScript.iss
│ ├── license.txt
│ └── scripts
│ │ ├── isxdl
│ │ ├── czech.ini
│ │ ├── english.ini
│ │ ├── french.ini
│ │ ├── french2.ini
│ │ ├── french3.ini
│ │ ├── german.ini
│ │ ├── isxdl.iss
│ │ ├── norwegian.ini
│ │ ├── polish.ini
│ │ ├── portugues.ini
│ │ ├── portuguese.ini
│ │ ├── russian.ini
│ │ ├── spanish.ini
│ │ └── swedish.ini
│ │ ├── products.iss
│ │ └── products
│ │ ├── directxruntime.iss
│ │ ├── dotnetfx11.iss
│ │ ├── dotnetfx11lp.iss
│ │ ├── dotnetfx11sp1.iss
│ │ ├── dotnetfx20.iss
│ │ ├── dotnetfx20lp.iss
│ │ ├── dotnetfx20sp1.iss
│ │ ├── dotnetfx20sp1lp.iss
│ │ ├── dotnetfx20sp2.iss
│ │ ├── dotnetfx20sp2lp.iss
│ │ ├── dotnetfx35.iss
│ │ ├── dotnetfx35lp.iss
│ │ ├── dotnetfx35sp1.iss
│ │ ├── dotnetfx35sp1lp.iss
│ │ ├── dotnetfx40client.iss
│ │ ├── dotnetfx40full.iss
│ │ ├── dotnetfx46.iss
│ │ ├── dotnetfxversion.iss
│ │ ├── fileversion.iss
│ │ ├── ie6.iss
│ │ ├── iis.iss
│ │ ├── jet4sp8.iss
│ │ ├── kb835732.iss
│ │ ├── mdac28.iss
│ │ ├── msi20.iss
│ │ ├── msi31.iss
│ │ ├── msi45.iss
│ │ ├── msiproduct.iss
│ │ ├── sql2005express.iss
│ │ ├── sql2008express.iss
│ │ ├── sqlcompact35sp2.iss
│ │ ├── stringversion.iss
│ │ ├── vcredist2005.iss
│ │ ├── vcredist2008.iss
│ │ ├── vcredist2010.iss
│ │ ├── vcredist2010sp1.iss
│ │ ├── vcredist2012.iss
│ │ ├── vcredist2013.iss
│ │ ├── vcredist2015.iss
│ │ ├── wic.iss
│ │ └── winversion.iss
├── Libraries
│ ├── Google.ProtocolBuffers.Serialization.dll
│ └── Google.ProtocolBuffers.dll
├── Notifications.cs
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── ProtoClient.cs
├── Resources.Designer.cs
├── Resources.resx
├── Resources
│ ├── ConfigFile.ico
│ ├── Hyperion-disabled.ico
│ ├── Hyperion-enabled.ico
│ ├── cross.ico
│ ├── gear.ico
│ ├── television--arrow.ico
│ └── television--pencil.ico
├── Settings.cs
├── SetupForm.Designer.cs
├── SetupForm.cs
├── SetupForm.resx
├── app.config
└── packages.config
├── LICENSE.txt
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 |
24 | # Visual Studio 2015 cache/options directory
25 | .vs/
26 | # Uncomment if you have tasks that create the project's static files in wwwroot
27 | #wwwroot/
28 |
29 | # MSTest test Results
30 | [Tt]est[Rr]esult*/
31 | [Bb]uild[Ll]og.*
32 |
33 | # NUNIT
34 | *.VisualState.xml
35 | TestResult.xml
36 |
37 | # Build Results of an ATL Project
38 | [Dd]ebugPS/
39 | [Rr]eleasePS/
40 | dlldata.c
41 |
42 | # DNX
43 | project.lock.json
44 | artifacts/
45 |
46 | *_i.c
47 | *_p.c
48 | *_i.h
49 | *.ilk
50 | *.meta
51 | *.obj
52 | *.pch
53 | *.pdb
54 | *.pgc
55 | *.pgd
56 | *.rsp
57 | *.sbr
58 | *.tlb
59 | *.tli
60 | *.tlh
61 | *.tmp
62 | *.tmp_proj
63 | *.log
64 | *.vspscc
65 | *.vssscc
66 | .builds
67 | *.pidb
68 | *.svclog
69 | *.scc
70 |
71 | # Chutzpah Test files
72 | _Chutzpah*
73 |
74 | # Visual C++ cache files
75 | ipch/
76 | *.aps
77 | *.ncb
78 | *.opendb
79 | *.opensdf
80 | *.sdf
81 | *.cachefile
82 |
83 | # Visual Studio profiler
84 | *.psess
85 | *.vsp
86 | *.vspx
87 | *.sap
88 |
89 | # TFS 2012 Local Workspace
90 | $tf/
91 |
92 | # Guidance Automation Toolkit
93 | *.gpState
94 |
95 | # ReSharper is a .NET coding add-in
96 | _ReSharper*/
97 | *.[Rr]e[Ss]harper
98 | *.DotSettings.user
99 |
100 | # JustCode is a .NET coding add-in
101 | .JustCode
102 |
103 | # TeamCity is a build add-in
104 | _TeamCity*
105 |
106 | # DotCover is a Code Coverage Tool
107 | *.dotCover
108 |
109 | # NCrunch
110 | _NCrunch_*
111 | .*crunch*.local.xml
112 | nCrunchTemp_*
113 |
114 | # MightyMoose
115 | *.mm.*
116 | AutoTest.Net/
117 |
118 | # Web workbench (sass)
119 | .sass-cache/
120 |
121 | # Installshield output folder
122 | [Ee]xpress/
123 |
124 | # DocProject is a documentation generator add-in
125 | DocProject/buildhelp/
126 | DocProject/Help/*.HxT
127 | DocProject/Help/*.HxC
128 | DocProject/Help/*.hhc
129 | DocProject/Help/*.hhk
130 | DocProject/Help/*.hhp
131 | DocProject/Help/Html2
132 | DocProject/Help/html
133 |
134 | # Click-Once directory
135 | publish/
136 |
137 | # Publish Web Output
138 | *.[Pp]ublish.xml
139 | *.azurePubxml
140 | # TODO: Comment the next line if you want to checkin your web deploy settings
141 | # but database connection strings (with potential passwords) will be unencrypted
142 | *.pubxml
143 | *.publishproj
144 |
145 | # NuGet Packages
146 | *.nupkg
147 | # The packages folder can be ignored because of Package Restore
148 | **/packages/*
149 | # except build/, which is used as an MSBuild target.
150 | !**/packages/build/
151 | # Uncomment if necessary however generally it will be regenerated when needed
152 | #!**/packages/repositories.config
153 | # NuGet v3's project.json files produces more ignoreable files
154 | *.nuget.props
155 | *.nuget.targets
156 |
157 | # Microsoft Azure Build Output
158 | csx/
159 | *.build.csdef
160 |
161 | # Microsoft Azure Emulator
162 | ecf/
163 | rcf/
164 |
165 | # Microsoft Azure ApplicationInsights config file
166 | ApplicationInsights.config
167 |
168 | # Windows Store app package directory
169 | AppPackages/
170 | BundleArtifacts/
171 |
172 | # Visual Studio cache files
173 | # files ending in .cache can be ignored
174 | *.[Cc]ache
175 | # but keep track of directories ending in .cache
176 | !*.[Cc]ache/
177 |
178 | # Others
179 | ClientBin/
180 | ~$*
181 | *~
182 | *.dbmdl
183 | *.dbproj.schemaview
184 | *.pfx
185 | *.publishsettings
186 | node_modules/
187 | orleans.codegen.cs
188 |
189 | # RIA/Silverlight projects
190 | Generated_Code/
191 |
192 | # Backup & report files from converting an old project file
193 | # to a newer Visual Studio version. Backup files are not needed,
194 | # because we have git ;-)
195 | _UpgradeReport_Files/
196 | Backup*/
197 | UpgradeLog*.XML
198 | UpgradeLog*.htm
199 |
200 | # SQL Server files
201 | *.mdf
202 | *.ldf
203 |
204 | # Business Intelligence projects
205 | *.rdl.data
206 | *.bim.layout
207 | *.bim_*.settings
208 |
209 | # Microsoft Fakes
210 | FakesAssemblies/
211 |
212 | # GhostDoc plugin setting file
213 | *.GhostDoc.xml
214 |
215 | # Node.js Tools for Visual Studio
216 | .ntvs_analysis.dat
217 |
218 | # Visual Studio 6 build log
219 | *.plg
220 |
221 | # Visual Studio 6 workspace options file
222 | *.opt
223 |
224 | # Visual Studio LightSwitch build output
225 | **/*.HTMLClient/GeneratedArtifacts
226 | **/*.DesktopClient/GeneratedArtifacts
227 | **/*.DesktopClient/ModelManifest.xml
228 | **/*.Server/GeneratedArtifacts
229 | **/*.Server/ModelManifest.xml
230 | _Pvt_Extensions
231 |
232 | # Paket dependency manager
233 | .paket/paket.exe
234 |
235 | # FAKE - F# Make
236 | .fake/
237 | /HyperionScreenCap/Installation Files/Output/SetupHyperionScreenCap.zip
238 |
--------------------------------------------------------------------------------
/HyperionScreenCap.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HyperionScreenCap", "HyperionScreenCap\HyperionScreenCap.csproj", "{9EC68860-AE7E-413F-A5A4-AC31B93912C2}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x86 = Debug|x86
11 | Release|x86 = Release|x86
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {9EC68860-AE7E-413F-A5A4-AC31B93912C2}.Debug|x86.ActiveCfg = Debug|x86
15 | {9EC68860-AE7E-413F-A5A4-AC31B93912C2}.Debug|x86.Build.0 = Debug|x86
16 | {9EC68860-AE7E-413F-A5A4-AC31B93912C2}.Release|x86.ActiveCfg = Release|x86
17 | {9EC68860-AE7E-413F-A5A4-AC31B93912C2}.Release|x86.Build.0 = Release|x86
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/HyperionScreenCap/ApiServer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Grapevine.Interfaces.Server;
3 | using Grapevine.Server;
4 | using Grapevine.Server.Attributes;
5 | using Grapevine.Shared;
6 |
7 |
8 | namespace HyperionScreenCap
9 | {
10 | class ApiServer
11 | {
12 | private RestServer _server;
13 |
14 | public void StartServer(string hostname, string port)
15 | {
16 | try
17 | {
18 | if (_server == null)
19 | {
20 | _server = new RestServer
21 | {
22 | Host = hostname,
23 | Port = port
24 | };
25 |
26 | _server.Start();
27 | }
28 | }
29 | catch (Exception){
30 | }
31 | }
32 |
33 | public void StopServer()
34 | {
35 | _server?.Stop();
36 | }
37 |
38 | public void RestartServer(string hostname, string port)
39 | {
40 | StopServer();
41 | StartServer(hostname, port);
42 | }
43 |
44 | [RestResource]
45 | public class Resources
46 | {
47 | [RestRoute(HttpMethod = HttpMethod.GET, PathInfo = "/API")]
48 | public IHttpContext API(IHttpContext context)
49 | {
50 | context.Response.ContentType = ContentType.TEXT;
51 | string responseText = "No valid API command received.";
52 | string command = context.Request.QueryString["command"] ?? "";
53 | string force = context.Request.QueryString["force"] ?? "false";
54 |
55 | if (!string.IsNullOrEmpty(command))
56 | {
57 | // Only process valid commands
58 | if (command == "ON" || command == "OFF")
59 | {
60 |
61 | // Check for deactivate API between certain times
62 | if (Settings.ApiExcludedTimesEnabled && force.ToLower() == "false")
63 | {
64 | if ((DateTime.Now.TimeOfDay >= Settings.ApiExcludeTimeStart.TimeOfDay &&
65 | DateTime.Now.TimeOfDay <= Settings.ApiExcludeTimeEnd.TimeOfDay) ||
66 | ((Settings.ApiExcludeTimeStart.TimeOfDay > Settings.ApiExcludeTimeEnd.TimeOfDay) &&
67 | ((DateTime.Now.TimeOfDay <= Settings.ApiExcludeTimeStart.TimeOfDay &&
68 | DateTime.Now.TimeOfDay <= Settings.ApiExcludeTimeEnd.TimeOfDay) ||
69 | (DateTime.Now.TimeOfDay >= Settings.ApiExcludeTimeStart.TimeOfDay &&
70 | DateTime.Now.TimeOfDay >= Settings.ApiExcludeTimeEnd.TimeOfDay))))
71 | {
72 | responseText = "API exclude times enabled and within time range.";
73 | context.Response.SendResponse(responseText);
74 | return context;
75 | }
76 | }
77 |
78 | Form1.ToggleCapture(command);
79 | responseText = $"API command {command} completed successfully.";
80 | }
81 |
82 | if (command == "STATE")
83 | {
84 | responseText = $"{Form1._captureEnabled}";
85 | }
86 | }
87 | context.Response.SendResponse(responseText);
88 | return context;
89 | }
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/HyperionScreenCap/DXCapture.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 | using SlimDX.Direct3D9;
6 | using SlimDX.Windows;
7 |
8 | namespace HyperionScreenCap
9 | {
10 | public class DxScreenCapture
11 | {
12 | private readonly Device _d;
13 | public int MonitorIndex = 0;
14 | public DxScreenCapture(int monitorIndex)
15 | {
16 | try
17 | {
18 | var presentParams = new PresentParameters
19 | {
20 | Windowed = true,
21 | SwapEffect = SwapEffect.Discard,
22 | PresentationInterval = PresentInterval.Immediate
23 | };
24 |
25 | MonitorIndex = GetMonitorIndex(monitorIndex);
26 | _d = new Device(new Direct3D(), MonitorIndex, DeviceType.Hardware, IntPtr.Zero,
27 | CreateFlags.SoftwareVertexProcessing, presentParams);
28 | }
29 | catch (Exception ex)
30 | {
31 | Notifications.Error(ex.Message);
32 | }
33 | }
34 |
35 | public Surface CaptureScreen(int width, int height, int monitorIndex)
36 | {
37 | try
38 | {
39 | var s = Surface.CreateOffscreenPlain(_d, Screen.AllScreens[monitorIndex].Bounds.Width,
40 | Screen.AllScreens[monitorIndex].Bounds.Height,
41 | Format.A8R8G8B8, Pool.Scratch);
42 | var b = Surface.CreateOffscreenPlain(_d, Settings.HyperionWidth, Settings.HyperionHeight, Format.A8R8G8B8,
43 | Pool.Scratch);
44 | _d.GetFrontBufferData(0, s);
45 | Surface.FromSurface(b, s, Filter.Triangle, 0);
46 | s.Dispose();
47 | return b;
48 | }
49 | catch (Exception ex)
50 | {
51 | Notifications.Error(ex.Message);
52 | }
53 | return null;
54 | }
55 |
56 | public static int GetMonitorIndex(int monitorIndex)
57 | {
58 | var monitorArray = DisplayMonitor.EnumerateMonitors();
59 |
60 | // For anything other than index 0 (first screen) we do a lookup in monitor array
61 | if (monitorIndex == 0)
62 | {
63 | Debug.WriteLine($"Monitor index is 0, skipping lookup and using ==> device: {monitorArray[monitorIndex].DeviceName} | IsPrimary: {monitorArray[monitorIndex].IsPrimary} | Handle: {monitorArray[monitorIndex].Handle}");
64 | return monitorIndex;
65 | }
66 |
67 | // If we have only 1 monitor and monitor index is set higher fallback to first monitor
68 | if (monitorArray.Count() == 1 && monitorIndex > 0)
69 | return 0;
70 |
71 | if (monitorArray.Any())
72 | {
73 | foreach (var monitor in monitorArray)
74 | {
75 | Debug.WriteLine($"Found ==> device: {monitor.DeviceName} | IsPrimary: {monitor.IsPrimary} | Handle: {monitor.Handle}");
76 | var monitorShortname = monitor.DeviceName.Replace(@"\\.\DISPLAY", string.Empty);
77 | var dmMonitorIndex = 0;
78 | bool isdValidMonitorIndex = int.TryParse(monitorShortname, out dmMonitorIndex);
79 | if (isdValidMonitorIndex)
80 | {
81 | if (dmMonitorIndex == monitorIndex)
82 | {
83 | Debug.WriteLine($"Using ==> device: {monitor.DeviceName} | IsPrimary: {monitor.IsPrimary} | Handle: {monitor.Handle}");
84 | return dmMonitorIndex;
85 | }
86 | }
87 | }
88 | }
89 |
90 | return monitorIndex;
91 | }
92 | }
93 | }
--------------------------------------------------------------------------------
/HyperionScreenCap/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Windows.Forms;
3 |
4 | namespace HyperionScreenCap
5 | {
6 | partial class Form1
7 | {
8 | ///
9 | /// Required designer variable.
10 | ///
11 | private IContainer components = null;
12 |
13 | ///
14 | /// Clean up any resources being used.
15 | ///
16 | /// true if managed resources should be disposed; otherwise, false.
17 | protected override void Dispose(bool disposing)
18 | {
19 | if (disposing && (components != null))
20 | {
21 | TrayIcon.Dispose();
22 | components.Dispose();
23 | }
24 | base.Dispose(disposing);
25 | }
26 |
27 | #region Windows Form Designer generated code
28 |
29 | ///
30 | /// Required method for Designer support - do not modify
31 | /// the contents of this method with the code editor.
32 | ///
33 | private void InitializeComponent()
34 | {
35 | this.components = new System.ComponentModel.Container();
36 | this.SuspendLayout();
37 | //
38 | // Form1
39 | //
40 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
41 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
42 | this.ClientSize = new System.Drawing.Size(284, 261);
43 | this.Name = "Form1";
44 | this.Text = "Form1";
45 | this.ResumeLayout(false);
46 |
47 | }
48 |
49 | #endregion
50 | }
51 | }
--------------------------------------------------------------------------------
/HyperionScreenCap/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.Threading;
4 | using System.Windows.Forms;
5 | using Microsoft.Win32;
6 | using SlimDX;
7 | using SlimDX.Direct3D9;
8 | using SlimDX.Windows;
9 |
10 | namespace HyperionScreenCap
11 | {
12 | public partial class Form1 : Form
13 | {
14 | #region Variables
15 |
16 | private static bool _initLock;
17 | private static DxScreenCapture _d;
18 | private static ProtoClient _protoClient;
19 | private static ApiServer _apiServer;
20 |
21 | public static NotifyIcon TrayIcon;
22 | public static ContextMenuStrip TrayMenuIcons = new ContextMenuStrip();
23 |
24 | public static bool _captureEnabled;
25 |
26 | public enum NotificationLevels
27 | {
28 | None,
29 | Info,
30 | Error
31 | }
32 |
33 | #endregion Variables
34 |
35 | public Form1()
36 | {
37 | InitializeComponent();
38 |
39 | // Add menu icons
40 | TrayMenuIcons.Items.Add("Change monitor index", Resources.television__pencil.ToBitmap());
41 | TrayMenuIcons.Items.Add("Setup", Resources.gear.ToBitmap(), OnSetup);
42 | TrayMenuIcons.Items.Add("Exit", Resources.cross.ToBitmap(), OnExit);
43 |
44 | TrayIcon = new NotifyIcon {Text = @"Hyperion Screen Capture (Not Connected) {}"};
45 | TrayIcon.DoubleClick += TrayIcon_DoubleClick;
46 | TrayIcon.MouseClick += TrayIcon_Click;
47 | TrayIcon.Icon = Resources.Hyperion_disabled;
48 | TrayIconUpdateMonitorIndexes();
49 |
50 | // Add menu to tray icon and show it.
51 | TrayIcon.ContextMenuStrip = TrayMenuIcons;
52 | //TrayIcon.ContextMenu = trayMenu;
53 |
54 | TrayIcon.Visible = true;
55 |
56 | Settings.LoadSetttings();
57 |
58 | if (Settings.HyperionServerIp == "0.0.0.0")
59 | {
60 | MessageBox.Show(@"No configuration found, please setup in the next window.");
61 | SetupForm setupForm = new SetupForm();
62 | setupForm.Show();
63 | }
64 | else
65 | {
66 | Init();
67 | }
68 |
69 | // PowerModeChanged Handler
70 | SystemEvents.PowerModeChanged += PowerModeChanged;
71 | }
72 |
73 | public static void Init(bool reInit = false, bool forceOn = false)
74 | {
75 | if (!_initLock)
76 | {
77 | _initLock = true;
78 |
79 | // Stop current capture first on reinit
80 | if (reInit)
81 | {
82 | _captureEnabled = false;
83 | Thread.Sleep(500 + Settings.CaptureInterval);
84 |
85 | if (_protoClient != null)
86 | {
87 | ProtoClient.Disconnect();
88 | Thread.Sleep(500);
89 | }
90 | }
91 |
92 | _protoClient = new ProtoClient();
93 | ProtoClient.Init(Settings.HyperionServerIp, Settings.HyperionServerPort,
94 | Settings.HyperionMessagePriority);
95 |
96 | if (Settings.CaptureOnStartup || forceOn)
97 | {
98 | if (ProtoClient.IsConnected())
99 | {
100 | Notifications.Info($"Connected to Hyperion server on {Settings.HyperionServerIp}!");
101 | ToggleCapture("ON");
102 | }
103 | }
104 |
105 | if (Settings.ApiEnabled)
106 | {
107 | _apiServer = new ApiServer();
108 | _apiServer.StartServer("localhost", Settings.ApiPort.ToString());
109 | }
110 | else
111 | {
112 | _apiServer?.StopServer();
113 | }
114 |
115 | _initLock = false;
116 | }
117 | }
118 | private static void TrayIconUpdateMonitorIndexes()
119 | {
120 | int dropMenuCount = ((ToolStripMenuItem)TrayMenuIcons.Items[0]).DropDownItems.Count;
121 |
122 | if (dropMenuCount > 0)
123 | {
124 | int count = 0;
125 | while (count < dropMenuCount)
126 | {
127 | try
128 | {
129 | ((ToolStripMenuItem) TrayMenuIcons.Items[0]).DropDownItems.RemoveAt(0);
130 | }
131 | catch (Exception) { }
132 |
133 | count++;
134 | }
135 | }
136 |
137 | for (int i = 0; i < DisplayMonitor.EnumerateMonitors().Length; i++)
138 | {
139 | ((ToolStripMenuItem)TrayMenuIcons.Items[0]).DropDownItems.Add($"#{i}",
140 | Resources.television__arrow.ToBitmap(), OnChangeMonitor);
141 | }
142 | }
143 |
144 | private static void TrayIcon_DoubleClick(object sender, EventArgs e)
145 | {
146 | ToggleCapture(_captureEnabled ? "OFF" : "ON");
147 | }
148 |
149 | private static void TrayIcon_Click(object sender, EventArgs e)
150 | {
151 | TrayIconUpdateMonitorIndexes();
152 | }
153 |
154 | public static void ToggleCapture(string command)
155 | {
156 | if (_captureEnabled && command == "OFF")
157 | {
158 | _captureEnabled = false;
159 |
160 | TrayIcon.Icon = Resources.Hyperion_disabled;
161 | TrayIcon.Text = @"Hyperion Screen Capture (Disabled)";
162 | ProtoClient.ClearPriority(Settings.HyperionMessagePriority);
163 | }
164 | else if (!_captureEnabled && command == "ON")
165 | {
166 | _captureEnabled = true;
167 |
168 | TrayIcon.Icon = Resources.Hyperion_enabled;
169 | TrayIcon.Text = @"Hyperion Screen Capture (Enabled)";
170 | Thread.Sleep(50);
171 | var t = new Thread(StartCapture) {IsBackground = true};
172 | t.Start();
173 | }
174 | }
175 |
176 | private static void OnChangeMonitor(object sender, EventArgs e)
177 | {
178 | var selectedMenuItem = sender as ToolStripDropDownItem;
179 | if (selectedMenuItem != null)
180 | {
181 | int newMonitorIndex;
182 | var selectedItem = selectedMenuItem.Text.Replace("#", string.Empty);
183 | bool isValidInteger = int.TryParse(selectedItem, out newMonitorIndex);
184 | if (isValidInteger)
185 | {
186 | Debug.WriteLine($"Selected new monitor index: {newMonitorIndex}");
187 | Settings.MonitorIndex = newMonitorIndex;
188 | Settings.SaveSettings();
189 | Init(true, true);
190 | }
191 | else
192 | {
193 | Debug.WriteLine($"Selected monitor index was invalid integer: {selectedItem}");
194 | }
195 | }
196 | else
197 | {
198 | Debug.WriteLine("OnChangeMonitor selected item was null");
199 | }
200 | }
201 |
202 |
203 | private static void OnSetup(object sender, EventArgs e)
204 | {
205 | SetupForm setupForm = new SetupForm();
206 | setupForm.Show();
207 | }
208 |
209 | private static void OnExit(object sender, EventArgs e)
210 | {
211 | // Clear tray icon on close
212 | if (TrayIcon != null)
213 | {
214 | TrayIcon.Visible = false;
215 | }
216 |
217 | // On send clear priority
218 | if (_protoClient != null)
219 | {
220 | _captureEnabled = false;
221 | ProtoClient.ClearPriority(Settings.HyperionMessagePriority);
222 | Thread.Sleep(50);
223 | ProtoClient.ClearPriority(Settings.HyperionMessagePriority);
224 | ProtoClient.Disconnect();
225 | }
226 |
227 | if (Settings.ApiEnabled)
228 | _apiServer.StopServer();
229 |
230 | Environment.Exit(0);
231 | }
232 |
233 | protected override void OnLoad(EventArgs e)
234 | {
235 | Visible = false; // Hide form window.
236 | ShowInTaskbar = false; // Remove from taskbar.
237 |
238 | base.OnLoad(e);
239 | }
240 |
241 | #region DXCapture
242 |
243 | private static void StartCapture()
244 | {
245 | try
246 | {
247 | _d = new DxScreenCapture(Settings.MonitorIndex);
248 |
249 | while (_captureEnabled)
250 | {
251 | if (!ProtoClient.IsConnected())
252 | {
253 | // Reconnect every 5s (default)
254 | ProtoClient.Init(Settings.HyperionServerIp, Settings.HyperionServerPort,
255 | Settings.HyperionMessagePriority);
256 | Thread.Sleep(Settings.ReconnectInterval);
257 | continue;
258 | }
259 |
260 | var s = _d.CaptureScreen(Settings.HyperionWidth, Settings.HyperionHeight,_d.MonitorIndex);
261 | var dr = s.LockRectangle(LockFlags.None);
262 | var ds = dr.Data;
263 | var x = RemoveAlpha(ds);
264 |
265 | s.UnlockRectangle();
266 | s.Dispose();
267 | ds.Dispose();
268 |
269 | ProtoClient.SendImageToServer(x);
270 |
271 | // Add small delay to reduce cpu usage (200FPS max)
272 | Thread.Sleep(Settings.CaptureInterval);
273 | }
274 |
275 | _d = null;
276 | }
277 | catch (Exception ex)
278 | {
279 | _captureEnabled = false;
280 | Notifications.Error("Error occured during capture: " + ex.Message);
281 | }
282 | }
283 |
284 | #endregion DXCapture
285 |
286 | private static byte[] RemoveAlpha(DataStream ia)
287 | {
288 | var newImage = new byte[(ia.Length * 3 / 4)];
289 | int counter = 0;
290 | while (ia.Position < ia.Length)
291 | {
292 | var a = new byte[4];
293 | ia.Read(a, 0, 4);
294 | newImage[counter] = (a[2]);
295 | counter++;
296 | newImage[counter] = (a[1]);
297 | counter++;
298 | newImage[counter] = (a[0]);
299 | counter++;
300 | }
301 | return newImage;
302 | }
303 |
304 | #region PowerModeChanged Event
305 |
306 | private void PowerModeChanged(object sender, PowerModeChangedEventArgs powerMode)
307 | {
308 | // On resume restart capture instance after grace period in case that was resume
309 | if (powerMode.Mode == PowerModes.Resume)
310 | {
311 | if (_captureEnabled)
312 | {
313 | _captureEnabled = false;
314 | Thread.Sleep(2500);
315 | ToggleCapture("ON");
316 | }
317 | Thread.Sleep(1500);
318 |
319 | _protoClient = new ProtoClient();
320 | ProtoClient.Init(Settings.HyperionServerIp, Settings.HyperionServerPort,
321 | Settings.HyperionMessagePriority);
322 | }
323 | }
324 | #endregion
325 | }
326 | }
--------------------------------------------------------------------------------
/HyperionScreenCap/Form1.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
--------------------------------------------------------------------------------
/HyperionScreenCap/HyperionScreenCap.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {9EC68860-AE7E-413F-A5A4-AC31B93912C2}
8 | WinExe
9 | Properties
10 | HyperionScreenCap
11 | HyperionScreenCap
12 | v4.0
13 | 512
14 | Client
15 |
16 |
17 | false
18 | publish\
19 | true
20 | Disk
21 | false
22 | Foreground
23 | 7
24 | Days
25 | false
26 | false
27 | true
28 | 0
29 | 1.0.0.%2a
30 | false
31 | true
32 |
33 |
34 | x86
35 | true
36 | full
37 | false
38 | bin\Debug\
39 | DEBUG;TRACE
40 | prompt
41 | 4
42 | true
43 |
44 |
45 | x86
46 | pdbonly
47 | false
48 | bin\Release\
49 | TRACE
50 | prompt
51 | 4
52 |
53 |
54 |
55 |
56 |
57 | true
58 | bin\x86\Debug\
59 | DEBUG;TRACE
60 | full
61 | x86
62 | prompt
63 | MinimumRecommendedRules.ruleset
64 |
65 |
66 | bin\x86\Release\
67 | TRACE
68 | pdbonly
69 | x86
70 | prompt
71 | MinimumRecommendedRules.ruleset
72 |
73 |
74 | Resources\Hyperion-enabled.ico
75 |
76 |
77 |
78 | Libraries\Google.ProtocolBuffers.dll
79 |
80 |
81 | Libraries\Google.ProtocolBuffers.Serialization.dll
82 |
83 |
84 | ..\packages\Grapevine.4.1.0.0\lib\net40\Grapevine.dll
85 |
86 |
87 | ..\packages\SlimDX.4.0.13.44\lib\NET40\SlimDX.dll
88 | True
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | Form
107 |
108 |
109 | Form1.cs
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 | True
118 | True
119 | Resources.resx
120 |
121 |
122 |
123 | Form
124 |
125 |
126 | SetupForm.cs
127 |
128 |
129 |
130 |
131 | Designer
132 |
133 |
134 |
135 |
136 | Form1.cs
137 | Designer
138 |
139 |
140 | ResXFileCodeGenerator
141 | Resources.Designer.cs
142 |
143 |
144 | SetupForm.cs
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 | False
229 | Microsoft .NET Framework 4 Client Profile %28x86 and x64%29
230 | true
231 |
232 |
233 | False
234 | .NET Framework 3.5 SP1
235 | false
236 |
237 |
238 | False
239 | Windows Installer 4.5
240 | true
241 |
242 |
243 |
244 |
245 |
246 |
247 | 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}.
248 |
249 |
250 |
251 |
258 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/InstallScript.iss:
--------------------------------------------------------------------------------
1 | ; Script generated by the Inno Setup Script Wizard.
2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3 |
4 | #define use_dotnetfx40
5 | #define use_wic
6 |
7 | #define use_directxruntime
8 |
9 | #define use_msiproduct
10 | #define use_vc2008
11 | ;#define use_vc2010
12 | #define use_vc2010sp1
13 | #define use_vc2012
14 | #define use_vc2013
15 |
16 | [Setup]
17 | ; NOTE: The value of AppId uniquely identifies this application.
18 | ; Do not use the same AppId value in installers for other applications.
19 | AppId={{EB137069-4865-4E77-8AC3-00E4399B1359}
20 | AppName=Hyperion Screen Capture
21 | AppVersion=1.0
22 | ;AppVerName=Hyperion Screen Capture 1.0
23 | AppPublisher=Djhansel
24 | AppPublisherURL=https://github.com/djhansel/HyperionScreenCap
25 | AppSupportURL=https://github.com/djhansel/HyperionScreenCap
26 | AppUpdatesURL=https://github.com/djhansel/HyperionScreenCap
27 | DefaultDirName={pf}\Hyperion Screen Capture
28 | DisableProgramGroupPage=yes
29 | LicenseFile=License.txt
30 | OutputBaseFilename=SetupHyperionScreenCap
31 | SetupIconFile=../Resources/Hyperion-enabled.ico
32 | Compression=lzma
33 | SolidCompression=yes
34 | PrivilegesRequired=admin
35 |
36 | [Languages]
37 | Name: "en"; MessagesFile: "compiler:Default.isl"
38 |
39 |
40 | [Tasks]
41 | Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
42 |
43 | [Files]
44 | Source: "..\bin\x86\Release\HyperionScreenCap.exe"; DestDir: "{app}"; Flags: ignoreversion
45 | Source: "..\bin\x86\Release\HyperionScreenCap.exe.config"; DestDir: "{app}"; Flags: ignoreversion
46 | ;Source: "..\bin\x86\Release\SlimDX.dll"; DestDir: "{app}"; Flags: ignoreversion
47 | ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
48 |
49 | ; direct X installer
50 | Source: "src\dxwebsetup.exe"; Flags: dontcopy
51 |
52 |
53 | [Icons]
54 | Name: "{commonprograms}\Hyperion Screen Capture"; Filename: "{app}\HyperionScreenCap.exe"
55 | Name: "{commondesktop}\Hyperion Screen Capture"; Filename: "{app}\HyperionScreenCap.exe"; Tasks: desktopicon
56 |
57 | [Run]
58 | Filename: "{app}\HyperionScreenCap.exe"; Description: "{cm:LaunchProgram,Hyperion Screen Capture}"; Flags: nowait postinstall skipifsilent
59 |
60 | [CustomMessages]
61 | win_sp_title=Windows %1 Service Pack %2
62 |
63 |
64 | ; shared code for installing the products
65 | #include "scripts\products.iss"
66 | ; helper functions
67 | #include "scripts\products\stringversion.iss"
68 | #include "scripts\products\winversion.iss"
69 | #include "scripts\products\fileversion.iss"
70 | #include "scripts\products\dotnetfxversion.iss"
71 |
72 | ; actual products
73 | #ifdef use_iis
74 | #include "scripts\products\iis.iss"
75 | #endif
76 |
77 | #ifdef use_kb835732
78 | #include "scripts\products\kb835732.iss"
79 | #endif
80 |
81 | #ifdef use_msi20
82 | #include "scripts\products\msi20.iss"
83 | #endif
84 | #ifdef use_msi31
85 | #include "scripts\products\msi31.iss"
86 | #endif
87 | #ifdef use_msi45
88 | #include "scripts\products\msi45.iss"
89 | #endif
90 |
91 | #ifdef use_ie6
92 | #include "scripts\products\ie6.iss"
93 | #endif
94 |
95 | #ifdef use_dotnetfx11
96 | #include "scripts\products\dotnetfx11.iss"
97 | #include "scripts\products\dotnetfx11sp1.iss"
98 | #ifdef use_dotnetfx11lp
99 | #include "scripts\products\dotnetfx11lp.iss"
100 | #endif
101 | #endif
102 |
103 | #ifdef use_dotnetfx20
104 | #include "scripts\products\dotnetfx20.iss"
105 | #include "scripts\products\dotnetfx20sp1.iss"
106 | #include "scripts\products\dotnetfx20sp2.iss"
107 | #ifdef use_dotnetfx20lp
108 | #include "scripts\products\dotnetfx20lp.iss"
109 | #include "scripts\products\dotnetfx20sp1lp.iss"
110 | #include "scripts\products\dotnetfx20sp2lp.iss"
111 | #endif
112 | #endif
113 |
114 | #ifdef use_dotnetfx35
115 | ;#include "scripts\products\dotnetfx35.iss"
116 | #include "scripts\products\dotnetfx35sp1.iss"
117 | #ifdef use_dotnetfx35lp
118 | ;#include "scripts\products\dotnetfx35lp.iss"
119 | #include "scripts\products\dotnetfx35sp1lp.iss"
120 | #endif
121 | #endif
122 |
123 | #ifdef use_dotnetfx40
124 | #include "scripts\products\dotnetfx40client.iss"
125 | #include "scripts\products\dotnetfx40full.iss"
126 | #endif
127 |
128 | #ifdef use_dotnetfx46
129 | #include "scripts\products\dotnetfx46.iss"
130 | #endif
131 |
132 | #ifdef use_wic
133 | #include "scripts\products\wic.iss"
134 | #endif
135 |
136 | #ifdef use_msiproduct
137 | #include "scripts\products\msiproduct.iss"
138 | #endif
139 | #ifdef use_vc2005
140 | #include "scripts\products\vcredist2005.iss"
141 | #endif
142 | #ifdef use_vc2008
143 | #include "scripts\products\vcredist2008.iss"
144 | #endif
145 | #ifdef use_vc2010
146 | #include "scripts\products\vcredist2010.iss"
147 | #endif
148 | #ifdef use_vc2010sp1
149 | #include "scripts\products\vcredist2010sp1.iss"
150 | #endif
151 | #ifdef use_vc2012
152 | #include "scripts\products\vcredist2012.iss"
153 | #endif
154 | #ifdef use_vc2013
155 | #include "scripts\products\vcredist2013.iss"
156 | #endif
157 | #ifdef use_vc2015
158 | #include "scripts\products\vcredist2015.iss"
159 | #endif
160 |
161 | #ifdef use_directxruntime
162 | #include "scripts\products\directxruntime.iss"
163 | #endif
164 |
165 | #ifdef use_mdac28
166 | #include "scripts\products\mdac28.iss"
167 | #endif
168 | #ifdef use_jet4sp8
169 | #include "scripts\products\jet4sp8.iss"
170 | #endif
171 |
172 | #ifdef use_sqlcompact35sp2
173 | #include "scripts\products\sqlcompact35sp2.iss"
174 | #endif
175 |
176 | #ifdef use_sql2005express
177 | #include "scripts\products\sql2005express.iss"
178 | #endif
179 | #ifdef use_sql2008express
180 | #include "scripts\products\sql2008express.iss"
181 | #endif
182 |
183 | [Code]
184 | function InitializeSetup(): boolean;
185 | begin
186 | // initialize windows version
187 | initwinversion();
188 |
189 | #ifdef use_iis
190 | if (not iis()) then exit;
191 | #endif
192 |
193 | #ifdef use_msi20
194 | msi20('2.0'); // min allowed version is 2.0
195 | #endif
196 | #ifdef use_msi31
197 | msi31('3.1'); // min allowed version is 3.1
198 | #endif
199 | #ifdef use_msi45
200 | msi45('4.5'); // min allowed version is 4.5
201 | #endif
202 | #ifdef use_ie6
203 | ie6('5.0.2919'); // min allowed version is 5.0.2919
204 | #endif
205 |
206 | #ifdef use_dotnetfx11
207 | dotnetfx11();
208 | #ifdef use_dotnetfx11lp
209 | dotnetfx11lp();
210 | #endif
211 | dotnetfx11sp1();
212 | #endif
213 |
214 | // install .netfx 2.0 sp2 if possible; if not sp1 if possible; if not .netfx 2.0
215 | #ifdef use_dotnetfx20
216 | // check if .netfx 2.0 can be installed on this OS
217 | if not minwinspversion(5, 0, 3) then begin
218 | msgbox(fmtmessage(custommessage('depinstall_missing'), [fmtmessage(custommessage('win_sp_title'), ['2000', '3'])]), mberror, mb_ok);
219 | exit;
220 | end;
221 | if not minwinspversion(5, 1, 2) then begin
222 | msgbox(fmtmessage(custommessage('depinstall_missing'), [fmtmessage(custommessage('win_sp_title'), ['XP', '2'])]), mberror, mb_ok);
223 | exit;
224 | end;
225 |
226 | if minwinversion(5, 1) then begin
227 | dotnetfx20sp2();
228 | #ifdef use_dotnetfx20lp
229 | dotnetfx20sp2lp();
230 | #endif
231 | end else begin
232 | if minwinversion(5, 0) and minwinspversion(5, 0, 4) then begin
233 | #ifdef use_kb835732
234 | kb835732();
235 | #endif
236 | dotnetfx20sp1();
237 | #ifdef use_dotnetfx20lp
238 | dotnetfx20sp1lp();
239 | #endif
240 | end else begin
241 | dotnetfx20();
242 | #ifdef use_dotnetfx20lp
243 | dotnetfx20lp();
244 | #endif
245 | end;
246 | end;
247 | #endif
248 |
249 | #ifdef use_dotnetfx35
250 | //dotnetfx35();
251 | dotnetfx35sp1();
252 | #ifdef use_dotnetfx35lp
253 | //dotnetfx35lp();
254 | dotnetfx35sp1lp();
255 | #endif
256 | #endif
257 |
258 | #ifdef use_wic
259 | wic();
260 | #endif
261 |
262 | // if no .netfx 4.0 is found, install the client (smallest)
263 | #ifdef use_dotnetfx40
264 | if (not netfxinstalled(NetFx40Client, '') and not netfxinstalled(NetFx40Full, '')) then
265 | dotnetfx40client();
266 | #endif
267 |
268 | #ifdef use_dotnetfx46
269 | dotnetfx46(50); // min allowed version is 4.5.0
270 | #endif
271 |
272 | #ifdef use_vc2005
273 | vcredist2005();
274 | #endif
275 | #ifdef use_vc2008
276 | vcredist2008();
277 | #endif
278 | #ifdef use_vc2010
279 | vcredist2010();
280 | #endif
281 | #ifdef use_vc2010sp1
282 | vcredist2010sp1();
283 | #endif
284 | #ifdef use_vc2012
285 | vcredist2012();
286 | #endif
287 | #ifdef use_vc2013
288 | //SetForceX86(true); // force 32-bit install of next products
289 | vcredist2013();
290 | //SetForceX86(false); // disable forced 32-bit install again
291 | #endif
292 | #ifdef use_vc2015
293 | vcredist2015();
294 | #endif
295 |
296 | #ifdef use_directxruntime
297 | // extracts included setup file to temp folder so that we don't need to download it
298 | // and always runs directxruntime installer as we don't know how to check if it is required
299 | directxruntime();
300 | #endif
301 |
302 | #ifdef use_mdac28
303 | mdac28('2.7'); // min allowed version is 2.7
304 | #endif
305 | #ifdef use_jet4sp8
306 | jet4sp8('4.0.8015'); // min allowed version is 4.0.8015
307 | #endif
308 |
309 | #ifdef use_sqlcompact35sp2
310 | sqlcompact35sp2();
311 | #endif
312 |
313 | #ifdef use_sql2005express
314 | sql2005express();
315 | #endif
316 | #ifdef use_sql2008express
317 | sql2008express();
318 | #endif
319 |
320 | Result := true;
321 | end;
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/license.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Hansel Batista
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/czech.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Installation Files/scripts/isxdl/czech.ini
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/english.ini:
--------------------------------------------------------------------------------
1 | [strings]
2 | ; General
3 | 100=File download
4 | 101=Do you want to cancel the download?
5 | 102=%1 (%2 of %3)
6 | 103=%1 KB
7 | 104=%1 KB of %2 KB (%3%)
8 |
9 | ; Status information
10 | 110=Getting file information...
11 | 111=Redirecting to %1
12 | 112=Sending request...
13 | 113=Resolving %1
14 | 114=Connected to %1
15 | 115=Receiving...
16 | 116=Connecting to %1
17 |
18 | ; Error messages
19 | 120=Error connecting to the internet.\n\n%1
20 | 121=Error opening %1.\n\nThe server returned status code %2.
21 | 122=Error reading URL.\n\n%1
22 | 123=Error writing file %1.\n\n%2
23 | 124=Error opening file %1.\n\n%2
24 | 125='%1' is an invalid URL.
25 | 126=Error opening %1.\n\n%2
26 | 127=Error sending request.\n\n%1
27 | 128=Unsupported protocol. Only HTTP and FTP protocols are supported.
28 | 129=Failed to connect to %1.\n\n%2
29 | 130=Failed to query status code.\n\n%1
30 | 131=Error requesting file.\n\n%1
31 |
32 | ; Other
33 | 144=About...
34 | 146=Download
35 | 147=Setup is now downloading additional files to your computer.
36 |
37 | ; labels
38 | 160=File:
39 | 161=Speed:
40 | 162=Status:
41 | 163=Elapsed Time:
42 | 164=Remaining Time:
43 | 165=Current File:
44 | 166=Overall Progress:
45 | 167=Cancel
46 | 168=OK
47 | 169=User Name and Password
48 | 170=User Name:
49 | 171=Password:
50 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/french.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Installation Files/scripts/isxdl/french.ini
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/french2.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Installation Files/scripts/isxdl/french2.ini
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/french3.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Installation Files/scripts/isxdl/french3.ini
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/german.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Installation Files/scripts/isxdl/german.ini
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/isxdl.iss:
--------------------------------------------------------------------------------
1 | [Files]
2 | Source: "scripts\isxdl\isxdl.dll"; Flags: dontcopy
3 |
4 | [Code]
5 | procedure isxdl_AddFile(URL, Filename: PAnsiChar);
6 | external 'isxdl_AddFile@files:isxdl.dll stdcall';
7 |
8 | function isxdl_DownloadFiles(hWnd: Integer): Integer;
9 | external 'isxdl_DownloadFiles@files:isxdl.dll stdcall';
10 |
11 | function isxdl_SetOption(Option, Value: PAnsiChar): Integer;
12 | external 'isxdl_SetOption@files:isxdl.dll stdcall';
13 |
14 | [Setup]
15 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/norwegian.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Installation Files/scripts/isxdl/norwegian.ini
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/polish.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Installation Files/scripts/isxdl/polish.ini
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/portugues.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Installation Files/scripts/isxdl/portugues.ini
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/portuguese.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Installation Files/scripts/isxdl/portuguese.ini
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/russian.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Installation Files/scripts/isxdl/russian.ini
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/spanish.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Installation Files/scripts/isxdl/spanish.ini
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/isxdl/swedish.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Installation Files/scripts/isxdl/swedish.ini
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products.iss:
--------------------------------------------------------------------------------
1 | #include "isxdl\isxdl.iss"
2 |
3 | [CustomMessages]
4 | DependenciesDir=MyProgramDependencies
5 |
6 | en.depdownload_msg=The following applications are required before setup can continue:%n%n%1%nDownload and install now?
7 |
8 | en.depdownload_memo_title=Download dependencies
9 |
10 | en.depinstall_memo_title=Install dependencies
11 |
12 | en.depinstall_title=Installing dependencies
13 |
14 | en.depinstall_description=Please wait while Setup installs dependencies on your computer.
15 |
16 | en.depinstall_status=Installing %1...
17 |
18 | en.depinstall_missing=%1 must be installed before setup can continue. Please install %1 and run Setup again.
19 |
20 | en.depinstall_error=An error occured while installing the dependencies. Please restart the computer and run the setup again or install the following dependencies manually:%n
21 |
22 | en.isxdl_langfile=
23 |
24 | [Files]
25 | Source: "scripts\isxdl\german.ini"; Flags: dontcopy
26 |
27 | [Code]
28 | type
29 | TProduct = record
30 | File: String;
31 | Title: String;
32 | Parameters: String;
33 | ForceSuccess : boolean;
34 | InstallClean : boolean;
35 | MustRebootAfter : boolean;
36 | end;
37 |
38 | InstallResult = (InstallSuccessful, InstallRebootRequired, InstallError);
39 |
40 | var
41 | installMemo, downloadMemo, downloadMessage: string;
42 | products: array of TProduct;
43 | delayedReboot, isForcedX86: boolean;
44 | DependencyPage: TOutputProgressWizardPage;
45 |
46 |
47 | procedure AddProduct(filename, parameters, title, size, url: string; forceSuccess, installClean, mustRebootAfter : boolean);
48 | var
49 | path: string;
50 | i: Integer;
51 | begin
52 | installMemo := installMemo + '%1' + title + #13;
53 |
54 | path := ExpandConstant('{src}{\}') + CustomMessage('DependenciesDir') + '\' + filename;
55 | if not FileExists(path) then begin
56 | path := ExpandConstant('{tmp}{\}') + filename;
57 |
58 | if not FileExists(path) then begin
59 | isxdl_AddFile(url, path);
60 |
61 | downloadMemo := downloadMemo + '%1' + title + #13;
62 | downloadMessage := downloadMessage + ' ' + title + ' (' + size + ')' + #13;
63 | end;
64 | end;
65 |
66 | i := GetArrayLength(products);
67 | SetArrayLength(products, i + 1);
68 | products[i].File := path;
69 | products[i].Title := title;
70 | products[i].Parameters := parameters;
71 | products[i].ForceSuccess := forceSuccess;
72 | products[i].InstallClean := installClean;
73 | products[i].MustRebootAfter := mustRebootAfter;
74 | end;
75 |
76 | function SmartExec(product : TProduct; var resultcode : Integer): boolean;
77 | begin
78 | if (LowerCase(Copy(product.File, Length(product.File) - 2, 3)) = 'exe') then begin
79 | Result := Exec(product.File, product.Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, resultcode);
80 | end else begin
81 | Result := ShellExec('', product.File, product.Parameters, '', SW_SHOWNORMAL, ewWaitUntilTerminated, resultcode);
82 | end;
83 | end;
84 |
85 | function PendingReboot: boolean;
86 | var names: String;
87 | begin
88 | if (RegQueryMultiStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager', 'PendingFileRenameOperations', names)) then begin
89 | Result := true;
90 | end else if ((RegQueryMultiStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager', 'SetupExecute', names)) and (names <> '')) then begin
91 | Result := true;
92 | end else begin
93 | Result := false;
94 | end;
95 | end;
96 |
97 | function InstallProducts: InstallResult;
98 | var
99 | resultCode, i, productCount, finishCount: Integer;
100 | begin
101 | Result := InstallSuccessful;
102 | productCount := GetArrayLength(products);
103 |
104 | if productCount > 0 then begin
105 | DependencyPage := CreateOutputProgressPage(CustomMessage('depinstall_title'), CustomMessage('depinstall_description'));
106 | DependencyPage.Show;
107 |
108 | for i := 0 to productCount - 1 do begin
109 | if (products[i].InstallClean and (delayedReboot or PendingReboot())) then begin
110 | Result := InstallRebootRequired;
111 | break;
112 | end;
113 |
114 | DependencyPage.SetText(FmtMessage(CustomMessage('depinstall_status'), [products[i].Title]), '');
115 | DependencyPage.SetProgress(i, productCount);
116 |
117 | if SmartExec(products[i], resultCode) then begin
118 | //setup executed; resultCode contains the exit code
119 | if (products[i].MustRebootAfter) then begin
120 | //delay reboot after install if we installed the last dependency anyways
121 | if (i = productCount - 1) then begin
122 | delayedReboot := true;
123 | end else begin
124 | Result := InstallRebootRequired;
125 | end;
126 | break;
127 | end else if (resultCode = 0) or (products[i].ForceSuccess) then begin
128 | finishCount := finishCount + 1;
129 | end else if (resultCode = 3010) then begin
130 | //Windows Installer resultCode 3010: ERROR_SUCCESS_REBOOT_REQUIRED
131 | delayedReboot := true;
132 | finishCount := finishCount + 1;
133 | end else begin
134 | Result := InstallError;
135 | break;
136 | end;
137 | end else begin
138 | Result := InstallError;
139 | break;
140 | end;
141 | end;
142 |
143 | //only leave not installed products for error message
144 | for i := 0 to productCount - finishCount - 1 do begin
145 | products[i] := products[i+finishCount];
146 | end;
147 | SetArrayLength(products, productCount - finishCount);
148 |
149 | DependencyPage.Hide;
150 | end;
151 | end;
152 |
153 | function PrepareToInstall(var NeedsRestart: boolean): String;
154 | var
155 | i: Integer;
156 | s: string;
157 | begin
158 | delayedReboot := false;
159 |
160 | case InstallProducts() of
161 | InstallError: begin
162 | s := CustomMessage('depinstall_error');
163 |
164 | for i := 0 to GetArrayLength(products) - 1 do begin
165 | s := s + #13 + ' ' + products[i].Title;
166 | end;
167 |
168 | Result := s;
169 | end;
170 | InstallRebootRequired: begin
171 | Result := products[0].Title;
172 | NeedsRestart := true;
173 |
174 | //write into the registry that the installer needs to be executed again after restart
175 | RegWriteStringValue(HKEY_CURRENT_USER, 'SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce', 'InstallBootstrap', ExpandConstant('{srcexe}'));
176 | end;
177 | end;
178 | end;
179 |
180 | function NeedRestart : boolean;
181 | begin
182 | Result := delayedReboot;
183 | end;
184 |
185 | function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo, MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
186 | var
187 | s: string;
188 | begin
189 | if downloadMemo <> '' then
190 | s := s + CustomMessage('depdownload_memo_title') + ':' + NewLine + FmtMessage(downloadMemo, [Space]) + NewLine;
191 | if installMemo <> '' then
192 | s := s + CustomMessage('depinstall_memo_title') + ':' + NewLine + FmtMessage(installMemo, [Space]) + NewLine;
193 |
194 | s := s + MemoDirInfo + NewLine + NewLine + MemoGroupInfo
195 |
196 | if MemoTasksInfo <> '' then
197 | s := s + NewLine + NewLine + MemoTasksInfo;
198 |
199 | Result := s
200 | end;
201 |
202 | function NextButtonClick(CurPageID: Integer): boolean;
203 | begin
204 | Result := true;
205 |
206 | if CurPageID = wpReady then begin
207 | if downloadMemo <> '' then begin
208 | //change isxdl language only if it is not english because isxdl default language is already english
209 | if (ActiveLanguage() <> 'en') then begin
210 | ExtractTemporaryFile(CustomMessage('isxdl_langfile'));
211 | isxdl_SetOption('language', ExpandConstant('{tmp}{\}') + CustomMessage('isxdl_langfile'));
212 | end;
213 | //isxdl_SetOption('title', FmtMessage(SetupMessage(msgSetupWindowTitle), [CustomMessage('appname')]));
214 |
215 | if SuppressibleMsgBox(FmtMessage(CustomMessage('depdownload_msg'), [downloadMessage]), mbConfirmation, MB_YESNO, IDYES) = IDNO then
216 | Result := false
217 | else if isxdl_DownloadFiles(StrToInt(ExpandConstant('{wizardhwnd}'))) = 0 then
218 | Result := false;
219 | end;
220 | end;
221 | end;
222 |
223 | function IsX86: boolean;
224 | begin
225 | Result := isForcedX86 or (ProcessorArchitecture = paX86) or (ProcessorArchitecture = paUnknown);
226 | end;
227 |
228 | function IsX64: boolean;
229 | begin
230 | Result := (not isForcedX86) and Is64BitInstallMode and (ProcessorArchitecture = paX64);
231 | end;
232 |
233 | function IsIA64: boolean;
234 | begin
235 | Result := (not isForcedX86) and Is64BitInstallMode and (ProcessorArchitecture = paIA64);
236 | end;
237 |
238 | function GetString(x86, x64, ia64: String): String;
239 | begin
240 | if IsX64() and (x64 <> '') then begin
241 | Result := x64;
242 | end else if IsIA64() and (ia64 <> '') then begin
243 | Result := ia64;
244 | end else begin
245 | Result := x86;
246 | end;
247 | end;
248 |
249 | function GetArchitectureString(): String;
250 | begin
251 | if IsX64() then begin
252 | Result := '_x64';
253 | end else if IsIA64() then begin
254 | Result := '_ia64';
255 | end else begin
256 | Result := '';
257 | end;
258 | end;
259 |
260 | procedure SetForceX86(value: boolean);
261 | begin
262 | isForcedX86 := value;
263 | end;
264 |
265 | [Setup]
266 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/directxruntime.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7, Windows Server 2003 Service Pack 1, Windows Server 2003 Service Pack 2, Windows Server 2008, Windows Vista, Windows XP Service Pack 2, Windows XP Service Pack 3
2 | ; http://www.microsoft.com/en-US/download/details.aspx?id=35
3 |
4 | [CustomMessages]
5 | en.directxruntime_title=DirectX End-User Runtime
6 |
7 | en.directxruntime_size=1 MB - 95.6 MB
8 |
9 | [Files]
10 | ;includes dxwebsetup.exe in setup executable so that we don't need to download it
11 | Source: "src\dxwebsetup.exe"; Flags: dontcopy
12 |
13 | [Code]
14 | const
15 | directxruntime_url = 'http://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe';
16 |
17 | procedure directxruntime();
18 | begin
19 | ExtractTemporaryFile('dxwebsetup.exe');
20 |
21 | AddProduct('dxwebsetup.exe',
22 | '/Q',
23 | CustomMessage('directxruntime_title'),
24 | CustomMessage('directxruntime_size'),
25 | directxruntime_url,
26 | true, false, false);
27 | end;
28 |
29 | [Setup]
30 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx11.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 2000; Windows Server 2003 Service Pack 1 for Itanium-based Systems; Windows Server 2003 x64 editions; Windows Server 2008 Datacenter; Windows Server 2008 Enterprise; Windows Server 2008 for Itanium-based Systems; Windows Server 2008 Standard; Windows Vista Business; Windows Vista Enterprise; Windows Vista Home Basic; Windows Vista Home Premium; Windows Vista Starter; Windows Vista Ultimate; Windows XP; Windows XP Professional x64 Edition; Windows NT 4.0 Service Pack 6a
2 | ; requires internet explorer 5.0.1 or higher
3 | ; http://www.microsoft.com/downloads/details.aspx?FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3
4 |
5 | [CustomMessages]
6 | dotnetfx11_title=.NET Framework 1.1
7 |
8 | en.dotnetfx11_size=23.1 MB
9 |
10 | [Code]
11 | const
12 | dotnetfx11_url = 'http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe';
13 |
14 | procedure dotnetfx11();
15 | begin
16 | if (IsX86() and not netfxinstalled(NetFx11, '')) then
17 | AddProduct('dotnetfx11.exe',
18 | '/q:a /c:"install /qb /l"',
19 | CustomMessage('dotnetfx11_title'),
20 | CustomMessage('dotnetfx11_size'),
21 | dotnetfx11_url,
22 | false, false, false);
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx11lp.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 |
3 |
4 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
5 |
6 |
7 | [Code]
8 | procedure dotnetfx11lp();
9 | begin
10 | if (ActiveLanguage() <> 'en') then begin
11 | if (IsX86() and not netfxinstalled(NetFx11, CustomMessage('dotnetfx11lp_lcid'))) then
12 | AddProduct('dotnetfx11' + ActiveLanguage() + '.exe',
13 | '/q:a /c:"inst.exe /qb /l"',
14 | CustomMessage('dotnetfx11lp_title'),
15 | CustomMessage('dotnetfx11lp_size'),
16 | CustomMessage('dotnetfx11lp_url'),
17 | false, false, false);
18 | end;
19 | end;
20 |
21 | [Setup]
22 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx11sp1.iss:
--------------------------------------------------------------------------------
1 | ; requires TabletPC, Windows 2000, Windows 2000 Advanced Server, Windows 2000 Professional Edition , Windows 2000 Server, Windows 2000 Service Pack 2, Windows 2000 Service Pack 3, Windows 2000 Service Pack 4, Windows Server 2003 Service Pack 1 for Itanium-based Systems, Windows Server 2003 x64 editions, Windows Server 2003, Datacenter Edition for 64-Bit Itanium-Based Systems, Windows Server 2003, Datacenter x64 Edition, Windows Server 2003, Enterprise Edition for Itanium-based Systems, Windows Server 2003, Enterprise x64 Edition, Windows Server 2003, Standard x64 Edition, Windows Server 2008 Datacenter, Windows Server 2008 Enterprise, Windows Server 2008 for Itanium-based Systems, Windows Server 2008 Standard, Windows Vista Business, Windows Vista Business 64-bit edition, Windows Vista Enterprise, Windows Vista Enterprise 64-bit edition, Windows Vista Home Basic, Windows Vista Home Basic 64-bit edition, Windows Vista Home Premium, Windows Vista Home Premium 64-bit edition, Windows Vista Starter, Windows Vista Ultimate, Windows Vista Ultimate 64-bit edition, Windows XP, Windows XP Home Edition , Windows XP Media Center Edition, Windows XP Professional Edition , Windows XP Professional x64 Edition , Windows XP Service Pack 1, Windows XP Service Pack 2
2 | ; requires internet explorer 5.0.1 or higher
3 | ; http://www.microsoft.com/downloads/details.aspx?familyid=A8F5654F-088E-40B2-BBDB-A83353618B38
4 |
5 | [CustomMessages]
6 | dotnetfx11sp1_title=.NET Framework 1.1 Service Pack 1
7 |
8 | en.dotnetfx11sp1_size=10.5 MB
9 |
10 | [Code]
11 | const
12 | dotnetfx11sp1_url = 'http://download.microsoft.com/download/8/b/4/8b4addd8-e957-4dea-bdb8-c4e00af5b94b/NDP1.1sp1-KB867460-X86.exe';
13 |
14 | procedure dotnetfx11sp1();
15 | begin
16 | if (IsX86() and (netfxspversion(NetFx11, '') < 1)) then
17 | AddProduct('dotnetfx11sp1.exe',
18 | '/q',
19 | CustomMessage('dotnetfx11sp1_title'),
20 | CustomMessage('dotnetfx11sp1_size'),
21 | dotnetfx11sp1_url,
22 | false, false, false);
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx20.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 2000 Service Pack 3, Windows 98, Windows 98 Second Edition, Windows ME, Windows Server 2003, Windows XP Service Pack 2
2 | ; requires internet explorer 5.0.1 or higher
3 | ; requires windows installer 2.0 on windows 98, ME
4 | ; requires Windows Installer 3.1 on windows 2000 or higher
5 | ; http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5
6 |
7 | [CustomMessages]
8 | dotnetfx20_title=.NET Framework 2.0
9 |
10 | dotnetfx20_size=23 MB
11 |
12 | [Code]
13 | const
14 | dotnetfx20_url = 'http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe';
15 | dotnetfx20_url_x64 = 'http://download.microsoft.com/download/a/3/f/a3f1bf98-18f3-4036-9b68-8e6de530ce0a/NetFx64.exe';
16 | dotnetfx20_url_ia64 = 'http://download.microsoft.com/download/f/8/6/f86148a4-e8f7-4d08-a484-b4107f238728/NetFx64.exe';
17 |
18 | procedure dotnetfx20();
19 | begin
20 | if (not netfxinstalled(NetFx20, '')) then
21 | AddProduct('dotnetfx20' + GetArchitectureString() + '.exe',
22 | '/passive /norestart /lang:ENU',
23 | CustomMessage('dotnetfx20_title'),
24 | CustomMessage('dotnetfx20_size'),
25 | GetString(dotnetfx20_url, dotnetfx20_url_x64, dotnetfx20_url_ia64),
26 | false, false, false);
27 | end;
28 |
29 | [Setup]
30 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx20lp.iss:
--------------------------------------------------------------------------------
1 | ; http://www.microsoft.com/downloads/details.aspx?familyid=92E0E1CE-8693-4480-84FA-7D85EEF59016
2 |
3 | [CustomMessages]
4 |
5 |
6 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
7 |
8 |
9 | [Code]
10 | procedure dotnetfx20lp();
11 | begin
12 | if (ActiveLanguage() <> 'en') then begin
13 | if (not netfxinstalled(NetFx20, CustomMessage('dotnetfx20lp_lcid'))) then
14 | AddProduct('dotnetfx20' + GetArchitectureString() + '_' + ActiveLanguage() + '.exe',
15 | '/passive /norestart /lang:ENU',
16 | CustomMessage('dotnetfx20lp_title'),
17 | CustomMessage('dotnetfx20lp_size'),
18 | CustomMessage('dotnetfx20lp_url' + GetArchitectureString()),
19 | false, false, false);
20 | end;
21 | end;
22 |
23 | [Setup]
24 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx20sp1.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 2000 Service Pack 4, Windows Server 2003, Windows XP Service Pack 2
2 | ; requires KB 835732 on Windows 2000 Service Pack 4
3 | ; http://www.microsoft.com/downloads/details.aspx?FamilyID=79bc3b77-e02c-4ad3-aacf-a7633f706ba5
4 |
5 | [CustomMessages]
6 | dotnetfx20sp1_title=.NET Framework 2.0 Service Pack 1
7 |
8 | en.dotnetfx20sp1_size=23.6 MB
9 |
10 | [Code]
11 | const
12 | dotnetfx20sp1_url = 'http://download.microsoft.com/download/0/8/c/08c19fa4-4c4f-4ffb-9d6c-150906578c9e/NetFx20SP1_x86.exe';
13 | dotnetfx20sp1_url_x64 = 'http://download.microsoft.com/download/9/8/6/98610406-c2b7-45a4-bdc3-9db1b1c5f7e2/NetFx20SP1_x64.exe';
14 | dotnetfx20sp1_url_ia64 = 'http://download.microsoft.com/download/c/9/7/c97d534b-8a55-495d-ab06-ad56f4b7f155/NetFx20SP1_ia64.exe';
15 |
16 | procedure dotnetfx20sp1();
17 | begin
18 | if (netfxspversion(NetFx20, '') < 1) then
19 | AddProduct('dotnetfx20sp1' + GetArchitectureString() + '.exe',
20 | '/passive /norestart /lang:ENU',
21 | CustomMessage('dotnetfx20sp1_title'),
22 | CustomMessage('dotnetfx20sp1_size'),
23 | GetString(dotnetfx20sp1_url, dotnetfx20sp1_url_x64, dotnetfx20sp1_url_ia64),
24 | false, false, false);
25 | end;
26 |
27 | [Setup]
28 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx20sp1lp.iss:
--------------------------------------------------------------------------------
1 | ; http://www.microsoft.com/downloads/details.aspx?FamilyID=1cc39ffe-a2aa-4548-91b3-855a2de99304
2 |
3 | [CustomMessages]
4 |
5 |
6 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
7 |
8 |
9 | [Code]
10 | procedure dotnetfx20sp1lp();
11 | begin
12 | if (ActiveLanguage() <> 'en') then begin
13 | if (netfxspversion(NetFx20, CustomMessage('dotnetfx20sp1lp_lcid')) < 1) then
14 | AddProduct('dotnetfx20sp1' + GetArchitectureString() + '_' + ActiveLanguage() + '.exe',
15 | '/passive /norestart /lang:ENU',
16 | CustomMessage('dotnetfx20sp1lp_title'),
17 | CustomMessage('dotnetfx20sp1lp_size'),
18 | CustomMessage('dotnetfx20sp1lp_url' + GetArchitectureString()),
19 | false, false, false);
20 | end;
21 | end;
22 |
23 | [Setup]
24 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx20sp2.iss:
--------------------------------------------------------------------------------
1 | ; http://www.microsoft.com/downloads/details.aspx?familyid=5B2C0358-915B-4EB5-9B1D-10E506DA9D0F
2 |
3 | [CustomMessages]
4 | dotnetfx20sp2_title=.NET Framework 2.0 Service Pack 2
5 |
6 | en.dotnetfx20sp2_size=24 MB - 52 MB
7 |
8 | [Code]
9 | const
10 | dotnetfx20sp2_url = 'http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe';
11 | dotnetfx20sp2_url_x64 = 'http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x64.exe';
12 | dotnetfx20sp2_url_ia64 = 'http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_ia64.exe';
13 |
14 | procedure dotnetfx20sp2();
15 | begin
16 | if (netfxspversion(NetFx20, '') < 2) then
17 | AddProduct('dotnetfx20sp2' + GetArchitectureString() + '.exe',
18 | '/passive /norestart /lang:ENU',
19 | CustomMessage('dotnetfx20sp2_title'),
20 | CustomMessage('dotnetfx20sp2_size'),
21 | GetString(dotnetfx20sp2_url, dotnetfx20sp2_url_x64, dotnetfx20sp2_url_ia64),
22 | false, false, false);
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx20sp2lp.iss:
--------------------------------------------------------------------------------
1 | ; http://www.microsoft.com/downloads/details.aspx?FamilyID=c69789e0-a4fa-4b2e-a6b5-3b3695825992
2 |
3 | [CustomMessages]
4 |
5 |
6 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
7 |
8 |
9 | [Code]
10 | procedure dotnetfx20sp2lp();
11 | begin
12 | if (ActiveLanguage() <> 'en') then begin
13 | if (netfxspversion(NetFx20, CustomMessage('dotnetfx20sp2lp_lcid')) < 2) then
14 | AddProduct('dotnetfx20sp2' + GetArchitectureString() + '_' + ActiveLanguage() + '.exe',
15 | '/lang:enu /passive /norestart"',
16 | CustomMessage('dotnetfx20sp2lp_title'),
17 | CustomMessage('dotnetfx20sp2lp_size'),
18 | CustomMessage('dotnetfx20sp2lp_url' + GetArchitectureString()),
19 | false, false, false);
20 | end;
21 | end;
22 |
23 | [Setup]
24 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx35.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows Server 2003 Service Pack 1, Windows Server 2008, Windows Vista, Windows XP Service Pack 2
2 | ; requires Windows Installer 3.1
3 | ; WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
4 | ; http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6
5 |
6 | [CustomMessages]
7 | dotnetfx35_title=.NET Framework 3.5
8 |
9 | dotnetfx35_size=3 MB - 197 MB
10 |
11 | [Code]
12 | const
13 | dotnetfx35_url = 'http://download.microsoft.com/download/7/0/3/703455ee-a747-4cc8-bd3e-98a615c3aedb/dotNetFx35setup.exe';
14 |
15 | procedure dotnetfx35();
16 | begin
17 | if (netfxinstalled(NetFx35, '') = false) then
18 | AddProduct('dotnetfx35.exe',
19 | '/lang:enu /passive /norestart',
20 | CustomMessage('dotnetfx35_title'),
21 | CustomMessage('dotnetfx35_size'),
22 | dotnetfx35_url,
23 | false, false, false);
24 | end;
25 |
26 | [Setup]
27 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx35lp.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 |
3 |
4 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
5 |
6 |
7 | [Code]
8 | procedure dotnetfx35lp();
9 | begin
10 | if (ActiveLanguage() <> 'en') then begin
11 | if (not netfxinstalled(NetFx35, CustomMessage('dotnetfx35lp_lcid'))) then
12 | AddProduct('dotnetfx35_' + ActiveLanguage() + '.exe',
13 | '/lang:enu /passive /norestart',
14 | CustomMessage('dotnetfx35lp_title'),
15 | CustomMessage('dotnetfx35lp_size'),
16 | CustomMessage('dotnetfx35lp_url'),
17 | false, false, false);
18 | end;
19 | end;
20 |
21 | [Setup]
22 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx35sp1.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows Server 2003 Service Pack 1, Windows Server 2008, Windows Vista, Windows XP Service Pack 2
2 | ; requires Windows Installer 3.1
3 | ; WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
4 | ; http://www.microsoft.com/downloads/details.aspx?FamilyID=ab99342f-5d1a-413d-8319-81da479ab0d7
5 |
6 | [CustomMessages]
7 | dotnetfx35sp1_title=.NET Framework 3.5 Service Pack 1
8 |
9 | en.dotnetfx35sp1_size=3 MB - 232 MB
10 |
11 | [Code]
12 | const
13 | dotnetfx35sp1_url = 'http://download.microsoft.com/download/0/6/1/061f001c-8752-4600-a198-53214c69b51f/dotnetfx35setup.exe';
14 |
15 | procedure dotnetfx35sp1();
16 | begin
17 | if (netfxspversion(NetFx35, '') < 1) then
18 | AddProduct('dotnetfx35sp1.exe',
19 | '/lang:enu /passive /norestart',
20 | CustomMessage('dotnetfx35sp1_title'),
21 | CustomMessage('dotnetfx35sp1_size'),
22 | dotnetfx35sp1_url,
23 | false, false, false);
24 | end;
25 |
26 | [Setup]
27 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx35sp1lp.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 |
3 |
4 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
5 |
6 |
7 | [Code]
8 | procedure dotnetfx35sp1lp();
9 | begin
10 | if (ActiveLanguage() <> 'en') then begin
11 | if (netfxspversion(NetFx35, CustomMessage('dotnetfx35sp1lp_lcid')) < 1) then
12 | AddProduct('dotnetfx35sp1_' + ActiveLanguage() + '.exe',
13 | '/lang:enu /passive /norestart',
14 | CustomMessage('dotnetfx35sp1lp_title'),
15 | CustomMessage('dotnetfx35sp1lp_size'),
16 | CustomMessage('dotnetfx35sp1lp_url'),
17 | false, false, false);
18 | end;
19 | end;
20 |
21 | [Setup]
22 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx40client.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7, Windows 7 Service Pack 1, Windows Server 2003 Service Pack 2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2008 R2 SP1, Windows Vista Service Pack 1, Windows XP Service Pack 3
2 | ; requires Windows Installer 3.1
3 | ; requires Internet Explorer 5.01
4 | ; WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
5 | ; http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5765d7a8-7722-4888-a970-ac39b33fd8ab
6 |
7 | [CustomMessages]
8 | dotnetfx40client_title=.NET Framework 4.0 Client
9 |
10 | dotnetfx40client_size=3 MB - 197 MB
11 |
12 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
13 | en.dotnetfx40client_lcid=
14 |
15 | [Code]
16 | const
17 | dotnetfx40client_url = 'http://download.microsoft.com/download/7/B/6/7B629E05-399A-4A92-B5BC-484C74B5124B/dotNetFx40_Client_setup.exe';
18 |
19 | procedure dotnetfx40client();
20 | begin
21 | if (not netfxinstalled(NetFx40Client, '')) then
22 | AddProduct('dotNetFx40_Client_setup.exe',
23 | CustomMessage('dotnetfx40client_lcid') + ' /passive /norestart',
24 | CustomMessage('dotnetfx40client_title'),
25 | CustomMessage('dotnetfx40client_size'),
26 | dotnetfx40client_url,
27 | false, false, false);
28 | end;
29 |
30 | [Setup]
31 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx40full.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7, Windows 7 Service Pack 1, Windows Server 2003 Service Pack 2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2008 R2 SP1, Windows Vista Service Pack 1, Windows XP Service Pack 3
2 | ; requires Windows Installer 3.1
3 | ; requires Internet Explorer 5.01
4 | ; WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
5 | ; http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992
6 |
7 | [CustomMessages]
8 | dotnetfx40full_title=.NET Framework 4.0 Full
9 |
10 | dotnetfx40full_size=3 MB - 197 MB
11 |
12 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
13 | en.dotnetfx40full_lcid=
14 |
15 | [Code]
16 | const
17 | dotnetfx40full_url = 'http://download.microsoft.com/download/1/B/E/1BE39E79-7E39-46A3-96FF-047F95396215/dotNetFx40_Full_setup.exe';
18 |
19 | procedure dotnetfx40full();
20 | begin
21 | if (not netfxinstalled(NetFx40Full, '')) then
22 | AddProduct('dotNetFx40_Full_setup.exe',
23 | CustomMessage('dotnetfx40full_lcid') + ' /passive /norestart',
24 | CustomMessage('dotnetfx40full_title'),
25 | CustomMessage('dotnetfx40full_size'),
26 | dotnetfx40full_url,
27 | false, false, false);
28 | end;
29 |
30 | [Setup]
31 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfx46.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Server 2012 R2, Windows Vista Service Pack 2
2 | ; WARNING: express setup (downloads and installs the components depending on your OS) if you want to deploy it on cd or network download the full bootsrapper on website below
3 | ; http://www.microsoft.com/en-us/download/details.aspx?id=48137
4 |
5 | [CustomMessages]
6 | dotnetfx46_title=.NET Framework 4.6
7 |
8 | dotnetfx46_size=1 MB - 63 MB
9 |
10 | ;http://www.microsoft.com/globaldev/reference/lcid-all.mspx
11 | en.dotnetfx46_lcid=
12 |
13 | [Code]
14 | const
15 | dotnetfx46_url = 'http://download.microsoft.com/download/1/4/A/14A6C422-0D3C-4811-A31F-5EF91A83C368/NDP46-KB3045560-Web.exe';
16 |
17 | procedure dotnetfx46(minVersion: integer);
18 | begin
19 | if (not netfxinstalled(NetFx4x, '') or (netfxspversion(NetFx4x, '') < minVersion)) then
20 | AddProduct('dotnetfx46.exe',
21 | CustomMessage('dotnetfx46_lcid') + ' /passive /norestart',
22 | CustomMessage('dotnetfx46_title'),
23 | CustomMessage('dotnetfx46_size'),
24 | dotnetfx46_url,
25 | false, false, false);
26 | end;
27 |
28 | [Setup]
29 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/dotnetfxversion.iss:
--------------------------------------------------------------------------------
1 | [Code]
2 | type
3 | NetFXType = (NetFx10, NetFx11, NetFx20, NetFx30, NetFx35, NetFx40Client, NetFx40Full, NetFx4x);
4 |
5 | const
6 | netfx11plus_reg = 'Software\Microsoft\NET Framework Setup\NDP\';
7 |
8 | function netfxinstalled(version: NetFXType; lcid: string): boolean;
9 | var
10 | regVersion: cardinal;
11 | regVersionString: string;
12 | begin
13 | if (lcid <> '') then
14 | lcid := '\' + lcid;
15 |
16 | if (version = NetFx10) then begin
17 | RegQueryStringValue(HKLM, 'Software\Microsoft\.NETFramework\Policy\v1.0\3705', 'Install', regVersionString);
18 | Result := regVersionString <> '';
19 | end else begin
20 | case version of
21 | NetFx11:
22 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v1.1.4322' + lcid, 'Install', regVersion);
23 | NetFx20:
24 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v2.0.50727' + lcid, 'Install', regVersion);
25 | NetFx30:
26 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v3.0\Setup' + lcid, 'InstallSuccess', regVersion);
27 | NetFx35:
28 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v3.5' + lcid, 'Install', regVersion);
29 | NetFx40Client:
30 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Client' + lcid, 'Install', regVersion);
31 | NetFx40Full:
32 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Install', regVersion);
33 | NetFx4x:
34 | begin
35 | RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Release', regVersion);
36 | Result := (regVersion >= 378389); // 4.5.0+
37 | Exit;
38 | end;
39 | end;
40 | Result := (regVersion <> 0);
41 | end;
42 | end;
43 |
44 | function netfxspversion(version: NetFXType; lcid: string): integer;
45 | var
46 | regVersion: cardinal;
47 | begin
48 | if (lcid <> '') then
49 | lcid := '\' + lcid;
50 |
51 | case version of
52 | NetFx10:
53 | //not supported
54 | regVersion := -1;
55 | NetFx11:
56 | if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v1.1.4322' + lcid, 'SP', regVersion)) then
57 | regVersion := -1;
58 | NetFx20:
59 | if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v2.0.50727' + lcid, 'SP', regVersion)) then
60 | regVersion := -1;
61 | NetFx30:
62 | if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v3.0' + lcid, 'SP', regVersion)) then
63 | regVersion := -1;
64 | NetFx35:
65 | if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v3.5' + lcid, 'SP', regVersion)) then
66 | regVersion := -1;
67 | NetFx40Client:
68 | if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Client' + lcid, 'Servicing', regVersion)) then
69 | regVersion := -1;
70 | NetFx40Full:
71 | if (not RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Servicing', regVersion)) then
72 | regVersion := -1;
73 | NetFx4x:
74 | if (RegQueryDWordValue(HKLM, netfx11plus_reg + 'v4\Full' + lcid, 'Release', regVersion)) then begin
75 | if (regVersion >= 393295) then
76 | regVersion := 60 // 4.6+
77 | else if (regVersion >= 379893) then
78 | regVersion := 52 // 4.5.2+
79 | else if (regVersion >= 378675) then
80 | regVersion := 51 // 4.5.1+
81 | else if (regVersion >= 378389) then
82 | regVersion := 50 // 4.5.0+
83 | else
84 | regVersion := -1;
85 | end;
86 | end;
87 | Result := regVersion;
88 | end;
89 |
90 | [Setup]
91 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/fileversion.iss:
--------------------------------------------------------------------------------
1 | [Code]
2 | function GetFullVersion(VersionMS, VersionLS: cardinal): string;
3 | var
4 | version: string;
5 | begin
6 | version := IntToStr(word(VersionMS shr 16));
7 | version := version + '.' + IntToStr(word(VersionMS and not $ffff0000));
8 |
9 | version := version + '.' + IntToStr(word(VersionLS shr 16));
10 | version := version + '.' + IntToStr(word(VersionLS and not $ffff0000));
11 |
12 | Result := version;
13 | end;
14 |
15 | function fileversion(file: string): string;
16 | var
17 | versionMS, versionLS: cardinal;
18 | begin
19 | if GetVersionNumbers(file, versionMS, versionLS) then
20 | Result := GetFullVersion(versionMS, versionLS)
21 | else
22 | Result := '0';
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/ie6.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 2000; Windows 98; Windows ME; Windows NT; Windows XP Service Pack 1
2 | ; WARNING: express setup (downloads and installs the components depending on your OS)
3 | ; http://www.microsoft.com/downloads/details.aspx?familyid=1E1550CB-5E5D-48F5-B02B-20B602228DE6
4 |
5 | [CustomMessages]
6 | ie6_title=Internet Explorer 6
7 |
8 | en.ie6_size=1 MB - 77.5 MB
9 |
10 | [Code]
11 | const
12 | ie6_url = 'http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/ie6setup.exe';
13 |
14 | procedure ie6(minVersion: string);
15 | var
16 | version: string;
17 | begin
18 | RegQueryStringValue(HKLM, 'Software\Microsoft\Internet Explorer', 'Version', version);
19 | if (compareversion(version, minVersion) < 0) then
20 | AddProduct('ie6.exe',
21 | '/q:a /C:"setup /QNT"',
22 | CustomMessage('ie6_title'),
23 | CustomMessage('ie6_size'),
24 | ie6_url,
25 | false, false, false);
26 | end;
27 |
28 | [Setup]
29 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/iis.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | iis_title=Internet Information Services (IIS)
3 |
4 | [Code]
5 | function iis(): boolean;
6 | begin
7 | if (not RegKeyExists(HKLM, 'SYSTEM\CurrentControlSet\Services\W3SVC\Security')) then
8 | MsgBox(FmtMessage(CustomMessage('depinstall_missing'), [CustomMessage('iis_title')]), mbError, MB_OK)
9 | else
10 | Result := true;
11 | end;
12 |
13 | [Setup]
14 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/jet4sp8.iss:
--------------------------------------------------------------------------------
1 | ; http://support.microsoft.com/kb/239114
2 |
3 | [CustomMessages]
4 | jet4sp8_title=Jet 4
5 |
6 | en.jet4sp8_size=3.7 MB
7 |
8 | [Code]
9 | const
10 | jet4sp8_url = 'http://download.microsoft.com/download/4/3/9/4393c9ac-e69e-458d-9f6d-2fe191c51469/Jet40SP8_9xNT.exe';
11 |
12 | procedure jet4sp8(minVersion: string);
13 | begin
14 | //check for Jet4 Service Pack 8 installation
15 | if (compareversion(fileversion(ExpandConstant('{sys}{\}msjet40.dll')), minVersion) < 0) then
16 | AddProduct('jet4sp8.exe',
17 | '/q:a /c:"install /qb /l"',
18 | CustomMessage('jet4sp8_title'),
19 | CustomMessage('jet4sp8_size'),
20 | jet4sp8_url,
21 | false, false, false);
22 | end;
23 |
24 | [Setup]
25 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/kb835732.iss:
--------------------------------------------------------------------------------
1 | ; required by .NET Framework 2.0 Service Pack 1 on Windows 2000 Service Pack 2-4
2 | ; http://www.microsoft.com/technet/security/bulletin/ms04-011.mspx
3 | ; http://www.microsoft.com/downloads/details.aspx?FamilyId=0692C27E-F63A-414C-B3EB-D2342FBB6C00
4 |
5 | [CustomMessages]
6 | en.kb835732_title=Windows 2000 Security Update (KB835732)
7 |
8 | en.kb835732_size=6.8 MB
9 |
10 | [Code]
11 | const
12 | kb835732_url = 'http://download.microsoft.com/download/f/a/a/faa796aa-399d-437a-9284-c3536e9f2e6e/Windows2000-KB835732-x86-ENU.EXE';
13 |
14 | procedure kb835732();
15 | begin
16 | if (exactwinversion(5, 0) and (minwinspversion(5, 0, 2) and maxwinspversion(5, 0, 4))) then begin
17 | if (not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB835732\Filelist')) then
18 | AddProduct('kb835732.exe',
19 | '/passive /norestart',
20 | CustomMessage('kb835732_title'),
21 | CustomMessage('kb835732_size'),
22 | kb835732_url,
23 | false, false, false);
24 | end;
25 | end;
26 |
27 | [Setup]
28 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/mdac28.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | mdac28_title=Microsoft Data Access Components 2.8
3 |
4 | en.mdac28_size=5.4 MB
5 |
6 | [Code]
7 | const
8 | mdac28_url = 'http://download.microsoft.com/download/c/d/f/cdfd58f1-3973-4c51-8851-49ae3777586f/MDAC_TYP.EXE';
9 |
10 | procedure mdac28(minVersion: string);
11 | var
12 | version: string;
13 | begin
14 | //check for MDAC installation
15 | RegQueryStringValue(HKLM, 'Software\Microsoft\DataAccess', 'FullInstallVer', version);
16 | if (compareversion(version, minVersion) < 0) then
17 | AddProduct('mdac28.exe',
18 | '/q:a /c:"install /qb /l"',
19 | CustomMessage('mdac28_title'),
20 | CustomMessage('mdac28_size'),
21 | mdac28_url,
22 | false, false, false);
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/msi20.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | msi20_title=Windows Installer 2.0
3 |
4 | en.msi20_size=1.7 MB
5 |
6 | [Code]
7 | const
8 | msi20_url = 'http://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe';
9 |
10 | procedure msi20(minVersion: string);
11 | begin
12 | // Check for required Windows Installer 2.0 on Windows 98 and ME
13 | if (IsX86() and maxwinversion(4, 9) and (compareversion(fileversion(ExpandConstant('{sys}{\}msi.dll')), minVersion) < 0)) then
14 | AddProduct('msi20.exe',
15 | '/q:a /c:"msiinst /delayrebootq"',
16 | CustomMessage('msi20_title'),
17 | CustomMessage('msi20_size'),
18 | msi20_url,
19 | false, false, false);
20 | end;
21 |
22 | [Setup]
23 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/msi31.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | msi31_title=Windows Installer 3.1
3 |
4 | en.msi31_size=2.5 MB
5 |
6 | [Code]
7 | const
8 | msi31_url = 'http://download.microsoft.com/download/1/4/7/147ded26-931c-4daf-9095-ec7baf996f46/WindowsInstaller-KB893803-v2-x86.exe';
9 |
10 | procedure msi31(minVersion: string);
11 | begin
12 | // Check for required Windows Installer 3.0 on Windows 2000 or higher
13 | if (IsX86() and minwinversion(5, 0) and (compareversion(fileversion(ExpandConstant('{sys}{\}msi.dll')), minVersion) < 0)) then
14 | AddProduct('msi31.exe',
15 | '/passive /norestart',
16 | CustomMessage('msi31_title'),
17 | CustomMessage('msi31_size'),
18 | msi31_url,
19 | false, false, false);
20 | end;
21 |
22 | [Setup]
23 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/msi45.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | msi45_title=Windows Installer 4.5
3 |
4 | en.msi45win60_size=1.7 MB
5 |
6 | en.msi45win52_size=3.0 MB
7 |
8 | en.msi45win51_size=3.2 MB
9 |
10 | [Code]
11 | const
12 | msi45win60_url = 'http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/Windows6.0-KB942288-v2-x86.msu';
13 | msi45win52_url = 'http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsServer2003-KB942288-v4-x86.exe';
14 | msi45win51_url = 'http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsXP-KB942288-v3-x86.exe';
15 |
16 | procedure msi45(minVersion: string);
17 | begin
18 | if (IsX86() and (compareversion(fileversion(ExpandConstant('{sys}{\}msi.dll')), minVersion) < 0)) then begin
19 | if minwinversion(6, 0) then
20 | AddProduct('msi45_60.msu',
21 | '/quiet /norestart',
22 | CustomMessage('msi45_title'),
23 | CustomMessage('msi45win60_size'),
24 | msi45win60_url,
25 | false, false, false)
26 | else if minwinversion(5, 2) then
27 | AddProduct('msi45_52.exe',
28 | '/quiet /norestart',
29 | CustomMessage('msi45_title'),
30 | CustomMessage('msi45win52_size'),
31 | msi45win52_url,
32 | false, false, false)
33 | else if minwinversion(5, 1) then
34 | AddProduct('msi45_51.exe',
35 | '/quiet /norestart',
36 | CustomMessage('msi45_title'),
37 | CustomMessage('msi45win51_size'),
38 | msi45win51_url,
39 | false, false, false);
40 | end;
41 | end;
42 |
43 | [Setup]
44 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/msiproduct.iss:
--------------------------------------------------------------------------------
1 | [Code]
2 | #IFDEF UNICODE
3 | #DEFINE AW "W"
4 | #ELSE
5 | #DEFINE AW "A"
6 | #ENDIF
7 |
8 | type
9 | INSTALLSTATE = Longint;
10 | const
11 | INSTALLSTATE_INVALIDARG = -2; // An invalid parameter was passed to the function.
12 | INSTALLSTATE_UNKNOWN = -1; // The product is neither advertised or installed.
13 | INSTALLSTATE_ADVERTISED = 1; // The product is advertised but not installed.
14 | INSTALLSTATE_ABSENT = 2; // The product is installed for a different user.
15 | INSTALLSTATE_DEFAULT = 5; // The product is installed for the current user.
16 |
17 | function MsiQueryProductState(szProduct: string): INSTALLSTATE;
18 | external 'MsiQueryProductState{#AW}@msi.dll stdcall';
19 |
20 | function msiproduct(const ProductID: string): boolean;
21 | begin
22 | Result := MsiQueryProductState(ProductID) = INSTALLSTATE_DEFAULT;
23 | end;
24 |
25 | [Setup]
26 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/sql2005express.iss:
--------------------------------------------------------------------------------
1 | ; SQL Server Express is supported on x64 and EMT64 systems in Windows On Windows (WOW). SQL Server Express is not supported on IA64 systems
2 | ; requires Microsoft .NET Framework 2.0 or later
3 | ; SQLEXPR32.EXE is a smaller package that can be used to install SQL Server Express on 32-bit operating systems only. The larger SQLEXPR.EXE package supports installing onto both 32-bit and 64-bit (WOW install) operating systems. There is no other difference between these packages.
4 | ; http://www.microsoft.com/download/en/details.aspx?id=15291
5 |
6 | [CustomMessages]
7 | sql2005express_title=SQL Server 2005 Express SP3
8 |
9 | en.sql2005express_size=38.1 MB
10 |
11 | en.sql2005express_size_x64=58.1 MB
12 |
13 | [Code]
14 | const
15 | sql2005express_url = 'http://download.microsoft.com/download/4/B/E/4BED5810-C8C0-4697-BDC3-DBC114B8FF6D/SQLEXPR32_NLA.EXE';
16 | sql2005express_url_x64 = 'http://download.microsoft.com/download/4/B/E/4BED5810-C8C0-4697-BDC3-DBC114B8FF6D/SQLEXPR_NLA.EXE';
17 |
18 | procedure sql2005express();
19 | var
20 | version: string;
21 | begin
22 | //CHECK NOT FINISHED YET
23 | //RTM: 9.00.1399.06
24 | //Service Pack 1: 9.1.2047.00
25 | //Service Pack 2: 9.2.3042.00
26 | // TODO: Newer detection method required for SP3 and x64
27 | //Service Pack 3: 9.00.4035.00
28 | //RegQueryDWordValue(HKLM, 'Software\Microsoft\Microsoft SQL Server\90\DTS\Setup', 'Install', version);
29 | RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\CurrentVersion', 'CurrentVersion', version);
30 | if (version < '9.00.4035') then begin
31 | if (not IsIA64()) then
32 | AddProduct('sql2005express' + GetArchitectureString() + '.exe',
33 | '/qb ADDLOCAL=ALL INSTANCENAME=SQLEXPRESS',
34 | CustomMessage('sql2005express_title'),
35 | CustomMessage('sql2005express_size' + GetArchitectureString()),
36 | GetString(sql2005express_url, sql2005express_url_x64, ''),
37 | false, false, false);
38 | end;
39 | end;
40 |
41 | [Setup]
42 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/sql2008express.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7, Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP
2 | ; requires Microsoft .NET Framework 3.5 SP 1 or later
3 | ; requires Windows Installer 4.5 or later
4 | ; SQL Server Express is supported on x64 and EMT64 systems in Windows On Windows (WOW). SQL Server Express is not supported on IA64 systems
5 | ; SQLEXPR32.EXE is a smaller package that can be used to install SQL Server Express on 32-bit operating systems only. The larger SQLEXPR.EXE package supports installing onto both 32-bit and 64-bit (WOW install) operating systems. There is no other difference between these packages.
6 | ; http://www.microsoft.com/download/en/details.aspx?id=3743
7 |
8 | [CustomMessages]
9 | sql2008expressr2_title=SQL Server 2008 Express R2
10 |
11 | en.sql2008expressr2_size=58.2 MB
12 |
13 | en.sql2008expressr2_size_x64=74.1 MB
14 |
15 | [Code]
16 | const
17 | sql2008expressr2_url = 'http://download.microsoft.com/download/5/1/A/51A153F6-6B08-4F94-A7B2-BA1AD482BC75/SQLEXPR32_x86_ENU.exe';
18 | sql2008expressr2_url_x64 = 'http://download.microsoft.com/download/5/1/A/51A153F6-6B08-4F94-A7B2-BA1AD482BC75/SQLEXPR_x64_ENU.exe';
19 |
20 | procedure sql2008express();
21 | var
22 | version: string;
23 | begin
24 | // This check does not take into account that a full version of SQL Server could be installed,
25 | // making Express unnecessary.
26 | RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server\SQLEXPRESS\MSSQLServer\CurrentVersion', 'CurrentVersion', version);
27 | if (compareversion(version, '10.5') < 0) then begin
28 | if (not IsIA64()) then
29 | AddProduct('sql2008expressr2' + GetArchitectureString() + '.exe',
30 | '/QS /IACCEPTSQLSERVERLICENSETERMS /ACTION=Install /FEATURES=All /INSTANCENAME=SQLEXPRESS /SQLSVCACCOUNT="NT AUTHORITY\Network Service" /SQLSYSADMINACCOUNTS="builtin\administrators"',
31 | CustomMessage('sql2008expressr2_title'),
32 | CustomMessage('sql2008expressr2_size' + GetArchitectureString()),
33 | GetString(sql2008expressr2_url, sql2008expressr2_url_x64, ''),
34 | false, false, false);
35 | end;
36 | end;
37 |
38 | [Setup]
39 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/sqlcompact35sp2.iss:
--------------------------------------------------------------------------------
1 | [CustomMessages]
2 | sqlcompact35sp2_title=SQL Server Compact 3.5 Service Pack 2
3 |
4 | en.sqlcompact35sp2_size=5.3 MB
5 |
6 | [Code]
7 | const
8 | sqlcompact35sp2_url = 'http://download.microsoft.com/download/E/C/1/EC1B2340-67A0-4B87-85F0-74D987A27160/SSCERuntime-ENU.exe';
9 |
10 | procedure sqlcompact35sp2();
11 | begin
12 | if (isX86() and not RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5')) then
13 | AddProduct('sqlcompact35sp2.msi',
14 | '/qb',
15 | CustomMessage('sqlcompact35sp2_title'),
16 | CustomMessage('sqlcompact35sp2_size'),
17 | sqlcompact35sp2_url,
18 | false, false, false);
19 | end;
20 |
21 | [Setup]
22 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/stringversion.iss:
--------------------------------------------------------------------------------
1 | [Code]
2 | function stringtoversion(var temp: String): Integer;
3 | var
4 | part: String;
5 | pos1: Integer;
6 |
7 | begin
8 | if (Length(temp) = 0) then begin
9 | Result := -1;
10 | Exit;
11 | end;
12 |
13 | pos1 := Pos('.', temp);
14 | if (pos1 = 0) then begin
15 | Result := StrToInt(temp);
16 | temp := '';
17 | end else begin
18 | part := Copy(temp, 1, pos1 - 1);
19 | temp := Copy(temp, pos1 + 1, Length(temp));
20 | Result := StrToInt(part);
21 | end;
22 | end;
23 |
24 | function compareinnerversion(var x, y: String): Integer;
25 | var
26 | num1, num2: Integer;
27 |
28 | begin
29 | num1 := stringtoversion(x);
30 | num2 := stringtoversion(y);
31 | if (num1 = -1) and (num2 = -1) then begin
32 | Result := 0;
33 | Exit;
34 | end;
35 |
36 | if (num1 < 0) then begin
37 | num1 := 0;
38 | end;
39 | if (num2 < 0) then begin
40 | num2 := 0;
41 | end;
42 |
43 | if (num1 < num2) then begin
44 | Result := -1;
45 | end else if (num1 > num2) then begin
46 | Result := 1;
47 | end else begin
48 | Result := compareinnerversion(x, y);
49 | end;
50 | end;
51 |
52 | function compareversion(versionA, versionB: String): Integer;
53 | var
54 | temp1, temp2: String;
55 |
56 | begin
57 | temp1 := versionA;
58 | temp2 := versionB;
59 | Result := compareinnerversion(temp1, temp2);
60 | end;
61 |
62 | [Setup]
63 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/vcredist2005.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 2000 Service Pack 3, Windows 98, Windows 98 Second Edition, Windows ME, Windows Server 2003, Windows XP Service Pack 2
2 | ; requires Windows Installer 3.0
3 | ; http://www.microsoft.com/en-us/download/details.aspx?id=3387
4 |
5 | [CustomMessages]
6 | vcredist2005_title=Visual C++ 2005 Redistributable
7 | vcredist2005_title_x64=Visual C++ 2005 64-Bit Redistributable
8 | vcredist2005_title_ia64=Visual C++ 2005 Itanium Redistributable
9 |
10 | en.vcredist2005_size=2.6 MB
11 |
12 | en.vcredist2005_size_x64=4.1 MB
13 |
14 | en.vcredist2005_size_ia64=8.8 MB
15 |
16 | [Code]
17 | const
18 | vcredist2005_url = 'http://download.microsoft.com/download/d/3/4/d342efa6-3266-4157-a2ec-5174867be706/vcredist_x86.exe';
19 | vcredist2005_url_x64 = 'http://download.microsoft.com/download/9/1/4/914851c6-9141-443b-bdb4-8bad3a57bea9/vcredist_x64.exe';
20 | vcredist2005_url_ia64 = 'http://download.microsoft.com/download/8/1/6/816129e4-7f2f-4ba6-b065-684223e2fe1e/vcredist_IA64.exe';
21 |
22 | vcredist2005_productcode = '{A49F249F-0C91-497F-86DF-B2585E8E76B7}';
23 | vcredist2005_productcode_x64 = '{6E8E85E8-CE4B-4FF5-91F7-04999C9FAE6A}';
24 | vcredist2005_productcode_ia64 = '{03ED71EA-F531-4927-AABD-1C31BCE8E187}';
25 |
26 | procedure vcredist2005();
27 | begin
28 | if (not msiproduct(GetString(vcredist2005_productcode, vcredist2005_productcode_x64, vcredist2005_productcode_ia64))) then
29 | AddProduct('vcredist2005' + GetArchitectureString() + '.exe',
30 | '/q:a /c:"install /qb /l',
31 | CustomMessage('vcredist2005_title' + GetArchitectureString()),
32 | CustomMessage('vcredist2005_size' + GetArchitectureString()),
33 | GetString(vcredist2005_url, vcredist2005_url_x64, vcredist2005_url_ia64),
34 | false, false, false);
35 | end;
36 |
37 | [Setup]
38 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/vcredist2008.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 2000 Service Pack 4, Windows Server 2003, Windows Vista, Windows XP
2 | ; requires Windows Installer 3.0
3 | ; http://www.microsoft.com/en-us/download/details.aspx?id=29
4 |
5 | [CustomMessages]
6 | vcredist2008_title=Visual C++ 2008 Redistributable
7 | vcredist2008_title_x64=Visual C++ 2008 64-Bit Redistributable
8 | vcredist2008_title_ia64=Visual C++ 2008 Itanium Redistributable
9 |
10 | en.vcredist2008_size=1.7 MB
11 |
12 | en.vcredist2008_size_x64=2.3 MB
13 |
14 | en.vcredist2008_size_ia64=4.0 MB
15 |
16 | [Code]
17 | const
18 | vcredist2008_url = 'http://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140/vcredist_x86.exe';
19 | vcredist2008_url_x64 = 'http://download.microsoft.com/download/d/2/4/d242c3fb-da5a-4542-ad66-f9661d0a8d19/vcredist_x64.exe';
20 | vcredist2008_url_ia64 = 'http://download.microsoft.com/download/a/1/a/a1a4996b-ed78-4c2b-9589-8edd81b8df39/vcredist_IA64.exe';
21 |
22 | vcredist2008_productcode = '{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}';
23 | vcredist2008_productcode_x64 = '{350AA351-21FA-3270-8B7A-835434E766AD}';
24 | vcredist2008_productcode_ia64 = '{2B547B43-DB50-3139-9EBE-37D419E0F5FA}';
25 |
26 | procedure vcredist2008();
27 | begin
28 | if (not msiproduct(GetString(vcredist2008_productcode, vcredist2008_productcode_x64, vcredist2008_productcode_ia64))) then
29 | AddProduct('vcredist2008' + GetArchitectureString() + '.exe',
30 | '/q',
31 | CustomMessage('vcredist2008_title' + GetArchitectureString()),
32 | CustomMessage('vcredist2008_size' + GetArchitectureString()),
33 | GetString(vcredist2008_url, vcredist2008_url_x64, vcredist2008_url_ia64),
34 | false, false, false);
35 | end;
36 |
37 | [Setup]
38 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/vcredist2010.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7, Windows Server 2003 R2 (32-Bit x86), Windows Server 2003 Service Pack 2, Windows Server 2008 R2, Windows Server 2008 Service Pack 2, Windows Vista Service Pack 2, Windows XP Service Pack 3
2 | ; http://www.microsoft.com/en-us/download/details.aspx?id=5555
3 |
4 | [CustomMessages]
5 | vcredist2010_title=Visual C++ 2010 Redistributable
6 | vcredist2010_title_x64=Visual C++ 2010 64-Bit Redistributable
7 | vcredist2010_title_ia64=Visual C++ 2010 Itanium Redistributable
8 |
9 | en.vcredist2010_size=4.8 MB
10 |
11 | en.vcredist2010_size_x64=5.5 MB
12 |
13 | en.vcredist2010_size_ia64=2.2 MB
14 |
15 | [Code]
16 | const
17 | vcredist2010_url = 'http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe';
18 | vcredist2010_url_x64 = 'http://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe';
19 | vcredist2010_url_ia64 = 'http://download.microsoft.com/download/3/3/A/33A75193-2CBC-424E-A886-287551FF1EB5/vcredist_IA64.exe';
20 |
21 | vcredist2010_productcode = '{196BB40D-1578-3D01-B289-BEFC77A11A1E}';
22 | vcredist2010_productcode_x64 = '{DA5E371C-6333-3D8A-93A4-6FD5B20BCC6E}';
23 | vcredist2010_productcode_ia64 = '{C1A35166-4301-38E9-BA67-02823AD72A1B}';
24 |
25 | procedure vcredist2010();
26 | begin
27 | if (not msiproduct(GetString(vcredist2010_productcode, vcredist2010_productcode_x64, vcredist2010_productcode_ia64))) then
28 | AddProduct('vcredist2010' + GetArchitectureString() + '.exe',
29 | '/passive /norestart',
30 | CustomMessage('vcredist2010_title' + GetArchitectureString()),
31 | CustomMessage('vcredist2010_size' + GetArchitectureString()),
32 | GetString(vcredist2010_url, vcredist2010_url_x64, vcredist2010_url_ia64),
33 | false, false, false);
34 | end;
35 |
36 | [Setup]
37 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/vcredist2010sp1.iss:
--------------------------------------------------------------------------------
1 | ; Requires Windows 7, Windows Server 2003 R2 (32-bit x86), Windows Server 2003 Service Pack 2, Windows Server 2008 R2, Windows Server 2008 Service Pack 2, Windows Vista Service Pack 2, Windows XP Service Pack 3
2 | ; x86 download page: https://www.microsoft.com/en-us/download/details.aspx?id=8328
3 | ; x64 download page: https://www.microsoft.com/en-us/download/details.aspx?id=13523
4 | ; IA64 download page: https://www.microsoft.com/en-us/download/details.aspx?id=21051
5 |
6 | [CustomMessages]
7 | vcredist2010_title=Visual C++ 2010 SP1 Redistributable
8 | vcredist2010_title_x64=Visual C++ 2010 SP1 64-Bit Redistributable
9 | vcredist2010_title_ia64=Visual C++ 2010 SP1 Itanium Redistributable
10 |
11 | en.vcredist2010_size=4.8 MB
12 |
13 | en.vcredist2010_size_x64=5.4 MB
14 |
15 | en.vcredist2010_size_ia64=2.2 MB
16 |
17 | [Code]
18 | const
19 | vcredist2010_url_x86 = 'http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe';
20 | vcredist2010_url_x64 = 'http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe';
21 | vcredist2010_url_ia64 = 'http://download.microsoft.com/download/7/7/3/77332C03-CC6C-45E5-A7B6-E02504B93847/vcredist_IA64.exe';
22 |
23 | vcredist2010_productcode_x86 = '{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}';
24 | vcredist2010_productcode_x64 = '{1D8E6291-B0D5-35EC-8441-6616F567A0F7}';
25 | vcredist2010_productcode_ia64 = '{88C73C1C-2DE5-3B01-AFB8-B46EF4AB41CD}';
26 |
27 | procedure vcredist2010sp1();
28 | begin
29 | if (not msiproduct(GetString(vcredist2010_productcode_x86, vcredist2010_productcode_x64, vcredist2010_productcode_ia64))) then
30 | AddProduct('vcredist2010' + GetArchitectureString() + '.exe',
31 | '/passive /norestart',
32 | CustomMessage('vcredist2010_title' + GetArchitectureString()),
33 | CustomMessage('vcredist2010_size' + GetArchitectureString()),
34 | GetString(vcredist2010_url_x86, vcredist2010_url_x64, vcredist2010_url_ia64),
35 | false, false, false);
36 | end;
37 |
38 | [Setup]
39 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/vcredist2012.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Vista Service Pack 2, Windows XP
2 | ; http://www.microsoft.com/en-us/download/details.aspx?id=30679
3 |
4 | [CustomMessages]
5 | vcredist2012_title=Visual C++ 2012 Redistributable
6 | vcredist2012_title_x64=Visual C++ 2012 64-Bit Redistributable
7 |
8 | en.vcredist2012_size=6.3 MB
9 |
10 | en.vcredist2012_size_x64=6.4 MB
11 |
12 | [Code]
13 | const
14 | vcredist2012_url = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe';
15 | vcredist2012_url_x64 = 'http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe';
16 |
17 | vcredist2012_productcode = '{BD95A8CD-1D9F-35AD-981A-3E7925026EBB}';
18 | vcredist2012_productcode_x64 = '{CF2BEA3C-26EA-32F8-AA9B-331F7E34BA97}';
19 |
20 | procedure vcredist2012();
21 | begin
22 | if (not IsIA64()) then begin
23 | if (not msiproduct(GetString(vcredist2012_productcode, vcredist2012_productcode_x64, ''))) then
24 | AddProduct('vcredist2012' + GetArchitectureString() + '.exe',
25 | '/passive /norestart',
26 | CustomMessage('vcredist2012_title' + GetArchitectureString()),
27 | CustomMessage('vcredist2012_size' + GetArchitectureString()),
28 | GetString(vcredist2012_url, vcredist2012_url_x64, ''),
29 | false, false, false);
30 | end;
31 | end;
32 |
33 | [Setup]
34 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/vcredist2013.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Server 2012 R2, Windows Vista Service Pack 2, Windows XP
2 | ; http://www.microsoft.com/en-US/download/details.aspx?id=40784
3 |
4 | [CustomMessages]
5 | vcredist2013_title=Visual C++ 2013 Redistributable
6 | vcredist2013_title_x64=Visual C++ 2013 64-Bit Redistributable
7 |
8 | en.vcredist2013_size=6.2 MB
9 |
10 | en.vcredist2013_size_x64=6.9 MB
11 |
12 | [Code]
13 | const
14 | vcredist2013_url = 'http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe';
15 | vcredist2013_url_x64 = 'http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe';
16 |
17 | vcredist2013_productcode = '{13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}';
18 | vcredist2013_productcode_x64 = '{A749D8E6-B613-3BE3-8F5F-045C84EBA29B}';
19 |
20 | procedure vcredist2013();
21 | begin
22 | if (not IsIA64()) then begin
23 | if (not msiproduct(GetString(vcredist2013_productcode, vcredist2013_productcode_x64, ''))) then
24 | AddProduct('vcredist2013' + GetArchitectureString() + '.exe',
25 | '/passive /norestart',
26 | CustomMessage('vcredist2013_title' + GetArchitectureString()),
27 | CustomMessage('vcredist2013_size' + GetArchitectureString()),
28 | GetString(vcredist2013_url, vcredist2013_url_x64, ''),
29 | false, false, false);
30 | end;
31 | end;
32 |
33 | [Setup]
34 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/vcredist2015.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows 10, Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2003 Service Pack 2, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Vista Service Pack 2, Windows XP Service Pack 3
2 | ; http://www.microsoft.com/en-US/download/details.aspx?id=48145
3 |
4 | [CustomMessages]
5 | vcredist2015_title=Visual C++ 2015 Redistributable
6 | vcredist2015_title_x64=Visual C++ 2015 64-Bit Redistributable
7 |
8 | en.vcredist2015_size=12.8 MB
9 |
10 | en.vcredist2015_size_x64=13.9 MB
11 |
12 | [Code]
13 | const
14 | vcredist2015_url = 'http://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe';
15 | vcredist2015_url_x64 = 'http://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe';
16 |
17 | vcredist2015_productcode = '{74D0E5DB-B326-4DAE-A6B2-445B9DE1836E}';
18 | vcredist2015_productcode_x64 = '{0D3E9E15-DE7A-300B-96F1-B4AF12B96488}';
19 |
20 | procedure vcredist2015();
21 | begin
22 | if (not IsIA64()) then begin
23 | if (not msiproduct(GetString(vcredist2015_productcode, vcredist2015_productcode_x64, ''))) then
24 | AddProduct('vcredist2015' + GetArchitectureString() + '.exe',
25 | '/passive /norestart',
26 | CustomMessage('vcredist2015_title' + GetArchitectureString()),
27 | CustomMessage('vcredist2015_size' + GetArchitectureString()),
28 | GetString(vcredist2015_url, vcredist2015_url_x64, ''),
29 | false, false, false);
30 | end;
31 | end;
32 |
33 | [Setup]
34 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/wic.iss:
--------------------------------------------------------------------------------
1 | ; requires Windows Server 2003, Windows Server 2003 R2 Datacenter Edition (32-Bit x86), Windows Server 2003 R2 Enterprise Edition (32-Bit x86), Windows Server 2003 R2 Standard Edition (32-bit x86), Windows XP Service Pack 2
2 |
3 | [CustomMessages]
4 | wic_title=Windows Imaging Component
5 |
6 | en.wic_size=1.2 MB
7 |
8 | [Code]
9 | const
10 | wic_url = 'http://download.microsoft.com/download/f/f/1/ff178bb1-da91-48ed-89e5-478a99387d4f/wic_x86_';
11 | wic_url_x64 = 'http://download.microsoft.com/download/6/4/5/645fed5f-a6e7-44d9-9d10-fe83348796b0/wic_x64';
12 |
13 | function GetConvertedLanguageID(): string;
14 | begin
15 | case ActiveLanguage() of
16 | 'en': //English
17 | Result := 'enu';
18 | 'zh': //Chinese
19 | Result := 'chs';
20 | 'de': //German
21 | Result := 'deu';
22 | 'es': //Spanish
23 | Result := 'esn';
24 | 'fr': //French
25 | Result := 'fra';
26 | 'it': //Italian
27 | Result := 'ita';
28 | 'ja': //Japanese
29 | Result := 'jpn';
30 | 'nl': //Dutch
31 | Result := 'nld';
32 | 'pt': //Portuguese
33 | Result := 'ptb';
34 | 'ru': //Russian
35 | Result := 'rus';
36 | end;
37 | end;
38 |
39 | procedure wic();
40 | begin
41 | if (not IsIA64()) then begin
42 | //only needed on Windows XP SP2 or Windows Server 2003
43 | if ((exactwinversion(5, 1) and exactwinspversion(5, 1, 2)) or (exactwinversion(5, 2))) then begin
44 | if (not FileExists(GetEnv('windir') + '\system32\windowscodecs.dll')) then
45 | AddProduct('wic' + GetArchitectureString() + '_' + GetConvertedLanguageID() + '.exe',
46 | '/q',
47 | CustomMessage('wic_title'),
48 | CustomMessage('wic_size'),
49 | GetString(wic_url, wic_url_x64, '') + GetConvertedLanguageID() + '.exe',
50 | false, false, false);
51 | end;
52 | end;
53 | end;
54 |
55 | [Setup]
56 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Installation Files/scripts/products/winversion.iss:
--------------------------------------------------------------------------------
1 | [Code]
2 | var
3 | WindowsVersion: TWindowsVersion;
4 |
5 | procedure initwinversion();
6 | begin
7 | GetWindowsVersionEx(WindowsVersion);
8 | end;
9 |
10 | function exactwinversion(MajorVersion, MinorVersion: integer): boolean;
11 | begin
12 | Result := (WindowsVersion.Major = MajorVersion) and (WindowsVersion.Minor = MinorVersion);
13 | end;
14 |
15 | function minwinversion(MajorVersion, MinorVersion: integer): boolean;
16 | begin
17 | Result := (WindowsVersion.Major > MajorVersion) or ((WindowsVersion.Major = MajorVersion) and (WindowsVersion.Minor >= MinorVersion));
18 | end;
19 |
20 | function maxwinversion(MajorVersion, MinorVersion: integer): boolean;
21 | begin
22 | Result := (WindowsVersion.Major < MajorVersion) or ((WindowsVersion.Major = MajorVersion) and (WindowsVersion.Minor <= MinorVersion));
23 | end;
24 |
25 | function exactwinspversion(MajorVersion, MinorVersion, SpVersion: integer): boolean;
26 | begin
27 | if exactwinversion(MajorVersion, MinorVersion) then
28 | Result := WindowsVersion.ServicePackMajor = SpVersion
29 | else
30 | Result := true;
31 | end;
32 |
33 | function minwinspversion(MajorVersion, MinorVersion, SpVersion: integer): boolean;
34 | begin
35 | if exactwinversion(MajorVersion, MinorVersion) then
36 | Result := WindowsVersion.ServicePackMajor >= SpVersion
37 | else
38 | Result := true;
39 | end;
40 |
41 | function maxwinspversion(MajorVersion, MinorVersion, SpVersion: integer): boolean;
42 | begin
43 | if exactwinversion(MajorVersion, MinorVersion) then
44 | Result := WindowsVersion.ServicePackMajor <= SpVersion
45 | else
46 | Result := true;
47 | end;
48 |
49 | [Setup]
50 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Libraries/Google.ProtocolBuffers.Serialization.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Libraries/Google.ProtocolBuffers.Serialization.dll
--------------------------------------------------------------------------------
/HyperionScreenCap/Libraries/Google.ProtocolBuffers.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Libraries/Google.ProtocolBuffers.dll
--------------------------------------------------------------------------------
/HyperionScreenCap/Notifications.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace HyperionScreenCap
5 | {
6 | internal static class Notifications
7 | {
8 | public static void Error(string errorMsg)
9 | {
10 | if (Settings.NotificationLevel != Form1.NotificationLevels.Info &&
11 | Settings.NotificationLevel != Form1.NotificationLevels.Error) return;
12 | Form1.TrayIcon.ShowBalloonTip(3000, "", errorMsg, ToolTipIcon.Error);
13 | }
14 |
15 | public static void Info(string infoMsg)
16 | {
17 | if (Settings.NotificationLevel != Form1.NotificationLevels.Info) return;
18 | Form1.TrayIcon.ShowBalloonTip(1000, "", infoMsg, ToolTipIcon.Info);
19 | Console.WriteLine(infoMsg);
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/HyperionScreenCap/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 |
6 | namespace HyperionScreenCap
7 | {
8 | internal static class Program
9 | {
10 | [System.Runtime.InteropServices.DllImport("user32.dll")]
11 | private static extern bool SetProcessDPIAware();
12 |
13 | private static Form1 _mainForm;
14 |
15 | ///
16 | /// The main entry point for the application.
17 | ///
18 | [STAThread]
19 | private static void Main()
20 | {
21 | // Set DPI awareness
22 | SetProcessDPIAware();
23 |
24 | // Check if already running and exit if that's the case
25 | if (IsProgramRunning("hyperionscreencap", 0) > 1)
26 | {
27 | try
28 | {
29 | MessageBox.Show(@"HyperionScreenCap is already running!");
30 | Environment.Exit(0);
31 | }
32 | catch (Exception)
33 | {
34 | // ignored
35 | }
36 | }
37 | _mainForm = new Form1();
38 | Application.Run(_mainForm);
39 | }
40 |
41 | private static int IsProgramRunning(string name, int runtime)
42 | {
43 | runtime += Process.GetProcesses().Count(clsProcess => clsProcess.ProcessName.ToLower().Equals(name));
44 | return runtime;
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/HyperionScreenCap/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("HyperionScreenCap")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("HyperionScreenCap")]
12 | [assembly: AssemblyCopyright("Copyright © 2015")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("9ec68860-ae7e-413f-a5a4-ac31b93912c2")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("1.1.0.6")]
35 | [assembly: AssemblyFileVersion("1.1.0.6")]
36 |
--------------------------------------------------------------------------------
/HyperionScreenCap/ProtoClient.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Net.Sockets;
4 | using Google.ProtocolBuffers;
5 | using proto;
6 |
7 | namespace HyperionScreenCap
8 | {
9 | internal class ProtoClient
10 | {
11 | private static TcpClient _socket = new TcpClient();
12 | private static Stream _stream;
13 | private static int _hyperionPriority;
14 | private static bool _initLock;
15 |
16 | public static void Init(string hyperionIp, int hyperionProtoPort = 19445, int priority = 10)
17 | {
18 | try
19 | {
20 | if (_socket.Connected || _initLock) return;
21 | _initLock = true;
22 | _hyperionPriority = priority;
23 | _socket = new TcpClient
24 | {
25 | SendTimeout = 5000,
26 | ReceiveTimeout = 5000
27 | };
28 | _socket.Connect(hyperionIp, hyperionProtoPort);
29 | _stream = _socket.GetStream();
30 | _initLock = false;
31 | }
32 | catch (Exception ex)
33 | {
34 | Notifications.Error($"Failed to connect to Hyperion.{ex.Message}");
35 | _initLock = false;
36 | }
37 | }
38 |
39 | public static bool IsConnected()
40 | {
41 | try
42 | {
43 | if (_socket == null)
44 | {
45 | return false;
46 | }
47 | if (_socket.Connected)
48 | {
49 | return true;
50 | }
51 | }
52 | catch (Exception ex)
53 | {
54 | Notifications.Error(ex.Message);
55 | }
56 | return false;
57 | }
58 |
59 | public static void Disconnect()
60 | {
61 | _socket?.Close();
62 | }
63 |
64 | public static void SendImageToServer(byte[] pixeldata)
65 | {
66 | try
67 | {
68 | var imageRequest = ImageRequest.CreateBuilder()
69 | .SetImagedata(ByteString.CopyFrom(pixeldata))
70 | .SetImageheight(Settings.HyperionHeight)
71 | .SetImagewidth(Settings.HyperionWidth)
72 | .SetPriority(_hyperionPriority)
73 | .SetDuration(Settings.HyperionMessageDuration)
74 | .Build();
75 |
76 | var request = HyperionRequest.CreateBuilder()
77 | .SetCommand(HyperionRequest.Types.Command.IMAGE)
78 | .SetExtension(ImageRequest.ImageRequest_, imageRequest)
79 | .Build();
80 |
81 | SendRequest(request);
82 | }
83 | catch (Exception ex)
84 | {
85 | Notifications.Error($"Failed to send image to server.{ex.Message}");
86 | }
87 | }
88 |
89 | public static void ClearPriority(int priority)
90 | {
91 | try
92 | {
93 | if (!IsConnected())
94 | {
95 | return;
96 | }
97 |
98 | var clearRequest = ClearRequest.CreateBuilder()
99 | .SetPriority(priority)
100 | .Build();
101 |
102 | var request = HyperionRequest.CreateBuilder()
103 | .SetCommand(HyperionRequest.Types.Command.CLEAR)
104 | .SetExtension(ClearRequest.ClearRequest_, clearRequest)
105 | .Build();
106 |
107 | SendRequest(request);
108 | }
109 | catch (Exception ex)
110 | {
111 | Notifications.Error($"Failed to clear priority.{ex.Message}");
112 | }
113 | }
114 |
115 | private static void SendRequest(IMessageLite request)
116 | {
117 | try
118 | {
119 | if (!_socket.Connected) return;
120 | var size = request.SerializedSize;
121 | var header = new byte[4];
122 | header[0] = (byte) ((size >> 24) & 0xFF);
123 | header[1] = (byte) ((size >> 16) & 0xFF);
124 | header[2] = (byte) ((size >> 8) & 0xFF);
125 | header[3] = (byte) (size & 0xFF);
126 |
127 | var headerSize = header.Length;
128 | _stream.Write(header, 0, headerSize);
129 | request.WriteTo(_stream);
130 | _stream.Flush();
131 |
132 | // Enable reply message if needed (debugging only).
133 | //var reply = ReceiveReply();
134 | //Console.WriteLine($@"Reply: {reply.ToString()}");
135 | }
136 | catch (Exception ex)
137 | {
138 | Notifications.Error($"Failed to send request.{ex.Message}");
139 | }
140 | }
141 | private static HyperionReply ReceiveReply()
142 | {
143 | try
144 | {
145 | Stream input = _socket.GetStream();
146 | var header = new byte[4];
147 | input.Read(header, 0, 4);
148 | var size = (header[0] << 24) | (header[1] << 16) | (header[2] << 8) | (header[3]);
149 | var data = new byte[size];
150 | input.Read(data, 0, size);
151 | var reply = HyperionReply.ParseFrom(data);
152 |
153 | return reply;
154 | }
155 | catch (Exception e)
156 | {
157 | Notifications.Error("Error during reeceive hyperion reply: " + e.Message);
158 | return null;
159 | }
160 | }
161 | }
162 | }
--------------------------------------------------------------------------------
/HyperionScreenCap/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace HyperionScreenCap {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HyperionScreenCap.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
65 | ///
66 | internal static System.Drawing.Icon ConfigFile {
67 | get {
68 | object obj = ResourceManager.GetObject("ConfigFile", resourceCulture);
69 | return ((System.Drawing.Icon)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
75 | ///
76 | internal static System.Drawing.Icon cross {
77 | get {
78 | object obj = ResourceManager.GetObject("cross", resourceCulture);
79 | return ((System.Drawing.Icon)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
85 | ///
86 | internal static System.Drawing.Icon gear {
87 | get {
88 | object obj = ResourceManager.GetObject("gear", resourceCulture);
89 | return ((System.Drawing.Icon)(obj));
90 | }
91 | }
92 |
93 | ///
94 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
95 | ///
96 | internal static System.Drawing.Icon Hyperion_disabled {
97 | get {
98 | object obj = ResourceManager.GetObject("Hyperion_disabled", resourceCulture);
99 | return ((System.Drawing.Icon)(obj));
100 | }
101 | }
102 |
103 | ///
104 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
105 | ///
106 | internal static System.Drawing.Icon Hyperion_enabled {
107 | get {
108 | object obj = ResourceManager.GetObject("Hyperion_enabled", resourceCulture);
109 | return ((System.Drawing.Icon)(obj));
110 | }
111 | }
112 |
113 | ///
114 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
115 | ///
116 | internal static System.Drawing.Icon television__arrow {
117 | get {
118 | object obj = ResourceManager.GetObject("television__arrow", resourceCulture);
119 | return ((System.Drawing.Icon)(obj));
120 | }
121 | }
122 |
123 | ///
124 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
125 | ///
126 | internal static System.Drawing.Icon television__pencil {
127 | get {
128 | object obj = ResourceManager.GetObject("television__pencil", resourceCulture);
129 | return ((System.Drawing.Icon)(obj));
130 | }
131 | }
132 | }
133 | }
134 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | Resources\ConfigFile.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | Resources\cross.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
128 | Resources\gear.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
131 | Resources\Hyperion-disabled.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
132 |
133 |
134 | Resources\Hyperion-enabled.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
135 |
136 |
137 | Resources\television--arrow.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
138 |
139 |
140 | Resources\television--pencil.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
141 |
142 |
--------------------------------------------------------------------------------
/HyperionScreenCap/Resources/ConfigFile.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Resources/ConfigFile.ico
--------------------------------------------------------------------------------
/HyperionScreenCap/Resources/Hyperion-disabled.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Resources/Hyperion-disabled.ico
--------------------------------------------------------------------------------
/HyperionScreenCap/Resources/Hyperion-enabled.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Resources/Hyperion-enabled.ico
--------------------------------------------------------------------------------
/HyperionScreenCap/Resources/cross.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Resources/cross.ico
--------------------------------------------------------------------------------
/HyperionScreenCap/Resources/gear.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Resources/gear.ico
--------------------------------------------------------------------------------
/HyperionScreenCap/Resources/television--arrow.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Resources/television--arrow.ico
--------------------------------------------------------------------------------
/HyperionScreenCap/Resources/television--pencil.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RickDB/HyperionScreenCap/3c93c7f0e8e74d61c76d1b15d22f07e7ce460484/HyperionScreenCap/Resources/television--pencil.ico
--------------------------------------------------------------------------------
/HyperionScreenCap/Settings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Configuration;
3 | using System.Windows.Forms;
4 |
5 | namespace HyperionScreenCap
6 | {
7 | internal static class Settings
8 | {
9 | private static readonly Configuration Config =
10 | ConfigurationManager.OpenExeConfiguration(Application.ExecutablePath);
11 |
12 | // Generic
13 | public static string HyperionServerIp;
14 | public static int HyperionServerPort;
15 | public static int HyperionMessagePriority;
16 | public static int HyperionMessageDuration;
17 | public static int HyperionWidth;
18 | public static int HyperionHeight;
19 | public static int CaptureInterval;
20 | public static int MonitorIndex;
21 | public static int ReconnectInterval;
22 | public static bool CaptureOnStartup;
23 |
24 | // API
25 | public static int ApiPort = 29445;
26 | public static bool ApiEnabled;
27 | public static bool ApiExcludedTimesEnabled;
28 | public static DateTime ApiExcludeTimeStart = DateTime.Parse("08:00");
29 | public static DateTime ApiExcludeTimeEnd = DateTime.Parse("17:00");
30 |
31 | public static Form1.NotificationLevels NotificationLevel;
32 |
33 | public static void SaveSettings()
34 | {
35 | var setting = Config.AppSettings.Settings;
36 |
37 | setting["hyperionServerIP"].Value = HyperionServerIp;
38 | setting["hyperionServerPort"].Value = HyperionServerPort.ToString();
39 | setting["hyperionMessagePriority"].Value = HyperionMessagePriority.ToString();
40 | setting["hyperionMessageDuration"].Value = HyperionMessageDuration.ToString();
41 | setting["width"].Value = HyperionWidth.ToString();
42 | setting["height"].Value = HyperionHeight.ToString();
43 | setting["captureInterval"].Value = CaptureInterval.ToString();
44 | setting["monitorIndex"].Value = MonitorIndex.ToString();
45 | setting["reconnectInterval"].Value = ReconnectInterval.ToString();
46 | setting["notificationLevel"].Value = NotificationLevel.ToString();
47 | if (setting["captureOnStartup"] != null)
48 | setting["captureOnStartup"].Value = CaptureOnStartup.ToString();
49 |
50 | if (setting["apiPort"] != null)
51 | setting["apiPort"].Value = ApiPort.ToString();
52 | if (setting["apiEnabled"] != null)
53 | setting["apiEnabled"].Value = ApiEnabled.ToString();
54 | if (setting["apiExcludedTimesEnabled"] != null)
55 | setting["apiExcludedTimesEnabled"].Value = ApiExcludedTimesEnabled.ToString();
56 | if (setting["apiExcludeTimeStart"] != null)
57 | setting["apiExcludeTimeStart"].Value = ApiExcludeTimeStart.ToString();
58 | if (setting["apiExcludeTimeEnd"] != null)
59 | setting["apiExcludeTimeEnd"].Value = ApiExcludeTimeEnd.ToString();
60 |
61 | Config.Save(ConfigurationSaveMode.Modified);
62 | }
63 |
64 | public static void LoadSetttings()
65 | {
66 | if (Config.HasFile)
67 | {
68 | var setting = Config.AppSettings.Settings;
69 |
70 | HyperionServerIp = setting["hyperionServerIP"].Value;
71 | HyperionServerPort = int.Parse(setting["hyperionServerPort"].Value);
72 | HyperionMessagePriority = int.Parse(setting["hyperionMessagePriority"].Value);
73 | HyperionMessageDuration = int.Parse(setting["hyperionMessageDuration"].Value);
74 | HyperionWidth = int.Parse(setting["width"].Value);
75 | HyperionHeight = int.Parse(setting["height"].Value);
76 | CaptureInterval = int.Parse(setting["captureInterval"].Value);
77 | MonitorIndex = int.Parse(setting["monitorIndex"].Value);
78 | ReconnectInterval = int.Parse(setting["reconnectInterval"].Value);
79 | if (setting["captureOnStartup"] != null)
80 | CaptureOnStartup = bool.Parse(setting["captureOnStartup"].Value);
81 |
82 | if (setting["apiPort"] != null)
83 | ApiPort = int.Parse(setting["apiPort"].Value);
84 | if (setting["apiEnabled"] != null)
85 | ApiEnabled = bool.Parse(setting["apiEnabled"].Value);
86 | if (setting["apiExcludedTimesEnabled"] != null)
87 | ApiExcludedTimesEnabled = bool.Parse(setting["apiExcludedTimesEnabled"].Value);
88 | if (setting["apiExcludeTimeStart"] != null)
89 | ApiExcludeTimeStart = DateTime.Parse(setting["apiExcludeTimeStart"].Value);
90 | if (setting["apiExcludeTimeEnd"] != null)
91 | ApiExcludeTimeEnd = DateTime.Parse(setting["apiExcludeTimeEnd"].Value);
92 |
93 | NotificationLevel =
94 | (Form1.NotificationLevels)
95 | Enum.Parse(typeof(Form1.NotificationLevels), setting["notificationLevel"].Value);
96 | }
97 | }
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/HyperionScreenCap/SetupForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace HyperionScreenCap
2 | {
3 | partial class SetupForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetupForm));
32 | this.tabControl1 = new System.Windows.Forms.TabControl();
33 | this.tabPageGeneric = new System.Windows.Forms.TabPage();
34 | this.chkCaptureOnStartup = new System.Windows.Forms.CheckBox();
35 | this.cbMessagePriority = new System.Windows.Forms.ComboBox();
36 | this.lblMessagePriority = new System.Windows.Forms.Label();
37 | this.cbMonitorIndex = new System.Windows.Forms.ComboBox();
38 | this.lnlMonitorIndex = new System.Windows.Forms.Label();
39 | this.cbNotificationLevel = new System.Windows.Forms.ComboBox();
40 | this.lblNotificationLevel = new System.Windows.Forms.Label();
41 | this.tbProtoPort = new System.Windows.Forms.TextBox();
42 | this.lblProtoPort = new System.Windows.Forms.Label();
43 | this.tbIPHostName = new System.Windows.Forms.TextBox();
44 | this.lblIPHostName = new System.Windows.Forms.Label();
45 | this.tabPageAdvanced = new System.Windows.Forms.TabPage();
46 | this.grpDeactivate = new System.Windows.Forms.GroupBox();
47 | this.chkApiExcludeTimesEnabled = new System.Windows.Forms.CheckBox();
48 | this.tbApiExcludeEnd = new System.Windows.Forms.TextBox();
49 | this.lblEnd = new System.Windows.Forms.Label();
50 | this.tbApiExcludeStart = new System.Windows.Forms.TextBox();
51 | this.lblStart = new System.Windows.Forms.Label();
52 | this.lblApiPort = new System.Windows.Forms.Label();
53 | this.tbApiPort = new System.Windows.Forms.TextBox();
54 | this.chkApiEnabled = new System.Windows.Forms.CheckBox();
55 | this.tbReconnectInterval = new System.Windows.Forms.TextBox();
56 | this.lblReconnectInterval = new System.Windows.Forms.Label();
57 | this.tbCaptureInterval = new System.Windows.Forms.TextBox();
58 | this.lblCaptureInterval = new System.Windows.Forms.Label();
59 | this.tbCaptureHeight = new System.Windows.Forms.TextBox();
60 | this.lblCaptureHeight = new System.Windows.Forms.Label();
61 | this.tbCaptureWidth = new System.Windows.Forms.TextBox();
62 | this.lblCaptureWidth = new System.Windows.Forms.Label();
63 | this.tbMessageDuration = new System.Windows.Forms.TextBox();
64 | this.lblMessageDuration = new System.Windows.Forms.Label();
65 | this.btnSaveExit = new System.Windows.Forms.Button();
66 | this.lblVersion = new System.Windows.Forms.Label();
67 | this.tabControl1.SuspendLayout();
68 | this.tabPageGeneric.SuspendLayout();
69 | this.tabPageAdvanced.SuspendLayout();
70 | this.grpDeactivate.SuspendLayout();
71 | this.SuspendLayout();
72 | //
73 | // tabControl1
74 | //
75 | this.tabControl1.Controls.Add(this.tabPageGeneric);
76 | this.tabControl1.Controls.Add(this.tabPageAdvanced);
77 | this.tabControl1.Location = new System.Drawing.Point(2, 3);
78 | this.tabControl1.Name = "tabControl1";
79 | this.tabControl1.SelectedIndex = 0;
80 | this.tabControl1.Size = new System.Drawing.Size(697, 296);
81 | this.tabControl1.TabIndex = 9;
82 | //
83 | // tabPageGeneric
84 | //
85 | this.tabPageGeneric.BackColor = System.Drawing.SystemColors.Control;
86 | this.tabPageGeneric.Controls.Add(this.chkCaptureOnStartup);
87 | this.tabPageGeneric.Controls.Add(this.cbMessagePriority);
88 | this.tabPageGeneric.Controls.Add(this.lblMessagePriority);
89 | this.tabPageGeneric.Controls.Add(this.cbMonitorIndex);
90 | this.tabPageGeneric.Controls.Add(this.lnlMonitorIndex);
91 | this.tabPageGeneric.Controls.Add(this.cbNotificationLevel);
92 | this.tabPageGeneric.Controls.Add(this.lblNotificationLevel);
93 | this.tabPageGeneric.Controls.Add(this.tbProtoPort);
94 | this.tabPageGeneric.Controls.Add(this.lblProtoPort);
95 | this.tabPageGeneric.Controls.Add(this.tbIPHostName);
96 | this.tabPageGeneric.Controls.Add(this.lblIPHostName);
97 | this.tabPageGeneric.Location = new System.Drawing.Point(4, 22);
98 | this.tabPageGeneric.Name = "tabPageGeneric";
99 | this.tabPageGeneric.Padding = new System.Windows.Forms.Padding(3);
100 | this.tabPageGeneric.Size = new System.Drawing.Size(689, 270);
101 | this.tabPageGeneric.TabIndex = 0;
102 | this.tabPageGeneric.Text = "Generic";
103 | //
104 | // chkCaptureOnStartup
105 | //
106 | this.chkCaptureOnStartup.AutoSize = true;
107 | this.chkCaptureOnStartup.Location = new System.Drawing.Point(9, 197);
108 | this.chkCaptureOnStartup.Name = "chkCaptureOnStartup";
109 | this.chkCaptureOnStartup.Size = new System.Drawing.Size(144, 17);
110 | this.chkCaptureOnStartup.TabIndex = 19;
111 | this.chkCaptureOnStartup.Text = "Start capture on first start";
112 | this.chkCaptureOnStartup.UseVisualStyleBackColor = true;
113 | //
114 | // cbMessagePriority
115 | //
116 | this.cbMessagePriority.FormattingEnabled = true;
117 | this.cbMessagePriority.Items.AddRange(new object[] {
118 | "10",
119 | "20",
120 | "50",
121 | "100",
122 | "200",
123 | "500",
124 | "750",
125 | "1000"});
126 | this.cbMessagePriority.Location = new System.Drawing.Point(110, 85);
127 | this.cbMessagePriority.Name = "cbMessagePriority";
128 | this.cbMessagePriority.Size = new System.Drawing.Size(100, 21);
129 | this.cbMessagePriority.TabIndex = 18;
130 | this.cbMessagePriority.Validating += new System.ComponentModel.CancelEventHandler(this.cbMessagePriority_Validating);
131 | //
132 | // lblMessagePriority
133 | //
134 | this.lblMessagePriority.AutoSize = true;
135 | this.lblMessagePriority.Location = new System.Drawing.Point(6, 88);
136 | this.lblMessagePriority.Name = "lblMessagePriority";
137 | this.lblMessagePriority.Size = new System.Drawing.Size(38, 13);
138 | this.lblMessagePriority.TabIndex = 17;
139 | this.lblMessagePriority.Text = "Priority";
140 | //
141 | // cbMonitorIndex
142 | //
143 | this.cbMonitorIndex.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
144 | this.cbMonitorIndex.FormattingEnabled = true;
145 | this.cbMonitorIndex.Location = new System.Drawing.Point(110, 155);
146 | this.cbMonitorIndex.Name = "cbMonitorIndex";
147 | this.cbMonitorIndex.Size = new System.Drawing.Size(100, 21);
148 | this.cbMonitorIndex.TabIndex = 16;
149 | this.cbMonitorIndex.Text = "0";
150 | this.cbMonitorIndex.Validating += new System.ComponentModel.CancelEventHandler(this.cbMonitorIndex_Validating);
151 | //
152 | // lnlMonitorIndex
153 | //
154 | this.lnlMonitorIndex.AutoSize = true;
155 | this.lnlMonitorIndex.Location = new System.Drawing.Point(6, 158);
156 | this.lnlMonitorIndex.Name = "lnlMonitorIndex";
157 | this.lnlMonitorIndex.Size = new System.Drawing.Size(73, 13);
158 | this.lnlMonitorIndex.TabIndex = 15;
159 | this.lnlMonitorIndex.Text = "Monitor index:";
160 | //
161 | // cbNotificationLevel
162 | //
163 | this.cbNotificationLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
164 | this.cbNotificationLevel.FormattingEnabled = true;
165 | this.cbNotificationLevel.Items.AddRange(new object[] {
166 | "Info",
167 | "Error",
168 | "None"});
169 | this.cbNotificationLevel.Location = new System.Drawing.Point(110, 120);
170 | this.cbNotificationLevel.Name = "cbNotificationLevel";
171 | this.cbNotificationLevel.Size = new System.Drawing.Size(100, 21);
172 | this.cbNotificationLevel.TabIndex = 3;
173 | //
174 | // lblNotificationLevel
175 | //
176 | this.lblNotificationLevel.AutoSize = true;
177 | this.lblNotificationLevel.Location = new System.Drawing.Point(6, 123);
178 | this.lblNotificationLevel.Name = "lblNotificationLevel";
179 | this.lblNotificationLevel.Size = new System.Drawing.Size(88, 13);
180 | this.lblNotificationLevel.TabIndex = 13;
181 | this.lblNotificationLevel.Text = "Notification level:";
182 | //
183 | // tbProtoPort
184 | //
185 | this.tbProtoPort.Location = new System.Drawing.Point(110, 50);
186 | this.tbProtoPort.Name = "tbProtoPort";
187 | this.tbProtoPort.Size = new System.Drawing.Size(100, 20);
188 | this.tbProtoPort.TabIndex = 2;
189 | this.tbProtoPort.Validating += new System.ComponentModel.CancelEventHandler(this.tbProtoPort_Validating);
190 | //
191 | // lblProtoPort
192 | //
193 | this.lblProtoPort.AutoSize = true;
194 | this.lblProtoPort.Location = new System.Drawing.Point(6, 52);
195 | this.lblProtoPort.Name = "lblProtoPort";
196 | this.lblProtoPort.Size = new System.Drawing.Size(29, 13);
197 | this.lblProtoPort.TabIndex = 11;
198 | this.lblProtoPort.Text = "Port:";
199 | //
200 | // tbIPHostName
201 | //
202 | this.tbIPHostName.Location = new System.Drawing.Point(110, 15);
203 | this.tbIPHostName.Name = "tbIPHostName";
204 | this.tbIPHostName.Size = new System.Drawing.Size(100, 20);
205 | this.tbIPHostName.TabIndex = 1;
206 | //
207 | // lblIPHostName
208 | //
209 | this.lblIPHostName.AutoSize = true;
210 | this.lblIPHostName.Location = new System.Drawing.Point(6, 17);
211 | this.lblIPHostName.Name = "lblIPHostName";
212 | this.lblIPHostName.Size = new System.Drawing.Size(79, 13);
213 | this.lblIPHostName.TabIndex = 9;
214 | this.lblIPHostName.Text = "IP / Hostname:";
215 | //
216 | // tabPageAdvanced
217 | //
218 | this.tabPageAdvanced.BackColor = System.Drawing.SystemColors.Control;
219 | this.tabPageAdvanced.Controls.Add(this.grpDeactivate);
220 | this.tabPageAdvanced.Controls.Add(this.lblApiPort);
221 | this.tabPageAdvanced.Controls.Add(this.tbApiPort);
222 | this.tabPageAdvanced.Controls.Add(this.chkApiEnabled);
223 | this.tabPageAdvanced.Controls.Add(this.tbReconnectInterval);
224 | this.tabPageAdvanced.Controls.Add(this.lblReconnectInterval);
225 | this.tabPageAdvanced.Controls.Add(this.tbCaptureInterval);
226 | this.tabPageAdvanced.Controls.Add(this.lblCaptureInterval);
227 | this.tabPageAdvanced.Controls.Add(this.tbCaptureHeight);
228 | this.tabPageAdvanced.Controls.Add(this.lblCaptureHeight);
229 | this.tabPageAdvanced.Controls.Add(this.tbCaptureWidth);
230 | this.tabPageAdvanced.Controls.Add(this.lblCaptureWidth);
231 | this.tabPageAdvanced.Controls.Add(this.tbMessageDuration);
232 | this.tabPageAdvanced.Controls.Add(this.lblMessageDuration);
233 | this.tabPageAdvanced.Location = new System.Drawing.Point(4, 22);
234 | this.tabPageAdvanced.Name = "tabPageAdvanced";
235 | this.tabPageAdvanced.Padding = new System.Windows.Forms.Padding(3);
236 | this.tabPageAdvanced.Size = new System.Drawing.Size(689, 270);
237 | this.tabPageAdvanced.TabIndex = 1;
238 | this.tabPageAdvanced.Text = "Advanced";
239 | //
240 | // grpDeactivate
241 | //
242 | this.grpDeactivate.Controls.Add(this.chkApiExcludeTimesEnabled);
243 | this.grpDeactivate.Controls.Add(this.tbApiExcludeEnd);
244 | this.grpDeactivate.Controls.Add(this.lblEnd);
245 | this.grpDeactivate.Controls.Add(this.tbApiExcludeStart);
246 | this.grpDeactivate.Controls.Add(this.lblStart);
247 | this.grpDeactivate.Location = new System.Drawing.Point(395, 53);
248 | this.grpDeactivate.Name = "grpDeactivate";
249 | this.grpDeactivate.Size = new System.Drawing.Size(287, 106);
250 | this.grpDeactivate.TabIndex = 13;
251 | this.grpDeactivate.TabStop = false;
252 | this.grpDeactivate.Text = "Disable API control during specified time range";
253 | //
254 | // chkApiExcludeTimesEnabled
255 | //
256 | this.chkApiExcludeTimesEnabled.AutoSize = true;
257 | this.chkApiExcludeTimesEnabled.Location = new System.Drawing.Point(14, 23);
258 | this.chkApiExcludeTimesEnabled.Name = "chkApiExcludeTimesEnabled";
259 | this.chkApiExcludeTimesEnabled.Size = new System.Drawing.Size(65, 17);
260 | this.chkApiExcludeTimesEnabled.TabIndex = 17;
261 | this.chkApiExcludeTimesEnabled.Text = "Enabled";
262 | this.chkApiExcludeTimesEnabled.UseVisualStyleBackColor = true;
263 | //
264 | // tbApiExcludeEnd
265 | //
266 | this.tbApiExcludeEnd.Location = new System.Drawing.Point(76, 75);
267 | this.tbApiExcludeEnd.Name = "tbApiExcludeEnd";
268 | this.tbApiExcludeEnd.Size = new System.Drawing.Size(50, 20);
269 | this.tbApiExcludeEnd.TabIndex = 15;
270 | this.tbApiExcludeEnd.Text = "21:00";
271 | this.tbApiExcludeEnd.Validating += new System.ComponentModel.CancelEventHandler(this.tbExcludeEnd_Validating);
272 | //
273 | // lblEnd
274 | //
275 | this.lblEnd.AutoSize = true;
276 | this.lblEnd.Location = new System.Drawing.Point(11, 78);
277 | this.lblEnd.Name = "lblEnd";
278 | this.lblEnd.Size = new System.Drawing.Size(29, 13);
279 | this.lblEnd.TabIndex = 2;
280 | this.lblEnd.Text = "End:";
281 | //
282 | // tbApiExcludeStart
283 | //
284 | this.tbApiExcludeStart.Location = new System.Drawing.Point(76, 50);
285 | this.tbApiExcludeStart.Name = "tbApiExcludeStart";
286 | this.tbApiExcludeStart.Size = new System.Drawing.Size(50, 20);
287 | this.tbApiExcludeStart.TabIndex = 14;
288 | this.tbApiExcludeStart.Text = "8:00";
289 | this.tbApiExcludeStart.Validating += new System.ComponentModel.CancelEventHandler(this.tbExcludeStart_Validating);
290 | //
291 | // lblStart
292 | //
293 | this.lblStart.AutoSize = true;
294 | this.lblStart.Location = new System.Drawing.Point(11, 53);
295 | this.lblStart.Name = "lblStart";
296 | this.lblStart.Size = new System.Drawing.Size(32, 13);
297 | this.lblStart.TabIndex = 0;
298 | this.lblStart.Text = "Start:";
299 | //
300 | // lblApiPort
301 | //
302 | this.lblApiPort.AutoSize = true;
303 | this.lblApiPort.Location = new System.Drawing.Point(395, 17);
304 | this.lblApiPort.Name = "lblApiPort";
305 | this.lblApiPort.Size = new System.Drawing.Size(45, 13);
306 | this.lblApiPort.TabIndex = 12;
307 | this.lblApiPort.Text = "API port";
308 | //
309 | // tbApiPort
310 | //
311 | this.tbApiPort.Location = new System.Drawing.Point(446, 14);
312 | this.tbApiPort.Name = "tbApiPort";
313 | this.tbApiPort.Size = new System.Drawing.Size(60, 20);
314 | this.tbApiPort.TabIndex = 11;
315 | this.tbApiPort.Validating += new System.ComponentModel.CancelEventHandler(this.tbApiPort_Validating);
316 | //
317 | // chkApiEnabled
318 | //
319 | this.chkApiEnabled.AutoSize = true;
320 | this.chkApiEnabled.Location = new System.Drawing.Point(512, 16);
321 | this.chkApiEnabled.Name = "chkApiEnabled";
322 | this.chkApiEnabled.Size = new System.Drawing.Size(79, 17);
323 | this.chkApiEnabled.TabIndex = 10;
324 | this.chkApiEnabled.Text = "Enable API";
325 | this.chkApiEnabled.UseVisualStyleBackColor = true;
326 | //
327 | // tbReconnectInterval
328 | //
329 | this.tbReconnectInterval.Location = new System.Drawing.Point(143, 172);
330 | this.tbReconnectInterval.Name = "tbReconnectInterval";
331 | this.tbReconnectInterval.Size = new System.Drawing.Size(100, 20);
332 | this.tbReconnectInterval.TabIndex = 9;
333 | this.tbReconnectInterval.Validating += new System.ComponentModel.CancelEventHandler(this.tbReconnectInterval_Validating);
334 | //
335 | // lblReconnectInterval
336 | //
337 | this.lblReconnectInterval.AutoSize = true;
338 | this.lblReconnectInterval.Location = new System.Drawing.Point(10, 175);
339 | this.lblReconnectInterval.Name = "lblReconnectInterval";
340 | this.lblReconnectInterval.Size = new System.Drawing.Size(122, 13);
341 | this.lblReconnectInterval.TabIndex = 8;
342 | this.lblReconnectInterval.Text = "Reconnect interval (ms):";
343 | //
344 | // tbCaptureInterval
345 | //
346 | this.tbCaptureInterval.Location = new System.Drawing.Point(143, 127);
347 | this.tbCaptureInterval.Name = "tbCaptureInterval";
348 | this.tbCaptureInterval.Size = new System.Drawing.Size(100, 20);
349 | this.tbCaptureInterval.TabIndex = 7;
350 | this.tbCaptureInterval.Validating += new System.ComponentModel.CancelEventHandler(this.tbCaptureInterval_Validating);
351 | //
352 | // lblCaptureInterval
353 | //
354 | this.lblCaptureInterval.AutoSize = true;
355 | this.lblCaptureInterval.Location = new System.Drawing.Point(10, 130);
356 | this.lblCaptureInterval.Name = "lblCaptureInterval";
357 | this.lblCaptureInterval.Size = new System.Drawing.Size(106, 13);
358 | this.lblCaptureInterval.TabIndex = 6;
359 | this.lblCaptureInterval.Text = "Capture interval (ms):";
360 | //
361 | // tbCaptureHeight
362 | //
363 | this.tbCaptureHeight.Location = new System.Drawing.Point(143, 86);
364 | this.tbCaptureHeight.Name = "tbCaptureHeight";
365 | this.tbCaptureHeight.Size = new System.Drawing.Size(100, 20);
366 | this.tbCaptureHeight.TabIndex = 5;
367 | this.tbCaptureHeight.Validating += new System.ComponentModel.CancelEventHandler(this.tbCaptureHeight_Validating);
368 | //
369 | // lblCaptureHeight
370 | //
371 | this.lblCaptureHeight.AutoSize = true;
372 | this.lblCaptureHeight.Location = new System.Drawing.Point(7, 89);
373 | this.lblCaptureHeight.Name = "lblCaptureHeight";
374 | this.lblCaptureHeight.Size = new System.Drawing.Size(79, 13);
375 | this.lblCaptureHeight.TabIndex = 4;
376 | this.lblCaptureHeight.Text = "Capture height:";
377 | //
378 | // tbCaptureWidth
379 | //
380 | this.tbCaptureWidth.Location = new System.Drawing.Point(143, 50);
381 | this.tbCaptureWidth.Name = "tbCaptureWidth";
382 | this.tbCaptureWidth.Size = new System.Drawing.Size(100, 20);
383 | this.tbCaptureWidth.TabIndex = 3;
384 | this.tbCaptureWidth.Validating += new System.ComponentModel.CancelEventHandler(this.tbCaptureWidth_Validating);
385 | //
386 | // lblCaptureWidth
387 | //
388 | this.lblCaptureWidth.AutoSize = true;
389 | this.lblCaptureWidth.Location = new System.Drawing.Point(7, 53);
390 | this.lblCaptureWidth.Name = "lblCaptureWidth";
391 | this.lblCaptureWidth.Size = new System.Drawing.Size(75, 13);
392 | this.lblCaptureWidth.TabIndex = 2;
393 | this.lblCaptureWidth.Text = "Capture width:";
394 | //
395 | // tbMessageDuration
396 | //
397 | this.tbMessageDuration.Location = new System.Drawing.Point(143, 15);
398 | this.tbMessageDuration.Name = "tbMessageDuration";
399 | this.tbMessageDuration.Size = new System.Drawing.Size(100, 20);
400 | this.tbMessageDuration.TabIndex = 1;
401 | this.tbMessageDuration.Validating += new System.ComponentModel.CancelEventHandler(this.tbMessageDuration_Validating);
402 | //
403 | // lblMessageDuration
404 | //
405 | this.lblMessageDuration.AutoSize = true;
406 | this.lblMessageDuration.Location = new System.Drawing.Point(7, 17);
407 | this.lblMessageDuration.Name = "lblMessageDuration";
408 | this.lblMessageDuration.Size = new System.Drawing.Size(119, 13);
409 | this.lblMessageDuration.TabIndex = 0;
410 | this.lblMessageDuration.Text = "Message duration (ms): ";
411 | //
412 | // btnSaveExit
413 | //
414 | this.btnSaveExit.Location = new System.Drawing.Point(563, 305);
415 | this.btnSaveExit.Name = "btnSaveExit";
416 | this.btnSaveExit.Size = new System.Drawing.Size(132, 45);
417 | this.btnSaveExit.TabIndex = 10;
418 | this.btnSaveExit.Text = "Save and close";
419 | this.btnSaveExit.UseVisualStyleBackColor = true;
420 | this.btnSaveExit.Click += new System.EventHandler(this.btnSaveExit_Click);
421 | //
422 | // lblVersion
423 | //
424 | this.lblVersion.AutoSize = true;
425 | this.lblVersion.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
426 | this.lblVersion.Location = new System.Drawing.Point(9, 321);
427 | this.lblVersion.Name = "lblVersion";
428 | this.lblVersion.Size = new System.Drawing.Size(82, 13);
429 | this.lblVersion.TabIndex = 11;
430 | this.lblVersion.Text = "Version: 0.01";
431 | //
432 | // SetupForm
433 | //
434 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
435 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
436 | this.ClientSize = new System.Drawing.Size(700, 353);
437 | this.Controls.Add(this.lblVersion);
438 | this.Controls.Add(this.btnSaveExit);
439 | this.Controls.Add(this.tabControl1);
440 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
441 | this.Name = "SetupForm";
442 | this.Text = "Setup";
443 | this.tabControl1.ResumeLayout(false);
444 | this.tabPageGeneric.ResumeLayout(false);
445 | this.tabPageGeneric.PerformLayout();
446 | this.tabPageAdvanced.ResumeLayout(false);
447 | this.tabPageAdvanced.PerformLayout();
448 | this.grpDeactivate.ResumeLayout(false);
449 | this.grpDeactivate.PerformLayout();
450 | this.ResumeLayout(false);
451 | this.PerformLayout();
452 |
453 | }
454 |
455 | #endregion
456 |
457 | private System.Windows.Forms.TabControl tabControl1;
458 | private System.Windows.Forms.TabPage tabPageGeneric;
459 | private System.Windows.Forms.TextBox tbProtoPort;
460 | private System.Windows.Forms.Label lblProtoPort;
461 | private System.Windows.Forms.TextBox tbIPHostName;
462 | private System.Windows.Forms.Label lblIPHostName;
463 | private System.Windows.Forms.TabPage tabPageAdvanced;
464 | private System.Windows.Forms.ComboBox cbNotificationLevel;
465 | private System.Windows.Forms.Label lblNotificationLevel;
466 | private System.Windows.Forms.ComboBox cbMonitorIndex;
467 | private System.Windows.Forms.Label lnlMonitorIndex;
468 | private System.Windows.Forms.ComboBox cbMessagePriority;
469 | private System.Windows.Forms.Label lblMessagePriority;
470 | private System.Windows.Forms.TextBox tbMessageDuration;
471 | private System.Windows.Forms.Label lblMessageDuration;
472 | private System.Windows.Forms.TextBox tbCaptureHeight;
473 | private System.Windows.Forms.Label lblCaptureHeight;
474 | private System.Windows.Forms.TextBox tbCaptureWidth;
475 | private System.Windows.Forms.Label lblCaptureWidth;
476 | private System.Windows.Forms.TextBox tbCaptureInterval;
477 | private System.Windows.Forms.Label lblCaptureInterval;
478 | private System.Windows.Forms.TextBox tbReconnectInterval;
479 | private System.Windows.Forms.Label lblReconnectInterval;
480 | private System.Windows.Forms.Button btnSaveExit;
481 | private System.Windows.Forms.Label lblApiPort;
482 | private System.Windows.Forms.TextBox tbApiPort;
483 | private System.Windows.Forms.CheckBox chkApiEnabled;
484 | private System.Windows.Forms.GroupBox grpDeactivate;
485 | private System.Windows.Forms.TextBox tbApiExcludeEnd;
486 | private System.Windows.Forms.Label lblEnd;
487 | private System.Windows.Forms.TextBox tbApiExcludeStart;
488 | private System.Windows.Forms.Label lblStart;
489 | private System.Windows.Forms.CheckBox chkApiExcludeTimesEnabled;
490 | private System.Windows.Forms.CheckBox chkCaptureOnStartup;
491 | private System.Windows.Forms.Label lblVersion;
492 | }
493 | }
--------------------------------------------------------------------------------
/HyperionScreenCap/SetupForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Reflection;
4 | using System.Windows.Forms;
5 | using SlimDX.Windows;
6 |
7 | namespace HyperionScreenCap
8 | {
9 | public partial class SetupForm : Form
10 | {
11 | public SetupForm()
12 | {
13 | InitializeComponent();
14 |
15 | // Automatically set the monitor index
16 |
17 | for (int i = 0; i < DisplayMonitor.EnumerateMonitors().Length; i++)
18 | {
19 | cbMonitorIndex.Items.Add(i);
20 | }
21 |
22 | LoadSettings();
23 |
24 | lblVersion.Text = Assembly.GetExecutingAssembly().GetName().Version.ToString();
25 | }
26 |
27 | private void LoadSettings()
28 | {
29 | try
30 | {
31 | Settings.LoadSetttings();
32 | tbIPHostName.Text = Settings.HyperionServerIp;
33 | tbProtoPort.Text = Settings.HyperionServerPort.ToString();
34 | cbMessagePriority.Text = Settings.HyperionMessagePriority.ToString();
35 | tbMessageDuration.Text = Settings.HyperionMessageDuration.ToString();
36 | tbCaptureWidth.Text = Settings.HyperionWidth.ToString();
37 | tbCaptureHeight.Text = Settings.HyperionHeight.ToString();
38 | tbCaptureInterval.Text = Settings.CaptureInterval.ToString();
39 | cbMonitorIndex.Text = Settings.MonitorIndex.ToString();
40 | tbReconnectInterval.Text = Settings.ReconnectInterval.ToString();
41 | chkCaptureOnStartup.Checked = Settings.CaptureOnStartup;
42 | tbApiPort.Text = Settings.ApiPort.ToString();
43 | chkApiEnabled.Checked = Settings.ApiEnabled;
44 | chkApiExcludeTimesEnabled.Checked = Settings.ApiExcludedTimesEnabled;
45 | tbApiExcludeStart.Text = Settings.ApiExcludeTimeStart.ToString("HH:mm");
46 | tbApiExcludeEnd.Text = Settings.ApiExcludeTimeEnd.ToString("HH:mm");
47 |
48 | cbNotificationLevel.Text = Settings.NotificationLevel.ToString();
49 | }
50 | catch (Exception ex)
51 | {
52 | MessageBox.Show($"Error occcured during LoadSettings(): {ex.Message}");
53 | }
54 | }
55 |
56 | private void btnSaveExit_Click(object sender, EventArgs e)
57 | {
58 | SaveSettings();
59 | }
60 |
61 | private void SaveSettings()
62 | {
63 | try
64 | {
65 | // Check if all settngs are valid
66 | if (ValidatorDateTime(tbApiExcludeStart.Text) == false)
67 | {
68 | MessageBox.Show("Error in excluded API start time", "Error in excluded API start time", MessageBoxButtons.OK, MessageBoxIcon.Error);
69 | return;
70 | }
71 | if (ValidatorDateTime(tbApiExcludeEnd.Text) == false)
72 | {
73 | MessageBox.Show("Error in excluded API end time", "Error in excluded API end time", MessageBoxButtons.OK, MessageBoxIcon.Error);
74 | return;
75 | }
76 |
77 |
78 | Settings.HyperionServerIp = tbIPHostName.Text;
79 | Settings.HyperionServerPort = int.Parse(tbProtoPort.Text);
80 | Settings.HyperionMessagePriority = int.Parse(cbMessagePriority.Text);
81 | Settings.HyperionMessageDuration = int.Parse(tbMessageDuration.Text);
82 | Settings.HyperionWidth = int.Parse(tbCaptureWidth.Text);
83 | Settings.HyperionHeight = int.Parse(tbCaptureHeight.Text);
84 | Settings.CaptureInterval = int.Parse(tbCaptureInterval.Text);
85 | Settings.MonitorIndex = int.Parse(cbMonitorIndex.Text);
86 | Settings.ReconnectInterval = int.Parse(tbReconnectInterval.Text);
87 | Settings.CaptureOnStartup = chkCaptureOnStartup.Checked;
88 | Settings.ApiPort = int.Parse(tbApiPort.Text);
89 | Settings.ApiEnabled = chkApiEnabled.Checked;
90 | Settings.ApiExcludedTimesEnabled = chkApiExcludeTimesEnabled.Checked;
91 | Settings.ApiExcludeTimeStart = DateTime.Parse(tbApiExcludeStart.Text);
92 | Settings.ApiExcludeTimeEnd = DateTime.Parse(tbApiExcludeEnd.Text);
93 |
94 | Settings.NotificationLevel =
95 | (Form1.NotificationLevels) Enum.Parse(typeof(Form1.NotificationLevels), cbNotificationLevel.Text);
96 |
97 | Settings.SaveSettings();
98 | Form1.Init(true);
99 | }
100 | catch (Exception ex)
101 | {
102 | MessageBox.Show($"Error occcured during SaveSettings(): {ex.Message}");
103 | }
104 |
105 | Close();
106 | }
107 |
108 | private static bool ValidatorInt(string input, int minValue, int maxValue, bool validateMaxValue)
109 | {
110 | bool isValid = false;
111 | int value;
112 | bool isInteger = int.TryParse(input, out value);
113 |
114 | if (isInteger)
115 | {
116 | //Only check minValue
117 | if (validateMaxValue == false && value >= minValue)
118 | {
119 | isValid = true;
120 | }
121 | //Check both min/max values
122 | else
123 | {
124 | if (value >= minValue && value <= maxValue)
125 | {
126 | isValid = true;
127 | }
128 | }
129 | }
130 | return isValid;
131 | }
132 |
133 | public Boolean ValidatorDateTime(string input)
134 | {
135 | DateTime dt;
136 | Boolean IsValid = false;
137 | bool isDateTime = DateTime.TryParse(input, out dt);
138 | if (isDateTime)
139 | {
140 | IsValid = true;
141 | }
142 |
143 | return IsValid;
144 | }
145 |
146 | private void tbProtoPort_Validating(object sender, CancelEventArgs e)
147 | {
148 | const int minValue = 1;
149 | const int maxValue = 65535;
150 | if (ValidatorInt(tbProtoPort.Text, minValue, maxValue, false) == false)
151 | {
152 | MessageBox.Show(@"Invalid integer filled for port");
153 | }
154 | }
155 |
156 | private void cbMessagePriority_Validating(object sender, CancelEventArgs e)
157 | {
158 | const int minValue = 0;
159 | const int maxValue = 0;
160 | if (ValidatorInt(cbMessagePriority.Text, minValue, maxValue, false) == false)
161 | {
162 | MessageBox.Show(@"Invalid integer filled for message priority");
163 | }
164 | }
165 |
166 | private void cbMonitorIndex_Validating(object sender, CancelEventArgs e)
167 | {
168 | const int minValue = 0;
169 | const int maxValue = 0;
170 | if (ValidatorInt(cbMonitorIndex.Text, minValue, maxValue, false) == false)
171 | {
172 | MessageBox.Show(@"Invalid integer filled for monitor index");
173 | }
174 | }
175 |
176 | private void tbMessageDuration_Validating(object sender, CancelEventArgs e)
177 | {
178 | const int minValue = -1;
179 | const int maxValue = 0;
180 | if (ValidatorInt(tbMessageDuration.Text, minValue, maxValue, false) == false)
181 | {
182 | MessageBox.Show(@"Invalid integer filled for message duration");
183 | }
184 | }
185 |
186 | private void tbCaptureWidth_Validating(object sender, CancelEventArgs e)
187 | {
188 | const int minValue = 0;
189 | const int maxValue = 0;
190 | if (ValidatorInt(tbCaptureWidth.Text, minValue, maxValue, false) == false)
191 | {
192 | MessageBox.Show(@"Invalid integer filled for capture width");
193 | }
194 | }
195 |
196 | private void tbCaptureHeight_Validating(object sender, CancelEventArgs e)
197 | {
198 | const int minValue = 0;
199 | const int maxValue = 0;
200 | if (ValidatorInt(tbCaptureHeight.Text, minValue, maxValue, false) == false)
201 | {
202 | MessageBox.Show(@"Invalid integer filled for capture height");
203 | }
204 | }
205 |
206 | private void tbCaptureInterval_Validating(object sender, CancelEventArgs e)
207 | {
208 | const int minValue = 0;
209 | const int maxValue = 0;
210 | if (ValidatorInt(tbCaptureInterval.Text, minValue, maxValue, false) == false)
211 | {
212 | MessageBox.Show(@"Invalid integer filled for capture interval");
213 | }
214 | }
215 |
216 | private void tbReconnectInterval_Validating(object sender, CancelEventArgs e)
217 | {
218 | const int minValue = 0;
219 | const int maxValue = 0;
220 | if (ValidatorInt(tbReconnectInterval.Text, minValue, maxValue, false) == false)
221 | {
222 | MessageBox.Show(@"Invalid integer filled for reconnect interval");
223 | }
224 | }
225 |
226 | private void tbApiPort_Validating(object sender, CancelEventArgs e)
227 | {
228 | const int minValue = 1;
229 | const int maxValue = 65535;
230 | if (ValidatorInt(tbApiPort.Text, minValue, maxValue, false) == false)
231 | {
232 | MessageBox.Show(@"Invalid integer filled for port");
233 | }
234 | }
235 |
236 | private void tbExcludeStart_Validating(object sender, System.ComponentModel.CancelEventArgs e)
237 | {
238 | if (ValidatorDateTime(tbApiExcludeStart.Text) == false)
239 | {
240 | MessageBox.Show("Error in excluded API start time", "Error in excluded API start time", MessageBoxButtons.OK, MessageBoxIcon.Error);
241 | }
242 | }
243 |
244 | private void tbExcludeEnd_Validating(object sender, System.ComponentModel.CancelEventArgs e)
245 | {
246 | if (ValidatorDateTime(tbApiExcludeEnd.Text) == false)
247 | {
248 | MessageBox.Show("Error in excluded API end time", "Error in excluded API end time", MessageBoxButtons.OK, MessageBoxIcon.Error);
249 | }
250 | }
251 | }
252 | }
253 |
--------------------------------------------------------------------------------
/HyperionScreenCap/SetupForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 |
123 | AAABAAIAICAAAAEAIACoEAAAJgAAABAQAAABACAAaAQAAM4QAAAoAAAAIAAAAEAAAAABACAAAAAAAIAQ
124 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
125 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
126 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
127 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
128 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
129 | AAEAAAABAAAAAgAAAAIAAAACAAAAAwAAAAMAAAADAAAAAwAAAAQAAAAEAAAABAAAAAMAAAADAAAAAwAA
130 | AAMAAAACAAAAAgAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
131 | AAEAAAAEAAAADAAAABIAAAAZAAAAHwAAACUAAAAqAAAALgAAADEAAAAzAAAANAAAADQAAAA0AAAAMgAA
132 | ADEAAAAuAAAAKgAAACUAAAAfAAAAGAAAABEAAAAIAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
133 | AAAAAAAAAAAAAgAAAAkAAAAVAAAAIAAAAC0AAAA6AAAARD8ABGl7AA6olwAb1psAKOGoADn/qABI/5sA
134 | UeGWAFzXegBVqjsALXAAAABPAAAARgAAADsAAAAwAAAAJAAAABQAAAAGAAAAAQAAAAAAAAAAAAAAAAAA
135 | AAAAAAAAAAAAAAAAAAAAAAABAAAABQAAAAwAAAASAAAAGnkEAFehAADOrgsR/7sVI//HHzr/ySNM/9At
136 | Y//QLnT/ySR8/8chiP+7FYz/rguM/6AAi9BzAGtcAAAAIgAAABwAAAAUAAAACgAAAAMAAAAAAAAAAAAA
137 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY0VAAekEACdsBcQ/70YFf/RLTD/0zM//9U5
138 | T//WPWD/2EFy/9hCg//WP5H/1Tyf/9M3q//RMbX/vRmt/7IQqv+nAKadewB+CAAAAAIAAAABAAAAAAAA
139 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChJwASoR8AwLAjDv/SPiz/1T01/9tB
140 | Qf/hTVT/5VVl/+hdef/qYYz/6mKd/+hfq//lWrf/4VHA/9tHx//VO8r/0jLP/68Osv+cAKfAlACoEgAA
141 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnjgACZ4vAMmtNQr/1Vgw/9xY
142 | Pv/kXE7/7GFd//Jrbf/2dYD/+HyS//qBpf/6grb/+H/D//Z60P/ycdn/7GXf/+RV3//bRtz/zDfV/50O
143 | sv+JAKfJgACoCQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACcQgCZslEP/9lz
144 | M//hdUP/63pW//N9aP/5gXf//IOD//2Lkf/+kqL//pWz//6Xw//+ldP//ZHg//yK6//5gPH/83Hy/+Rg
145 | 6//PTOH/ujvZ/40SuP9yAKiZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAmFMAM6Zb
146 | Dv/djjX/5JBE/+6UWP/2mGv//Jt8//6Zif//mpT//52f//+krv//qL7//6rP//+o3f//pOr//531//6T
147 | /P/3h/z/5nb2/9Fj7v+6TuT/pT3d/24Os/9aAKgzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
148 | AACVXQDAv4Uc/+SnQP/tq1P/97Fo//yyev/+sIn//6+W//+uov//rq3//7W6//+5yf//u9n//7nn//+1
149 | 8v//rfv//KL///GV/v/jh/z/z3X3/7Ze7f+eSuT/dCLH/0oAqMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
150 | AAAAAAAAkGsAMKF5Df/lvDz/7L9M//XFYf/7yHT//siF///HlP//xKL//8Ow///Cu///xcb//8rU///M
151 | 4v//yu///8X5//+7///1sP//6aL//9mT/v/Ggvv/sG71/5hY7P+CReX/RA2z/zQAqDAAAAAAAAAAAAAA
152 | AAAAAAAAAAAAAAAAAACLcwCEvKMf/+rQRP/y1lb/+dtp//3cfP//3I3//9qd///Yrf//17v//9XI///V
153 | 0///2t7//9zr///a9///0/7/+Mj//+y7///drf//zZ3//7qL/f+lePn/jmLy/3hO6v9LIsr/JACohAAA
154 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAId6AL3SxjD/7+NL//bpXf/87XH//u2C///tk///7KT//+q1///p
155 | xf//6NP//+ff///o6P//6vP//+j9//vf///v0///4cX//9G1///ApP//rZL+/5qA/P+Fa/b/blbv/002
156 | 2/8VAKi9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgX8A5OXjPv/08VH/+fZi//35dP//+4b///qW///5
157 | qP//+bn///jK///32v//9uj///Xy///2+v/98v//8+j//+Xa///Vyv//xLn//7Oo//+hlv//joT9/3tw
158 | +f9nXfT/UEXp/wkAqOQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6gAD57PFH//L3Vf/4/Gb/+v52//v/
159 | h//8/5j//f+q//3/u//+/8z//v/c//7/6v////b///////b2///q6v//3Nz//8zM//+7u///qqr//5iY
160 | //+Ghv7/dHT8/2Fh9/9QUPL/AACo+QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHOAAPnl9Er/7PtY/+/+
161 | Z//w/3j/8f+G//H/lv/y/6j/8v+5//P/yv/0/9r/9P/o//T/8v/2//r/8v3//+jy///a5P//ytX//7nD
162 | //+osv//lqH//4eR//91f/7/ZG77/1Jc9f8AB6f5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa4AA5NTu
163 | R//j/lr/5P9t/+P/eP/j/4P/4/+T/+P/pP/k/7X/5P/F/+X/0//l/9//6P/o/+r/9P/o//3/3/n//9Pt
164 | ///F3///tc///6S9//+TrP//h5///3uQ//9le/7/TmPx/wAPpeQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
165 | AABifgC9ud4+/9b/Wf/X/2//1f92/9P/fv/S/43/0v+d/9L/rf/T/7v/0//I/9X/0//a/9//3P/s/9r/
166 | +P/T/v//yPX//7vp//+t2v//ncn//424//+FrP//eqD//2OK//9CZej/ABqjvQAAAAAAAAAAAAAAAAAA
167 | AAAAAAAAAAAAAFl7AISUvy//yf9a/8v/cP/H/3j/wf95/8D/hv/A/5T/wP+i/8D/sP/B/7v/xf/G/8r/
168 | 1f/M/+T/yv/x/8X/+/+7/P//sPH//6Lk//+U1f//h8X//4S7//97r///Y5r//zBh0/8AJaGEAAAAAAAA
169 | AAAAAAAAAAAAAAAAAAAAAAAAUHgAMGSQE/+6/1j/v/90/77/fv+z/3f/rv99/6z/iv+s/5b/rP+i/67/
170 | rf+1/7r/uf/K/7v/2/+5/+n/tf/2/63//v+i+f//lu3//4rf//+D0///iMv//32///9fp///E02w/wAx
171 | nzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ3IAvYbHOf+x/3L/t/+G/6n/fP+d/3b/mf9//5j/
172 | iv+Z/5T/nf+f/6T/r/+o/8D/qv/R/6j/4P+k/+7/nf/5/5T+//+K9f//gen//4Xg//+N2v//eMn//zuP
173 | 2f8AQpy9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6bQAzT4kV/6L/Y/+z/47/q/+N/5X/
174 | ev+I/3b/hf99/4b/hv+N/5T/k/+k/5b/tv+Y/8f/lv/Y/5P/5/+N//P/hv/8/3/7//+D8v//k+z//5Tl
175 | //9n0v//FW2t/wBNmTMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsZwCZX6ku/6j/
176 | hP+8/6r/qv+c/43/g/98/3j/ef97/37/if+D/5z/hv+t/4f/vv+G/8//g//f/3//7P9///b/if/+/6H7
177 | //+t9v//iev//y6cw/8AXpWZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACVj
178 | AAkfYADJVaw0/6n/l//K/8T/u/+4/6H/of+P/5T/hP+T/3//m/97/6n/fP+5/4H/y/+I/93/kv/r/6X/
179 | 9v+6//3/xv7//5n5//80scP/AG2PyQBmkgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
180 | AAAAAAAAAAAAABldABITWgDAP6Eu/4f9ff+7/7r/1v/X/8z/0P+//8j/s//G/63/yv+t/9P/tP/f/8D/
181 | 7P/N//X/1//6/73/+/+A/vz/LrS5/wB4iMAAc4wSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
182 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5YAAYJVgCTHX0Z/0TDRf91/33/nv+p/8L/zf/K/9n/4//u/+T/
183 | 8P/K/+n/wv/s/5//6v93/+z/RdTI/xqfmv8AgH+TAHyEBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
184 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVAA8AFQDwA5sFv8xp0b/TtV0/1Tf
185 | if9o/av/aP24/1Tjrf9O3LD/MbqZ/w6Qd/8AgG/DAIB2PwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
186 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFcLIQBa
187 | EngAXRq9AGIjzABnLvwAbTn8AHJDzAB3T70Ae1l4AH9jIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
188 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
189 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
190 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
191 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
192 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////AAAP/AAAA/wAAAH8AAAD/wA
193 | AB/8AAA/+AAAH/gAAB/wAAAP8AAAD+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AAAAfgAAAH4AAAB+AA
194 | AAfwAAAP8AAAD/gAAB/4AAAf/AAAP/4AAH//gAH//+AH////////////KAAAABAAAAAgAAAAAQAgAAAA
195 | AABABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
196 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIUvHgFFFhIIShgZD00ZHxVOGiUZTxorG1AZ
197 | MRxNFzUaSxY5F0gVPBJEEj0LXhhdAgAAAAAAAAAAAAAAAAAAAAB2OiEEAAAAFB4BADZjAgWepQ0h37cU
198 | RPe3FGL3pA1x32ICUaMcABo/AAAAIUYYSwkAAAAAAAAAAAAAAAAAAAAAAAAAAKlCITa1IhLmzzAu/9tD
199 | Uf/gT3X/4FCX/9tHsP/PM7z/thS05pIRnTcAAAAAAAAAAAAAAAAAAAAAAAAAAKldICi1ShPx32dB/+9u
200 | Yv/4e4D/+4mj//uLw//4gd3/72ro/9ZK3/+bFrrxhSWvKAAAAAAAAAAAAAAAAAAAAACkZAq85JxD//Wj
201 | af/9pIn//6Sg//+uu///sdv//6jz//iU/f/adfX/rEzk/2EMsrwAAAAAAAAAAAAAAACpiiEty6or//PN
202 | W//90oD//8+g///Mu///z9L//9Ps//3G/f/prv//yY/9/55o8/9iMNP/WCy8LQAAAAAAAAAAp5slaObf
203 | Qv/68Wn//vOM///yrv//8M///+7o//7u+v/w3f//0r///7Cd/v+Kd/r/XEvp/0s2xWgAAAAAAAAAAJ6j
204 | KHzr9U//9P1u//b/jv/3/7H/+P/T//n/7v/3/P3/4uf//8LH//+gpf//fYL9/1le9v9AQMd8AAAAAAAA
205 | AACRpypo0fJO/9z/cv/a/4j/2v+o/9v/xv/f/97/4v/1/9P2//+43P//mLr//4Ce//9Wc/X/PE/FaAAA
206 | AAAAAAAAg6YqLZ7TPf/D/3b/uP98/7b/lf+2/67/v//H/8L/5v+4/vv/ou7//4rT//+Bvf//QXvg/zZf
207 | wi0AAAAAAAAAAAAAAABUixO7r/96/6H/fv+P/3//kv+T/53/sv+g/9T/mP/w/4j7/v+H6f//gNb//xRi
208 | rrsAAAAAAAAAAAAAAAAAAAAAYp8xKF6tOfG2/6j/mf+V/4L/iv+A/6P/gv/E/4f/5P+Z//n/q/r//zqp
209 | xfE3i7ooAAAAAAAAAAAAAAAAAAAAAAAAAABQmjY2O5wx5JLwlP+6/8P/w//V/8P/4v+7/+3/lPTq/zK0
210 | s+Q6oLI2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGC2WA8jfCl4H4w5zC+pYfEvr3jxH6J8zCCZ
211 | g3hWvrgPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
212 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAwAMAAMADAADgBwAAwAMAAMADAACAAQAAgAEAAIAB
213 | AACAAQAAgAEAAMADAADAAwAA4AcAAPAPAAD//wAA
214 |
215 |
216 |
--------------------------------------------------------------------------------
/HyperionScreenCap/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/HyperionScreenCap/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 hanselb
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # HyperionScreenCap
2 |
3 | Windows screen capture program for the [Hyperion](https://github.com/tvdzwan/hyperion) open-source Ambilight project.
4 |
5 | The program uses Direct3D9 to capture the screen, resize it and send it to the ProtoBuffer interface of Hyperion.
6 |
7 | ## Download
8 | [SetupHyperionScreenCap.exe](https://github.com/hanselb/HyperionScreenCap/releases/download/v1.4/SetupHyperionScreenCap.exe)
9 |
10 | ## Dependencies
11 |
12 | [DirectX End-User Runtime](https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=35)
13 |
14 | [Visual C++ Redistributable for Visual Studio 2012](https://www.microsoft.com/en-us/download/details.aspx?id=30679)
15 |
16 | [Microsoft Visual C++ 2010 Service Pack 1](https://www.microsoft.com/en-us/download/details.aspx?id=26999)
17 |
18 | [Microsoft Visual C++ 2008 Service Pack 1](https://www.microsoft.com/en-us/download/details.aspx?id=26368)
19 |
20 |
21 | ## Configuration
22 |
23 | Comes with setup form which is accessible via system tray, however manual config edit is also possible and below is an example HyperionScreenCap.exe.config :
24 |
25 | ```xml
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | ```
47 |
--------------------------------------------------------------------------------