Project

General

Profile

New script for derby db on windows 7 (and up I suppose): db-create-derby.cmd

Gabriel Rossetti
Added over 4 years ago

Hi all,

the derby db creation script didn't work on windows (I know...but I have no choice), even when using "GIT Bash". I have created a native (db-create-derby.cmd) version that is attached, can you pls include it in the next release?

Thanks,

Gabriel

db-create-derby.cmd (1.31 KB) db-create-derby.cmd windows deby script

Replies (10)

Added by Gabriel Rossetti over 4 years ago

Oh, and the console install doc (http://www.tigase.org/content/manual-installation-console-mode) has some minor issues, such as:

  • <strong>blabla</strong> not actually making the text bold but being shown verbatim (since they are in a code block)

  • the db creation script names have changed, so for example ./scripts/derby-db-create.sh should be ./scripts/db-create-derby.sh

Added by Gabriel Rossetti over 4 years ago

Where did the run.bat go? I can't find it and not being very good at batch files (this is the first time I try anything on windows since 1998) I don't think I could convert tigase.sh anytime soon...

I downloaded tigase-server-5.2.1-b3461-dist-max.zip

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

I have created a native (db-create-derby.cmd) version that is attached, can you pls include it in the next release?

Thank you for the script. I have created a ticket for this: #2228 and you are on watchers list, so you will be notified about progress on this.

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 4 years ago

Hm, we are not really windows users either, however, somebody will help you with this soon. Wojciech, could you please give some hints on the windows installation?

Added by Gabriel Rossetti over 4 years ago

Artur Hefczyc wrote:

Thank you for the script. I have created a ticket for this: #2228 and you are on watchers list, so you will be notified about progress on this.

Cool, thanks

Hm, we are not really windows users either, however, somebody will help you with this soon. Wojciech, could you please give some hints on the windows installation?

Thank you

Added by Gabriel Rossetti over 4 years ago

I've finally started writing the tigase.cmd batch script, I have converted most of it from the bash version, it is totally untested at this point and some things I could not figure out how to do in windows (like tests if it is a file or a directory, tests for file/directory writability, etc).

I am stuck on the "stop" command, I couldn't find a way to get the java process' PID when launching it and I can't find a way to kill just that java process and not all java processes. If I get stop to work I need to do "start" and I am done, then I need to test and debug it. If someone could help out and find a way to get the PID or a way to identify the Tigase java process without the PID it would allow me to finish this up.

Also, what is the intended difference in between "run" and "start" commands?

Thanks

Added by Wojciech Kapcia TigaseTeam over 4 years ago

Gabriel Rossetti wrote:

Where did the run.bat go? I can't find it and not being very good at batch files (this is the first time I try anything on windows since 1998) I don't think I could convert tigase.sh anytime soon...

Actually lot of windows stuff is in repository: https://projects.tigase.org/projects/tigase-server/repository/revisions/devel/show/win-stuff

I downloaded tigase-server-5.2.1-b3461-dist-max.zip

Thank you for bringing this to our attention, windows related scripts are now included in the distribution package.

Gabriel Rossetti wrote:

I've finally started writing the tigase.cmd batch script, I have converted most of it from the bash version, it is totally untested at this point and some things I could not figure out how to do in windows (like tests if it is a file or a directory, tests for file/directory writability, etc).

I am stuck on the "stop" command, I couldn't find a way to get the java process' PID when launching it and I can't find a way to kill just that java process and not all java processes. If I get stop to work I need to do "start" and I am done, then I need to test and debug it. If someone could help out and find a way to get the PID or a way to identify the Tigase java process without the PID it would allow me to finish this up.

Windows is a bit different when it comes to managing long-running processes and it's preferred to actually use system services functionality (then you can use @$ net (start|stop|pause) service_name@) and this is already supported - please check linked above directory.

Added by Gabriel Rossetti over 4 years ago

Thanks for the link, I have a question,

What is the difference between running it using Run.bat and Tigase.bat? I see the later uses the wrapper and not the former, what does the wrapper do/add in this case (when using the "-c" switch?

For the developement process I just need to run it on demand locally on Windows, the production version will likely run on Linux.

Thanks,

Gabriel

Added by Wojciech Kapcia TigaseTeam over 4 years ago

What is the difference between running it using Run.bat and

Tigase.bat? I see the later uses the wrapper and not the former, what

does the wrapper do/add in this case (when using the "-c" switch?

The latter simply use the wrapper approach, which was needed to

correctly handle installing Tigase as a service. So the second could be

used to simulate running Tigase as a service while the first one to

simply start Tigase directly.

For the developement process I just need to run it on demand locally

on Windows, the production version will likely run on Linux.

You can simply use Run.bat (or, given that it's development, run it

directly from preferred IDE).

Added by Gabriel Rossetti over 4 years ago

Ok, thanks

    (1-10/10)