-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
226 lines (170 loc) · 8.81 KB
/
README
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
1. Introduction
---------------
This repository contains a set of tools to allow building Wine and
running the Wine test suite with minimal effort and submit the results
to http://test.winehq.org
References:
* Wine http://www.winehq.org
* WineTest http://wiki.winehq.org/ConformanceTests
2. Building Wine
----------------
The hardest part is installing all the development dependencies so one
can build both the 32-bit and 64-bit Wine in order to be able to run
both 32-bit and 64-bit Windows applications. Thankfully all the details
of working around missing 32-bit development packages, and multi-arch
bugs is handled by the wt-install-dev script for Debian, Ubuntu,
openSUSE, Elementary OS, Pop! OS, and most likely various derivatives.
So to install the development packages simply run wt-install-dev as
root:
sudo ./wt-install-dev
or
wget https://gitlab.winehq.org/fgouget/wt-daily/-/raw/master/wt-install-dev
sudo sh ./wt-install-dev
Then build Wine normally:
* By hand using the old WoW approach:
mkdir wow32 wow64
cd wow64 && ../wine/configure --enable-win64 && make
cd ../wow32 && ../wine/configure --with-wine64=../wow64 && make
* Or with wt-bot using the old WoW approach:
mkdir wow32 wow64 && cd wow64 && wt-bot --build --wow
* By hand using the new WoW approach:
cd wine && ./configure --enable-archs=i386,x86_64 && make
3. Running the tests
--------------------
The main script is wt-daily. Its purpose is to "orchestrate all the
daily WineTest runs and related tasks."
Here's the quickstart guide:
git clone https://gitlab.winehq.org/fgouget/wt-daily
cd wt-daily
cp wt-daily.config.template wt-daily.config
vi wt-daily.config
In this file set the following lines:
email="your email address here"
tag="a-tag"
desc="A description of your system for Wine developers"
shutdown="suspend"
Then just type ./wt-daily. This will update and rebuild Wine, run the
tests and finally suspend your machine.
It's that simple!
Note that you can keep using your machine up until the tests start. If
you don't want the tests to start automatically click 'No' before the
build is done.
If you'd rather not suspend your machine once all is done, you can set
shutdown to "poweroff" or "reboot" instead, or even leave it empty to
leave the computer on.
If you have a 64 bit system then you can also set the {tag,desc}wow32
and {tag,desc}wow64 variables to run the tests in a mixed 32/64 bit
WinePrefix. If you have a Mac, set the {tag,desc}mac variables instead
of (or in addition to) the regular ones to run the tests using the
Mac driver instead of (or in addition to) X11. If you can, running the
X11 tests on a Mac is useful but XQuartz can be temperamental.
Now you can totally stop reading here. But there's a ton more that the
script can do. Read on if you want to discover more.
4. Creative uses
----------------
The thing to remember is that the 'configuration file' is actually a
shell script that can define multiple functions that are called at
various points by wt-daily. This means you can extend wt-daily to do
your bidding to your hearts content. Here are some ideas.
You can have the script start an application that will prevent the
tests from running until you close it. For instance you can use that to
turn a MythTV client box into a WineTest box. Whenever you watch TV
Wine will get updated and rebuilt in the background and once you
exit MythFrontend the script will run the tests before power off the
computer.
(see pre_interactive() in wt-daily.config.template)
The script can also take an image of a suitably configured Windows
partition, restore it, reboot to Windows which will then automatically
run the Wine tests and finally either shut the computer down or reboot
back to Linux depending on the configuration.
(see the section on that subject below)
This functionality is used on the cw-hd6800 and cw-gtx560 CodeWeavers
boxes to run the tests on Linux, then Windows 8.1 and then Windows 10.
All automatically. wt-daily actually runs every hour and skips the
tests (and rebooting) if nothing changed since the last run.
You can also extend wt-daily to add non Wine tasks. For instance you
could use it to run a script synchronizing your desktop and laptop
Documents folders and Git repositories, ensuring that with one simple
daily routine you both keep the two machines in sync and contribute to
Wine.
(see pre_update() or pre_build() in wt-daily.config.template)
You can even add command line options to turn these extra tasks on/off.
(see is_extra_option() and print_extra_usage() in wt-daily.config.template)
5. The other tools
------------------
The repository also contains a number or scripts that you will likely
not have to use yourself but which you may find them useful to further
automate things. Note that they all have a --help option.
wt-install-dev Installs the packages needed to build the 32 and 64 bit
versions of Wine. When possible it applies workarounds if
installing both the 32 and 64 bit development packages is
impossible. It can also install some extra packages
needed by the tests and the wt-daily scripts. See the
usage message for the list of Linux distributions it was
tested on.
wt-image Creates, checks, restores or reboots to a disk image.
See the section below.
wt-bot Updates, builds and checks the Wine source code, and runs
the tests.
wt-make Seeks to automatically fully use CPU and I/O parallelism
when running make. Used by wt-bot obviously.
wt-ask Asks a simple Yes/No question to the user.
wt-notify Displays a notification to the user.
wt-power Powers off, reboots, suspends or hibernates the computer.
wt-screensaver Controls the screensaver. In particular wt-bot uses it to
prevent the screensaver from triggering during the tests.
wt-nice Runs the specified command with the lowest possible CPU
and I/O priority. wt-daily uses it to ensure your
computer remains usable while it rebuilds Wine in the
background.
wt-flock A portable replacement for flock.
6. Running the tests on Windows
-------------------------------
wt-daily can also help you automate running the tests on your Windows
partition. It does so by restoring your Windows partition from a disk
image stored on your Linux system.
*********************************************************
* This means the content of your Windows partition will *
* be wiped out every time you run the tests on Windows. *
*********************************************************
So obviously you must first think hard about whether that's appropriate
for your situation and it will require some preparation.
If you're still interested then here are the steps:
1. First configure your Windows partition so it can run the tests. This
may mean disabling the anti-virus (some of them interfere with
WineTest), ensuring it will have network connectivity, etc. The
'Windows configuration' section of the WineTestBot VM configuration
page may be useful for that.
http://wiki.winehq.org/WineTestBotVMs
2. You may also want to do a big cleanup to minimize the amount of data
that will have to be written to disk every time you run the tests.
3. Use wt-daily.bat.template as a basis to create a wt-daily.bat file.
Configure the tagXXX settings as usual.
4. Then configure Windows for automatic login and follow the steps at
the top of the file so the batch file is run automatically on login.
Should you need to use your Windows partition know that you'll have
30 seconds to interrupt the batch file after the login.
5. Ideally in all the steps above you did not run the Wine tests so that
the Windows environment is still pristine.
6. Now that the Windows side is ready, reboot to Linux and create the
reference image.
su -
mkdir /winimages
cd /winimages
wt-image --backup PARTITION_UUID \
--desc "A description for your reference" \
windows.img.gz
7. The above command will have created a windows.wtimage script. Make
sure you can run it as root from your user account (e.g. johndoe):
cat /etc/sudoers.d/wt-image
johndoe ALL = NOPASSWD: /winimages/windows.wtimage --restore, /winimages/windows.wtimage --check, /winimages/windows.wtimage --grub
8. Now in wt-daily.config set the otheroses setting:
otheroses="/winimages/windows.wtimage"
That's it. Normally wt-daily should now ask whether you want to
"Run the tests on 'windows'". If you say yes it will restore the Windows
partition from the backup and reboot to Windows (after first running
the tests on Linux).
If you don't answer the question it will ignore the otheroses setting.
To automatically restore the Windows partition, add the following line
to your wt-daily.config file:
default_options="--auto-otheros"