diff --git a/My/Console/Program1.dpr b/My/Console/Program1.dpr new file mode 100644 index 0000000..87fb440 --- /dev/null +++ b/My/Console/Program1.dpr @@ -0,0 +1,10 @@ +program Program1; + +uses + CRT; + +begin + InitConsole('Hello', True); + WriteLn('My first program'); + ReadKey; +end. \ No newline at end of file diff --git a/My/Console/build.bat b/My/Console/build.bat new file mode 100644 index 0000000..3f3fc8b --- /dev/null +++ b/My/Console/build.bat @@ -0,0 +1 @@ +@call "%~dp0..\..\Lib\build.bat" "%~dp0Program1" \ No newline at end of file diff --git a/My/GUI/Program2.dpr b/My/GUI/Program2.dpr new file mode 100644 index 0000000..991e300 --- /dev/null +++ b/My/GUI/Program2.dpr @@ -0,0 +1,33 @@ +program Program2; + +uses + KolibriOS; + +var + WndLeft, WndTop, WndWidth, WndHeight: Integer; + +begin + with GetScreenSize do + begin + WndWidth := Width div 4; + WndHeight := Height div 4; + WndLeft := (Width - WndWidth) div 2; + WndTop := (Height - WndHeight) div 2; + end; + + while True do + case WaitEvent of + REDRAW_EVENT: + begin + BeginDraw; + DrawWindow(WndLeft, WndTop, WndWidth, WndHeight, 'My GUI Program', $00FFFFFF, + WS_SKINNED_FIXED + WS_CLIENT_COORDS + WS_CAPTION, CAPTION_MOVABLE); + EndDraw; + end; + KEY_EVENT: + GetKey; + BUTTON_EVENT: + if GetButton.ID = 1 then + TerminateThread; + end; +end. \ No newline at end of file diff --git a/My/GUI/build.bat b/My/GUI/build.bat new file mode 100644 index 0000000..ba11435 --- /dev/null +++ b/My/GUI/build.bat @@ -0,0 +1 @@ +@call "%~dp0..\..\Lib\build.bat" "%~dp0Program2" \ No newline at end of file diff --git a/build-all.bat b/build-all.bat new file mode 100644 index 0000000..201fa7f --- /dev/null +++ b/build-all.bat @@ -0,0 +1,3 @@ +@echo off +call build-examples.bat +call build-my.bat \ No newline at end of file diff --git a/build-my.bat b/build-my.bat new file mode 100644 index 0000000..9e3cc46 --- /dev/null +++ b/build-my.bat @@ -0,0 +1,8 @@ +@echo off + +for /d %%f in (%~dp0My\*) do ( + call %%f\build.bat + if errorlevel 1 goto exit +) + +:exit \ No newline at end of file