Page 1 of 1

Bash and Batch files moved

PostPosted: Fri May 06, 2011 10:30 pm
by Charles
For those of you who hack on the source code, the scripts for building, cleaning, etc. have changed:

Code: Select all
# Windows
cd CobraWorkspace\Source
bin\build
bin\install-from-workspace
bin\build-compiler-lib

# UnixLike
cd CobraWorkspace/Source
bin/build
bin/install-from-workspace
bin/build-compiler-lib


The bash and batch files formally found in CobraWorkspace\Source are now in CobraWorkspace\Source\bin for better organization. Also, "comp" was renamed to "build".

This means you need to prefix them with "bin\" on Windows and "bin/" on UnixLike as seen above. If you find that troublesome, you can cook up some aliases or scripts for your workspace or even your system. For example, on Mac, I just enter "b" to build in any project I work on:

Code: Select all
#!/bin/bash
if [ -x ./build ]; then
   ./build "$@"
elif [ -x ./bin/build ]; then
   ./bin/build "$@"
elif [ -x ./scripts/build ]; then
   ./scripts/build "$@"
elif [ -x ./comp ]; then
   ./comp "$@"
elif [ -f ./build.cobra ]; then
   cobra -d build.cobra ~/bin/BuilderBase.cobra -- "$@"
   rm -f build.exe*
elif [ -f *.proj ]; then
   xbuild "$@"
else
   echo 'error: no ./build or ./bin/build found to execute at:' `pwd`
fi


I have tested on Mono+Mac and .NET+Windows. If you have any problems or questions, let me know.

Re: Bash and Batch files moved

PostPosted: Mon May 09, 2011 10:32 pm
by RIGHT_THEN
Hey Charles,

this is a good move i wonder why are there still some dlls in the
source directory thou cobra.sharps....


when i run build.bat it gives this eror

C:\cobra-workspace\Source\bin>Snapshot\cobra.exe -compile -color -debug -ert:yes -timeit cobra.cobra -files:files-to-compile.text
The system cannot find the path specified.


when i try to run install-from-workspace.bat it gives this error
compiling installation programm
'The system cannot find the path specified'




which means it is not working on my system Windows 7 ultimate
i am using the latest checkout on 10-May-2011

and when you say build process has changed! now instead of
-install-from-workspace.bat
i would have to run
-build.bat
first is that what you mean?

Thanking_You
RIGHT_THEN

Re: Bash and Batch files moved

PostPosted: Tue May 10, 2011 12:26 am
by Charles
Take a closer look at my post and you'll see that my current directory is "Source" and then the commands I use are "bin\install-from-source" and "bin\build".

I think it's convenient to be in the Source directory so you can use other commands like grep, invoking your editor, svn di, etc.

Re: Bash and Batch files moved

PostPosted: Tue May 10, 2011 3:06 am
by RIGHT_THEN
thanks charles

it did work now.

in your post you are using install-from-source whereas it is install-from-workspace
unless you wanted me to test my common-sense.
and also you are using build first and then install-from-workspace
not the other way round.


anybody trying to do it on window it should look like this
on commanprompt
C:\cobra-workspace\Source>bin\build
C:\cobra-workspace\Source>bin\install-from-workspace

just to be clear unless somebody considers it a line continuation in the original post.

Thanking_You
RIGHT_THEN

Re: Bash and Batch files moved

PostPosted: Tue May 10, 2011 7:22 am
by Charles
Thanks. I have edited the post in place to correct s/install-from-source/install-from-workspace/.