Feasibility question

I’m very interested in writing an application not unlike X-Writs [sic]
for X-Window and Stretch Break for Win95.

I’m wondering how feasible it would be to use SDL to do this.
I’d really love the program to be portable to non-X-Window environments.

I imagine the program working like so:

1 User boots up, logs in, whatever

2 My application is loaded at startup

3 The application immediately minimizes itself
[Can an SDL app request to be minimized???]

4 Every X minutes, the application reappears and plays a little animation
showing the user which exercise to do now.

5 The user clicks “OK” when they’re done… go back to step 3

also:

6 If the user un-iconifies the program, it will either assume they want
to take a break now, or will show them a menu screen
(I haven’t decided which yet, will probably make it an option)
[SDL apps can tell when they’ve regained focus, right?]

And speaking of all this, is anyone interested in handling the Windows
port for this when I’m done (or while I’m working on it)?

I spoke with my chiropractor today and he’s excited about the idea of
such a program (he gives people sheets of paper with exercises on them
and an egg timer :wink: ), and has offered to help.

I guess I also need a model or two to demonstrate the stretches…
(Or a good artist/animator :slight_smile: )

-bill!
bill at newbreedsoftware.com
http://www.newbreedsoftware.com/

William Kendrick wrote:

And speaking of all this, is anyone interested in handling the Windows
port for this when I’m done (or while I’m working on it)?

SDL is cross-platform. You should only have to write it once and compile
again for windows (either with a cross-compiler or a native windows one).

I’d really love the program to be portable to non-X-Window environments.
Kinda difficult when your dealing with iconification and stuff. Obvious BeOS,
MacOS and Windows are possible.

3 The application immediately minimizes itself
[Can an SDL app request to be minimized???]
SDL_WM_IconifyWindow();

4 Every X minutes, the application reappears and plays a little animation
showing the user which exercise to do now.
There is no SDL_WM_RestoreWindow() or SDL_WM_DeiconifyWindow().
You could use SDL_GetWMInfo() and deiconify the window yourself.

6 If the user un-iconifies the program, it will either assume they want
to take a break now, or will show them a menu screen
(I haven’t decided which yet, will probably make it an option)
[SDL apps can tell when they’ve regained focus, right?]
sdldoc.sourceforge.net/current/sdlactiveevent.html

I guess I also need a model or two to demonstrate the stretches…
(Or a good artist/animator :slight_smile: )
Sexy models?On Wed, Nov 22, 2000 at 09:19:23PM -0800, William Kendrick wrote:


Martin

Bother said the Moderator, &$&^%NO CARRIER

William Kendrick wrote:

And speaking of all this, is anyone interested in handling the Windows
port for this when I’m done (or while I’m working on it)?

SDL is cross-platform. You should only have to write it once and compile
again for windows (either with a cross-compiler or a native windows one).

Well, I have no idea how to have an application start up at boot/login
time on a Windows box. (Is there a folder for that?)

-bill!

William Kendrick wrote:

William Kendrick wrote:

And speaking of all this, is anyone interested in handling the Windows
port for this when I’m done (or while I’m working on it)?

SDL is cross-platform. You should only have to write it once and compile
again for windows (either with a cross-compiler or a native windows one).

Well, I have no idea how to have an application start up at boot/login
time on a Windows box. (Is there a folder for that?)

autoexec.bat

its a batch file (which is a lot like a shell script but the dos shell is very
crippled) that is run after every thing else started up. You would add a line
at the very end invoking your program. Something like:

C:\theprogsfolder\theprog.exe

William Kendrick wrote:

William Kendrick wrote:

And speaking of all this, is anyone interested in handling the
Windows

port for this when I’m done (or while I’m working on it)?

SDL is cross-platform. You should only have to write it once and
compile

again for windows (either with a cross-compiler or a native windows
one).

Well, I have no idea how to have an application start up at boot/login
time on a Windows box. (Is there a folder for that?)

autoexec.bat

its a batch file (which is a lot like a shell script but the dos shell is
very
crippled) that is run after every thing else started up. You would add a
line
at the very end invoking your program. Something like:

C:\theprogsfolder\theprog.exe

Or you could write a new key in

[HKLM\Software\Microsoft\Windows\CurrentVersion\Run]
“MyApp” = “C:\Program Files\MyCoolProgram\MyCoolExe.exe”

Since autoexec.bat isn’t parsed on WNT/W2000 (Ok, not really true but
almost).

/J

> > autoexec.bat > > its a batch file (which is a lot like a shell script but the dos shell is very > crippled) that is run after every thing else started up. You would add a line > at the very end invoking your program. Something like: > > C:\theprogsfolder\theprog.exe > >

Hum… I guess I could have instructions explaining to people to load
the file up in NotePad… Ok. :slight_smile: What about MacOS and BeOS? :wink:

-bill!

William Kendrick wrote:

Hum… I guess I could have instructions explaining to people to load
the file up in NotePad… Ok. :slight_smile: What about MacOS and BeOS? :wink:

BeOS: Create a symlink to the app in the “StartUp”-folder (at
~/config/boot/StartUp)–
Sascha Offe

William Kendrick wrote:

> > autoexec.bat > > its a batch file (which is a lot like a shell script but the dos shell is very > crippled) that is run after every thing else started up. You would add a line > at the very end invoking your program. Something like: > > C:\theprogsfolder\theprog.exe > >

Hum… I guess I could have instructions explaining to people to load
the file up in NotePad…

I don’t think that would go over well with windows users!! Most programs edit
autoexec.bat during their installation (and usually forget to remove there changes
when you uninstall them :slight_smile:

    -- David Snopek
> > autoexec.bat > > its a batch file (which is a lot like a shell script but the dos

shell is very

crippled) that is run after every thing else started up. You would
add a line

at the very end invoking your program. Something like:

C:\theprogsfolder\theprog.exe

Hum… I guess I could have instructions explaining to people to load
the file up in NotePad… Ok. :slight_smile: What about MacOS and BeOS? :wink:

-bill!

/boot/home/config/boot/UserBootscript is the shell script that is run at
startup on BeOS.

Justin-----------------------------------
This message was sent with the demo version of Postmaster, a BeOS mail client.
For more information, please visit http://kennyc.com/postmaster

I don’t think that would go over well with windows users!! Most programs edit
autoexec.bat during their installation (and usually forget to remove there changes
when you uninstall them :slight_smile:

Hehe… That’s my problem. My program won’t have an "installer,"
since I can’t make one (since I don’t have Windows) :slight_smile:

-bill!

William Kendrick wrote:

I don’t think that would go over well with windows users!! Most programs edit
autoexec.bat during their installation (and usually forget to remove there changes
when you uninstall them :slight_smile:

Hehe… That’s my problem. My program won’t have an "installer,"
since I can’t make one (since I don’t have Windows) :slight_smile:

This is the sort of thing that is a canidate for help as an open source project. (That
is assuming your project is open source? I don’t quite remember if you mentioned
that…) On your web page (or however you plan to coordinate distribution of your
program) post a standing request for someone to write a windows installer.

    -- David Snopek

I’d be willing to try to write an installer. I’m now a Linux
programmer, but I started on windows. And my dad could help me. He
knows how to use InstallShield (a scripting language for
installers). Also, I have a working cross compiler on my Linux box,
which makes things a bit easier.

Anyway, yea, contact me and I’ll give it a shot. (If I have time, of
course.)

-Arthur

Hehe… That’s my problem. My program won’t have an "installer,"
since I can’t make one (since I don’t have Windows) :slight_smile:

This is the sort of thing that is a canidate for help as an open source project. (That
is assuming your project is open source? I don’t quite remember if you mentioned
that…) On your web page (or however you plan to coordinate distribution of your
program) post a standing request for someone to write a windows installer.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20001126/6e7d0164/attachment.pgp

This is the sort of thing that is a canidate for help as an open source project. (That
is assuming your project is open source?

But of course! :slight_smile:

On your web page (or however you plan to coordinate distribution of your
program) post a standing request for someone to write a windows installer.

I would’ve anyway, but I wanted to make sure I had my bases covered before
I made the Linux version… wouldn’t wanna have to rewrite most of the
main code to make it portable. (Defeats the purpose of using SDL :slight_smile: )

-bill!

I’d be willing to try to write an installer. I’m now a Linux
programmer, but I started on windows. And my dad could help me. He
knows how to use InstallShield (a scripting language for
installers). Also, I have a working cross compiler on my Linux box,
which makes things a bit easier.

How does InstallShield store… umm… data? (How do I ask this?)

In other words, is it possible to also have some raw data file which
is used by installshield to “compile” into the “install.exe” (or whatever)
program file?

-bill!

Hehe… That’s my problem. My program won’t have an "installer,"
since I can’t make one (since I don’t have Windows) :slight_smile:

This is the sort of thing I think BeOS packagers did right. Instead of
running a script or creating some clunky installer, all they do is place a
folder shortcut called “Drag xxxx here”. For example, you could have a .bat
or some other shortcut to your win32 executable that you want to run at
startup, and have the folder shortcut point to

“%WINDIR%\Start Menu\Programs\StartUp” on Win9x,

or

“%USERPROFILE%\start menu\programs\startup” on Win2K.

Hmm… Or you could just make an install.bat that copies to the above
locations instead. Not sure how you’d detect the OS from the bat file,
maybe you’d just have win9x_install.bat, etc. I think a similar approach
could be used for any platform. If the paths above aren’t quite what you
want, open a DOS box and type ‘set’ to see the pre-defined variables the
installer can use.

Brent

How does InstallShield store… umm… data? (How do I ask this?)

In other words, is it possible to also have some raw data file which
is used by installshield to “compile” into the “install.exe” (or whatever)
program file?

It has an text script file (a kind of cross between C and BASIC, I
think). I think this file is compiled into an INF which is interpreted
by a program at install time. It is not very pretty, but I hear it’s
easy to use and relatively powerful. Also, the installer it creates
looks just like the installers from other windows programs, so it will
be consistent with other packages.

It’s a thought. There may very well be better ways.

-Arthur
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20001126/4c8108da/attachment.pgp

NT has an OS command variable, which is set to Windows_NT if your running
Win2k or WinNT.
Win9X doesnt have that variable though, unfortunately.
Attached a script that I played with months ago - never went anywhere - but
it shows use of the variable.
If its NT, it echos “Running NT” or something
and if the variable isnt there, it echos something else.

Kludgy, but hope its useful.

Ben> ----- Original Message -----

From: Brent Schartung [mailto:firebrand@mailandnews.com]
Sent: 26 November 2000 20:27
To: sdl at lokigames.com
Subject: Re: [SDL] Feasibility question

Hehe… That’s my problem. My program won’t have an "installer,"
since I can’t make one (since I don’t have Windows) :slight_smile:

This is the sort of thing I think BeOS packagers did right. Instead of
running a script or creating some clunky installer, all they do is place a
folder shortcut called “Drag xxxx here”. For example, you could have a .bat
or some other shortcut to your win32 executable that you want to run at
startup, and have the folder shortcut point to

“%WINDIR%\Start Menu\Programs\StartUp” on Win9x,

or

“%USERPROFILE%\start menu\programs\startup” on Win2K.

Hmm… Or you could just make an install.bat that copies to the above
locations instead. Not sure how you’d detect the OS from the bat file,
maybe you’d just have win9x_install.bat, etc. I think a similar approach
could be used for any platform. If the paths above aren’t quite what you
want, open a DOS box and type ‘set’ to see the pre-defined variables the
installer can use.

Brent

-------------- next part --------------
A non-text attachment was scrubbed…
Name: script.bat
Type: application/octet-stream
Size: 106 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20001127/2a4803a1/attachment.obj

I would stay away from the registry and the autoexec.bat

All you need to do is add a link in the Programs->Startup folder of the
startbar>

Or you could write a new key in

[HKLM\Software\Microsoft\Windows\CurrentVersion\Run]
“MyApp” = “C:\Program Files\MyCoolProgram\MyCoolExe.exe”

Since autoexec.bat isn’t parsed on WNT/W2000 (Ok, not really true but
almost).

/J

3 The application immediately minimizes itself
[Can an SDL app request to be minimized???]
SDL_WM_IconifyWindow();

Works great, thanks! :slight_smile:

4 Every X minutes, the application reappears and plays a little animation
showing the user which exercise to do now.
There is no SDL_WM_RestoreWindow() or SDL_WM_DeiconifyWindow().

Umm… at least in SDL 1.1.6, there IS no such thing as those two
functions! :slight_smile:

Help! My window can’t _un_iconify itself! I guess it’s a strange and
obscure thing for a program to want to uniconify itself, but in this
case, the program is kind of a visual alarm clock, so it’s quite
necessary! :slight_smile:

You could use SDL_GetWMInfo() and deiconify the window yourself.

> sdldoc.sourceforge.net/current/sdlactiveevent.html

Kick-ass. This is looking great!

I guess I also need a model or two to demonstrate the stretches…
(Or a good artist/animator :slight_smile: )
Sexy models?

I’ll work on it. :slight_smile:

-bill!
(need to stretch)