seafile-admin-docs/manual/develop/windows.md
Huang Junxiang e5716cba11
Some checks are pending
Deploy CI - 13.0 / deploy (push) Waiting to run
13.0 republish (#479)
* Add changelog for 12.0.10

* Add changelog for 12.0.10

* fix: migrate from non-docker

* fix: minimal install for mariadb in backup and recover

* fix: fuse content missing in host

* opt:adjusting migration strategy

* Add changelog for pro 12.0.10

* Update security_features.md

Update descriptions for encrypted library.

* Update seahub_settings_py.md

Update description for encrypted library versions.

* docs: update Windows development setup instructions for vcpkg (#471)

* Update drive-client-changelog.md

3.0.13

* update seasearch.yml

* update

* Update shibboleth_authentication.md

* Update remote_user.md

* fix: backup & restore command mysql -> mariadb

* update backup and recovery commands and tip

* opt: steps in recovering DB

* update link of note of MDEV-30203 note from Mariadb

* update link of note of MDEV-30203 note from Mariadb

* opt: steps in recovering DB

* Add changelog for 12.0.11-pro

* Add changelog for v12.0.11

* republish 13.0

* fix: ce binary deployment format error

---------

Co-authored-by: Daniel Pan <daniel.pan@seafile.com>
Co-authored-by: Daniel Pan <freeplant@gmail.com>
Co-authored-by: Jiaqiang Xu <jonathan.xu@seafile.com>
Co-authored-by: rumtid <liwei.jiang@seafile.com>
Co-authored-by: r350178982 <32759763+r350178982@users.noreply.github.com>
Co-authored-by: lian <imwhatiam123@gmail.com>
2025-03-19 19:49:57 +08:00

4.2 KiB
Raw Blame History

Windows

Environment Setup

The following setups are required for building and packaging Sync Client on Windows:

  • Visual Studio 2019

    • Desktop development with C++
      • MSVC v142
      • Windows 10 SDK (10.0.19041.0) (installed by default, not used)
      • Windows 10 SDK (10.0.18362.0)
    • Universal Windows Platform development
      • Windows 10 SDK (10.0.18362.0)
  • Qt 6.5

    • MSVC 2019 64-bit
    • Qt 5 Compatibility Module
    • Qt Positioning
    • Qt Serial Port
    • Qt WebChannel
    • Qt WebEngine
  • Qt VS Tools

  • vcpkg (it is recommended to update to the latest version)

    Note: Dependencies will be automatically downloaded and compiled when building VS projects.

  • Python 3.7

  • wix

    • install to C:\wix
  • Paraffin

    • copy Paraffin.exe to C:\wix\bin
  • Breakpad

  • Certificates

    • install to C:\certs

    Note: certificates for Windows application are issued by third-party certificate authority.

Breakpad

Support for Breakpad can be added by running following steps:

  • install gyp tool

      $ git clone --depth=1 git@github.com:chromium/gyp.git
      $ python setup.py install
    
  • compile breakpad

      $ git clone --depth=1 git@github.com:google/breakpad.git
      $ cd breakpad
      $ git clone https://github.com/google/googletest.git testing
      $ cd ..
      # create vs solution, this may throw an error "module collections.abc has no attribute OrderedDict", you should open the msvs.py and replace 'collections.abc' with 'collections'.
      $ gyp -no-circular-check breakpad\src\client\windows\breakpad_client.gyp
    
    • open breakpad_client.sln and configure C++ Language Standard to C++17 and C/C++ ---> Code Generation ---> Runtime Library to Multi-threaded DLL (/MD)
    • build breakpad
  • compile dump_syms tool

    create vs solution

      gyp -no-circular-check breakpad\src\tools\windows\tools_windows.gyp
    
    • open tools_windows.sln and build tools_windows
    • Insert #include in the source file about unique_ptr compilation error and recompile.
    • build dump_syms
    • Copy C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Remote Debugger\x64\msdia140.dll to breakpad\src\tools\windows\Release.
  • copy VC merge modules

      copy C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\v142\MergeModules\MergeModules\Microsoft_VC142_CRT_x64.msm C:\packagelib
    

Building Sync Client

Following directory structures are expected when building Sync Client:

seafile-workspace/
seafile-workspace/libsearpc/
seafile-workspace/seafile/
seafile-workspace/seafile-client/
seafile-workspace/seafile-shell-ext/

The source code of these projects can be downloaded at github.com/haiwen/libsearpc, github.com/haiwen/seafile, github.com/haiwen/seafile-client, and github.com/haiwen/seafile-shell-ext.

Building

Note: the building commands have been included in the packaging script, you can skip building commands while packaging.

To build libsearpc:

$ cd seafile-workspace/libsearpc/
$ devenv libsearpc.sln /build "Release|x64"

To build seafile

$ cd seafile-workspace/seafile/
$ devenv seafile.sln /build "Release|x64"
$ devenv msi/custom/seafile_custom.sln /build "Release|x64"

To build seafile-client

$ cd seafile-workspace/seafile-client/
$ devenv third_party/quazip/quazip.sln /build "Release|x64"
$ devenv seafile-client.sln /build "Release|x64"

To build seafile-shell-ext

$ cd seafile-workspace/seafile-shell-ext/
$ devenv extensions/seafile_ext.sln /build "Release|x64"
$ devenv seadrive-thumbnail-ext/seadrive_thumbnail_ext.sln /build "Release|x64"

Packaging

  1. Update the CERTFILE configure in seafile-workspace/seafile/scripts/build/build-msi-vs.py .

  2. Run commands:

     $ cd seafile-workspace/seafile-client/third_party/quazip
     $ devenv quazip.sln /build Release|x64
     $ cd seafile-workspace/seafile/scripts/build
     $ python build-msi-vs.py 1.0.0