[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > > Project [ ash ]Launch [ Yes ]Rebuild [ Yes ]Started [ 22:43:44 > ] > > > Starting in: home/baz/Documents : /home/baz/hash/ > /bin/bash: hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en > -rebuild : No such file or directory > > > Exit Code [ 127 ]Exit Status [ 0 ]Finished at [ 22:43:44 ] > Done in [ 0.04 Secs ] > > > Sorry, cannot launch project because of errors... > > The problem seems to come from "Starting in: home/baz/Documents" > I have nothing harbour related in Documents, and I have no idea where > hbide is picking this up. > > If I use:- > > hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en -rebuild > > from the command line the application builds without error. > > This is ash.hbp as produced by hbide :- > > -3rd=hbide_version=1.0 > -3rd=hbide_type=Executable > -3rd=hbide_title=ash > -3rd=hbide_location=/home/baz/hash/ > -3rd=hbide_workingfolder=/home/baz/hash > -3rd=hbide_destinationfolder=/home/baz/hash > -3rd=hbide_output=ash > -3rd=hbide_launchparams= > -3rd=hbide_launchprogram=./ash > -3rd=hbide_backupfolder= > If I use:- hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en -rebuild At this point where are you stationed ? Are you executing hbIDE from the same location where you are executing above command ? It appears that hbIDE is been unable to set this build's working folder. As I have no idea how paths are taken care of in *nixes, someone has to answer you on this matter, Vailton, are you around ? - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4861857.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > --- > Project [ ash ]Launch [ Yes ]Rebuild [ Yes ]Started [ 22:43:44 > ] > > > Starting in: home/baz/Documents : /home/baz/hash/ > /bin/bash: hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en > -rebuild : No such file or directory > > > Exit Code [ 127 ]Exit Status [ 0 ]Finished at [ 22:43:44 ] > Done in [ 0.04 Secs ] > > Have you set the environment via right-toolbar icon? Please visit http://hbide.vouch.info/ and look at topic . - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4861919.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > Path to hbmk2 /home/baz/SVN/harbour/bin/linux/gcc > Path to hbide.env /home/baz/hbr > The main window is empty. > >The main window is empty. It should not. Please examine: {hbide_location}/resource/hbide.env Copy this to /home/baz/hbr Open the dialog again and adjust the contents to nix equivalents only for the compiler you are using. I mean : SET *.* => EXPORT *.* etc. The other quick way is: Reach to /home/baz/hash/ ( I assume you can build as hbmk2 ash.hbp from here ) Execute hbIDE from within console ( Window equivalant is => C:\>path_to_hbIDE_exe\hbIDE ) I think I have to write proper help on this topic. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4865259.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > >[ COMMON ] > PLATFORM = linux > COMPILER = gcc > > {hb_comp} gcc > export HB_COMPILER=gcc > > export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc > export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc > export PATH=$PATH:/home/baz/SVN/harbour/include > Can you try this: [ COMMON ] PLATFORM = linux COMPILER = gcc [ GCC ] {hb_comp} gcc export HB_COMPILER=gcc export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/include export PATH=$PATH:/home/_your_gcc_installation_root Then: Right-click on project name node Point to "Select an Environmen..." and then select "GCC" the only option available You must be able to see "Env: GCC" in the status-bar panel Then rebuild. Infact I do not know how files are managed in .nixes so please make some experiments in ideprojmanager.prg line#1232 ::cBatch := ::oEV:prepareBatch( ::cWrkEnvironment ) I have added some more log entries to know exactly what is happening at the lower levels. Please do all above after r14286. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4866042.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > >[ COMMON ] > PLATFORM = linux > COMPILER = gcc > >[GCC] > {hb_comp} gcc > export HB_COMPILER=gcc > > export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc > export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc > export PATH=$PATH:/home/baz/SVN/harbour/include > export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc > My fault, sorry. [ COMMON ] PLATFORM = linux COMPILER = gcc [GCC] {hb_comp} gcc {content} export HB_COMPILER=gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/include {content} export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc To debug more: ::cBatch := ::oEV:prepareBatch( ::cWrkEnvironment ) 1. Check what is the value of ::cWrkEnvironment 2. Check what is the value of ::cBatch ( a temporary file name ) 3. Explore what is wrong with idemisc.prg line#2070 function hbide_getShellCommandTempFile() Until this temp file containg above entries is not there and executed by the shell, hbIDE will be unable to locate environment components. To debug, you can use standard method, say, MsgBox() or whatever you employ for debugging. This call creates a temporary shell command file having entries in {content} lines above. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4867582.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > >> 1. Check what is the value of ::cWrkEnvironment > GCC > Ok. >> 2. Check what is the value of ::cBatch ( a temporary file name ) > Blank line about 30-40 characters long. > And this is what Ia m trying to figure-out, WHY ? Why it is blank. >> 3. Explore what is wrong with idemisc.prg line#2070 function >> hbide_getShellCommandTempFile() > Function does not exist - file stops at line 2067 ! > To be sure I deleted idemisc.prg and svn up :- > Restored 'idemisc.prg' > At revision 14287. > I am sorry to say that I have to go word-by-word to teach you how you can find a function in a .prg. I might have mis-wrote line number. Anyway, it is 1237 of 2070. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4867927.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
BTW did you changed the .env as [GCC] {hb_comp} gcc {content} export HB_COMPILER=gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/include {content} export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc Your last post does not refer to it . - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4867943.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > The code in this IF conditional (in METHOD IdeEnvironments:prepareBatch( > cEnvName ) ) > is being skipped. > > "GCC" *is* being passed to the METHOD. > > IF ( n := ascan( ::aEnvrns, {|e_| e_[ 1 ] == cEnvName } ) ) > 0 > > ENDIF > > So the METHOD is returning space( 255 ) > So now I can guess what is happening. Follow step below closely: 1. Run hbIDE as usual. 2. Can you see "Env: GCC" in the status-bar ? If yes, 3. Click on "Compiler Environment". Can you see [GCC] + entry in the edit box ?, if yes, 4. Right-click on the "ash" projects tree node, can you see active prompt "Set an Environment...", if yes, 5. Point to "Set an Environment..." and select "GCC", if you could do it 6. ash MUST build. Please show me hbide.env and if possible, the screenshot of "Compiler Environment" dialog containing whatever it has the first time you click. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4868232.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > http://i115.photobucket.com/albums/n287/barjac_2006/hbide8.png > Everything looks absolutely right, so where is the catch? > I noticed a lower() in the function that builds the arrays, while "GCC" > is being passed as upper case - probably off track - I was just looking > at that when I saw your last post. > No, this is for key=value pair. This problem may peep in the next step. For now we are concentrating on why shell command temp file is not being created. Do one more hack, [ COMMON ] PLATFORM = linux COMPILER = gcc [GCC] {hb_comp} gcc {content} export HB_COMPILER=gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/include {content} export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc [ DUMMY ] {hb_comp} gcc {content} export HB_COMPILER=gcc And show me the log. Plus you can investigate ::aEnvrns contents. Also check : METHOD IdeEnvironments:parse( cEnvFile ) - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4868413.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > "DUMMY" is selectable and appears on status bar > Yes, selectable, but do not select. Select GCC. > I assume that by "log" you are referring to the console output:- > Yep. >> Plus you can investigate ::aEnvrns contents. >> Also check : >> METHOD IdeEnvironments:parse( cEnvFile ) > > TODO > You are to investigate why "GCC" is not found in ::aEnviron. Only then we can proceed. Theoretically, it must find and I am at a loss what is going wrong exactly. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4869829.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Viktor Szakáts wrote: > > Ops, I think I've been there. The problem is with > parallel execution of script and HBIDE. HBIDE will > call external process, but continue to run, so it > will instantly delete the script, so the script > will not run. > > I remember fixing this once. > > Try removing FERASE() call for the temporary > external script to prove that. > FERASE() is issued when process is "finished". So it does not collide with parallel running. Also it works perfectly on Windows, so I suspect that it the script is not executed at all due some reason, though I may be wrong. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4871710.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > I paused hbide just after it wrote (and closed) the temp script. > I found the script and ran it after displaying PATH and looking at the > script:- > > [...@jackodesktop tmp]$ echo $PATH > /usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/home/baz/Scripts:/home/baz/bin:/home/baz/SVN/harbour/bin/linux/gcc:/home/baz/SVN/harbour/lib/linux/gcc:/home/baz/SVN/harbour/include > If you will pause hbIDE, probably Qt might have stopped executing the child process as well, no ? If yes, then try not to pause it here but just comment out FERASE() and you will be able to view the contents. To view environment setting, try to dump the path into output console after process is started or just before "finished" is called. > export HB_COMPILER=gcc > export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc > export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc > export PATH=$PATH:/home/baz/SVN/harbour/include > export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc > Please add path to Harbour bin as the last line ( in hbide.env ) {content} export PATH=$PATH:/home/baz/SVN/harbour/ It appears script is not "executed" at all. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4871821.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Viktor Szakáts wrote: > > The CRLF issue is for sure there though. > Can you point out exactly what I should look? - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4871958.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Viktor Szakáts wrote: > export HB_COMPILER=gcc export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/include export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc > > BTW, all of the above is not necessary for hbmk2. > (given that gcc is already in the PATH, which it > is on most systems) > > So I'd suggest not to confuse matters with these > unnecessary lines. In fact it's outright dangerous. > > For hbmk2, it's enough to put in the PATH, or > refer to it with an absolute name (f.e. /home/me/harbour/bin/hbmk2) > and it will find everything automatically. > > Even HB_COMPILER=gcc is totally unnecessary. > You are right when we assume that there is only ONE environment developer needs or have set his desktop from the very begining and he donot want to compile with another compiler or other type of project. In that case there is absolutely no need to even touch hbide.env. Without any anvironment set, hbIDE only executes the hbMK2 with its parameters and under the environemnt hbMK2 detects automatically. But what if someone wants to experiment with different compilers and different type of projects, just like in my case. There comes the concept of hbide.env. For example, I compile my ERP solutions "Vouch" with MSVC, BCC, MINGW and OpenWatcome. I never leave the interface even once. I just change the environment and there it goes. If you said that, you must be having a broader view of the issue, I am sure, but still my reasoning is valid. This is not imposed on the user, this is suggested if he ever want to maintain many projects, all built under different environmrnts. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4873116.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > But before I do, may I ask whether the line I see in the console output > is the command used to launch the build? > /bin/bash: /home/baz/tmp/ao9flu.sh && hbmk2 /home/baz/hash/ash.hbp -q > -trace -info -lang=en > > If it's just the error message only then fine, but if it is the command > then it should not have the ":". > > Without this, (using a dummy script in ~/tmp) it runs OK :- > > /bin/bash /home/baz/tmp/test.sh && hbmk2 /home/baz/hash/ash.hbp -q > -trace -info -lang=en > > Can you dump the "Output Console" log showing above lines ? - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4873206.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Viktor Szakáts wrote: > >> But what if someone wants to experiment with different >> compilers and different type of projects, just like in my case. >> There comes the concept of hbide.env. For example, >> I compile my ERP solutions "Vouch" with MSVC, BCC, MINGW and >> OpenWatcome. I never leave the interface even once. I just >> change the environment and there it goes. > > No problem, but even in this case, the best solution > is to setup PATH properly for given compiler and let > hbmk2 autodetect compiler. > > HB_COMPILER is _only_ necessary if there are multiple > C compiler present in the PATH at the same time. > > If that tells anything, on Windows I compile for > practically all possible Harbour targets and I never > touch HB_COMPILER. > We can document it or omit it altogether. But I had some issues in the past. I do not remember exactly what these were but soon I will experiment when I will turn to building refinements scheduled next week. Virtually, only C compiler specific path should go inside it, rest hbMK2 should take care, this is the goal for Harbour projects. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4873743.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > Sadly none work and all produce the same file not found error. I would > have expected the "sh " to have solved this. > No, this point just constructs a string to tell shell command the behavior of command line execution. For Windows it is "/C " means execute and terminate. > You are right - the script is not being run. > I added the line:- > > {content} echo "this ran" > /home/baz/hash/ash_hbide.txt > > to the script and the file has not appeared. > > Output :- > > > Project [ ash ]Launch [ No ]Rebuild [ No ]Started [ 21:01:35 ] > > > /home/baz/tmp/h2zifo.sh : Exists > /home/baz/tmp/h2zifo.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info > -lang=en > > Starting in: home/baz/hash : /home/baz/hash/ > /bin/bash: /home/baz/tmp/h2zifo.sh && hbmk2 /home/baz/hash/ash.hbp -q > -trace -info -lang=en : No such file or directory > > > Exit Code [ 127 ]Exit Status [ 0 ]Finished at [ 21:01:35 ] > Done in [ 0.12 Secs ] > > The is important: /bin/bash: /home/baz/tmp/h2zifo.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en : No such file or directory This output is sent by QProcess:read() method when an error is generated. /bin/bash: is sent by Qt and I do not know what it is. Can you check the value of ? - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4873826.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > >> /bin/bash: is sent by Qt and I do not know what it is. > That is similar format to bash error message format e.g. > > [...@jackodesktop ~]$ qwertyuiop > bash: qwertyuiop: command not found > [...@jackodesktop ~]$ > > sh is normally a link to bash which is always in /bin in the system > path, so /bin/bash does the same as sh > >> >> Can you check the value of ? > > /bin/bash > So it means /bin/bash /home/baz/tmp/h2zifo.sh&& hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en ^^ is not executing /home/baz/tmp/h2zifo.sh&&[ Notice no space between .sh and && ] if this is the case, I am confused, why not it shows up a space inbetween. the constructor is : cArg := iif( empty( ::cBatch ), cC, cC + ::cBatch + " && " ) ^ I am really lost. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4874345.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > cCArg is:- > /home/baz/asd45f.sh && > Ah, Ok. > The final command sent to the command line should AFAICT be:- > /bin/bash /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp -q > -trace -info -lang=en > > Running that on command line works fine. > It should be the case with hbIDE but it is not... > At present (from the console output) it seems to be just:- > /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info > -lang=en > You are not taking into consideration . QProcess() expects two components, command and parameters. What you see are parameters, command is verified with as it shows up as - /bin/bash ( you confirmed in a prev post ). > If I change to this > cC := iif( hbide_getOS() == "nix", "/bin/bash ", "/C " ) > > then the console output looks correct, but still does not run:- > No, this is not the correct way, it will never work. > If Qt sends the /bin/bash cCmd part invisibly, then I am of course > wrong, but I would have expected the full command to be shown in the > error message. > Not invisibly. We are sending it as , where cCmd == /bin/bash cArgs == /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en > No hope for me then :-( > Don't be disheartened. We will succeed one day. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4876058.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > >> cCmd := '/bin/sh' >> cArgs := '-c ". /home/baz/tmp/ahrl8i.sh&& hbmk2 >> /home/baz/hash/ash.hbp' + ; >> ' -q -trace -info -lang=en"' > > Thanks for your input - well explained as always! > I am struggling to follow your use of quotes in cArgs above. > Is that correct? > > I have hacked the calling routine to test it and get:- > > /bin/sh: ' -c . "/home/baz/tmp/5qwnv4.sh && hbmk2 > /home/baz/hash/ash.hbp' + ' -q -trace -info -lang=en "': No such file or > directory > > I can get this to run OK from the command line, but not yours. > > sh -c ". /home/baz/tmp/test.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace > -info -lang=en " > > Note . is inside the quotes. > > (temp.sh is similar to the other transitory scripts) > You are constructing wrongly. Follow Przemek's input closely. Try this : ::oProcess:output := {|cOut, mp2, oHbp| ::showOutput( cOut,mp2,oHbp ) } ::oProcess:finished:= {|nEC , nES, oHbp| ::finished( nEC ,nES,oHbp ) } ::oProcess:workingPath := hbide_pathToOSPath( ::oProject:location ) // cCmd := hbide_getShellCommand() cC := iif( hbide_getOS() == "nix", "-c ", "/C " ) IF hbide_getOS() == "nix" cArg := iif( empty( ::cBatch ), cC, cC + '".' + ::cBatch + " && " ) cArg += cExeHbMk2 + " " + cHbpPath + cCmdParams + '"' ELSE *cArgs := '-c ". ' + /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en"' cArg := iif( empty( ::cBatch ), cC, cC + ::cBatch + " && " ) cArg += cExeHbMk2 + " " + cHbpPath + cCmdParams ENDIF // ::oOutputResult:oWidget:append( "batchfile = " + ::cBatch + iif( hb_fileExists( ::cBatch ), " : Exists", " : Doesn't Exist" ) ) ::oOutputResult:oWidget:append( "cCmd = " + cCmd ) ::oOutputResult:oWidget:append( "arguments = " + cArg ) ::oOutputResult:oWidget:append( hbide_outputLine() ) // ::oProcess:addArg( cArg ) ::oProcess:start( cCmd ) And let us know. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4877729.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Przemysław Czerpak wrote: > > the standard parameter delimiter is '-'. '/' is MS "extensions" which > works only in DOS based systems. In all shells '-c ' can be > used to execute command specified in . All other parameters > passed after are parameters of executed command. > >> Not invisibly. We are sending it as , where >> cCmd == /bin/bash >> cArgs == /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp -q >> -trace >> -info -lang=en > > I guess that /home/baz/tmp/ahrl8i.sh contains some environment variables > settings. It will not work as you want for few reasons. > 1. shell will try to execute above cArgs as single command and should show >the message that such file does not exist. You should use "-c" switch >before. > 2. /home/baz/tmp/ahrl8i.sh does not have executable attribute so after >fixing the problem in point 1 you will have message like: >/home/baz/tmp/ahrl8i.sh: Permission denied > 3. If you set executable attribute (point 2) then you exploit next > problem. >All environment variables set by /home/baz/tmp/ahrl8i.sh are local to >/home/baz/tmp/ahrl8i.sh and are not visible for hbmk2 and its child >processes. To resolve it you should not execute /home/baz/tmp/ahrl8i.sh >as normal file but _include_ it to the current shell. Included files >does not need executable attribute so you will not have to problem in >point 2. To include file you can use "." command, i.e.: > . /home/baz/tmp/ahrl8i.sh >BTW the extension like .sh have no meaning in *nixes so you can ignore >them. >You can also remove "#!/bin/sh" from included files because "#" is >used as comment (like REM in BATCH files). > > In summary the final command should look like: > >cmd := 'sh -c ". /home/baz/tmp/ahrl8i.sh && hbmk2 > /home/baz/hash/ash.hbp"' >cmd += ' -q -trace -info -lang=en' >HB_PROCESSRUN( cmd ) > > I do not know the QProcess parameters so I cannot tell you how exactly > it should look. Your comment above suggests that it should be enough > to make: >cCmd := '/bin/sh' >cArgs := '-c ". /home/baz/tmp/ahrl8i.sh && hbmk2 > /home/baz/hash/ash.hbp"' >cArgs += ' -q -trace -info -lang=en' > Thanks for this very well explained tutorial. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4877740.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > > Project [ ash ]Launch [ No ]Rebuild [ No ]Started [ 16:47:10 ] > > > batchfile = /home/baz/tmp/eurxke.sh : Exists > cCmd = /bin/bash > arguments = -c "./home/baz/tmp/eurxke.sh && hbmk2 /home/baz/hash/ash.hbp > -q -trace -info -lang=en " > > Starting in: home/baz/hash : /home/baz/hash/ > /bin/bash: - : invalid option > Usage: /bin/bash [GNU long option] [option] ... > /bin/bash [GNU long option] [option] script-file ... > GNU long options: > --debug > --debugger > --dump-po-strings > --dump-strings > --help > --init-file > --login > --noediting > --noprofile > --norc > --posix > --protected > --rcfile > --restricted > --verbose > --version > --wordexp > Shell options: > -irsD or -c command or -O shopt_option (invocation only) > -abefhkmnptuvxBCHP or -o option > > > Exit Code [ 2 ]Exit Status [ 0 ]Finished at [ 16:47:10 ]Done > in [ 0.61 Secs ] > > So at least we moved forward a bit. > I tried replacing cCmd with /bin/sh and :- > You need not to as /bin/sh == /bin/bash Let's wait Przemeks analysis. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4879351.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > Output from latest SVN (14320) :- > > > Project [ ash ]Launch [ No ]Rebuild [ No ]Started [ 16:08:44 ] > > Batch File Exists => /home/baz/tmp/yydylr.sh > Batch File Contents => > #!/bin/sh > export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc > echo "this ran" > /home/baz/hash/ash_hbide.txt > > hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en > > Command => /bin/bash > Arguments => -c /home/baz/tmp/yydylr.sh > > CurDir() => home/baz/hash Starting in => /home/baz/hash/ > /bin/bash: - : invalid option > Usage: /bin/bash [GNU long option] [option] ... > /bin/bash [GNU long option] [option] script-file ... > GNU long options: > --debug > Can you change cC := iif( hbide_getOS() == "nix", "-c ", "/C " ) to cC := iif( hbide_getOS() == "nix", "-c .", "/C " ) and try again? - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4885921.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > >>> Can you change >>> cC := iif( hbide_getOS() == "nix", "-c ", "/C " ) >>> to >>> cC := iif( hbide_getOS() == "nix", "-c .", "/C " ) >>> >>> and try again? >> >> Rather to: >> cC := iif( hbide_getOS() == "nix", "", "/C " ) >> >> An .sh file is not a command, so -c is just not needed >> there. > > I thought I would go with Viktor's version first! > > :-) :-) :-) :-) :-) :-) > > > Project [ ash ]Launch [ No ]Rebuild [ No ]Started [ 19:04:46 ] > > Batch File Exists => /home/baz/tmp/91uqn7.sh > Batch File Contents => > #!/bin/sh > export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc > echo "this ran" > /home/baz/hash/ash_hbide.txt > > hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en > > Command => /bin/bash > Arguments => /home/baz/tmp/91uqn7.sh > > CurDir() => home/baz/hash Starting in => /home/baz/hash/ > hbmk2: Autodetected platform: linux > hbmk2: Autodetected C compiler: gcc > hbmk2: Using Harbour: /home/baz/SVN/harbour/bin > /home/baz/SVN/harbour/include > /home/baz/SVN/harbour/lib/linux/gcc /home/baz/SVN/harbour/lib/linux/gcc > hbmk2: Harbour compiler command (embedded): > ... > > Exit Code [ 0 ]Exit Status [ 0 ]Finished at [ 19:04:57 ]Done > in [ 10.30 Secs ] > > > No apologies for posting the whole output as it's been a long time coming! > > This is a non-GUI app and when built with the "build and launch" button > the output adds:- > > Detected exeutable => ash > > Launching application [ /home/baz/hash/ash ] > > ... but nothing further - I don't know if this is correct in this > situation. > > Well done everyone ! > So we succeeded, at last. Thanks Viktor for pointing to keep everything in.sh/.bat and above tip. Thanks Przemek for understanding how bash commands work. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4886672.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > This is a non-GUI app and when built with the "build and launch" button > the output adds:- > > Detected exeutable => ash > > Launching application [ /home/baz/hash/ash ] > > ... but nothing further - I don't know if this is correct in this > situation. > It should launch theoretically. But let us examine how I am initiating the launch. #if 1 qProcess := QProcess():new() qProcess:setWorkingDirectory( hbide_pathToOSPath( oProject:wrkDirectory ) ) IF !empty( oProject:launchParams ) qStr := QStringList():new() qStr:append( oProject:launchParams ) qProcess:startDetached_1( cTargetFN, qStr ) ELSE qProcess:startDetached_2( cTargetFN ) ENDIF qProcess:waitForStarted() qProcess := NIL #else Please investigate. It is straight forward. Somewhere we are missing how should we pass the params to QProcess(). - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4886691.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Pritpal Bedi wrote: > > It should launch theoretically. > But let us examine how I am initiating the launch. > > #if 1 > qProcess := QProcess():new() > qProcess:setWorkingDirectory( hbide_pathToOSPath( > oProject:wrkDirectory ) ) > IF !empty( oProject:launchParams ) > qStr := QStringList():new() > qStr:append( oProject:launchParams ) > qProcess:startDetached_1( cTargetFN, qStr ) > ELSE > qProcess:startDetached_2( cTargetFN ) > ENDIF > qProcess:waitForStarted() > qProcess := NIL > > #else > > Please investigate. It is straight forward. > Somewhere we are missing how should we pass the params to QProcess(). > METHOD IdeProjManager:launchProject( cProject, cExe ) needs to be overhauled as it is Windows centric anyway. Because passed parameter is not having ".exe" as extnsion, nothing has hapened. Please check. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4886710.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Viktor Szakáts wrote: > > Accidentally I've stumbled upon new code to detect > executable name, and it's not right. First of all > "hbmk2: Linker command:" text is only shown when > -trace mode is used, second, there is no guarantee > that '-o' option is used in all supported target > compilers, this is not true even with current set > of compilers. > I know this fact. But am short of insight how effectively should I detect it. Please tweak with this issue, if possible. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4886756.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > I hit another problem trying to test with a simple "Hello World" project. > I have seen this before but was waiting until other issues were fixed. > > On attempting to add a second project to hbide, either by creating from > scratch, or using an existing .hbp, this array bound error crashes hbide. > > http://i115.photobucket.com/albums/n287/barjac_2006/hbide10.png > First, do not mix two issues in one thread, open another. Can you guard idehome.prg#368 aadd( aHtm, '' + dtoc( dir_[ 1,3 ] ) + " " + dir_[ 1,4 ] ) with if ! empty( dir_ ) aadd( aHtm, '' + dtoc( dir_[ 1,3 ] ) + " " + dir_[ 1,4 ] ) endif Infact I know nothing about how things happen on *nixes. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4886893.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > >> My ash project does not run now - I suspect a change in Harbour in the >> last few days has broken it as it has always been OK. >> >> Error DBCMD/35 Workarea not in use: __DBLOCATE >> Called from __DBLOCATE(0) >> Called from INTVAR(401) >> Called from MAIN(195) > > Pritpal, > > Ah! - this is related to hbide! > I have just discovered that hbide IS launching ash - but in the > background and after hbide is closed the process is still running - > locking the .dbf, which is why I was getting the above error in > subsequently trying to run my appliaction. > I ran tests on dBlocate() etc and all was fine with current harbour, so > I re-loaded ash into hbide and tried to launch it. > There is nothing in the log, but /home/baz/hash/ash is running. > These are the open files (after hbide is closed) :- > > ash 451baz cwd DIR 8,1112288 > 3719282 /home/baz/hash > > Hope that sheds some light. > When a project is launched after build it is done in a detached process and it must show up. If what you say is true, then you may experiment with qProcess:startDetached_2( cTargetFN ) Play with METHOD IdeProjManager:launchProject( cProject, cExe ) and let us know what parameters are passed and in what way. May be we need to initiate a shell command to execute the executable. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4893175.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: > > I am pretty useless with OOP, but digging a little this looks relevant? > > From QT 4.5 QProcess Class Reference > QProcess::startDetached. > > Unix: The started process will run in its own session and act like a > daemon. > > Windows: The started process will run as a regular standalone process. > Unix: The started process will run in its own session and act like a daemon. I do not know what exactly this means in unix. Also I do not know how to cover it. Someone with more nixes knowldge should tell us. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4893416.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Alex Strickland wrote: > >> Unix: The started process will run in its own session and act like a >> daemon. >> I do not know what exactly this means in unix. >> Also I do not know how to cover it. Someone with more nixes knowldge >> should tell us. > > It is similar to running a service in windows. It is not attached to any > input > or output device. > Thanks Alex for the info. So the question is how to invoke it as application but in detached manner. More investigation is needed from Qt documentation. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4894451.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Przemysław Czerpak wrote: > >hb_processRun( , [ ], [ @ ], [ @ > ], ; > [ ] ) -> > > must not be .T. if you do not want to execute process in > background (as daemon). > This command is implemented for all platforms. > If == .F. then the process will run under hbIDE's process space, right? If yes, then when the control will return to hbIDE ? Immediately after initiating the process or after initiated process will terminate? - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4894583.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] Re: HBIDE Project build start folder problem
Przemysław Czerpak wrote: > > Look at parameters. They give you the answer. > To set , and is necessary to wait inside > hb_processRun() until executed command terminates. > > If you want to still execute your foreground process then use: >hb_processOpen( , ; >[ @ ], [ @ ], [ @ ], ; >[ ], [ @ ] ) -> | F_ERROR > and then: >hb_processValue( [, ] ) -> > or: >hb_processClose( [, ] ) -> > > , and read and write using FREAD()/FWRITE(). > is value returned by executed process (errorLevel()), > is .T. by default, > is .T. by default, when it's .F. the process is killed > unconditionally. > I tried this: hb_processRun( cExecutable, NIL, NIL, NIL, .F. ) Executable is invoked but control is returned to the caller after termination of executable. hb_processRun( cExecutable, NIL, NIL, NIL, .T. ) Executable is active without showing up interface ( as a daemon ) but still control is not returned back to caller, hangs forever and has to be killed via task manager. I need a functionality where new process executes normally at its own and control is returned back to caller. How this can be achieved with hb_processRun() ? - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/HBIDE-Project-build-start-folder-problem-tp4861627p4894704.html Sent from the harbour-devel mailing list archive at Nabble.com. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 07/04/10 00:20, Pritpal Bedi wrote: Have you set the environment via right-toolbar icon? I reduced that to:- Path to hbmk2 /home/baz/SVN/harbour/bin/linux/gcc Path to hbide.env /home/baz/hbr The main window is empty. I was launching hbide from a desktop icon with no start folder set, so this is how it defaulted to ~/Documents, however if I change this to start in ~/hash the error is the same. Starting in: home/baz/hash : /home/baz/hash/ /bin/bash: hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en : No such file or directory If I move to ~/hash and run hbide from the command line the result is the same. It seems to use the system current location and then add the one from hbide ? "Starting in: home/baz/hash : /home/baz/hash/" Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 07/04/10 15:28, Pritpal Bedi wrote: Barry Jackson wrote: Path to hbmk2 /home/baz/SVN/harbour/bin/linux/gcc Path to hbide.env /home/baz/hbr The main window is empty. The main window is empty. It should not. It was full but everything in there was Windows related so I assumed I should remove it. Please examine: {hbide_location}/resource/hbide.env Copy this to /home/baz/hbr Open the dialog again and adjust the contents to nix equivalents only for the compiler you are using. I mean : SET *.* => EXPORT *.* etc. OK sth like ? :- [ COMMON ] PLATFORM = linux COMPILER = gcc {hb_comp} gcc export HB_COMPILER=gcc export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/include (The last 3 lines are in my environment already) The other quick way is: Reach to /home/baz/hash/ ( I assume you can build as hbmk2 ash.hbp from here ) Yes - no problem. Execute hbIDE from within console ( Window equivalant is => C:\>path_to_hbIDE_exe\hbIDE ) That is how I have done. [...@jackodesktop hash]$ /home/baz/SVN/harbour/contrib/hbide/hbide Still the same with the modifications above. Starting in: home/baz/hash : /home/baz/hash/ /bin/bash: hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en : No such file or directory I think I have to write proper help on this topic. :-) Sorry if appear dim :-( Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 07/04/10 17:50, Pritpal Bedi wrote: Can you try this: [ COMMON ] PLATFORM = linux COMPILER = gcc [ GCC ] {hb_comp} gcc export HB_COMPILER=gcc export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/include export PATH=$PATH:/home/_your_gcc_installation_root [ COMMON ] PLATFORM = linux COMPILER = gcc [GCC] {hb_comp} gcc export HB_COMPILER=gcc export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/include export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc Then: Right-click on project name node Point to "Select an Environmen..." and then select "GCC" the only option available You must be able to see "Env: GCC" in the status-bar panel Yes - done Then rebuild. Infact I do not know how files are managed in .nixes so please make some experiments in ideprojmanager.prg line#1232 ::cBatch := ::oEV:prepareBatch( ::cWrkEnvironment ) Sorry but I can't figure how to debug this. I have added some more log entries to know exactly what is happening at the lower levels. Please do all above after r14286. Project [ ash ]Launch [ No ]Rebuild [ No ]Started [ 21:28:43 ] : Do Not Exists hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en Starting in: home/baz/hash : /home/baz/hash/ /bin/bash: hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en : No such file or directory Exit Code [ 127 ]Exit Status [ 0 ]Finished at [ 21:28:44 ] Done in [ 0.03 Secs ] If I build from command line :- [...@jackodesktop hash]$ hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en hbmk2: Autodetected platform: linux hbmk2: Autodetected C compiler: gcc hbmk2: Using Harbour: /home/baz/SVN/harbour/bin /home/baz/SVN/harbour/include /home/baz/SVN/harbour/lib/linux/gcc /home/baz/SVN/harbour/lib/linux/gcc hbmk2: Harbour compiler command (embedded): (/home/baz/SVN/harbour/bin/linux/gcc/harbour) -n2 /home/baz/hash/ash.prg /home/baz/hash/f_amax.prg /home/baz/hash/b_bget.prg /home/baz/hash/f_getini.prg /home/baz/hash/products.prg snip-- Builds OK. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 07/04/10 22:11, Pritpal Bedi wrote: To debug more: ::cBatch := ::oEV:prepareBatch( ::cWrkEnvironment ) 1. Check what is the value of ::cWrkEnvironment GCC 2. Check what is the value of ::cBatch ( a temporary file name ) Blank line about 30-40 characters long. 3. Explore what is wrong with idemisc.prg line#2070 function hbide_getShellCommandTempFile() Function does not exist - file stops at line 2067 ! To be sure I deleted idemisc.prg and svn up :- Restored 'idemisc.prg' At revision 14287. Until this temp file containg above entries is not there and executed by the shell, hbIDE will be unable to locate environment components. To debug, you can use standard method, say, MsgBox() or whatever you employ for debugging. Never got into OOP and always used CLD in the past, but MsgBox() works OK. I will try my best and no doubt learn as I go! Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 07/04/10 23:09, Barry Jackson wrote: Function does not exist - file stops at line 2067 ! OK found it - line 1218 :-) Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 07/04/10 23:27, Pritpal Bedi wrote: BTW did you changed the .env as [GCC] {hb_comp} gcc {content} export HB_COMPILER=gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/include {content} export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc Your last post does not refer to it . Yes that is done. hbide.env :- [ COMMON ] PLATFORM = linux COMPILER = gcc [GCC] {hb_comp} gcc {content} export HB_COMPILER=gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/include {content} export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc AFAICT the function hbide_getShellCommandTempFile() is not being called at all. I inserted a MsgBox() trap in the function start and it does not appear. I will try to figure out why tomorrow - it's getting late here. Sorry abt the missing file - I did search *.prg for it, but for some reason my file manager did not find it on the first pass. Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 07/04/10 23:23, Pritpal Bedi wrote: And this is what Ia m trying to figure-out, WHY ? Why it is blank. The code in this IF conditional (in METHOD IdeEnvironments:prepareBatch( cEnvName ) ) is being skipped. "GCC" *is* being passed to the METHOD. IF ( n := ascan( ::aEnvrns, {|e_| e_[ 1 ] == cEnvName } ) ) > 0 ENDIF So the METHOD is returning space( 255 ) Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 08/04/10 00:41, Pritpal Bedi wrote: Barry Jackson wrote: The code in this IF conditional (in METHOD IdeEnvironments:prepareBatch( cEnvName ) ) is being skipped. "GCC" *is* being passed to the METHOD. IF ( n := ascan( ::aEnvrns, {|e_| e_[ 1 ] == cEnvName } ) )> 0 ENDIF So the METHOD is returning space( 255 ) So now I can guess what is happening. Follow step below closely: 1. Run hbIDE as usual. 2. Can you see "Env: GCC" in the status-bar ? If yes, Yes 3. Click on "Compiler Environment". Can you see [GCC] + entry in the edit box ?, if yes, Yes 4. Right-click on the "ash" projects tree node, can you see active prompt "Set an Environment...", if yes, Yes 5. Point to "Set an Environment..." and select "GCC", if you could do it Yes 6. ash MUST build. Sorry but no :-( Please show me hbide.env and if possible, the screenshot of "Compiler Environment" dialog containing whatever it has the first time you click. http://i115.photobucket.com/albums/n287/barjac_2006/hbide8.png hbide.env :- [ COMMON ] PLATFORM = linux COMPILER = gcc [GCC] {hb_comp} gcc {content} export HB_COMPILER=gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/include {content} export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc I noticed a lower() in the function that builds the arrays, while "GCC" is being passed as upper case - probably off track - I was just looking at that when I saw your last post. Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 08/04/10 01:41, Pritpal Bedi wrote: And show me the log. "DUMMY" is selectable and appears on status bar I assume that by "log" you are referring to the console output:- Project [ ash ]Launch [ Yes ]Rebuild [ Yes ]Started [ 08:27:29 ] : Do Not Exists hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en -rebuild Starting in: home/baz/hash : /home/baz/hash/ /bin/bash: hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en -rebuild : No such file or directory Exit Code [ 127 ]Exit Status [ 0 ]Finished at [ 08:27:29 ] Done in [ 0.10 Secs ] Sorry, cannot launch project because of errors... Plus you can investigate ::aEnvrns contents. Also check : METHOD IdeEnvironments:parse( cEnvFile ) TODO Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 08/04/10 09:32, Pritpal Bedi wrote: Barry Jackson wrote: "DUMMY" is selectable and appears on status bar Yes, selectable, but do not select. Select GCC. OK With [DUMMY] entry in compiler env. and GCC selected it does now make temp script which is correct. (Remove the dummy and it fails again) /home/baz/tmp/fpw5bh.sh : Exists /home/baz/tmp/fpw5bh.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en Starting in: home/baz/hash : /home/baz/hash/ /bin/bash: /home/baz/tmp/fpw5bh.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en : No such file or directory So, now the problem seems to be the missing full path to hbmk2 Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 08/04/10 11:21, Barry Jackson wrote: So, now the problem seems to be the missing full path to hbmk2 Ignore that silly remark - hbmk2 is already in the path and should be found. Something strange though. I paused hbide just after it wrote (and closed) the temp script. I found the script and ran it after displaying PATH and looking at the script:- [...@jackodesktop tmp]$ echo $PATH /usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/home/baz/Scripts:/home/baz/bin:/home/baz/SVN/harbour/bin/linux/gcc:/home/baz/SVN/harbour/lib/linux/gcc:/home/baz/SVN/harbour/include [...@jackodesktop tmp]$ cat 7aqf54.sh #!/bin/sh export HB_COMPILER=gcc export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/include export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc [...@jackodesktop tmp]$ sh 7aqf54.sh (no errors reported) [...@jackodesktop tmp]$ echo $PATH /usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/home/baz/Scripts:/home/baz/bin:/home/baz/SVN/harbour/bin/linux/gcc:/home/baz/SVN/harbour/lib/linux/gcc:/home/baz/SVN/harbour/include [...@jackodesktop tmp]$ Note that $PATH is not affected by running the script. I thought it may be a permissions problem, or that it needed to be executable, but [...@jackodesktop tmp]$ chmod +x 7aqf54.sh [...@jackodesktop tmp]$ ls -l 7aqf54.sh -rwxrwxr-x 1 baz baz 233 2010-04-08 11:47 7aqf54.sh Makes no difference. Still nothing is added to PATH. Running :- [...@jackodesktop tmp]$ export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc at the command line DOES add those to the path. Baffled... Since hbmk2 is already in my PATH, I do not understand why the build fails (despite the the script not modifying the PATH). OK got some painting to do so will ponder this while brushing :-) Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
Ops, I think I've been there. The problem is with parallel execution of script and HBIDE. HBIDE will call external process, but continue to run, so it will instantly delete the script, so the script will not run. I remember fixing this once. Try removing FERASE() call for the temporary external script to prove that. Brgds, Viktor On 2010 Apr 8, at 13:30, Barry Jackson wrote: > On 08/04/10 11:21, Barry Jackson wrote: > >> >> So, now the problem seems to be the missing full path to hbmk2 > > Ignore that silly remark - hbmk2 is already in the path and should be found. > > Something strange though. > I paused hbide just after it wrote (and closed) the temp script. > I found the script and ran it after displaying PATH and looking at the > script:- > > [...@jackodesktop tmp]$ echo $PATH > /usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/home/baz/Scripts:/home/baz/bin:/home/baz/SVN/harbour/bin/linux/gcc:/home/baz/SVN/harbour/lib/linux/gcc:/home/baz/SVN/harbour/include > > [...@jackodesktop tmp]$ cat 7aqf54.sh > #!/bin/sh > export HB_COMPILER=gcc > export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc > export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc > export PATH=$PATH:/home/baz/SVN/harbour/include > export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc > > [...@jackodesktop tmp]$ sh 7aqf54.sh > (no errors reported) > [...@jackodesktop tmp]$ echo $PATH > /usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/home/baz/Scripts:/home/baz/bin:/home/baz/SVN/harbour/bin/linux/gcc:/home/baz/SVN/harbour/lib/linux/gcc:/home/baz/SVN/harbour/include > [...@jackodesktop tmp]$ > > Note that $PATH is not affected by running the script. > I thought it may be a permissions problem, or that it needed to be > executable, but > [...@jackodesktop tmp]$ chmod +x 7aqf54.sh > [...@jackodesktop tmp]$ ls -l 7aqf54.sh > -rwxrwxr-x 1 baz baz 233 2010-04-08 11:47 7aqf54.sh > Makes no difference. Still nothing is added to PATH. > Running :- > [...@jackodesktop tmp]$ export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc > at the command line DOES add those to the path. > > Baffled... > > Since hbmk2 is already in my PATH, I do not understand why the build fails > (despite the the script not modifying the PATH). > > OK got some painting to do so will ponder this while brushing :-) > > Rgds > Barry > > > ___ > Harbour mailing list (attachment size limit: 40KB) > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
Barry Jackson wrote: So, now the problem seems to be the missing full path to hbmk2 /home/baz/tmp/fpw5bh.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en Shouldn't fpw5bh.sh have the hbmk2 line as its last line? Regards Alex ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 08/04/10 12:40, Viktor Szakáts wrote: Ops, I think I've been there. The problem is with parallel execution of script and HBIDE. HBIDE will call external process, but continue to run, so it will instantly delete the script, so the script will not run. I remember fixing this once. Try removing FERASE() call for the temporary external script to prove that. Brgds, Viktor I anticipated that. I added msgbox() line in FUNCTION hbide_getShellCommandsTempFile here:- FWrite( fhnd, cCmdFile ) FClose( fhnd ) msgbox(cCmdFile) <== ..and left hbide hanging there while I did the tests. Any other thoughts? Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
2010/4/8 Barry Jackson > On 08/04/10 11:21, Barry Jackson wrote: > > >> So, now the problem seems to be the missing full path to hbmk2 >> > > Ignore that silly remark - hbmk2 is already in the path and should be > found. > > Something strange though. > I paused hbide just after it wrote (and closed) the temp script. > I found the script and ran it after displaying PATH and looking at the > script:- > > [...@jackodesktop tmp]$ echo $PATH > > /usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/home/baz/Scripts:/home/baz/bin:/home/baz/SVN/harbour/bin/linux/gcc:/home/baz/SVN/harbour/lib/linux/gcc:/home/baz/SVN/harbour/include > > [...@jackodesktop tmp]$ cat 7aqf54.sh > #!/bin/sh > export HB_COMPILER=gcc > > export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc > export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc > export PATH=$PATH:/home/baz/SVN/harbour/include > export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc > > [...@jackodesktop tmp]$ sh 7aqf54.sh > Please read http://www.troubleshooters.com/linux/prepostpath.htm try: source 7aqf54.sh to get the PATH exported var changed not only into that script Hth, best regards Marco -- Linux Infinite Freedom ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 08/04/10 13:49, marco bra wrote: Please read http://www.troubleshooters.com/linux/prepostpath.htm try: source 7aqf54.sh to get the PATH exported var changed not only into that script Hth, best regards Marco Thanks Marco - interesting read, that is the reason my test failed. Alex - Maybe the script should call hbmk2 - not sure, I will await comment from Pritpal. :-) Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
I don't know if deleting FERASE() helped. Anyway, in HBIDE CRLF is permanently mapped to Chr( 13 ) + Chr( 10 ) for all platforms, which is wrong, and no .sh file will work with such EOL. To make HBIDE portable, such hard-wired windos EOL should never be used and all file reading functions should accept all kinds of EOLs. Brgds, Viktor On Thu, Apr 8, 2010 at 2:49 PM, marco bra wrote: > > > 2010/4/8 Barry Jackson >> >> On 08/04/10 11:21, Barry Jackson wrote: >> >>> >>> So, now the problem seems to be the missing full path to hbmk2 >> >> Ignore that silly remark - hbmk2 is already in the path and should be >> found. >> >> Something strange though. >> I paused hbide just after it wrote (and closed) the temp script. >> I found the script and ran it after displaying PATH and looking at the >> script:- >> >> [...@jackodesktop tmp]$ echo $PATH >> >> /usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/home/baz/Scripts:/home/baz/bin:/home/baz/SVN/harbour/bin/linux/gcc:/home/baz/SVN/harbour/lib/linux/gcc:/home/baz/SVN/harbour/include >> >> [...@jackodesktop tmp]$ cat 7aqf54.sh >> #!/bin/sh >> export HB_COMPILER=gcc >> export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc >> export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc >> export PATH=$PATH:/home/baz/SVN/harbour/include >> export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc >> >> [...@jackodesktop tmp]$ sh 7aqf54.sh > > Please read http://www.troubleshooters.com/linux/prepostpath.htm > try: > source 7aqf54.sh > to get the PATH exported var changed not only into that script > Hth, best regards > Marco > -- > Linux Infinite Freedom > > > ___ > Harbour mailing list (attachment size limit: 40KB) > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour > > ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
>> Ops, I think I've been there. The problem is with >> parallel execution of script and HBIDE. HBIDE will >> call external process, but continue to run, so it >> will instantly delete the script, so the script >> will not run. >> >> I remember fixing this once. >> >> Try removing FERASE() call for the temporary >> external script to prove that. >> > > FERASE() is issued when process is "finished". > So it does not collide with parallel running. Also > it works perfectly on Windows, so I suspect that it > the script is not executed at all due some reason, > though I may be wrong. Could be. Depends on how process is called by QT on *nix. For sure it has been problem on my Windows system, too, but I didn't check it recently. The CRLF issue is for sure there though. Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 08/04/10 16:27, Pritpal Bedi wrote: Barry Jackson wrote: I paused hbide just after it wrote (and closed) the temp script. I found the script and ran it after displaying PATH and looking at the script:- [...@jackodesktop tmp]$ echo $PATH /usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/home/baz/Scripts:/home/baz/bin:/home/baz/SVN/harbour/bin/linux/gcc:/home/baz/SVN/harbour/lib/linux/gcc:/home/baz/SVN/harbour/include If you will pause hbIDE, probably Qt might have stopped executing the child process as well, no ? If yes, then try not to pause it here but just comment out FERASE() and you will be able to view the contents. To view environment setting, try to dump the path into output console after process is started or just before "finished" is called. export HB_COMPILER=gcc export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc export PATH=$PATH:/home/baz/SVN/harbour/include export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc Please add path to Harbour bin as the last line ( in hbide.env ) {content} export PATH=$PATH:/home/baz/SVN/harbour/ It appears script is not "executed" at all. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ OK But before I do, may I ask whether the line I see in the console output is the command used to launch the build? /bin/bash: /home/baz/tmp/ao9flu.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en If it's just the error message only then fine, but if it is the command then it should not have the ":". Without this, (using a dummy script in ~/tmp) it runs OK :- /bin/bash /home/baz/tmp/test.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en I have searched your code to try to see the actual command line but can't get at it. Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 08/04/10 16:27, Pritpal Bedi wrote: Please add path to Harbour bin as the last line ( in hbide.env ) {content} export PATH=$PATH:/home/baz/SVN/harbour/ It appears script is not "executed" at all. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ I just tested running the script at the command line, after killing the FERASE() as suggested. PATH is ONLY changed for the duration of the script. If I add "echo $PATH" as last line INSIDE the script, the path has changed. Once script is finished then the PATH is re-set to original. See the post & link by Marco earlier. Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
>>> export HB_COMPILER=gcc >>> export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc >>> export PATH=$PATH:/home/baz/SVN/harbour/lib/linux/gcc >>> export PATH=$PATH:/home/baz/SVN/harbour/include >>> export PATH=$PATH:/usr/bin/gcc:/usr/lib/gcc BTW, all of the above is not necessary for hbmk2. (given that gcc is already in the PATH, which it is on most systems) So I'd suggest not to confuse matters with these unnecessary lines. In fact it's outright dangerous. For hbmk2, it's enough to put in the PATH, or refer to it with an absolute name (f.e. /home/me/harbour/bin/hbmk2) and it will find everything automatically. Even HB_COMPILER=gcc is totally unnecessary. Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
Hi Pritpal, > Viktor Szakáts wrote: >> >> The CRLF issue is for sure there though. >> > > Can you point out exactly what I should look? I've committed a fix, pls check it. .sh files should have LF as EOL. It also good to use platform native EOL in other places. Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
>> So I'd suggest not to confuse matters with these >> unnecessary lines. In fact it's outright dangerous. >> >> For hbmk2, it's enough to put in the PATH, or >> refer to it with an absolute name (f.e. /home/me/harbour/bin/hbmk2) >> and it will find everything automatically. >> >> Even HB_COMPILER=gcc is totally unnecessary. >> > > You are right when we assume that there is only ONE > environment developer needs or have set his desktop from the > very begining and he donot want to compile with another compiler > or other type of project. In that case there is absolutely no need > to even touch hbide.env. Without any anvironment set, hbIDE only > executes the hbMK2 with its parameters and under the environemnt > hbMK2 detects automatically. > > But what if someone wants to experiment with different > compilers and different type of projects, just like in my case. > There comes the concept of hbide.env. For example, > I compile my ERP solutions "Vouch" with MSVC, BCC, MINGW and > OpenWatcome. I never leave the interface even once. I just > change the environment and there it goes. No problem, but even in this case, the best solution is to setup PATH properly for given compiler and let hbmk2 autodetect compiler. HB_COMPILER is _only_ necessary if there are multiple C compiler present in the PATH at the same time. If that tells anything, on Windows I compile for practically all possible Harbour targets and I never touch HB_COMPILER. Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 08/04/10 20:16, Pritpal Bedi wrote: Can you dump the "Output Console" log showing above lines ? Yes - no problem, now however I think I am seeing the actual command line below the "script exists" line. Just to be sure there was nothing odd going on in my set-up I have since started with fresh new SVN and re-built harbour. I have also read a lot of Viktor's messages about paths and env vars etc. and removed all but the path to harbour and qt4 in my main environment. I have not used install, just make. I have just been playing with :- cC := iif( hbide_getOS() == "nix", "", "/C " ) and tried with :- cC := iif( hbide_getOS() == "nix", "sh ", "/C " ) and :- cC := iif( hbide_getOS() == "nix", ".", "/C " ) Sadly none work and all produce the same file not found error. I would have expected the "sh " to have solved this. You are right - the script is not being run. I added the line:- {content} echo "this ran" > /home/baz/hash/ash_hbide.txt to the script and the file has not appeared. Output :- Project [ ash ]Launch [ No ]Rebuild [ No ]Started [ 21:01:35 ] /home/baz/tmp/h2zifo.sh : Exists /home/baz/tmp/h2zifo.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en Starting in: home/baz/hash : /home/baz/hash/ /bin/bash: /home/baz/tmp/h2zifo.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en : No such file or directory Exit Code [ 127 ]Exit Status [ 0 ]Finished at [ 21:01:35 ] Done in [ 0.12 Secs ] Not sure why, but no matter how I cut and paste the above, the text wraps but the -- lines do not. Nothing is wrapped in the hbide window. Current hbide.env:- [ COMMON ] PLATFORM = linux COMPILER = gcc [GCC] {hb_comp} gcc {content} export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc {content} echo "this ran" > /home/baz/hash/ash_hbide.txt [ DUMMY ] {hb_comp} gcc {content} export HB_COMPILER=gcc Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 08/04/10 21:54, Pritpal Bedi wrote: The is important: /bin/bash: /home/baz/tmp/h2zifo.sh&& hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en : No such file or directory This output is sent by QProcess:read() method when an error is generated. /bin/bash: is sent by Qt and I do not know what it is. That is similar format to bash error message format e.g. [...@jackodesktop ~]$ qwertyuiop bash: qwertyuiop: command not found [...@jackodesktop ~]$ sh is normally a link to bash which is always in /bin in the system path, so /bin/bash does the same as sh Can you check the value of ? /bin/bash Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 08/04/10 23:58, Pritpal Bedi wrote: Barry Jackson wrote: /bin/bash: is sent by Qt and I do not know what it is. That is similar format to bash error message format e.g. [...@jackodesktop ~]$ qwertyuiop bash: qwertyuiop: command not found [...@jackodesktop ~]$ sh is normally a link to bash which is always in /bin in the system path, so /bin/bash does the same as sh Can you check the value of ? /bin/bash So it means /bin/bash /home/baz/tmp/h2zifo.sh&& hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en ^^ is not executing /home/baz/tmp/h2zifo.sh&& [ Notice no space between .sh and&& ] if this is the case, I am confused, why not it shows up a space inbetween. the constructor is : cArg := iif( empty( ::cBatch ), cC, cC + ::cBatch + " && " ) ^ Don't get confused between the .sh extension which is optionally used for shell scripts, and the command sh which is a link to /bin/bash. Where are you seeing no space between script.sh and && ? cCArg is:- /home/baz/asd45f.sh && I have not seen it without the space. The final command sent to the command line should AFAICT be:- /bin/bash /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en Running that on command line works fine. At present (from the console output) it seems to be just:- /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en If I change to this cC := iif( hbide_getOS() == "nix", "/bin/bash ", "/C " ) then the console output looks correct, but still does not run:- /home/baz/tmp/mw7pe1.sh : Exists /bin/bash /home/baz/tmp/mw7pe1.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en Starting in: home/baz/hash : /home/baz/hash/ /bin/bash: /bin/bash /home/baz/tmp/mw7pe1.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en : No such file or directory If Qt sends the /bin/bash cCmd part invisibly, then I am of course wrong, but I would have expected the full command to be shown in the error message. > > I am really lost. No hope for me then :-( ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 09/04/10 10:08, Pritpal Bedi wrote: No hope for me then :-( Don't be disheartened. We will succeed one day. OK I made some progress - lots more tests after hacking IdeProjManager:buildProject I made a script:- /home/baz/hash/test_hb.sh and hard coded cArg to be "test_hb.sh" and removed all the other following commands etc. It runs OK and writes a message to the console. I then replaced it with just "updt" which is a globally accessible script I have which as user just throws up a warning massage and quits. That runs OK I then changed it to cArg := "test_hb.sh && updt" and bang :- test_hb.sh && updt Starting in: home/baz/hash : /home/baz/hash/ /bin/bash: test_hb.sh && updt: No such file or directory From the command line:- [...@jackodesktop ~]$ cd hash [...@jackodesktop hash]$ sh test_hb.sh && updt Test text from test_hb.sh <= correct Sorry, you must run this as root. (Use su NOT su -)<= correct [...@jackodesktop hash]$ I also tested just using the test_hb.sh script with a parameter passed to it ( "test_hb.sh parameter" )and it failed the same way. Is Qt outputting real CHR(20) spaces I wonder? Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On Fri, 09 Apr 2010, Pritpal Bedi wrote: Hi, > > At present (from the console output) it seems to be just:- > > /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info > > -lang=en > > You are not taking into consideration . > QProcess() expects two components, command and parameters. > What you see are parameters, command is verified with > as it shows up as - /bin/bash ( you confirmed in a prev post ). > > > If I change to this > > cC := iif( hbide_getOS() == "nix", "/bin/bash ", "/C " ) > > then the console output looks correct, but still does not run:- the standard parameter delimiter is '-'. '/' is MS "extensions" which works only in DOS based systems. In all shells '-c ' can be used to execute command specified in . All other parameters passed after are parameters of executed command. > Not invisibly. We are sending it as , where > cCmd == /bin/bash > cArgs == /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace > -info -lang=en I guess that /home/baz/tmp/ahrl8i.sh contains some environment variables settings. It will not work as you want for few reasons. 1. shell will try to execute above cArgs as single command and should show the message that such file does not exist. You should use "-c" switch before. 2. /home/baz/tmp/ahrl8i.sh does not have executable attribute so after fixing the problem in point 1 you will have message like: /home/baz/tmp/ahrl8i.sh: Permission denied 3. If you set executable attribute (point 2) then you exploit next problem. All environment variables set by /home/baz/tmp/ahrl8i.sh are local to /home/baz/tmp/ahrl8i.sh and are not visible for hbmk2 and its child processes. To resolve it you should not execute /home/baz/tmp/ahrl8i.sh as normal file but _include_ it to the current shell. Included files does not need executable attribute so you will not have to problem in point 2. To include file you can use "." command, i.e.: . /home/baz/tmp/ahrl8i.sh BTW the extension like .sh have no meaning in *nixes so you can ignore them. You can also remove "#!/bin/sh" from included files because "#" is used as comment (like REM in BATCH files). In summary the final command should look like: cmd := 'sh -c ". /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp"' cmd += ' -q -trace -info -lang=en' HB_PROCESSRUN( cmd ) I do not know the QProcess parameters so I cannot tell you how exactly it should look. Your comment above suggests that it should be enough to make: cCmd := '/bin/sh' cArgs := '-c ". /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp"' cArgs += ' -q -trace -info -lang=en' HTH, best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On Fri, 09 Apr 2010, Przemysław Czerpak wrote: Hi, > it should look. Your comment above suggests that it should be enough > to make: >cCmd := '/bin/sh' >cArgs := '-c ". /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp"' >cArgs += ' -q -trace -info -lang=en' Sorry, stupid typo, it should be: cCmd := '/bin/sh' cArgs := '-c ". /home/baz/tmp/ahrl8i.sh && hbmk2 /home/baz/hash/ash.hbp' + ; ' -q -trace -info -lang=en"' best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 09/04/10 11:35, Przemysław Czerpak wrote: On Fri, 09 Apr 2010, Przemysław Czerpak wrote: Hi, it should look. Your comment above suggests that it should be enough to make: cCmd := '/bin/sh' cArgs := '-c ". /home/baz/tmp/ahrl8i.sh&& hbmk2 /home/baz/hash/ash.hbp"' cArgs += ' -q -trace -info -lang=en' Sorry, stupid typo, it should be: cCmd := '/bin/sh' cArgs := '-c ". /home/baz/tmp/ahrl8i.sh&& hbmk2 /home/baz/hash/ash.hbp' + ; ' -q -trace -info -lang=en"' best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour Hi Przemek, Thanks for your input - well explained as always! I am struggling to follow your use of quotes in cArgs above. Is that correct? I have hacked the calling routine to test it and get:- /bin/sh: ' -c . "/home/baz/tmp/5qwnv4.sh && hbmk2 /home/baz/hash/ash.hbp' + ' -q -trace -info -lang=en "': No such file or directory I can get this to run OK from the command line, but not yours. sh -c ". /home/baz/tmp/test.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en " Note . is inside the quotes. (temp.sh is similar to the other transitory scripts) Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 09/04/10 16:26, Pritpal Bedi wrote: You are constructing wrongly. Very likely :-) I will study the differences later, but just for now :- Project [ ash ]Launch [ No ]Rebuild [ No ]Started [ 16:47:10 ] batchfile = /home/baz/tmp/eurxke.sh : Exists cCmd = /bin/bash arguments = -c "./home/baz/tmp/eurxke.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en " Starting in: home/baz/hash : /home/baz/hash/ /bin/bash: - : invalid option Usage: /bin/bash [GNU long option] [option] ... /bin/bash [GNU long option] [option] script-file ... GNU long options: --debug --debugger --dump-po-strings --dump-strings --help --init-file --login --noediting --noprofile --norc --posix --protected --rcfile --restricted --verbose --version --wordexp Shell options: -irsD or -c command or -O shopt_option (invocation only) -abefhkmnptuvxBCHP or -o option Exit Code [ 2 ]Exit Status [ 0 ]Finished at [ 16:47:10 ]Done in [ 0.61 Secs ] I tried replacing cCmd with /bin/sh and :- snip batchfile = /home/baz/tmp/8vrt10.sh : Exists cCmd = /bin/sh arguments = -c "./home/baz/tmp/8vrt10.sh && hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en " Starting in: home/baz/hash : /home/baz/hash/ /bin/sh: - : invalid option Usage: /bin/sh [GNU long option] [option] ... /bin/sh [GNU long option] [option] script-file ... GNU long options: --debug --debugger ---snip- Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 09/04/10 16:26, Pritpal Bedi wrote: IF hbide_getOS() == "nix" cArg := iif( empty( ::cBatch ), cC, cC + '".' + ::cBatch + "&& " ) cArg += cExeHbMk2 + " " + cHbpPath + cCmdParams + '"' ELSE *cArgs := '-c ". ' + /home/baz/tmp/ahrl8i.sh&& hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en"' ...to add to my other reply (which is taking for ever to hit the list) the above is missing a space after . however with it there it still fails with same invalid option error from hbide, but does run from cmd line. Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 09/04/10 17:43, Barry Jackson wrote: On 09/04/10 16:26, Pritpal Bedi wrote: IF hbide_getOS() == "nix" cArg := iif( empty( ::cBatch ), cC, cC + '".' + ::cBatch + "&& " ) cArg += cExeHbMk2 + " " + cHbpPath + cCmdParams + '"' ELSE *cArgs := '-c ". ' + /home/baz/tmp/ahrl8i.sh&& hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en"' ...to add to my other reply (which is taking for ever to hit the list) the above is missing a space after . however with it there it still fails with same invalid option error from hbide, but does run from cmd line. Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour Output from latest SVN (14320) :- Project [ ash ]Launch [ No ]Rebuild [ No ]Started [ 16:08:44 ] Batch File Exists => /home/baz/tmp/yydylr.sh Batch File Contents => #!/bin/sh export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc echo "this ran" > /home/baz/hash/ash_hbide.txt hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en Command => /bin/bash Arguments => -c /home/baz/tmp/yydylr.sh CurDir() => home/baz/hash Starting in => /home/baz/hash/ /bin/bash: - : invalid option Usage: /bin/bash [GNU long option] [option] ... /bin/bash [GNU long option] [option] script-file ... GNU long options: --debug --debugger --dump-po-strings --dump-strings --help --init-file --login --noediting --noprofile --norc --posix --protected --rcfile --restricted --verbose --version --wordexp Shell options: -irsD or -c command or -O shopt_option (invocation only) -abefhkmnptuvxBCHP or -o option Exit Code [ 2 ]Exit Status [ 0 ]Finished at [ 16:08:44 ]Done in [ 0.63 Secs ] Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
>> Usage: /bin/bash [GNU long option] [option] ... >> /bin/bash [GNU long option] [option] script-file ... >> GNU long options: >> --debug >> > > Can you change > cC := iif( hbide_getOS() == "nix", "-c ", "/C " ) > to > cC := iif( hbide_getOS() == "nix", "-c .", "/C " ) > > and try again? Rather to: cC := iif( hbide_getOS() == "nix", "", "/C " ) An .sh file is not a command, so -c is just not needed there. Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 11/04/10 17:07, Viktor Szakáts wrote: Usage: /bin/bash [GNU long option] [option] ... /bin/bash [GNU long option] [option] script-file ... GNU long options: --debug Can you change cC := iif( hbide_getOS() == "nix", "-c ", "/C " ) to cC := iif( hbide_getOS() == "nix", "-c .", "/C " ) and try again? Rather to: cC := iif( hbide_getOS() == "nix", "", "/C " ) An .sh file is not a command, so -c is just not needed there. Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour I thought I would go with Viktor's version first! :-) :-) :-) :-) :-) :-) Project [ ash ]Launch [ No ]Rebuild [ No ]Started [ 19:04:46 ] Batch File Exists => /home/baz/tmp/91uqn7.sh Batch File Contents => #!/bin/sh export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc echo "this ran" > /home/baz/hash/ash_hbide.txt hbmk2 /home/baz/hash/ash.hbp -q -trace -info -lang=en Command => /bin/bash Arguments => /home/baz/tmp/91uqn7.sh CurDir() => home/baz/hash Starting in => /home/baz/hash/ hbmk2: Autodetected platform: linux hbmk2: Autodetected C compiler: gcc hbmk2: Using Harbour: /home/baz/SVN/harbour/bin /home/baz/SVN/harbour/include /home/baz/SVN/harbour/lib/linux/gcc /home/baz/SVN/harbour/lib/linux/gcc hbmk2: Harbour compiler command (embedded): (/home/baz/SVN/harbour/bin/linux/gcc/harbour) -n2 /home/baz/hash/ash.prg /home/baz/hash/f_amax.prg /home/baz/hash/b_bget.prg /home/baz/hash/f_getini.prg /home/baz/hash/products.prg /home/baz/hash/f_chtd.prg /home/baz/hash/catalog.prg /home/baz/hash/account1.prg /home/baz/hash/sales.prg /home/baz/hash/f_sysset.prg /home/baz/hash/utils.prg /home/baz/hash/ashelp.prg /home/baz/hash/company.prg /home/baz/hash/l_syserr.prg /home/baz/hash/f_inxcnt.prg /home/baz/hash/terminal.prg /home/baz/hash/term2.prg /home/baz/hash/f_beep.prg /home/baz/hash/l_dbfsek.prg /home/baz/hash/lists.prg /home/baz/hash/l_dbftra.prg /home/baz/hash/f_gblank.prg /home/baz/hash/f_fn_ok.prg /home/baz/hash/l_dbfzap.prg /home/baz/hash/f_fn_mat.prg /home/baz/hash/f_bskip.prg /home/baz/hash/batch.prg /home/baz/hash/web.prg /home/baz/hash/f_clmess.prg /home/baz/hash/f_mbeep.prg /home/baz/hash/f_recalc.prg /home/baz/hash/f_fpknum.prg /home/baz/hash/f_outed.prg /home/baz/hash/f_strmem.prg /home/baz/hash/f_inkeyw.prg /home/baz/hash/f_delwin.prg /home/baz/hash/f_tagged.prg /home/baz/hash/l_sysscr.prg /home/baz/hash/l_syspop.prg /home/baz/hash/f_go_bot.prg /home/baz/hash/account2.prg /home/baz/hash/f_bx_qry.prg /home/baz/hash/vatrep.prg /home/baz/hash/year_end.prg /home/baz/hash/f_updtda.prg /home/baz/hash/f_go_top.prg /home/baz/hash/f_ntod.prg /home/baz/hash/l_sysdat.prg /home/baz/hash/l_sysntx.prg /home/baz/hash/bank.prg /home/baz/hash/l_syscol.prg /home/baz/hash/l_colsys.prg /home/baz/hash/l_systmu.prg /home/baz/hash/l_sysmnu.prg /home/baz/hash/l_syspri.prg /home/baz/hash/f_memvar.prg /home/baz/hash/l_dbfskp.prg /home/baz/hash/f_lupdat.prg /home/baz/hash/f_gettop.prg /home/baz/hash/f_locate.prg /home/baz/hash/orders.prg /home/baz/hash/f_dbfuse.prg /home/baz/hash/f_getco.prg /home/baz/hash/f_invtag.prg /home/baz/hash/f_ctrtag.prg /home/baz/hash/ctools.prg /home/baz/hash/f_tag.prg /home/baz/hash/f_hblog.prg -q -o/home/baz/tmp/ -i/home/baz/SVN/harbour/include Harbour 2.1.0dev (Rev. 14310) Copyright (c) 1999-2010, http://www.harbour-project.org/ hbmk2: C/C++ compiler command: gcc -c -O3 -Wall -W -pipe -I/home/baz/SVN/harbour/include /home/baz/tmp/ash.c -o /home/baz/tmp/ash.o hbmk2: C/C++ compiler command: gcc -c -O3 -Wall -W -pipe -I/home/baz/SVN/harbour/include /home/baz/tmp/f_amax.c -o /home/baz/tmp/f_amax.o hbmk2: C/C++ compiler command: gcc -c -O3 -Wall -W -pipe -I/home/baz/SVN/harbour/include /home/baz/tmp/b_bget.c -o /home/baz/tmp/b_bget.o hbmk2: C/C++ compiler command: gcc -c -O3 -Wall -W -pipe -I/home/baz/SVN/harbour/include /home/baz/tmp/f_getini.c -o /home/baz/tmp/f_getini.o hbmk2: C/C++ compiler command: gcc -c -O3 -Wall -W -pipe -I/home/baz/SVN/harbour/include /home/baz/tmp/products.c -o /home/baz/tmp/products.o hbmk2: C/C++ compiler command: gcc -c -O3 -Wall -W -pipe -I/home/baz/SVN/harbour/include /home/baz/tmp/f_chtd.c -o /home/baz/tmp/f_chtd.o hbmk2: C/C++ compiler command: gcc -c -O3 -Wall -W -pipe -I/home/baz/SVN/harbour/include /home/baz/tmp/catalog.c -o /home/baz/tmp/catalog.o hbmk2: C/C++ compiler command: gcc -c -O3 -Wall -W -pipe -I/home/baz/SVN/harbour/include /home/baz/tmp/account1.c -o /home/baz/tmp/account1.o hbmk2: C/C++ compiler command: gcc -c -O3 -Wall -W -pipe
Re: [Harbour] Re: HBIDE Project build start folder problem
> It should launch theoretically. > But let us examine how I am initiating the launch. > > #if 1 > qProcess := QProcess():new() > qProcess:setWorkingDirectory( hbide_pathToOSPath( > oProject:wrkDirectory ) ) > IF !empty( oProject:launchParams ) > qStr := QStringList():new() > qStr:append( oProject:launchParams ) > qProcess:startDetached_1( cTargetFN, qStr ) > ELSE > qProcess:startDetached_2( cTargetFN ) > ENDIF > qProcess:waitForStarted() > qProcess := NIL > > #else > > Please investigate. It is straight forward. > Somewhere we are missing how should we pass the params to QProcess(). Accidentally I've stumbled upon new code to detect executable name, and it's not right. First of all "hbmk2: Linker command:" text is only shown when -trace mode is used, second, there is no guarantee that '-o' option is used in all supported target compilers, this is not true even with current set of compilers. Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 11/04/10 20:14, Pritpal Bedi wrote: Pritpal Bedi wrote: It should launch theoretically. But let us examine how I am initiating the launch. #if 1 qProcess := QProcess():new() qProcess:setWorkingDirectory( hbide_pathToOSPath( oProject:wrkDirectory ) ) IF !empty( oProject:launchParams ) qStr := QStringList():new() qStr:append( oProject:launchParams ) qProcess:startDetached_1( cTargetFN, qStr ) ELSE qProcess:startDetached_2( cTargetFN ) ENDIF qProcess:waitForStarted() qProcess := NIL #else Please investigate. It is straight forward. Somewhere we are missing how should we pass the params to QProcess(). METHOD IdeProjManager:launchProject( cProject, cExe ) needs to be overhauled as it is Windows centric anyway. Because passed parameter is not having ".exe" as extnsion, nothing has hapened. Please check. - enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ I hit another problem trying to test with a simple "Hello World" project. I have seen this before but was waiting until other issues were fixed. On attempting to add a second project to hbide, either by creating from scratch, or using an existing .hbp, this array bound error crashes hbide. http://i115.photobucket.com/albums/n287/barjac_2006/hbide10.png My ash project does not run now - I suspect a change in Harbour in the last few days has broken it as it has always been OK. Error DBCMD/35 Workarea not in use: __DBLOCATE Called from __DBLOCATE(0) Called from INTVAR(401) Called from MAIN(195) It's a very simple early routine that opens a .dbf, locates some data and closes it again, before main system is up and indexes opened etc. 399 FUNCTION intvar 400 USE company 401 LOCATE FOR co = "ZZ" 402 IF FOUND() 403zco = cmpny ---snip--- Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 11/04/10 21:08, Pritpal Bedi wrote: First, do not mix two issues in one thread, open another. Sorry Can you guard idehome.prg#368 aadd( aHtm, '' + dtoc( dir_[ 1,3 ] ) + " " + dir_[ 1,4 ] ) with if ! empty( dir_ ) aadd( aHtm, '' + dtoc( dir_[ 1,3 ] ) + " " + dir_[ 1,4 ] ) endif That worked - sort of, but it seems not to save the second project properly between runs, and mixes displayed info from one project in the other, so I now have just one very simple project to test this problem. Project [ hellotest ]Launch [ Yes ]Rebuild [ No ]Started [ 23:32:26 ] Batch File Exists => /home/baz/tmp/2bxo6s.sh Batch File Contents => #!/bin/sh export PATH=$PATH:/home/baz/SVN/harbour/bin/linux/gcc hbmk2 /home/baz/hbr/hbhello/hellotest.hbp -q -trace -info -lang=en Command => /bin/bash Arguments => /home/baz/tmp/2bxo6s.sh CurDir() => home/baz/hash Starting in => /home/baz/hbr/hbhello/ <= CurDir() wrong - this project is not going into /home/baz/hash hbmk2: Autodetected platform: linux hbmk2: Autodetected C compiler: gcc hbmk2: Using Harbour: /home/baz/SVN/harbour/bin /home/baz/SVN/harbour/include /home/baz/SVN/harbour/lib/linux/gcc /home/baz/SVN/harbour/lib/linux/gcc hbmk2: Harbour compiler command (embedded): (/home/baz/SVN/harbour/bin/linux/gcc/harbour) -n2 /home/baz/hbr/hbhello/hellotest.prg -q -o/home/baz/tmp/ -i/home/baz/SVN/harbour/include Harbour 2.1.0dev (Rev. 14310) Copyright (c) 1999-2010, http://www.harbour-project.org/ hbmk2: C/C++ compiler command: gcc -c -O3 -Wall -W -pipe -I/home/baz/SVN/harbour/include /home/baz/tmp/hellotest.c -o /home/baz/tmp/hellotest.o hbmk2: C/C++ compiler command: gcc -c -O3 -Wall -W -pipe -I/home/baz/SVN/harbour/include /home/baz/tmp/hbmk_kv2ysd.c -o /home/baz/tmp/hbmk_kv2ysd.o hbmk2: Linker command: gcc /home/baz/tmp/hellotest.o /home/baz/tmp/hbmk_kv2ysd.o -Wl,--start-group -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgttrm -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lm -ldl -lrt -lpcre -lz -Wl,--end-group -ohellotest -L/home/baz/SVN/harbour/lib/linux/gcc Exit Code [ 0 ]Exit Status [ 0 ]Finished at [ 23:32:28 ]Done in [ 1.10 Secs ] Detected exeutable => hellotest<== Typo :-) Launching application [ /home/baz/hbr/hbhello/hellotest ] <== Looks correct. There is no more output in the console though. On command line in hbhello:- [...@jackodesktop hbhello]$ ./hellotest Hello World or from anywhere :- [...@jackodesktop ~]$ /home/baz/hbr/hbhello/hellotest Hello World How is current directory set? Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 11/04/10 20:52, Barry Jackson wrote: On 11/04/10 20:14, Pritpal Bedi wrote: Pritpal Bedi wrote: It should launch theoretically. But let us examine how I am initiating the launch. My ash project does not run now - I suspect a change in Harbour in the last few days has broken it as it has always been OK. Error DBCMD/35 Workarea not in use: __DBLOCATE Called from __DBLOCATE(0) Called from INTVAR(401) Called from MAIN(195) Pritpal, Ah! - this is related to hbide! I have just discovered that hbide IS launching ash - but in the background and after hbide is closed the process is still running - locking the .dbf, which is why I was getting the above error in subsequently trying to run my appliaction. I ran tests on dBlocate() etc and all was fine with current harbour, so I re-loaded ash into hbide and tried to launch it. There is nothing in the log, but /home/baz/hash/ash is running. These are the open files (after hbide is closed) :- ash 451baz cwd DIR 8,1112288 3719282 /home/baz/hash ash 451baz txt REG 8,11 1897710 3723851 /home/baz/hash/ash ash 451baz3uW REG 8,11 6634 3719498 /home/baz/hash/datasys.dbf ash 451baz4uW REG 8,11 5120 3719340 /home/baz/hash/datasys.ntx ash 451baz5uR REG 8,11 585627 3719643 /home/baz/hash/cat/irvine.dbf ash 451baz6uR REG 8,11 438272 3719616 /home/baz/hash/cat/irvine.ntx ash 451baz7uW REG 8,11 99 3723291 /home/baz/hash/dal/da100412.dbf ash 451baz8uW REG 8,11 2048 3719592 /home/baz/hash/dal/da90.ntx ash 451baz9uW REG 8,11 7212 3719352 /home/baz/hash/adjvat.dbf ash 451baz 10uW REG 8,11 5120 3719441 /home/baz/hash/adjvat.ntx ash 451baz 11uW REG 8,11 901821 3719438 /home/baz/hash/bank.dbf ash 451baz 12uW REG 8,11 193536 3719312 /home/baz/hash/bank.ntx ash 451baz 13uW REG 8,11 207872 3719392 /home/baz/hash/bankref.ntx ash 451baz 14uW REG 8,1192109 3719410 /home/baz/hash/batch.dbf ash 451baz 15uW REG 8,1137888 3719465 /home/baz/hash/batch.ntx ash 451baz 16uW REG 8,11 9135 3719411 /home/baz/hash/c_cust.dbf ash 451baz 17uW REG 8,11 2048 3719430 /home/baz/hash/c_custno.ntx ash 451baz 18uW REG 8,11 2048 3719388 /home/baz/hash/c_pcode.ntx ash 451baz 19uW REG 8,11 2048 3719473 /home/baz/hash/c_lname.ntx ash 451baz 20uW REG 8,11 2048 3719513 /home/baz/hash/c_fname.ntx ash 451baz 21uW REG 8,11 1082 3719514 /home/baz/hash/c_orders.dbf ash 451baz 22uW REG 8,11 512 3719474 /home/baz/hash/c_orders.dbt ash 451baz 23uW REG 8,11 2048 3719491 /home/baz/hash/c_orders.ntx ash 451baz 24uW REG 8,11 2048 3719386 /home/baz/hash/c_ordcus.ntx ash 451baz 25uW REG 8,11 1570 3719502 /home/baz/hash/c_ordlst.dbf ash 451baz 26uW REG 8,11 2048 3719489 /home/baz/hash/c_ordlst.ntx ash 451baz 27uW REG 8,11 2048 3719432 /home/baz/hash/c_item.ntx ash 451baz 28uW REG 8,11 382594 3719427 /home/baz/hash/cashbk.dbf ash 451baz 29uW REG 8,1176800 3719505 /home/baz/hash/cashbk.ntx ash 451baz 30uW REG 8,11 218945 3719322 /home/baz/hash/company.dbf ash 451baz 31uW REG 8,11 6144 3719299 /home/baz/hash/coco.ntx ash 451baz 32uW REG 8,1113312 3719406 /home/baz/hash/conam.ntx ash 451baz 33uW REG 8,11 2821 3719499 /home/baz/hash/custinv.dbf ash 451baz 34uW REG 8,11 2048 3719343 /home/baz/hash/custinv.ntx ash 451baz 35uW REG 8,11 6611 3719307 /home/baz/hash/customer.dbf ash 451baz 36uW REG 8,11 2048 3719484 /home/baz/hash/customer.ntx ash 451baz 37uW REG 8,11 278873 3719304 /home/baz/hash/delivery.dbf ash 451baz 38uW REG 8,11 196608 3719355 /home/baz/hash/delivery.ntx ash 451baz 39uW REG 8,1167763 3719361 /home/baz/hash/grpcode.dbf ash 451baz 40uW REG 8,11 8192 371
Re: [Harbour] Re: HBIDE Project build start folder problem
On 12/04/10 23:48, Pritpal Bedi wrote: experiment with qProcess:startDetached_2( cTargetFN ) Play with METHOD IdeProjManager:launchProject( cProject, cExe ) and let us know what parameters are passed and in what way. May be we need to initiate a shell command to execute the executable. I am pretty useless with OOP, but digging a little this looks relevant? From QT 4.5 QProcess Class Reference QProcess::startDetached. Unix: The started process will run in its own session and act like a daemon. Windows: The started process will run as a regular standalone process. Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
Pritpal Bedi wrote: Unix: The started process will run in its own session and act like a daemon. I do not know what exactly this means in unix. Also I do not know how to cover it. Someone with more nixes knowldge should tell us. It is similar to running a service in windows. It is not attached to any input or output device. Regards Alex ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On Mon, 12 Apr 2010, Pritpal Bedi wrote: Hi, > >> Unix: The started process will run in its own session and act like a > >> daemon. > >> I do not know what exactly this means in unix. > >> Also I do not know how to cover it. Someone with more nixes knowldge > >> should tell us. > > It is similar to running a service in windows. It is not attached to any > > input > > or output device. > Thanks Alex for the info. > So the question is how to invoke it as application but in detached manner. > More investigation is needed from Qt documentation. hb_processRun( , [ ], [ @ ], [ @ ], ; [ ] ) -> must not be .T. if you do not want to execute process in background (as daemon). This command is implemented for all platforms. best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On Mon, 12 Apr 2010, Pritpal Bedi wrote: Hi, > >hb_processRun( , [ ], [ @ ], [ @ > > ], ; > > [ ] ) -> > > must not be .T. if you do not want to execute process in > > background (as daemon). > > This command is implemented for all platforms. > If == .F. then the process will run under hbIDE's process space, > right? > If yes, then when the control will return to hbIDE ? Immediately after > initiating the process > or after initiated process will terminate? Look at parameters. They give you the answer. To set , and is necessary to wait inside hb_processRun() until executed command terminates. If you want to still execute your foreground process then use: hb_processOpen( , ; [ @ ], [ @ ], [ @ ], ; [ ], [ @ ] ) -> | F_ERROR and then: hb_processValue( [, ] ) -> or: hb_processClose( [, ] ) -> , and is value returned by executed process (errorLevel()), is .T. by default, is .T. by default, when it's .F. the process is killed unconditionally. best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
>> is .T. by default, >> is .T. by default, when it's .F. the process is killed >> unconditionally. >> > > I tried this: > > hb_processRun( cExecutable, NIL, NIL, NIL, .F. ) > Executable is invoked but control is returned to the caller after > termination of executable. > hb_processRun( cExecutable, NIL, NIL, NIL, .T. ) > Executable is active without showing up interface ( as a daemon ) > but still control is not returned back to caller, hangs forever and has to > be killed via task manager. > > I need a functionality where new process executes normally at its own and > control is returned back to caller. How this can be achieved with > hb_processRun() ? I don't understand you. The code is there in hbmk2.prg, why don't you take a look at it? Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On Tue, 13 Apr 2010, Pritpal Bedi wrote: Hi, > > Look at parameters. They give you the answer. > > To set , and is necessary to wait inside > > hb_processRun() until executed command terminates. > > > > If you want to still execute your foreground process then use: > >hb_processOpen( , ; > >[ @ ], [ @ ], [ @ ], ; > >[ ], [ @ ] ) -> | F_ERROR > > and then: > >hb_processValue( [, ] ) -> > > or: > >hb_processClose( [, ] ) -> > > > > , and > read and write using FREAD()/FWRITE(). > > is value returned by executed process (errorLevel()), > > is .T. by default, > > is .T. by default, when it's .F. the process is killed > > unconditionally. > I tried this: >hb_processRun( cExecutable, NIL, NIL, NIL, .F. ) > Executable is invoked but control is returned to the caller after > termination of executable. >hb_processRun( cExecutable, NIL, NIL, NIL, .T. ) > Executable is active without showing up interface ( as a daemon ) > but still control is not returned back to caller, hangs forever and has to > be killed via task manager. Exactly as I described above. I know that my English is fatal but" "To set , and is necessary to wait inside hb_processRun() until executed command terminates." seems to be clear. > I need a functionality where new process executes normally at its own and > control is returned back to caller. How this can be achieved with > hb_processRun() ? You have to read my message once again. I gave you all necessary information. You have to use hb_processOpen(), i.e.: hProccess := hb_processOpen( cExecutable ) if hProccess != F_ERROR while ( nResult := hb_processValue( hProccess, .F. ) ) == -1 ? "waiting for process..." hb_idleSleep( 1 ) enddo ? "process terminated with result:", nResult endif best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 13/04/10 09:30, Przemysław Czerpak wrote: On Tue, 13 Apr 2010, Pritpal Bedi wrote: I need a functionality where new process executes normally at its own and control is returned back to caller. How this can be achieved with hb_processRun() ? You have to read my message once again. I gave you all necessary information. You have to use hb_processOpen(), i.e.: hProccess := hb_processOpen( cExecutable ) if hProccess != F_ERROR while ( nResult := hb_processValue( hProccess, .F. ) ) == -1 ? "waiting for process..." hb_idleSleep( 1 ) enddo ? "process terminated with result:", nResult endif best regards, Przemek I think I follow what Prital means:- "...where new process executes normally on its own and control is returned back to caller INSTANTLY without waiting for the process to complete." So that the built application will then run totally independently of hbide and hbide may be used for other things or closed while the application is running. Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
Of course nobody has to believe me, but probably the most convenient solution is to launch target using 'hbmk2 -hbrun my.hbp' (for standalone launch) or additional '-run' option (for build and launch operation). This way there is no need to detect target executable name and everything is handled by hbmk2, where launching already works (or if there is any problem, we can fix it at one place). Brgds, Viktor On 2010 Apr 13, at 11:27, Barry Jackson wrote: > On 13/04/10 09:30, Przemysław Czerpak wrote: >> On Tue, 13 Apr 2010, Pritpal Bedi wrote: > >>> I need a functionality where new process executes normally at its own and >>> control is returned back to caller. How this can be achieved with >>> hb_processRun() ? >> >> You have to read my message once again. >> I gave you all necessary information. >> You have to use hb_processOpen(), i.e.: >> >>hProccess := hb_processOpen( cExecutable ) >> >>if hProccess != F_ERROR >> while ( nResult := hb_processValue( hProccess, .F. ) ) == -1 >> ? "waiting for process..." >> hb_idleSleep( 1 ) >> enddo >> ? "process terminated with result:", nResult >>endif >> >> best regards, >> Przemek > > I think I follow what Prital means:- > "...where new process executes normally on its own and control is returned > back to caller INSTANTLY without waiting for the process to complete." > > So that the built application will then run totally independently of hbide > and hbide may be used for other things or closed while the application is > running. > > Rgds, > Barry > > ___ > Harbour mailing list (attachment size limit: 40KB) > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 13/04/10 11:05, Viktor Szakáts wrote: Of course nobody has to believe me, but probably the most convenient solution is to launch target using 'hbmk2 -hbrun my.hbp' (for standalone launch) or additional '-run' option (for build and launch operation). This way there is no need to detect target executable name and everything is handled by hbmk2, where launching already works (or if there is any problem, we can fix it at one place). Brgds, Viktor If I run from command line :- [...@jackodesktop hash]$ hbmk2 ash.hbp -run then ash is built and runs, but it is in a terminal window labelled "hash:hbmk2" If I kill the hbmk2 process then the running ash process drops to a prompt, with ./ash still taking 25% cpu and showtime() still running, displaying the time (as it does in ash). It's the same with: [...@jackodesktop hash]$ hbmk2 ash.hbp -hbrun The launched process still depends on hbmk2. Is there a way to launch a new terminal window and run the process in that, so the launched app is truly independant ? Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
>> Brgds, >> Viktor > > If I run from command line :- > > [...@jackodesktop hash]$ hbmk2 ash.hbp -run > > then ash is built and runs, but it is in a terminal window labelled > "hash:hbmk2" > > If I kill the hbmk2 process then the running ash process drops to a prompt, > with ./ash still taking 25% cpu and showtime() still running, displaying the > time (as it does in ash). > > It's the same with: > [...@jackodesktop hash]$ hbmk2 ash.hbp -hbrun > > The launched process still depends on hbmk2. > Is there a way to launch a new terminal window and run the process in that, > so the launched app is truly independant ? I don't know, but if someone gives me some hints, it's very easy to implement in hbmk2. It already works for win, darwin and os2. For *nix it's AFAIK desktop dependent, and we should also have a default version which is plain terminal based. Here is my code to do that, but I'd highly appreciate if *nix experts would comment on it, before I add it to Harbour: --- IF ! Empty( GetEnv( "GNOME_DESKTOP_SESSION_ID" ) ) nResult := hb_run( "gnome-open " + cFileName ) ELSEIF ! Empty( GetEnv( "KDEDIR" ) ) nResult := hb_run( "kfmclient exec " + cFileName ) ELSE nResult := hb_run( cFileName ) ENDIF --- Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 13/04/10 12:45, Viktor Szakáts wrote: I don't know, but if someone gives me some hints, it's very easy to implement in hbmk2. It already works for win, darwin and os2. For *nix it's AFAIK desktop dependent, and we should also have a default version which is plain terminal based. Here is my code to do that, but I'd highly appreciate if *nix experts would comment on it, before I add it to Harbour: --- IF ! Empty( GetEnv( "GNOME_DESKTOP_SESSION_ID" ) ) nResult := hb_run( "gnome-open " + cFileName ) ELSEIF ! Empty( GetEnv( "KDEDIR" ) ) nResult := hb_run( "kfmclient exec " + cFileName ) ELSE nResult := hb_run( cFileName ) ENDIF --- Brgds, Viktor I can run KDE, Gnome, LXDE or ICEWM here - so am happy to do some testing. In KDE I have no KDEDIR envar by default, so it may be distro specific. ( I run Mandriva 2010.0 ) This will launch a new konsole (in KDE) and run my ash application :- proc main hb_run( "konsole --workdir /home/baz/hash -e /home/baz/hash/ash" ) return I can close the calling konsole without affecting it and the new konsole closes when the (non-GUI) application closes. I will look at Gnome later. Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
OK I have been playing and I now have hbide launching my non-GUI application in konsole in KDE using :- ELSE * qProcess:startDetached_2( cTargetFN ) cRunStr := "konsole --workdir " + oProject:wrkDirectory + " -e " + cTargetFN hb_run( cRunStr ) ENDIF I can close hbide or continue with it while the application runs. Rgds Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On Tue, 13 Apr 2010, Szak�ts Viktor wrote: Hi, > > If I run from command line :- > > [...@jackodesktop hash]$ hbmk2 ash.hbp -run > > then ash is built and runs, but it is in a terminal window labelled > > "hash:hbmk2" > > If I kill the hbmk2 process then the running ash process drops to a prompt, > > with ./ash still taking 25% cpu and showtime() still running, displaying > > the time (as it does in ash). > > It's the same with: > > [...@jackodesktop hash]$ hbmk2 ash.hbp -hbrun > > The launched process still depends on hbmk2. > > Is there a way to launch a new terminal window and run the process in that, > > so the launched app is truly independant ? > I don't know, but if someone gives me some hints, > it's very easy to implement in hbmk2. It already > works for win, darwin and os2. > For *nix it's AFAIK desktop dependent, and we should > also have a default version which is plain terminal > based. > Here is my code to do that, but I'd highly appreciate > if *nix experts would comment on it, before I add it > to Harbour: > --- >IF ! Empty( GetEnv( "GNOME_DESKTOP_SESSION_ID" ) ) > nResult := hb_run( "gnome-open " + cFileName ) >ELSEIF ! Empty( GetEnv( "KDEDIR" ) ) > nResult := hb_run( "kfmclient exec " + cFileName ) >ELSE > nResult := hb_run( cFileName ) >ENDIF > --- This is different thing. When you are working with XWindow then you can execute new programs in separated terminal windows. Such functionality should be optional, i.e. hbide can have an option: [x] execute in new terminal so user can set it when he thinks it's necessary for his program. In such case the application should be executed using some terminal emulator, i.e. xterm, pterm, rxvt, konsole, gnome-terminal, ... It would be niece if user can choose preferred terminal. As default hbide can use: "xterm -e " as most portable setting and user can change it i.e. to: "konsole -e" or "pterm -e" ... -e is the standard option in most of terminal emulators. Warning some gnome-terminal versions have problems with this functionality. best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
Now it remains to be seen how to detect that 'konsole' needs to be used. Is there any universal solution in the Linux world for that whole isse? F.e. on OS X it's called 'open '. Brgds, Viktor On 2010 Apr 13, at 21:28, Barry Jackson wrote: > OK I have been playing and I now have hbide launching my non-GUI application > in konsole in KDE using :- > > ELSE > * qProcess:startDetached_2( cTargetFN ) > cRunStr := "konsole --workdir " + oProject:wrkDirectory + " -e " + > cTargetFN > hb_run( cRunStr ) > ENDIF > > I can close hbide or continue with it while the application runs. > > Rgds > Barry > ___ > Harbour mailing list (attachment size limit: 40KB) > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
Hi Przemek, > This is different thing. > When you are working with XWindow then you can execute new > programs in separated terminal windows. Such functionality > should be optional, i.e. hbide can have an option: > [x] execute in new terminal > so user can set it when he thinks it's necessary for his > program. In such case the application should be executed > using some terminal emulator, i.e. xterm, pterm, rxvt, > konsole, gnome-terminal, ... > It would be niece if user can choose preferred terminal. > As default hbide can use: "xterm -e " as most portable > setting and user can change it i.e. to: "konsole -e" or > "pterm -e" ... > -e is the standard option in most of > terminal emulators. > > Warning some gnome-terminal versions have problems with > this functionality. Speaking of hbmk2, which has a -run/-hbrun functionality, above configurable method seems to defeat the whole purpose of these option (namely to launch target executable in a _simple_ way). What do you recommend as a simple, default, commonly working launch method for hbmk2, which sort of works like 'start' and 'open' in other operating system? (keeping in mind, that an app can be GUI, CUI and cmdline) Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On 13/04/10 21:00, Przemysław Czerpak wrote: It would be nice if user can choose preferred terminal. As default hbide can use: "xterm -e " as most portable setting and user can change it i.e. to: "konsole -e" or "pterm -e" ... -eis the standard option in most of terminal emulators. Yes I agree - I was already thinking along those lines, as the visual effect in different terminal emulators varies dramatically. I have hacked hbide to test and this is working with and without parameter passed to application :- * LOCAL cTargetFN, cTmp, oProject, qProcess, qStr, cExt, cRunStr LOCAL cTargetFN, cTmp, oProject, cExt, cRunStr ---snip--- #if 1 * qProcess := QProcess():new() * qProcess:setWorkingDirectory( hbide_pathToOSPath( oProject:wrkDirectory ) ) IF !empty( oProject:launchParams ) * qStr := QStringList():new() * qStr:append( oProject:launchParams ) *qProcess:startDetached_1( cTargetFN, qStr ) cRunStr := "konsole --workdir " + hbide_pathToOSPath( oProject:wrkDirectory ) + " -e " + cTargetFN +" "+oProject:launchParams ELSE * qProcess:startDetached_2( cTargetFN ) cRunStr := "konsole --workdir " + hbide_pathToOSPath( oProject:wrkDirectory ) + " -e " + cTargetFN ENDIF hb_run( cRunStr ) * qProcess:waitForStarted() * qProcess := NIL #else ... Rgds, Barry ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] Re: HBIDE Project build start folder problem
On Tue, 13 Apr 2010, Szak�ts Viktor wrote: Hi, > Speaking of hbmk2, which has a -run/-hbrun functionality, > above configurable method seems to defeat the whole > purpose of these option (namely to launch target executable > in a _simple_ way). > What do you recommend as a simple, default, commonly working > launch method for hbmk2, which sort of works like 'start' and > 'open' in other operating system? (keeping in mind, that > an app can be GUI, CUI and cmdline) For me current hbmk2 behavior is perfect. Nothing to change. hbmk2 is command line tools so it already has terminal device where is executed and if I sue -run option then it means that I want to use this TTY device. If I want to demonize some programs then I usually have my own code inside the application which will detach the process from current process group so I do not need any special switches or if I want to execute as daemon application which was not designed for such usage then I use nohup or similar tools redirecting IO and using & shell operator. I can also use shell commands like fg, bg, kill, wait, jobs to control such application. We can extend hbmk2 but in fact it will still support only small subset of existing shell functionality so I do not think it's necessary to make anything with it. With HBIDE the problem is a little bit different. This is GUI application so to execute console programs it should create terminal window in which they will be executed. BTW probably most of people do not know about it but first GT driver which was able to create many console windows in single application and switch between them in [x]Harbour world was GTCRS I created long time ago for xHarbour. This code is still present in our GTCRS though disabled by #if 0 (see create_newXterm()). It uses xterm to create new terminal windows. This code may help to understand how they work on lower level. Maybe in some spare time I'll reenable it using current Harbour multiwindow API. best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour