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

World: r3wp

[SDK]

Geomol
9-Aug-2005
[134x2]
I have a problem, if I in a DOS-prompt under windows try to run a 
REBOL program built with REBOL/SDK into a .exe file, and the program 
is not in current directory, but has to be found along the PATH. 
I get the error
Program error: invalid encapsulated data


I've tried under Windows2000 and WinXP. Can others confirm this error? 
(Just make a simple REBOL-script with e.g. a print and try it.)
The problem (bug) can also be verified with altme.exe. Just setup 
path in the DOS-prompt to where, altme is located, and type: altme
Gabriele
9-Aug-2005
[136]
I think REBOL needs a full path to itself.
Geomol
10-Aug-2005
[137]
It works, if you place yourself in the same directory as the .exe 
file and don't give full path. It also works, if you place yourself 
anywhere and give full or relative path. As I see it, the error is 
only, if you're not in the same directory as the .exe file, and the 
system finds it along the PATH environment variable. Maybe I should 
report it in RAMBO!?
Gabriele
10-Aug-2005
[138]
you can report it, but i'm not completely sure it can be fixed.
Henrik
10-Aug-2005
[139x2]
From the builds page: "A Beta test version of the SDK with the 1.3.1 
fixes and changes is now available for current SDK developers. Contact 
REBOL via feedback or email Cindy if you would like to try it."
and it says its for win32
Graham
11-Aug-2005
[141]
Geez, why  not just post it !!
Ladislav
11-Aug-2005
[142]
(because of the source it contains?)
Graham
11-Aug-2005
[143]
what about the exes ?
Ladislav
11-Aug-2005
[144]
(but you need sources to have it complete, don't you?)
Graham
11-Aug-2005
[145x2]
Hmm.  Yes, I guess so!
I stand corrected.
[unknown: 10]
11-Aug-2005
[147]
A Beta test version of the SDK with the 1.3.1 fixes and changes is 
now available for current SDK developers. Contact REBOL via feedback 
or email Cindy if you would like to try it.
Tomc
7-Sep-2005
[148x2]
I have recently started testing with Rebol/View 1.3, and decided 
to

purchase Rebol/SDK.  I have a function in one of my scripts that 
was
working in View during testing, but as soon I start using the SDK
binaries it no longer... um... functions.


In the function, I am trying to set a value in an array using an 
index
variable.

In view, I could do:
   values/:index: value
But in the SDK, I get:
   ** Syntax Error: Invalid word -- :index:

Again, any help would be appreciated.

Thank you,
robert w. dumond
from the mail list
Volker
7-Sep-2005
[150x2]
bata-sdk. also noted on the ML IIRC.
But the subdirectory is not mentioned by sunanda, and not linked 
public.
Micha
10-Oct-2005
[152x5]
plis help
kernel-lib: load/library %kernel32.dll
WriteFile: make routine! [
        hFile                   [integer!]
        lpBuffer                [integer!]
        nNumberOfBytesToWrite   [integer!]
        lpNumberOfBytesWritten  [integer!]
        lpOverlapped            [integer!]
        return:                 [integer!]
 
    ] kernel-lib "WriteFile"
it does not actit
how do to write in rebolu this ?
[DllImportAttribute("kernel32", SetLastError=true)]


        private static extern IntPtr CreateFile(string _lpFileName, 
                                           uint _dwDesiredAccess,

                                                 uint _dwShareMode,

                                        uint _lpSecurityAttributes, 

                                       uint _dwCreationDisposition,

                                        uint _dwFlagsAndAttributes, 

                                              uint _hTemplateFile);

        [DllImportAttribute("kernel32", SetLastError=true)]

        private static extern bool WriteFile(IntPtr _hFile, void* _lpBuffer, 
        uint _nNumberOfBytesToWrite, uint* _lpNumberOfBytesWritten, uint 
        _lpOverlapped);

        [DllImportAttribute("kernel32", SetLastError=true)]
        private static extern bool CloseHandle(IntPtr _hObject);

        [DllImportAttribute("kernel32", SetLastError=true)]

        private static extern bool DeviceIoControl(IntPtr _hDevice, uint 
        _dwIoControlCode, void* _lpInBuffer, uint _nInBufferSize, void* lpOutBuffer, 
        uint _nOutBufferSize, uint* _lpBytesReturned, uint _lpOverlapped);
Benjamin
10-Oct-2005
[157x2]
unsiged integers can safely be casted to integers, you sould know 
that some dll's wont work just because the need special arguments 
like pointers to certain data etc... nay whay why do you need to 
write a file using windows API can't you use rebol ?
btw lpOverlapped  is a pointer to a structure OVELAPPED you can pass 
a structure pointer from rebol using, lpOverlapped [struct! [(OVERLAPPED)]]
the scructure looks like this 
OVERLAPPED: make struct! [
	Internal		[integer!]
	InternalHigh		[integer!]
	Offset			[integer!]
	OffsetHigh		[integer!]
	hEvent			[integer!]
] none
again this still may not work ....
Henrik
13-Oct-2005
[159]
how small a Rebol executable can you build with the SDK? if you take 
away everything? just curious...
Graham
13-Oct-2005
[160]
300k from memory.
Henrik
13-Oct-2005
[161]
thanks
Gregg
14-Oct-2005
[162]
Base is a little smaller (~250K), but that's close enough. If you 
need GUI stuff, it will be around ~550K minimum (using rebface) or 
~650K using all of view and VID..
Allen
15-Oct-2005
[163]
If space is an issue, you can save a lot of space by removing protocols 
that aren't required. I got a few with full VID based but with only 
http protocol supported.. 506kb, 

I'm sure I could drop another 80-100 if I switched to using rebface.
Henrik
1-Nov-2005
[164]
Good place to discuss a remote encapping service? The idea would 
be for RT to provide a service that would allow you to encap source 
code without the SDK. RT encaps your files and provides you with 
an executable that works for 5 minutes. If you pay a fee (5$?), you'll 
get no time limitation.


This could be for people who can't afford the SDK, want to use the 
encap facility to see what it's all about or simply only need to 
encap a single application.
Gabriele
1-Nov-2005
[165]
an encap service as been discussed many times in the past. there 
are a number of problems in doing it.
Henrik
1-Nov-2005
[166x2]
there could be further limitations, such as only allow up to 50 kB 
of source code, or only to a specific platform.
ok...
Gabriele
1-Nov-2005
[168]
the problem is mainly that the process cannot be automated, because 
anyone going to encap a submission must verify that it complies with 
the encap licensing terms.
Henrik
1-Nov-2005
[169]
which basically would mean a rewrite of /encap?
Rebolek
1-Nov-2005
[170]
I think it would mean rewrite of licensing.
Gabriele
1-Nov-2005
[171x2]
no, it's not the code that's the problem. the encap process in itself 
can easily be automated (see the detective builder); but, the licensing 
terms don't make this possible.
i.e. if you allow anyone to encap anything for $5, you get /Command 
for $5.
Henrik
1-Nov-2005
[173x2]
well, it shouldn't be anything. there should be limits to the size 
of the source you could encap, plus isn't it possible to encap with 
only ordinary REBOL/View capabilities?
if it were possible to encap stuff with /command abilites, you'd 
already own /command to test your source prior to encapping...
Pekr
1-Nov-2005
[175]
DocKimbel once told me, that with his R#, encapping is so trivial, 
that he even hesitates to call it a product ;-)
Gabriele
1-Nov-2005
[176x4]
henrik, if you only get normal /View, there is no point in the encap 
service. i.e. it wouldn't help the com interface project at all.
also, it's not true that you would need to have command already.
you just encap a script like:   forever [do ask ">> "]
and you got /Command for $5.
Pekr
1-Nov-2005
[180x3]
:-) nice tip :-)
but licence forbids to expose rebol interpreter, so it would be against 
it ...
I just wonder, if SDK is really so expensive fro ppl? I am from CZ, 
we have bad salary to USD/EU ratio, yet I afforded to buy myself 
an SDK ....
Gabriele
1-Nov-2005
[183]
petr: exactly, licensing forbids it, and that why you can't have 
an automatic encap service where anyone can submit a script and you 
hand back an exe.