-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from RudolfJan/Installer
Prepared for alpha release v0.1
- Loading branch information
Showing
37 changed files
with
3,819 additions
and
64 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
All contents in this package are licensed under following Creative Common license: | ||
|
||
CC Attribution-NonCommercial-ShareAlike (CC BY-NC-SA) | ||
|
||
This license lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under identical terms. | ||
|
||
The content is provided "as-is" and by using it you agree the author is NOT liable in any form for the use of this software. Usage is completely at your onw risk. | ||
|
||
You are NOT entitled any form of support, though feedback is welcome. | ||
|
||
You understand that Dovetail Games Ltd or any related company is NOT involved in this software package by any means and cannot be held responsible for the use of this software. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
All contents in this package are licensed under following Creative Common license: | ||
|
||
CC Attribution-NonCommercial-ShareAlike (CC BY-NC-SA) | ||
|
||
This license lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creations under identical terms. | ||
|
||
The content is provided "as-is" and by using it you agree the author is NOT liable in any form for the use of this software. Usage is completely at your onw risk. | ||
|
||
You are NOT entitled any form of support, though feedback is welcome. | ||
|
||
You understand that Dovetail Games Ltd or any related company is NOT involved in this software package by any means and cannot be held responsible for the use of this software. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
TimetableTool | ||
|
||
TimetableTool is a toolkit to help you to design timetables for transportation simulators. The tool is NOT suitable to design timetables for real world application and should not nbe used for this purpose. | ||
This tool is NOT free, if you use it on a regular basis, you are supposed to donate to the author: | ||
|
||
Euro 5 for private non-commercial use | ||
Euro 25 per user per year for professional use. | ||
|
||
Check out http:/www.hollandhiking.nl/trainsimulator for other tools and documentation for TSW and TrainSimulator. | ||
|
||
Installation instructions: | ||
- Use the installer to install | ||
- Read the manual, which you can find in your Documents folder in the folder TimetableTool. | ||
The tool comes with two demo timetables. | ||
|
||
See the manual for details. | ||
|
||
Version history: | ||
|
||
Version 0.1 | ||
First public alpha version. This version is intended for review and feedback purposes only. |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
TimetableTool | ||
|
||
TimetableTool is a toolkit to help you to design timetables for transportation simulators. The tool is NOT suitable to design timetables for real world application and should not nbe used for this purpose. | ||
This tool is NOT free, if you use it on a regular basis, you are supposed to donate to the author: | ||
|
||
Euro 5 for private non-commercial use | ||
Euro 25 per user per year for professional use. | ||
|
||
Check out http:/www.hollandhiking.nl/trainsimulator for other tools and documentation for TSW and TrainSimulator. | ||
|
||
Installation instructions: | ||
- Use the installer to install | ||
- Read the manual, which you can find in your Documents folder in the folder TimetableTool. | ||
The tool comes with two demo timetables. | ||
|
||
See the manual for details. | ||
|
||
Version history: | ||
|
||
Version 0.1 | ||
First public alpha version. This version is intended for review and feedback purposes only. |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
; Script generated by the Inno Script Studio Wizard. | ||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||
|
||
#define MyAppName "TimetableTool" | ||
#define MyAppVersion "0.1 alpha" | ||
#define MyAppPublisher "Holland Hiking" | ||
#define MyAppURL "http://www.hollandhiking.nl/trainsimulator" | ||
#define MyAppExeName "TimetableTool.exe" | ||
; #define DataDirName= "{code:GetDataDir}" | ||
; #define DefaultDirName="{code:GetInstallDir}" | ||
|
||
[Setup] | ||
; NOTE: The value of AppId uniquely identifies this application. | ||
; Do not use the same AppId value in installers for other applications. | ||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) | ||
AppId={{0C16F964-B19F-4E40-AFF0-F5AFB66EED9E} | ||
AppName={#MyAppName} | ||
AppVersion={#MyAppVersion} | ||
AppPublisher={#MyAppPublisher} | ||
AppPublisherURL={#MyAppURL} | ||
AppSupportURL={#MyAppURL} | ||
AppUpdatesURL={#MyAppURL} | ||
DefaultDirName={pf}\{#MyAppName} | ||
DefaultGroupName={#MyAppName} | ||
AllowNoIcons=yes | ||
LicenseFile=License.txt | ||
InfoBeforeFile=Readme.txt | ||
OutputDir= Output | ||
OutputBaseFilename=TimetableToolSetup | ||
Compression=lzma | ||
SolidCompression=yes | ||
WizardImageFile=Setup.bmp | ||
WizardImageBackColor=clInfoBk | ||
WizardImageStretch=False | ||
AppCopyright=2020 Rudolf Heijink | ||
DisableWelcomePage=no | ||
DisableDirPage=no | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
|
||
[Tasks] | ||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked | ||
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1 | ||
|
||
[Files] | ||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\TimetableTool.exe"; DestDir: "{app}"; DestName: "{#MyAppExeName}" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\appsettings.json"; DestDir: "{app}" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\TimetableTool.runtimeconfig.json"; DestDir: "{app}" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\TimetableTool.deps.json"; DestDir: "{app}" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\*.dll"; DestDir: "{app}" | ||
Source: "..\Manual\TimetableTool Manual.pdf"; DestDir: "{userdocs}\TimetableTool" | ||
Source: "..\TimetableTool.Desktop\appsettings.json"; DestDir: "{app}" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\SQL\*.sql"; DestDir: "{app}\SQL" | ||
Source: "TimetableDb.db"; DestDir: "{userdocs}\TimetableTool" | ||
Source: "*.txt"; DestDir: "{userdocs}\TimetableTool" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\runtimes\win-x86\native\netstandard2.0\SQLite.Interop.dll"; DestDir: "{app}\runtimes\win-x86\native\netstandard2.0" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\runtimes\win-x86\native\sni.dll"; DestDir: "{app}\runtimes\win-x86\native" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\cs-CZ\Xceed.Wpf.AvalonDock.resources.dll"; DestDir: "{app}\cs-CZ" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\de\Xceed.Wpf.AvalonDock.resources.dll"; DestDir: "{app}\de" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\es\Xceed.Wpf.AvalonDock.resources.dll"; DestDir: "{app}\es" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\fr\Xceed.Wpf.AvalonDock.resources.dll"; DestDir: "{app}\fr" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\hu\Xceed.Wpf.AvalonDock.resources.dll"; DestDir: "{app}\hu" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\pt-BR\Xceed.Wpf.AvalonDock.resources.dll"; DestDir: "{app}\pt-BR" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\it\Xceed.Wpf.AvalonDock.resources.dll"; DestDir: "{app}\it" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\ro\Xceed.Wpf.AvalonDock.resources.dll"; DestDir: "{app}\ro" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\ru\Xceed.Wpf.AvalonDock.resources.dll"; DestDir: "{app}\ru" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\sv\Xceed.Wpf.AvalonDock.resources.dll"; DestDir: "{app}\sv" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\ro\Xceed.Wpf.AvalonDock.resources.dll"; DestDir: "{app}\ro" | ||
Source: "..\TimetableTool.Desktop\bin\Release\netcoreapp3.1\zh-Hans\Xceed.Wpf.AvalonDock.resources.dll"; DestDir: "{app}\zh-Hans" | ||
|
||
|
||
[Icons] | ||
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" | ||
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" | ||
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" | ||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon | ||
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon | ||
|
||
[Code] | ||
[Run] | ||
Filename: "{app}\{#MyAppExeName}"; Flags: nowait postinstall skipifsilent 32bit; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}" | ||
|
||
[Registry] | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
async Task checkForSquirrelUpdates() | ||
{ | ||
try { | ||
var (exitCode, output) = await RunSquirrel("--update https://example.org/updates"); | ||
|
||
if (exitCode != 0) { | ||
// TODO: Log update errors to Sentry | ||
this.Log().Warn($"Failed to update! {output}"); | ||
} | ||
} catch (Exception ex) { | ||
this.Log().Error(ex, $"Failed to invoke Update.exe"); | ||
} | ||
} | ||
|
||
public Task<(int exitCode, string output)> RunSquirrel(string args) | ||
{ | ||
string updateDotExe; | ||
try { | ||
updateDotExe = Path.GetFullPath("../Update.exe", Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)); | ||
|
||
if (!File.Exists(updateDotExe)) throw new Exception("update.exe doesn't exist"); | ||
} catch (Exception ex) { | ||
this.Log().Warn(ex, $"Update.exe not found, this is probably not a deployed app"); | ||
return Task.FromException<(int, string)>(new Exception("Not a deployed app")); | ||
} | ||
|
||
return invokeProcessAsync(updateDotExe, args, CancellationToken.None, Path.GetDirectoryName(updateDotExe)); | ||
} | ||
|
||
public bool IsAppDeployed() | ||
{ | ||
var updateDotExe = Path.GetFullPath("../Update.exe", Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)); | ||
return File.Exists(updateDotExe); | ||
} | ||
|
||
static Task<(int exitCode, string output)> invokeProcessAsync(string fileName, string arguments, CancellationToken ct, string workingDirectory = "") | ||
{ | ||
var psi = new ProcessStartInfo(fileName, arguments); | ||
|
||
psi.UseShellExecute = false; | ||
psi.WindowStyle = ProcessWindowStyle.Hidden; | ||
psi.ErrorDialog = false; | ||
psi.CreateNoWindow = true; | ||
psi.RedirectStandardOutput = true; | ||
psi.RedirectStandardError = true; | ||
psi.WorkingDirectory = workingDirectory; | ||
|
||
return invokeProcessAsync(psi, ct); | ||
} | ||
|
||
static async Task<(int exitCode, string output)> invokeProcessAsync(ProcessStartInfo psi, CancellationToken ct) | ||
{ | ||
var pi = Process.Start(psi); | ||
await Task.Run(() => { | ||
while (!ct.IsCancellationRequested) { | ||
if (pi.WaitForExit(2000)) return; | ||
} | ||
|
||
if (ct.IsCancellationRequested) { | ||
pi.Kill(); | ||
ct.ThrowIfCancellationRequested(); | ||
} | ||
}); | ||
|
||
string textResult = await pi.StandardOutput.ReadToEndAsync(); | ||
if (String.IsNullOrWhiteSpace(textResult) || pi.ExitCode != 0) { | ||
textResult = (textResult ?? "") + "\n" + await pi.StandardError.ReadToEndAsync(); | ||
|
||
if (String.IsNullOrWhiteSpace(textResult)) { | ||
textResult = String.Empty; | ||
} | ||
} | ||
|
||
return (pi.ExitCode, textResult.Trim()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.