Desktop app deploy

Hello,
I have created simple Desktop App with Vue.js and server.dll in /plugins folder.
App is published on https://github.com/dejanadamovic/boxfront and installed locally with app open https://github.com/dejanadamovic/boxfront

I can run application with app run boxfront and update application with app open https://github.com/dejanadamovic/boxfront

Questions:

  1. If app contains some local data in same folder, how to preserve that data after updating
  2. Is it possible to put application in private repository
  3. Can GitLab be used instead of GitHub

Thanks,
Dejan

You would need to save it in a separate folder, e.g:

var homeDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
var appDir = Path.Combine(homeDir, ".boxfront");
var appPrefs = Path.Combine(appDir, "app.prefs");

For small state Iā€™d just store in a serailized JSON file, for larger apps youā€™d consider using an SQLite db.

Yes see this StackOverflow Answer for how to configure your GitHub Token, e.g. by specifying it with -token {GITHUB_TOKEN} on the command-line or by setting the GITHUB_TOKEN Environment variable.

Previously you could only run it with the full URL:

$ app open https://github.com/dejanadamovic/boxfront

But in the latest version (0.0.52) just released Iā€™ve also added support for the short-hand:

$ app open dejanadamovic/boxfront

No, all tools are very much tied to GitHub only for most of their features.

Ok, thanks for detail explanation.

Private repository is working fine when setting enviroment variable (specifying -token doesnā€™t work).

I have two more questions:

  1. app shortcut %HOMEPATH%\.sharp-apps\boxfront\app.settings create shortcut in that folder not on user desktop
  2. Is there a way to install app without starting it (app open dejanadamovic/boxfront will download and start app)

It does when flags are at the start of the command, e.g:

$ app -token {GITHUB_TOKEN} open dejanadamovic/boxfront

But in the latest version (0.0.53) it now processes flags after the command so this should work:

$ app open dejanadamovic/boxfront -token {GITHUB_TOKEN}

Yes thatā€™s what {tool} install does, but it didnā€™t work for the shorthand, but does now so with the latest version you can now do:

$ app install dejanadamovic/boxfront

Thatā€™s right, itā€™s a tool to help automate installation, not to impose an opinion across all OSā€™s. Iā€™d recommend changing into the working directory, doing any customizations you need in the apps directory, e.g

$ app install dejanadamovic/boxfront -token {GITHUB_TOKEN}
$ pushd %HOMEPATH%\.sharp-apps\boxfront\
$ app shortcut
$ move Boxfront.lnk %HOMEPATH%\Desktop 
$ popd

Thank you.
Install, update, uninstall and create shortcut now works as expected.

One more thing :slightly_smiling_face: , I have this code in app.settings:

name BoxFront
debug false
CefConfig { Width:1550, Height:780, HideConsoleWindow:true }
CefConfig.CefSettings { LogSeverity:ā€˜Disableā€™ }

Console window is stil showing when app is starting and closing.
Also logging (info) is active in console although I have disabled logging.

Iā€™m trying to make app behave like regular desktop app, so console window is not desired behavior.
One more thing I have noticed - terminating app is slow, Iā€™m not sure is this related to my computer or .net core or servicestack?

Is it because youā€™re using a custom command prompt?

Does opening spirals hide the console window (does for me using both command line + with shortcut):

$ app open spirals

In latest (0.0.54) it should no longer log when not in DebugMode or Production.

Itā€™s a mixture of CefConfig shutting down the Chromium processes and .NET Core stopping the server, donā€™t know which is the major culprit.

Iā€™ll have to play around with it a bit more, I might be able to do minimize the console window to hide it out of view moreā€¦

No problem, I will wait for one more release :slightly_smiling_face: - thank you for very fast response.
Iā€™m currently creating proof of concept front-end application that needs to be installed on computers in gas stations with touch screen, something like ATM but for delivering packages.

Front-end application needs to comunicate with server and open lockers connected with controller over RS232 interface.
I need to implement on demand and automatic update mechanism, app tool with small applicaion size seems like perfect fit for this.
App will be running 24/7 so stability is crucial.
Server side is allready implemented with ServiceStack and currently in test phase.

Cool, hopes the POC works out well and it has enough resources to run Chromium.

The latest version (0.0.55) should work better, it now creates a Shortcut that runs in a minimum window and the Console Window doesnā€™t get restored until after Kestrel has shutdown, with this combined with:

debug false
CefConfig { width:1100, height:900, HideConsoleWindow:true }

I wasnā€™t able to see the Console Window when starting or quiting the app.

Yes, now it is much better.
Thanks once more.

1 Like

Hi Mythz,
Is there a way to launch app in full screen mode without window title bar?

ok required delving into Win32 land, but Iā€™ve added a Kiosk mode (in latest 0.0.56), e.g:

CefConfig { Kiosk:true }

Where it should open maximized at fullscreen without the title bar.

Itā€™s pretty cool, just added it in a new https://github.com/mythz/spirals-kiosk - with this you can now open an app from an external GitHub repo with a single command :slight_smile:

$ app open mythz/spirals-kiosk
1 Like

:exploding_head: :upside_down_face:
This is super fast excellent support.
ServiceStack has become my default framework for all web projects, and with this experience maybe even for desktop apps.
Thank you.

When running this line I get this errormessage (command line and powershell) (fresh installation of app)
app open mythz/spirals-kiosk

Hi Mythz, Iā€™m sorry but I see one more thing that is problem in kiosk mode, and since you already solved every issue so far, I hope that you could cover this one too.

In kiosk mode, on the right side there is vertical bar in entire screen height. First I thought that it is some css issue, but when i enabled scrollbars trough page css scrollbar appeared left to it.
I cannot be sure what is it but it behaves like browser not stretched across entire canvas, or (more probably) it could be winform vertical scrollbar?
Same behavior shows on your spirals-kiosk app.

I can confirm that on clean installation I can reproduce this issue.
Fresh installation of dotnet tool app

error

hmmm Iā€™m seeing none of these issues, and itā€™s weird cause it looks like it can see the installation files, just canā€™t read them. Does it work if you cd into the app directory, then try running it? e.g:

$ cd %HOMEPATH%\.sharp-apps\spirals-kiosk
$ app

Can you also try installing the app first then running (may be an issue with AntiVirus trying to use files immediately), e.g:

$ app install mythz/spirals-kiosk
$ app run

If itā€™s still an issue, can you run with the verbose flag to see if that highlights any issues:

$ cd %HOMEPATH%\.sharp-apps\spirals-kiosk
$ app

@masterit

Iā€™m not seeing the scrollbar when I run it, so not sure what to look at to try resolve it, but Iā€™ve just added:

::-webkit-scrollbar {
    display: none;
}

Can you let me know if itā€™s still an issue running the latest app, i.e:

$ app open mythz/spirals-kiosk

I checked the directory c:\users\marco\ and it does not include a .sharp-apps directory after using the install or open command (app open mythz/spirals-kiosk)

Just started the app, please look at attached image. Right side of the screen - gray rectangle:

Please zoom image, it is visible in upper right corner and it goes all the way down.

Definitelly is not html/css-caused, it looks like sort of Winforms ā€œplaceholderā€ for vertical scrollbar.