Minimal custom build for win64 Server app

Eric Pouech eric.pouech at orange.fr
Mon Feb 21 02:48:50 CST 2022


Le 21/02/2022 à 09:17, dravion at mail.de a écrit :
> Hello everyone,
>
> I tried to read the docs and researched the Forum and Stackoverflow 
> for some pointers but right know i think only  a Developer can answer 
> this build specific Question.
>
> My Project:
> Right know, iam trying to package a Server App (hMailServer) for 
> Debian but also for MacOS which can run headless on WINE right now.
> It only needs the Console Subsystem or can run as Windows Service, so 
> there is really no X11 or GUI stuff going on. The server simply starts 
> with wine c:\hMailServer\Bin\hMailServer.exe or it can be register 
> itself as Windows Service by running 
> c:\hMailServer\Bin\hMailServer.exe /Register
>
> Right now, it runs on Debian11 Bullseye AMD64 and MacOS 12 Monterey 
> this way in 64-Bit mode (AMD64/x86_64) just fine.
>
> Now i want to package it as Debian *.deb package and MacOS *.pkg 
> Installer package but i dont want to interfere with a existing WINE 
> Installation on the
> target System nor i want the User for example to Setup WINE on MacOS 
> with brew or on Linux with apt-get ect. hMailServer is a very popular 
> and easy to use
> Windows 32 and 64-Bit Software and i want it to stay it that way, even 
> on Linux and MacOS.
>
> Long story short:
> I want to package hMailServer for Linux and MacOS and have all 
> dependencies for WINE aboard. I want the User to install the package 
> so it just runs, like it does for Windows.
>
>
>
> So i tried to built my custom WINE Version to make it as small as 
> possible
> ./configure CFLAGS="-Os" --verbose --without-x 
> --prefix=/opt/build/wine --disable-win16 --disable-tests 
> --without-freetype --without-gstreamer --without-openal 
> --without-gettext --without-ldap --without-vkd3d --without-netapi 
> --without-oss --without-opencl --without-pulse --without-usb 
> --without-pcap --without-vulkan --without-sane --without-sdl 
> --without-cups --without-krb5 --without-gphoto --without-capi 
> --without-fontconfig --without-udev --without-dbus --without-mingw 
> --without-gnutls --without-opengl -disable-win64 --without-x 
> --disable-winemenubuilder
> make & make install
>
> But even then, the resulted WINE binaries in "/opt/build/wine" are 
> hugh (over 700 MBytes whyle hMailServer is only 20 MBytes in total!)
> I think thats way to big and i want to cut it down even more.
>
> My question:
> Is there a clean way or undocumented build switches so i can only 
> bring the console Subsystem up and running without the whole other 
> stuff like DirectX ect?
>
> Just console subsystem running "bare streams" without X11, DirectX, 
> Vulkan3D ect, ect.
>
> Ok, i hope some experienced WINE Developer can give me some hints how 
> to cut down this 700 MByte Monster even a bit more down.
>
> Please; Dont give me tips like, let the user install WINE completely, 
> thats not what i want. I just want the required dependencies for 
> running a
> Windows Console (CUI) into my installer package, thats all.
>
> Thanks in advance,
> Dravion
>
>
you can use --disable-MODNAME option to configure to disable compilation 
of a given module

you have then to determine which modules you don't need

and btw :

- you'd better don't use --without-mingw

- the name of the prefix is kinda too generic if you want to bundle wine 
within your app

- why are you targetting a 32bit build ?

A+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220221/d56c75b4/attachment.htm>


More information about the wine-devel mailing list