forked from rickparrish/Usurper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCOMPILE.TXT
More file actions
79 lines (58 loc) · 2.96 KB
/
COMPILE.TXT
File metadata and controls
79 lines (58 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Step 0) Assumptions:
The first assumption is that you have Borland Pascal installed in Z:\BP.
If you don't, you'll have to update the BPC.CFG and BUILDBP.CMD files
The second assumption is that you have Virtual Pascal installed in Z:\vp21.
If you don't, you'll have to update the VPC.CFG and BUILDVP.CMD files
*NOTE* The BUILD*.CMD files will copy a BPC.CFG or VPC.CFG into the relevant bin directory, meaning
if you have cusomized the .CFG file in the bin directory, it will be lost. Make a backup!
Step 1) Create directories to hold everything:
Z:\Usurper
Z:\Programming\Usurper
Z:\Programming\Usurper\EXE\BP
Z:\Programming\Usurper\EXE\VP
If you don't have a Z: drive, you can use SUBST or map a network drive to fake one
You can also put the files in an alternate location if you want, you'll just have to update the BUILD*.CMD scripts
Step 2) Get the source
Check out the GIT contents into Z:\Programming\Usurper
Step 3) Edit Z:\vp21\source\tv\dialogs.pas
TLabel.HandleEvent has a bug that will cause EDITOR32 to crash. So go to line 2068, which should be:
C := HotKey(Text^);
if (GetAltCode(C) = Event.KeyCode) or
((C <> #0) and (Owner^.Phase = phPostProcess) and
(UpCase(Event.CharCode) = C)) then FocusLink
And wrap it in a check to see if Text is assigned. In other words, replace it with:
if Assigned(Text) then
begin
C := HotKey(Text^);
if (GetAltCode(C) = Event.KeyCode) or
((C <> #0) and (Owner^.Phase = phPostProcess) and
(UpCase(Event.CharCode) = C)) then FocusLink
end;
Step 4) Edit Z:\vp21\source\rtl\vpsysw32.pas
For some reason the cursor position isn't always updated in the background thread in the Win32 version. I'm guessing
it's a race condition with the CurXPos and CurYPos variables, so the thread doesn't think an update is needed when
one really is. So I've updated my copy of CursorThreadFunc to take the return value of the SemWaitEvent() call into
account, so the update will also happen if the event is signaled. Can't think of a reason why they wouldn't have done
this in the first place. Here's the entire function to copy/paste into place:
function CursorThreadFunc(P: Pointer): Longint;
var
LastX, LastY: Longint;
begin
LastX := -1;
LastY := -1;
repeat
if SemWaitEvent(semCursor, 300) or (CurXPos <> LastX) or (CurYPos <> LastY) then
begin
DoSetCursorPosition;
LastX := CurXPos;
LastY := CurYPos;
end;
until tidCursor = -2;
tidCursor := -1;
end;
Step 5) Extract build scripts / config files
Extract COMPILE.ZIP (into the same directory as COMPILE.TXT). As mentioned in Step 0, you'll need to modify this
file if you aren't running off the Z:\ drive.
Step 5) Build new EXEs
Run BUILDBP.CMD to build the DOS EXEs and have them copied to Z:\Usurper
Run BUILDVP.CMD to build the WIN32 EXEs and have them copied to Z:\Usurper