На главнуюКонтактыКарта сайта
В коробке инженера
В коробке инженера
Обзоры программ, интересных блогов и программирование
Заметки о Rastrwin, Matlab
  • Twitter Colee

Matlab: Splash screen for Matlab Standalone applications

Суббота, 10 января 2015 г.

Language: English | Русский

With Matlab deployment tool one can create Matlab Standalone applications, which can be executed without Matlab (only Matlab runtime library needed). Launching Matlab Standalone application requires some time (about several seconds for the first run). In the meantime Matlab does not show any signals, that the Standalone is loading. So some time user can not understand, what's happening: whether the standalone is starting or not. More info about this problem can be found here. There is a solution - splash screen, auxiliary popup window, that is created without Matlab, that is waiting for loading Matlab standalone and can display some progress information. This solution from Yair Altman is not free. Here you can find a free solution written with Autoit3.

SplashScreenApp program

The idea of a auxiliary program SplashScreenApp is taken from Yair Altman Splash window for deployed applications. We create a program, that will do following things

  1. Run main Matlab standalone application.
  2. Show popup window, that will display some information to user
  3. The spash-screen window will be waiting and searching for the Matlab standalone window. When the Matlab Standalone window is found, the splash application is closed.
SplashScreenApp is written in AutoIt3 and with Aut2exe the script is converted to the executable.

It is very simple to write programms in AutoIt3 (specially with the existed solution for gif-animation GIFAnimation.au3 from trancexx GIF in AutoIt). That is why the features of SplashScreenApp duplicate all the features of Yair Altman solution, and the are some new features:

  • settings of SplashScreenApp are inside ini-file (new),
  • you can choose the size of the SplashScreenApp popup window,
  • you can choose the background image of SplashScreenApp,
  • you can choose gif-file with loading-loop animation (new),
  • you can create arbitrary message, that will be displayed in the SplashScreenApp window (new)
SplashScreenApp

SplashScreenApp Syntax

SplashScreenApp.exe

SplashScreenApp.exe "PathToConfigIni"

SplashScreenApp.exe "PathToConfigIni" "Param1" Param2"

 

SplashScreenApp.exe  reads settings from the default config file splash_config.ini, that must be in the current directory

SplashScreenApp.exe "PathToConfigIni"  reads settings from the config file with full path PathToConfigInipath

SplashScreenApp.exe "PathToConfigIni" "Param1" Param2"  the settings are taken from the file with filepath PathToConfigInipath, parameters Param1 and Param2 are transfered to the main Matlab Standalone

SplashScreenApp Settings

By default the config-file of the SplashScreenApp.exe splash_config.ini must be in the current directory. All program settings are separeted into the following 3 sections inside ini-file.

[Application] section - Main Matlab Standalone settings

  • exe_path
  • Contains the fullpath in quotes "" to the main Matlab Standalone

  • exe_fig_title
  • Contains the string in quotes "" with the Title of the Matlab Stanalone window. SplashScreenApp will be searching for this string in the title of all windows. The searching mentod is defined by the parameter [Options]-WinTitleMatchMode

[Gui] section - Settings for the SplashScreenApp popup window
  • gui_width and gui_height
  • Sets the sizes of the SplashScreenApp popup window. The background image will be scaled for the new size of the window. This parameters can be omitted (you can comment this lines). By default the size of the SplashScreenApp windows is equal to the size of the background image.

  • background_path
  • Fullpath to the background image. Formats gif, png, bmp, jpg are supported. For the image with transparency it is better to use gif-file.

  • loading_loop_path
  • Fullpath to the loading-loop file. If loading_loop_path= , the progressbar will be not shown. You can set sizes of the progressbar and it's left/right alignment (keys loop_width, loop_height, loop_left_shift (shift from left border), loop_right_shift (shift from right border), units - pixels)

  • info_str
  • The information-string in the bottom of the popup-window

    For example, info_str="Please, wait...\nApplication is loading"

    Symbol \n denotes the new-line symbol.

    The setting of the information-string are regulated with the following parameters (can be omitted):

    info_str_clr (color), info_str_fontname (font), info_str_fontsize (font size), info_str_fontweight (font style), info_str_fontattribute (italic, underline), info_str_alignment (alignment), info_string_shift (shift of the string relative to the progressbar), info_string_left_shift (left shift), info_string_right_shift (right shift).

  • loading_loop_shift_bottom
  • Shift of the progress bar from the bottom border of the window.

Section [Options] - Internal settings

  • WinTitleMatchMode 
  • The method for searching for matching of exe_fig_title and title string.

    1 = Match the title from the start

    2 = Match any substring in the title

    3 = Exact title match

    -1 to -3 = Case insensitive match according to the other type of match.

  • msg_timeout
  • Time in seconds, after which the SplashScreenApp notification message will be closed (by default 10 seconds)

  • exe_timeout
  • Time in seconds, during which SplashScreenApp will search for the Matlab Standalone application. If during this time the StandAlone window will be not found, then SplashScreenApp will display a notification message.

SplashScreenApp Tips

  1. You can create different shortcuts for SplashScreenApp with different settings for the Matlab StandAlone.
  2. You can distribute SplashScreenApp.exe together with the Matlab Standalone; you can rename SplashScreenApp.exe.
  3. If you want to change SplashScreenApp.exe icon, you need recompile source AutoIt3-files with Aut2exe.
  4. Loading-loop file can be created with the online-tool http://ajaxload.info.
  5. Background image for the SplashScreenApp can be created with PowerPoint.
  6. With AutoIt3 Aut2Exe you can change SplashScreenApp.exe icon (free icons can be found on https://www.iconfinder.com)
  7. SplashScreenApp can be used not only for Matlab applications улыбка
Download

SplashWindowApp.exe

SplashScreenApp.zip 16

Test program

RunTest_Exe.zip 8

Source files SplashScreenApp, AutoIt3

SplashScreenApp_source.zip 10

Поделиться с друзьями:
twitter.com facebook.com vkontakte.ru odnoklassniki.ru mail.ru ya.ru digg.com blogger.com livejournal.ru google.com yandex.ru del.icio.us
Оставьте комментарий!

Используйте нормальные имена

Ваш E-mail не публикуется, используется для обратной связи и для выбора аватара с сайта gravatar.com

Публикуется вместе с комментарием

усмешка LOL сыр улыбка подмигнуть ухмылка глаза в сторону в тупике удивление большое удивление малинка пустое лицо сдвинутая бровь Оо гррр ох ох неудачник смущенный больной Тау хммм бешенный злой клевый поцелуй шок крутой недовольный

Запрещается оскорблять окружающих и использовать ненормативную лексику

Вы должны включить JavaScript, чтобы оставить сообщение