Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
# Conflicts:
#	project.xml
  • Loading branch information
Aszusz committed Apr 27, 2023
2 parents 2e0b0b7 + 997aade commit 5e5504e
Show file tree
Hide file tree
Showing 51 changed files with 227 additions and 2,644 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/windows-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,20 @@ jobs:
makensis /DPRODUCT_VERSION=${{ steps.readversion.outputs.info }} Templates/installer/windows-installer-dev.nsi
- name: Sign installer
env:
CODESIGN_PWD: ${{ secrets.WIN_PASS}}
CODESIGN_BASE64: ${{ secrets.WIN_CERT}}
run: |
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate\cert.txt -Value $env:CODESIGN_BASE64
Set-Content -Path certificate\cert.txt -Value ${{ secrets.WIN_CERT }}
certutil -decode certificate\cert.txt certificate\cert.pfx
Import-PfxCertificate `
-FilePath certificate\cert.pfx `
-CertStoreLocation Cert:\CurrentUser\My `
-Password (ConvertTo-SecureString -String $env:CODESIGN_PWD -Force -AsPlainText)
-Password (ConvertTo-SecureString -String ${{ secrets.WIN_PASS }} -Force -AsPlainText)
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x86/signtool.exe' sign `
/debug `
/fd SHA256 `
/p $env:CODESIGN_PWD `
/p ${{ secrets.WIN_PASS }} `
/f certificate\cert.pfx `
/td sha256 `
/tr 'http://timestamp.digicert.com' `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<span class="tooltiptext">Open an Issue for Demo-Tasks</span>
</div>
<div class="tooltip">
<a href="https://github.com/Moonshine-IDE/Genesis-Super.Human.Installer/issues" target="_blank" class="menu">Super.Human.Installer<i class="fa fa-bug" aria-hidden="true"></i></a>
<a href="https://github.com/Moonshine-IDE/Super.Human.Installer/issues" target="_blank" class="menu">Super.Human.Installer<i class="fa fa-bug" aria-hidden="true"></i></a>
<span class="tooltiptext">Open an Issue for SHI</span>
</div>
<div class="tooltip">
Expand Down Expand Up @@ -66,13 +66,14 @@
<p>1) The existing Notes Client on your desktop by using File --> Application --> Open then using this server name:</p>
<p>&emsp;{{ settings.hostname }}.{{ settings.domain }}/{{ domino_organization }}</p>
<p>2) Your browser by accessing:</p>
<p>&emsp;<a href="https://domino.{{ settings.hostname }}.{{ settings.domain }}/portal.nsf" target="_blank">Portal -- https://domino.{{ settings.hostname }}.{{ settings.domain }}/portal.nsf</a></p>
<p>&emsp;<a href="https://domino.{{ settings.hostname }}.{{ settings.domain }}/Super.Human.Portal/js-release/index.html" target="_blank">Portal -- https://domino.{{ settings.hostname }}.{{ settings.domain }}/Super.Human.Portal/js-release/index.html</a></p>
<p>3) via Console:</p>
<p>&emsp;a) Press the Terminal button in the Super.Human.Installer application</p>
<p>&emsp;or</p>
<p>&emsp;b) Open the <a href="https://console.{{ settings.hostname }}.{{ settings.domain }}/system/terminal" target="_blank">Web Console</a> and login with the linux user credentials below</p>
<p>&emsp;b) Open the <a href="https://console.{{ settings.hostname }}.{{ settings.domain }}/system/" target="_blank">Web Console</a> and login with the linux user credentials below</p>
<p>&emsp;then</p>
<p>&emsp;To open the Domino console run <a href="#" onclick="CopyToClipboard('dom-console');return false;"><code id="dom-console">sudo domino console</code></a> </p>
<p>&emsp;For more advanced domino commands, visit <a href="https://www.nashcom.de/nshweb/pages/startscript.htm">Daniel Nash's Domino Script page here</a></p>
</div>
<hr>
<div class="section">
Expand Down Expand Up @@ -149,7 +150,7 @@
</li>
{% endif %}
<li>
<a href="https://console.{{ settings.hostname }}.{{ settings.domain }}/system/terminal" target="_blank">Web Console</a>
<a href="https://console.{{ settings.hostname }}.{{ settings.domain }}/system" target="_blank">Web Console</a>
</li>
</ul>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ hosts:
domino_organization: ::SERVER_ORGANIZATION:: #Default or Provide user option
safe_notes_id: ::USER_SAFE_ID:: #Variable or Provide user option
domino_admin_notes_id_password: "password"
genesis_packages:
- netmonitor
- SuperHumanPortal

## When using the default: demo.startcloud.com as the hostname and domain, we use the default-signed.crt certificates to provide a valid SSL
## If the hostname and domain, ie demo.startcloud.com do not match the certificate we provide (ie demo.startcloud.com in default-signed.crt), some services may not start (ie nomadweb)
Expand Down
9 changes: 8 additions & 1 deletion Assets/text/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@
"title":"Unsupported CPU",
"text":"The CPU architecture (%1) of this computer is currently not supported. We're constantly updating the application, please check back later for support for your CPU. Thank you",
"buttonok":"OK"
},
"crash":{
"title":"Crash Detected",
"text":"Super.Human.Installer crashed during the previous session. You can open and ispect the crash log, or you can create an issue on GitHub.",
"buttonopen":"Open Crash Log",
"buttongithub":"Create an issue on GitHub",
"buttonclose":"Close"
}
},
"console":{
Expand All @@ -77,7 +84,7 @@
"title":"Issues, problems, errors? Send us your log files",
"text":"<font color=\"#bbbbbb\">If you run into issues, experience errors using %1, you can email us your log files. Click the button below to locate %1's logs, and attach <font color=\"#ffffff\"><b>current.txt</b></font> and <font color=\"#ffffff\"><b>last.txt</b></font> to the email you'll be sending to <a href=\"mailto:support@prominic.net?subject=Problems using %1\"><font color=\"#4e84ff\"><b>support@prominic.net</b></font></a>. By sending us your log files, you accept %2's <a href=\"https://moonshine-ide.com/privacy-policy/\"><font color=\"#4e84ff\"><b>Privacy Policy</b></font></a></font>",
"button":"Open log file folder",
"visitgithub": "Open an issue on GitHub",
"visitgithub": "Create a new issue on GitHub",
"visitgithubtext": "Alternatively you can open a new issue in our public code repository"
},
"helppage":{
Expand Down
1 change: 1 addition & 0 deletions Genesis/GenesisApplication.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<haxelib name="openfl" />
<haxelib name="feathersui" />
<haxelib name="actuate" />
<haxelib name="champaign" />

<haxedef name="no-deprecation-warnings" />

Expand Down
108 changes: 100 additions & 8 deletions Genesis/Source/genesis/application/GenesisApplication.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@

package genesis.application;

import champaign.core.logging.Logger;
import champaign.core.primitives.VersionInfo;
import champaign.sys.logging.targets.FileTarget;
import champaign.sys.logging.targets.SysPrintTarget;
import feathers.controls.Application;
import feathers.controls.LayoutGroup;
import feathers.controls.navigators.PageItem;
Expand Down Expand Up @@ -57,17 +61,16 @@ import genesis.application.updater.GenesisApplicationUpdater;
import genesis.application.updater.GenesisApplicationUpdaterEvent;
import genesis.remote.GenesisRemote;
import genesis.remote.events.AuthEvent;
import haxe.Exception;
import lime.system.System;
import lime.ui.Window;
import openfl.Lib;
import openfl.events.Event;
import openfl.system.Capabilities;
import prominic.core.primitives.VersionInfo;
import prominic.logging.Logger;
import prominic.sys.applications.bin.Shell;
import prominic.sys.tools.SysTools;
import superhuman.config.SuperHumanGlobals;
import sys.FileSystem;
import sys.io.File;

#if buildmacros
@:build( BuildMacro.createGitInfo() )
Expand Down Expand Up @@ -95,6 +98,7 @@ abstract class GenesisApplication extends Application {
var _company:String;
var _content:LayoutGroup;
var _cpuArchitecture:CPUArchitecture;
var _crashLogTarget:FileTarget;
var _footer:Footer;
var _hasLogin:Bool;
var _header:Header;
Expand All @@ -118,6 +122,8 @@ abstract class GenesisApplication extends Application {
var _version:String;
var _versionInfo:VersionInfo;
var _window:Window;
var _startFilePath:String;
var _crashLogFilePath:String;

var _appConfigUseColoredOutput:Bool = false;
var _appConfigUseTimestamps:Bool = true;
Expand Down Expand Up @@ -177,7 +183,14 @@ abstract class GenesisApplication extends Application {
#if logmr _appConfigUseMachineReadable = true; #end
#end

var logFilePath = Logger.init( _appConfigDefaultLogLevel, _appConfigUseTimestamps, System.applicationStorageDirectory + "logs", 9, _appConfigUseColoredOutput, _appConfigUseMachineReadable, true );
Logger.init( _appConfigDefaultLogLevel, true );
Logger.addTarget( new SysPrintTarget( _appConfigDefaultLogLevel, _appConfigUseTimestamps, _appConfigUseMachineReadable, _appConfigUseColoredOutput ) );
var ft = new FileTarget( System.applicationStorageDirectory + "logs", "current.txt", 9, _appConfigDefaultLogLevel, _appConfigUseTimestamps, _appConfigUseMachineReadable );
Logger.addTarget( ft );

// Crash related features
_startFilePath = System.applicationStorageDirectory + "start";
_crashLogFilePath = System.applicationStorageDirectory + "logs/crash.txt";

_hasLogin = hasLogin;
_showLoginPage = hasLogin && showLoginPage;
Expand All @@ -186,10 +199,10 @@ abstract class GenesisApplication extends Application {
_version = Lib.application.meta.get( "version" );
_versionInfo = _version;

if ( FileSystem.exists( logFilePath ) )
Logger.info( '${this}: Log file created at ${logFilePath}' )
if ( FileSystem.exists( ft.currentLogFilePath ) )
Logger.info( '${this}: Log file created at ${ft.currentLogFilePath}' )
else
Logger.warning( '${this}: Log file creation failed at ${logFilePath}' );
Logger.warning( '${this}: Log file creation failed at ${ft.currentLogFilePath}' );

Logger.info( '${this}: Initializing ${_title} v${_version}...' );

Expand All @@ -206,6 +219,8 @@ abstract class GenesisApplication extends Application {
Logger.info( #if debug '${this}: Debug build: true' #else '${this}: Debug build: false' #end );
Logger.debug( '${this}: Application storage directory: ${System.applicationStorageDirectory}' );

ApplicationMain.onException.add( _onHaxeException );

this.disabledAlpha = .5;

LanguageManager.getInstance().load( LANGUAGE_FILE );
Expand Down Expand Up @@ -362,6 +377,18 @@ abstract class GenesisApplication extends Application {
if ( _updaterAddress != null ) _updater.checkUpdates( _updaterAddress );
#end

if ( _startFileExists() ) {

_showCrashAlert();

} else {

_createCrashLog();

}

_createStartFile();

}

function _updateFound( e:Event ) {
Expand Down Expand Up @@ -468,7 +495,11 @@ abstract class GenesisApplication extends Application {

}

function _onExit( exitCode:Int ) {}
function _onExit( exitCode:Int ) {

_deleteStartFile();

}

function _onWindowClose() {}

Expand Down Expand Up @@ -500,6 +531,8 @@ abstract class GenesisApplication extends Application {

function _visitSourceCodeIssues( ?e:Dynamic ) {}

function _visitSourceCodeNewIssue( ?e:Dynamic ) {}

function _menuSelected( e:GenesisApplicationEvent ) {

this.selectedPageId = e.pageId;
Expand All @@ -520,4 +553,63 @@ abstract class GenesisApplication extends Application {

function _pageChanged() { }

function _onHaxeException( e:Dynamic ):Void {

_createCrashLog();

if ( Std.isOfType( e, Exception ) ) {

Logger.fatal( 'Fatal exception : ${e}\nDetails : ${e.details()}\nNative : ${e.native}\nStack : ${e.stack}' );

} else {

Logger.fatal( 'Fatal error: ${e}' );

}

}

function _createStartFile() {

try {
File.saveContent( _startFilePath, Date.now().toString() );
} catch ( e ) {}

}

function _deleteStartFile() {

try {

FileSystem.deleteFile( _startFilePath );

} catch ( e ) {}

}

function _startFileExists() {

return FileSystem.exists( _startFilePath ) && !FileSystem.isDirectory( _startFilePath );

}

function _showCrashAlert() {}

function _createCrashLog() {

if ( _crashLogTarget == null ) {

_crashLogTarget = new FileTarget( System.applicationStorageDirectory + "logs", "crash.txt", 0, LogLevel.Fatal, true, false, true );
Logger.addTarget( _crashLogTarget );

}

}

function _openCrashLog() {

Shell.getInstance().open( [ _crashLogFilePath ] );

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class GenesisApplicationTheme extends ClassVariantTheme {

public static function getAssetPath( id:String ):String {

return System.applicationDirectory + Assets.getPath( id );
return Assets.getPath( id );

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

package genesis.application.updater;

import champaign.core.logging.Logger;
import champaign.core.primitives.VersionInfo;
import genesis.application.updater.GenesisApplicationUpdaterInfo;
import haxe.Json;
import haxe.io.Path;
Expand All @@ -46,8 +48,6 @@ import openfl.net.URLLoader;
import openfl.net.URLLoaderDataFormat;
import openfl.net.URLRequest;
import openfl.utils.ByteArray;
import prominic.core.primitives.VersionInfo;
import prominic.logging.Logger;
import prominic.sys.applications.bin.Shell;
import sys.FileSystem;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

package genesis.application.updater;

import prominic.core.primitives.VersionInfo;
import champaign.core.primitives.VersionInfo;

typedef GenesisApplicationUpdaterInfo = {

Expand Down
Loading

0 comments on commit 5e5504e

Please sign in to comment.