r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[SDK]

Pekr
7-Aug-2006
[620]
what do you mean by encap only?
Henrik
7-Aug-2006
[621]
if it only works with encapped programs, not ordinary scripts...
Pekr
7-Aug-2006
[622]
you mean the header trick? I think with encap only ....
Henrik
7-Aug-2006
[623]
ok
Pekr
7-Aug-2006
[624]
encap: [secure none quiet] ; example from docs ...
Anton
7-Aug-2006
[625]
Yes, it doesn't make sense for a normal script to be able to lower 
the security simply in the header :)
Henrik
7-Aug-2006
[626]
nope, just making sure :-)
james_nak
8-Aug-2006
[627]
I've have a script that works fine when executed with rebol but errors 
after being encapped. I know one is supposed to #include source and 
I suspect something is not being included. Is there a quick way to 
find out short of  adding them all. In case you ask...
** Script Error: Cannot use path on none! value
** Where: insert-event-func
** Near: insert system/view/screen-face/feel/event-funcs :funct
:funct
Thanks in advance.
Graham
8-Aug-2006
[628]
missing View ?
james_nak
9-Aug-2006
[629]
That did cross my mind but I am including that and have tried using 
all of the encap versions. Maybe I corrupted the them. I should check.
Anton
10-Aug-2006
[630]
Check how much of that path exists. That full path should exist at 
the beginning of the script (at least just after you have included 
view).
james_nak
10-Aug-2006
[631x2]
Thanks Anton and Graham. I forgot my own first rule of  programming: 
 "When all is said and done, it's probably 'User Error.'
My memory stick that I use did not have enough space for the resulting 
file! Encap, rather than complaining just wrote what it could. After 
making some space, it did its job. I did locate some words that were 
not yet defined so I did a "Search in files" to look for where they 
might be in the sdk/source files. Finding them I "#include"'d the 
source and wow, now it works. 


So Graham you were right. It was missing View. And Anton, next time 
I will check the path; that's a much quicker way to proceed.

It all makes sense now that I'm on the other side of success.
Anton
10-Aug-2006
[633]
Glad that it was something simple :)
Rondon
14-Aug-2006
[634]
Hi Folks. I'd Like to customize the window title for my rebol encaped 
programs.. not with rebview, but rebcommand.. The program is a cgi 
.exe encapsulated. but the window title, when I run it out of the 
browser appears "Rebol -". Can I change that ?
Graham
14-Aug-2006
[635x2]
have to use a windows library call.
can't remember which one though
Anton
15-Aug-2006
[637]
possibly shell32.dll
Graham
15-Aug-2006
[638]
win-lib: make object! [
	
	user-lib: load/library %user32.dll

	SetWindowText: make routine! [
		handle			[integer!]
		Title			[string!]
		return:			[integer!]
	] user-lib "SetWindowTextA"
	
	set 'WindowTitle func [
		Title [string!] 
	] [
		SetWindowText get-modes system/ports/system 'window Title
	]	
]
Maxim
13-Sep-2006
[639]
strange question, is SDK   view 1.3 based?
Gabriele
13-Sep-2006
[640]
yes, if you have the latest update.
Maxim
19-Sep-2006
[641x5]
is there any way to get an encapped application to send data to normal 
DOS stdout stderr (NOT IN REBOL CONSOLE)... I don't care how kludgy, 
even if it means compiling or using a dll with stdio.h included, 
just to access it...
There are things in the universe I just don't understand...
I can load - parse - save a web page directly from the net in one 
line of rebol...
yet It seems impossible to even do a proper stdout call, so that 
another application can use my app's output ... (on windows).  I 
mean its just the most basic thing in any language.
can anyone tell me how I can encap something which would duplicate 
using the -c switch from standard rebol?  (which seems to allow me 
to pipe out )
Volker
19-Sep-2006
[646]
http://www.rebol.com/docs/sdk/encap.html#section-8
Maxim
19-Sep-2006
[647x2]
thanks Volker, I have been trying to get to grips with the SDK.  
Somehow, I am lost when trying to find specific information... many 
times I try subjects, and I either encounter unfinished, incomplete 
or missing docs.   I do find some usefull tidbits here and there.... 
but its a pretty dry ride so far...
so far cgi in the header seems to work like a charm.  THANK YOU volker 
 :-)
Maxim
20-Sep-2006
[649x2]
now, why does using 'CALL within an encapped app cause it to freeze 
up and use 100% system CPU?
hum strange... the DOS prompt returns, yet I still have my encapped 
app running in the task list (at 100%)! my god, how is this possible?
Graham
20-Sep-2006
[651]
call doesn't make encapped apps to freeze .. I use it all the time.
Maxim
20-Sep-2006
[652]
hum  do you use it with any refinements? have you tried it specifically 
with the cgi option?
Graham
20-Sep-2006
[653]
yes, and no.
Maxim
20-Sep-2006
[654x3]
ok, I guess its the stdout redirection which causes it to go wild...
(using cgi)
have you been able to print to the real stdout , allowing your encapped 
app to print within the DOS shell or be used within pipes?
Graham
20-Sep-2006
[657x2]
never tried.
to print ... I call other applications, or send stuff to lpt1
Maxim
20-Sep-2006
[659]
I guess I should have said piped, or streamed to stdout.  I don't 
really want to print on paper ... but I guess you understood...
Gabriele
20-Sep-2006
[660]
Maxim, the Detective uses the cgi option, and prints to the dos command 
prompt if you call it from there (try running "nren help"). It does 
not use call though, but async-call, but i don't remember problems 
with call + cgi options.
Louis
20-Sep-2006
[661]
Is it possible to encap data files into the same .exe file as the 
script that uses them?
Geomol
20-Sep-2006
[662]
Louis, yes: http://www.rebol.com/docs/sdk/encap.html
Louis
20-Sep-2006
[663]
Germol, thanks. I thought I remembered reading that it was possible. 
I'll read the docs again to figure out how.
Gabriele
20-Sep-2006
[664]
#include-string and #include-binary are what you are looking for, 
i think.
Louis
20-Sep-2006
[665]
Gabriele, thanks.
Maxim
21-Sep-2006
[666x4]
Gabriele: asynch-call?
Gabriele, my issue, is that I am trying to capture the output of 
the applications I call.  For this I need to use /console AFAIK. 
 but when I do so, the encapped app just goes mad and enters some 
kind of deadlock at 100% cpu usage.
async-call :  WOW !  direct re-implementation using kernel32 lib!
I will test using it.  the page talks about a polling loop which 
consumes a lot of cpu... can this be improved (like inserting a wait 
0.01) ?