- Listing of Files
- Prerequisites
- Get the Files
- Extract the Archives
- Compile the Setup Program
- Localization
The following table lists all of the files associated with Syncthing Windows Setup (hereafter referred to as "Setup").
Folder or File | Description |
---|---|
bin |
Folder contains 32-bit and 64-bit Syncthing binaries |
asmt |
Folder contains 32-bit and 64-bit asmt binaries |
shawl |
Folder contains 32-bit and 64-bit shawl binaries |
ServMan |
Folder contains 32-bit and 64-bit ServMan binaries |
stctl |
Folder contains 32-bit and 64-bit stctl binaries |
redist |
Folder contains other files from the Syncthing download archive |
building.md |
This file |
LICENSE |
License agreement |
Get-Download.ps1 |
Downloads latest zip files from https://syncthing.net/downloads/ |
Expand-Download.ps1 |
PowerShell script that extracts the Syncthing Windows download zip files to the correct paths for building Setup |
lang- scriptname.js |
Setup installs one or more of these WSH scripts on the user's system |
License- lang.rtf |
License file displayed during installation |
ProcessCheck.dll |
32-bit ProcessCheck DLL used by Setup |
README.md |
Setup documentation |
Syncthing.iss |
Inno Setup reads this file and builds Setup |
Localization.ini |
Facilitates localization of the script files (see Localization) |
Messages-en.isl |
Setup messages file (see Localization) |
-
Inno Setup version 6 or later
Download the project from Github and extract it into folder of your choice (this folder will be referred to as the "build folder").
Run Get-Download.ps1
to download the latest Syncthing zip files.
From a PowerShell command line, run the Expand-Download.ps1
script in the build folder. The script uses 7-Zip to extract the Syncthing archive files into a folder structure appropriate for compiling Setup.
Use whatever method you prefer to compile Syncthing.iss
using Inno Setup. The output filename will be syncthing-
version-setup.exe
(where version is the Syncthing version).
To add additional language support to Setup, do the following:
-
Copy the
Messages-en.isl
file toMessages-
lang.isl
(where lang is the language code you want to use) and update the strings in the file. -
Update the strings in
Messages-
lang.isl
for the language. -
Update the
[Languages]
section in theSyncthing.iss
file. -
Copy each
en-
scriptname.js
script to lang-
scriptname.js
(where lang is the language you want to add). -
Edit the messages at the top of each lang
-
scriptname.js
script such that the messages are appropriate for the language.NOTE: If the messages do not display correctly when the scripts run, it may be an encoding problem. Try saving the scripts using UTF-16 LE (little endian) encoding.
-
In the
Localization.ini
file, add a section for the language, and specify the source file names you want to use for the language. -
Increment the
NumLanguages
preprocessor directive inSyncthing.iss
. -
Add a language preprocessor directive to
Syncthing.iss
, using the following syntax:#define protected Languages[
index] "
lang"
(where index is the next-higher index value in the
Languages
preprocessor directive array)
For example, the following steps describe how to add localization for Dutch (language code nl
):
-
Copy
Messages-en.isl
toMessages-nl.isl
. -
Update the strings in
Messages-nl.isl
to Dutch. -
Add Dutch to the
[Languages]
section inSyncthing.iss
; e.g.:[Languages] Name: "en"; MessagesFile: "compiler:Default.isl,Messages-en.isl" Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl,Messaages-nl.isl"
-
Copy the
en-
scriptname.js
scripts tonl-
scriptname.js
files. PowerShell example:Get-ChildItem en-*.js | ForEach-Object { Copy-Item $_ ($_.Name -replace '^en-','nl-') }
-
Update the messages at the top of each
nl-
scriptname.js
script file to Dutch. -
Add a section in
Localization.ini
for the Dutch language code (nl
) and add the corresponding script file names; e.g.:[nl] ScriptNameSetSyncthingConfig=nl-SetSyncthingConfig.js ScriptNameSyncthingFirewallRule=nl-SyncthingFirewallRule.js ScriptNameSyncthingLogonTask=nl-SyncthingLogonTask.js
-
Increment the
NumLanguages
preprocessor directive inSyncthing.iss
; e.g.:#define protected NumLanguages 2
-
Also in
Syncthing.iss
, add Dutch to theLanguages
preprocessor directive array using the next higher index; e.g.:#define protected Languages[0] "en" #define protected Languages[1] "nl"