Recent

Author Topic: application size and updating  (Read 6369 times)

klyxmaster

  • New Member
  • *
  • Posts: 25
application size and updating
« on: March 05, 2015, 03:50:40 pm »
Good morning (afternoon to some)
I have been feverishly scouring the net for the application size issue, and it's coming with NOT what I want.
Prob 1:
Application size:
Old fashion gamer, so I tend to like the old fashion text console style. So, with that said, I use win7/64bit and as you all know, the cmd window comes up smaller than we like during runtime. During the days of XP and earlier, this was not an issue as either text mode or a simple ALT-ENTER would fix that - not today though right?  :D

I do not mind the 80x25, but would like to know if there is a way to make the run time LARGER (big fonts ok). I blew off the dust from my old SWAG days, and none of the asm would work - or maybe I have the IDE set up wrong.

Everything I have been searching for has been addressing the IDE size, fonts an layout.  I DO NOT WANT THIS. I am searching for the actual application (game) to be larger - full screen would be nice, but not really a requirement.

I am familiar with the MODE CON: LINE/ROWS command, but that just makes the cmd window larger, but the fonts stay the same. (i.e. I can fit more text on a single line in this mode).  Any suggestions?   Again, I am old school TP7 (NOT Delphi) and NOT TObjects either. console.
Can anyone help me with this?

Prob 2
Small, not really important issue, but would be nice. While I make my game, I have a few friends and family that want to check it out. Be nice if there was a way they could auto update it. When I put up a new revision, the app will check and ask if they want to download it. (not SVN or GIT.). I am more interested in Prob 1, but be nice to get this at the same time.

ps
Trying my hand at an open world ascii game LOL (weeelll, not a huge asdwarf fortress, but fun exercise in pascal anyways, have to start somewhere )

thanks again guys!!

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: application size and updating
« Reply #1 on: March 05, 2015, 06:57:17 pm »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

klyxmaster

  • New Member
  • *
  • Posts: 25
Re: application size and updating
« Reply #2 on: March 05, 2015, 10:41:29 pm »
Prob 2
On my way to work, but did give it a quick glance. this doesn't look like it is console - this looks like more a GUI, so as per instructions, "...Drop the component onto the main form of your application " will not work, as I do not deal with forms and such.
Also I did not see the actual source code for the file compare and transfer of file. Is that anywhere, maybe I can convert it to console form.  I'll look closer at the SVN to see if i can find the source for that

Thank you for the reply!!


sam707

  • Guest
Re: application size and updating
« Reply #3 on: March 06, 2015, 06:12:42 am »
« Last Edit: March 06, 2015, 06:19:04 am by sam707 »

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: application size and updating
« Reply #4 on: March 06, 2015, 08:42:15 am »
Prob 2
On my way to work, but did give it a quick glance. this doesn't look like it is console - this looks like more a GUI, so as per instructions, "...Drop the component onto the main form of your application " will not work, as I do not deal with forms and such.
Also I did not see the actual source code for the file compare and transfer of file. Is that anywhere, maybe I can convert it to console form.  I'll look closer at the SVN to see if i can find the source for that

Thank you for the reply!!
LazAutoUpdate is normally used within a GUI, but itself is non-visual.  It should work OK in a console app (though I haven't tested it in one).  Just create and set properties and use methods etc. as for any non-visual component.
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

klyxmaster

  • New Member
  • *
  • Posts: 25
Re: application size and updating
« Reply #5 on: March 06, 2015, 02:07:14 pm »
https://msdn.microsoft.com/en-us/library/windows/desktop/ms686200%28v=vs.85%29.aspx

above link may help setting up console on windows

There is an easier way to size the command window: just use "MODE CON: LINES=200 COLS=70" This is a nice size for 1900 x 1080 (Which I have). HOWEVER, with that said, if you read through my OP, you will see, this is not the direction I would like to take.  Secondly, while I know c++, I rather not make an external program to achieve the desired effect - especially, when at one time, this could be accomplished with TP7 via script. My memory is hazy, but I seem to remember the TEXTMODE(X) did a lot, but these days, it has zero effect.

Also I am tinkering with some asm for changing the window size, but my old code doesn't work anymore. are there some directives I need to compile an asm?

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: application size and updating
« Reply #6 on: March 06, 2015, 02:31:17 pm »
No need assembler or c/c++. Just put Windows in the uses clause and use SetCurrentConsoleFontEx in your program. I think I have example program which uses that function.

EDIT : If you want to change your console font then you need to use SetCurrentConsoleFontEx. It changes console window size, too. But not to preferred sizes.
See this for bit more info : http://stackoverflow.com/questions/17160553/making-the-console-window-bigger-in-c
« Last Edit: March 06, 2015, 03:09:22 pm by Cyrax »

sam707

  • Guest
Re: application size and updating
« Reply #7 on: March 06, 2015, 11:44:42 pm »
yep, I cant know if the kernel of windows was writen in C++ in assembler, or in marsian language. If you plan to play with 'only pascalish writen OS calls', install Oberon A2 (see Bluebottle OS to get a running emulator for your PC inside windows) :D. its all in Wirthian language (Pascal successor) from boot sector to high level tools and applications.

as Mr Cyrax and I said, if you are writing code under a specific OS, and need to call this OS indirections, then follow its specific rules, unless FPC/Lazarus team made cross-platforms facilities! you have no choice!

http://en.wikipedia.org/wiki/Oberon_%28operating_system%29

http://www.inf.ethz.ch/personal/wirth/ProjectOberon/index.html
« Last Edit: March 07, 2015, 12:02:47 am by sam707 »

sam707

  • Guest
Re: application size and updating
« Reply #8 on: March 07, 2015, 02:38:55 am »
miscanelous download page for Wirthian langs fans =

http://www.ocp.inf.ethz.ch/wiki/OCP/Downloads#toc3

klyxmaster

  • New Member
  • *
  • Posts: 25
Re: application size and updating
« Reply #9 on: March 07, 2015, 01:41:26 pm »
yep, I cant know if the kernel of windows was writen in C++ in assembler, or in marsian language. If you plan to play with 'only pascalish writen OS calls', install Oberon A2 (see Bluebottle OS to get a running emulator for your PC inside windows) :D. its all in Wirthian language (Pascal successor) from boot sector to high level tools and applications.

as Mr Cyrax and I said, if you are writing code under a specific OS, and need to call this OS indirections, then follow its specific rules, unless FPC/Lazarus team made cross-platforms facilities! you have no choice!

http://en.wikipedia.org/wiki/Oberon_%28operating_system%29

http://www.inf.ethz.ch/personal/wirth/ProjectOberon/index.html

if you have that example it would be great - so far a lot of the responses are massive over kills. I was looking at "GRAPH" and outtext - which might be an alternative to what I am looking for. still looking at TEXTMODE w/o much luck. not sure if it work with the win7.

Thanks to the rest for your suggestions. If you can, please post an example snippet (with "uses", directives etc.) as none of the suggestions posted so far seem to make much sense. They are for every language BUT pascal.

1. C++ implementation? Example of a pascal source using C++ (NOT DELPHI, or GUI related)
2. Why suggestion Oberion?? Example of Oberion for pascal?
3. StakOverflow is answering the same question but for C++ console. I am not writing in C++,I know how to do it there.
4. TP7 does not have a "SetCurrentConsoleFontEx " only Delphi does (again, I am not using Delphi)


thanks again.
This was possible back in the day with pascal. I was hoping that while making it compatible with the modern OS's that the font feature was carried along with it.

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: application size and updating
« Reply #10 on: March 07, 2015, 02:37:21 pm »
Try this one for your 1) request
[ http://forum.lazarus.freepascal.org/index.php/topic,26668.msg168509.html#msg168509 ]
Code: [Select]
uses
  sysutils,
   Forms, Interfaces,
  windows,
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes   ................

......................
......................
procedure proc_DoMaximizeConsole;
var   loc_Out:HANDLE;
      loc_Handle: THandle;
      loc_MaxSize:COORD;
      loc_NewDisplay:TSmallRect;
begin
  loc_Handle:=FindWindow(nil, pchar(Application.ExeName));
  loc_Out:=GetStdHandle(STD_OUTPUT_HANDLE);
  loc_MaxSize:=GetLargestConsoleWindowSize(loc_Out);
  SetConsoleScreenBufferSize(loc_Out, loc_MaxSize);
   with loc_NewDisplay do begin
     Right:=loc_MaxSize.X;
     Bottom:=loc_MaxSize.Y;
   end;
   SetConsoleWindowInfo(loc_Out, True, loc_NewDisplay);
   ShowWindow(loc_Handle, SW_MAXIMIZE);
   ReadLn;
end;     
begin

   proc_DoMaximizeConsole;
.......................
.......................

end. 


my needs were for full screen
 play with the code for other dimensions
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: application size and updating
« Reply #11 on: March 07, 2015, 04:12:03 pm »
4. TP7 does not have a "SetCurrentConsoleFontEx " only Delphi does (again, I am not using Delphi)


thanks again.
This was possible back in the day with pascal. I was hoping that while making it compatible with the modern OS's that the font feature was carried along with it.
I'm not sure which version of pascal you want to use.

Your screen-name implies Kylix/Delphi

Your posts imply Borland Turbo Pascal v7

Yet you are posting in a Lazarus/FreePascal forum.  Most of the replies have assumed you are working with Lazarus/FPC - is that confusing for some reason?
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

sam707

  • Guest
Re: application size and updating
« Reply #12 on: March 07, 2015, 04:52:45 pm »
actually free pascal implements this cross-platform unit for compatibility :

http://www.freepascal.org/docs-html/rtl/crt/index-5.html

AGAIN, if you want to go deep, you have no other choice than LEARNING and calling your OWN OS API with its conventions. OR, if you are smart, extend such unit to make all your display utils "cross-platform"
« Last Edit: March 07, 2015, 04:59:47 pm by sam707 »

 

TinyPortal © 2005-2018