From c4d21acf5228d6dc7fb8d158ba24c370c822f0bf Mon Sep 17 00:00:00 2001 From: fredvs Date: Mon, 18 Apr 2022 13:38:57 +0200 Subject: [PATCH] Added in Config-form: Use libraries from system vs libraries from Strumpract release. (5) --- src/drums.pas | 2 +- src/errorform.mfm | 44 ++++++++++++++ src/errorform.pas | 18 ++++++ src/errorform_mfm.pas | 52 +++++++++++++++++ src/main.pas | 19 ++++++ src/strumpract.prj | 130 +++++++++++++++++++++++++++++------------- 6 files changed, 225 insertions(+), 40 deletions(-) create mode 100644 src/errorform.mfm create mode 100644 src/errorform.pas create mode 100644 src/errorform_mfm.pas diff --git a/src/drums.pas b/src/drums.pas index c9d7349..5f9a06c 100644 --- a/src/drums.pas +++ b/src/drums.pas @@ -1020,7 +1020,7 @@ procedure tdrumsfo.loadsoundlib(const Sender: TObject); begin allok := False; resulib := -1; - ordir := msestring(IncludeTrailingBackslash(ExtractFilePath(ParamStr(0)))); + ordir := msestring(IncludeTrailingBackslash(ExtractFilePath(ParamStr(0)))) ; {$IFDEF Windows} {$if defined(cpu64)} diff --git a/src/errorform.mfm b/src/errorform.mfm new file mode 100644 index 0000000..10b19f6 --- /dev/null +++ b/src/errorform.mfm @@ -0,0 +1,44 @@ +object errorfo: terrorfo + bounds_x = 482 + bounds_y = 282 + bounds_cx = 390 + bounds_cy = 104 + bounds_cxmin = 390 + bounds_cymin = 104 + bounds_cxmax = 390 + bounds_cymax = 104 + container.frame.localprops = [] + container.frame.localprops1 = [] + container.bounds = ( + 0 + 0 + 390 + 104 + ) + optionswindow = [wo_notaskbar, wo_rounded] + windowopacity = -Inf + moduleclassname = 'tmseform' + object tlabel1: tlabel + bounds_x = 85 + bounds_y = 24 + bounds_cx = 229 + bounds_cy = 19 + caption = 'Some libraries did not load...' + font.height = 16 + font.name = 'stf_default' + font.localprops = [flp_height] + reffontheight = 19 + end + object tlabel2: tlabel + taborder = 1 + bounds_x = 81 + bounds_y = 56 + bounds_cx = 241 + bounds_cy = 19 + caption = 'The application will terminate.' + font.height = 16 + font.name = 'stf_default' + font.localprops = [flp_height] + reffontheight = 19 + end +end diff --git a/src/errorform.pas b/src/errorform.pas new file mode 100644 index 0000000..0cd4e63 --- /dev/null +++ b/src/errorform.pas @@ -0,0 +1,18 @@ +unit errorform; +{$ifdef FPC}{$mode objfpc}{$h+}{$endif} +interface +uses + msetypes, mseglob, mseguiglob, mseguiintf, mseapplication, msestat, msemenus, + msegui,msegraphics, msegraphutils, mseevent, mseclasses, msewidgets, mseforms, + msesimplewidgets; +type + terrorfo = class(tmseform) + tlabel1: tlabel; + tlabel2: tlabel; + end; +var + errorfo: terrorfo; +implementation +uses + errorform_mfm; +end. diff --git a/src/errorform_mfm.pas b/src/errorform_mfm.pas new file mode 100644 index 0000000..3fb3095 --- /dev/null +++ b/src/errorform_mfm.pas @@ -0,0 +1,52 @@ +unit errorform_mfm; +{$ifdef FPC}{$mode objfpc}{$h+}{$endif} + +interface + +implementation +uses + mseclasses,errorform; + +const + objdata: record size: integer; data: array[0..695] of byte end = + (size: 696; data: ( + 84,80,70,48,8,116,101,114,114,111,114,102,111,7,101,114,114,111,114,102, + 111,8,98,111,117,110,100,115,95,120,3,226,1,8,98,111,117,110,100,115, + 95,121,3,26,1,9,98,111,117,110,100,115,95,99,120,3,134,1,9,98, + 111,117,110,100,115,95,99,121,2,104,12,98,111,117,110,100,115,95,99,120, + 109,105,110,3,134,1,12,98,111,117,110,100,115,95,99,121,109,105,110,2, + 104,12,98,111,117,110,100,115,95,99,120,109,97,120,3,134,1,12,98,111, + 117,110,100,115,95,99,121,109,97,120,2,104,26,99,111,110,116,97,105,110, + 101,114,46,102,114,97,109,101,46,108,111,99,97,108,112,114,111,112,115,11, + 0,27,99,111,110,116,97,105,110,101,114,46,102,114,97,109,101,46,108,111, + 99,97,108,112,114,111,112,115,49,11,0,16,99,111,110,116,97,105,110,101, + 114,46,98,111,117,110,100,115,1,2,0,2,0,3,134,1,2,104,0,13, + 111,112,116,105,111,110,115,119,105,110,100,111,119,11,12,119,111,95,110,111, + 116,97,115,107,98,97,114,10,119,111,95,114,111,117,110,100,101,100,0,13, + 119,105,110,100,111,119,111,112,97,99,105,116,121,5,0,0,0,0,0,0, + 0,128,255,255,15,109,111,100,117,108,101,99,108,97,115,115,110,97,109,101, + 6,8,116,109,115,101,102,111,114,109,0,6,116,108,97,98,101,108,7,116, + 108,97,98,101,108,49,8,98,111,117,110,100,115,95,120,2,85,8,98,111, + 117,110,100,115,95,121,2,24,9,98,111,117,110,100,115,95,99,120,3,229, + 0,9,98,111,117,110,100,115,95,99,121,2,19,7,99,97,112,116,105,111, + 110,6,30,83,111,109,101,32,108,105,98,114,97,114,105,101,115,32,100,105, + 100,32,110,111,116,32,108,111,97,100,46,46,46,11,102,111,110,116,46,104, + 101,105,103,104,116,2,16,9,102,111,110,116,46,110,97,109,101,6,11,115, + 116,102,95,100,101,102,97,117,108,116,15,102,111,110,116,46,108,111,99,97, + 108,112,114,111,112,115,11,10,102,108,112,95,104,101,105,103,104,116,0,13, + 114,101,102,102,111,110,116,104,101,105,103,104,116,2,19,0,0,6,116,108, + 97,98,101,108,7,116,108,97,98,101,108,50,8,116,97,98,111,114,100,101, + 114,2,1,8,98,111,117,110,100,115,95,120,2,81,8,98,111,117,110,100, + 115,95,121,2,56,9,98,111,117,110,100,115,95,99,120,3,241,0,9,98, + 111,117,110,100,115,95,99,121,2,19,7,99,97,112,116,105,111,110,6,31, + 84,104,101,32,97,112,112,108,105,99,97,116,105,111,110,32,119,105,108,108, + 32,116,101,114,109,105,110,97,116,101,46,11,102,111,110,116,46,104,101,105, + 103,104,116,2,16,9,102,111,110,116,46,110,97,109,101,6,11,115,116,102, + 95,100,101,102,97,117,108,116,15,102,111,110,116,46,108,111,99,97,108,112, + 114,111,112,115,11,10,102,108,112,95,104,101,105,103,104,116,0,13,114,101, + 102,102,111,110,116,104,101,105,103,104,116,2,19,0,0,0) + ); + +initialization + registerobjectdata(@objdata,terrorfo,''); +end. diff --git a/src/main.pas b/src/main.pas index 866d70c..7f8ef61 100644 --- a/src/main.pas +++ b/src/main.pas @@ -162,6 +162,7 @@ tmainfo = class(tmainform) implementation uses + errorform, findmessage, infos, conflang, @@ -6769,6 +6770,19 @@ procedure tmainfo.onclose(const Sender: TObject); procedure tmainfo.ontimertransp(const Sender: TObject); begin + + if allok = False then +begin +windowopacity := 1; +application.processmessages; +application.createform(terrorfo, errorfo); +errorfo.show; + application.processmessages; +sleep(2000); +//application.processmessages; +application.terminate; +end; + windowopacity := windowopacity + 0.1; //{ dockpanel1fo.windowopacity := dockpanel1fo.windowopacity + 0.1; @@ -6798,7 +6812,10 @@ recorderfo.windowopacity := recorderfo.windowopacity + 0.1; //} if windowopacity = 1 then + begin ttimer1.Enabled := False; + + end; end; @@ -6956,6 +6973,7 @@ procedure tmainfo.onactiv(const Sender: TObject); x: integer; oldlang: msestring; begin + oncreatedform(Sender); if isactivated = False then @@ -6980,6 +6998,7 @@ procedure tmainfo.onactiv(const Sender: TObject); end; if mainfo.drumsvisible.value = 1 then drumsfo.visible := true; + end; end. diff --git a/src/strumpract.prj b/src/strumpract.prj index 9798b07..36f721b 100644 --- a/src/strumpract.prj +++ b/src/strumpract.prj @@ -803,15 +803,21 @@ settingsstorage=0 settingsprojecttree=0 settingsautoload=0 settingsautosave=0 -modulenames=2 +modulenames=4 CONFIGFO DRUMSFO -moduletypes=2 + ERRORFO + MAINFO +moduletypes=4 TCONFIGFO TDRUMSFO -modulefiles=2 + TERRORFO + TMAINFO +modulefiles=4 /home/fred/strumpract/src/config.mfm /home/fred/strumpract/src/drums.mfm + /home/fred/strumpract/src/errorform.mfm + /home/fred/strumpract/src/main.mfm befcommandon=0 makeoptionson=15 4095 @@ -1180,7 +1186,7 @@ line=35 587 258 5734 - 3270 + 3271 1512 293 329 @@ -1192,7 +1198,7 @@ line=35 1588 209 1136 - 5802 + 5803 493 5 770 @@ -1614,11 +1620,15 @@ envvarons=0 [edit] hintwidth=314 hintheight=200 -finddtext=resu : +finddtext=opac findhistory=20 + opac + showm + opacity + timeract + timer resu : resu - showm createdr oncreatedd loadlib @@ -1632,63 +1642,79 @@ findhistory=20 label2.v label2 drumsfo. - timertick - spectrum - timer - timerwait findoptions=1 -editpos=3 - 0,9 - 8,1119 - 0,377 +editpos=5 + 0,48 + 55,1027 + 0,382 + 0,6820 + 0,2 bookmarks0=0 bookmarks1=0 bookmarks2=0 -sourcefiles=3 +bookmarks3=0 +bookmarks4=0 +sourcefiles=5 ${PROJECTDIR}/strumpract.pas ${PROJECTDIR}/drums.pas ${PROJECTDIR}/config.pas -relpaths=3 + ${PROJECTDIR}/main.pas + ${PROJECTDIR}/errorform.pas +relpaths=5 strumpract.pas drums.pas config.pas -ismoduletexts=3 + main.pas + errorform.pas +ismoduletexts=5 0 0 0 -modules=6 + 0 + 0 +modules=7 /home/fred/strumpract/src/main.mfm /home/fred/strumpract/src/commander.mfm /home/fred/strumpract/src/drums.mfm /home/fred/strumpract/src/recorder.mfm /home/fred/strumpract/src/guitars.mfm /home/fred/strumpract/src/config.mfm -moduleoptions=6 + /home/fred/strumpract/src/errorform.mfm +moduleoptions=7 0 2 0 2 0 0 -visiblemodules=6 0 +visiblemodules=7 + -1 0 -1 0 0 -1 -nomenumodules=6 -1 +nomenumodules=7 + 0 -1 0 -1 -1 0 + 0 [sourcefo.files_tab] +order=5 + 3 + 0 + 1 + 4 + 2 firsttab=0 -index=1 +index=2 [layout] -windowlayout=645 +windowlayout=671 [mainfo.basedock] splitdir=2 useroptions=268450944 @@ -1730,8 +1756,8 @@ windowlayout=645 ny=0 ncx=0 ncy=0 - x=406 - y=363 + x=425 + y=262 cx=497 cy=314 rcx=0 @@ -1843,7 +1869,7 @@ windowlayout=645 sortdescend1=0 sorted=0 col=0 - row=3 + row=10 rowheight=16 [stackfo] splitdir=0 @@ -1922,10 +1948,10 @@ windowlayout=645 [breakpointsfo.bkptson] value=0 [objectinspectorfo.grid] - propcolwidthref=323 - width0=183 + propcolwidthref=338 + width0=191 sortdescend0=0 - width1=134 + width1=141 sortdescend1=0 [symbolfo] splitdir=0 @@ -2089,7 +2115,7 @@ windowlayout=645 [componentpalettefo] splitdir=0 useroptions=268460139 - stackedunder= + stackedunder=_mse_mainfo_mse_ parent= mdistate=3 nx=0 @@ -2104,9 +2130,9 @@ windowlayout=645 rcy=0 wsize=0 active=0 - visible=0 + visible=1 [componentpalettefo.componentpages] - activetab=1 + activetab=0 [debuggerfo] splitdir=0 useroptions=24683 @@ -2147,7 +2173,8 @@ windowlayout=645 value=Pascal [debuggerfo.file_history] value=/home/fred/strumpract/src/drums.pas - history=11 + history=12 + /home/fred/strumpract/src/main.pas /home/fred/strumpract/src/drums.pas /home/fred/strumpract/src/config.pas /home/fred/ideu/src/conflang.pas @@ -2180,15 +2207,21 @@ windowlayout=645 rcx=0 rcy=0 [sourcefo.files_tab] + order=5 + 3 + 0 + 1 + 4 + 2 firsttab=0 - index=1 + index=2 [confideufo.usedefaulteditoroptions] value=0 [cpuc86_64fo] irqoff=0 splitdir=0 useroptions=268451947 - stackedunder=_mse_mainfo_mse_ + stackedunder=_mse_recorderfo_mse_ parent= mdistate=0 nx=0 @@ -2223,7 +2256,7 @@ windowlayout=645 [_mse_mainfo_mse_] splitdir=0 useroptions=268451963 - stackedunder=_mse_recorderfo_mse_ + stackedunder=_mse_errorfo_mse_ parent= mdistate=3 nx=0 @@ -2238,7 +2271,7 @@ windowlayout=645 rcy=0 wsize=0 active=0 - visible=0 + visible=1 [_mse_commanderfo_mse_] splitdir=0 useroptions=268451963 @@ -2318,7 +2351,7 @@ windowlayout=645 [_mse_configfo_mse_] splitdir=0 useroptions=268451963 - stackedunder=objectinspectorfo + stackedunder=componentpalettefo parent= mdistate=3 nx=0 @@ -2334,6 +2367,25 @@ windowlayout=645 wsize=0 active=0 visible=1 + [_mse_errorfo_mse_] + splitdir=0 + useroptions=268451963 + stackedunder=objectinspectorfo + parent= + mdistate=3 + nx=0 + ny=0 + ncx=0 + ncy=0 + x=482 + y=282 + cx=400 + cy=104 + rcx=0 + rcy=0 + wsize=0 + active=0 + visible=1 [targetconsole] finddtext= findhistory=0