Subtitle workshop 6.3.3 Classic, Technical documentation for software contributors.
==================================================================================

Updated: 2024-11-06

Contents:
---------

0. General
1. Downloading and Unpacking the source code
	1.1. Expected folder structure for package installation 
2. Package Installation
	2.1. Without compiling
	2.2. With Compiling
3. SubtitleAPI DLL (only for versions prior to v6.2.12)
4. The Subtitle workshop executable
5. FFmpeg tools
6. Additional


0. General
==========
These versions of Subtitle Workshop (and Subtitle API for versions prior to v6.2.12) are ported to Delphi 10.1 (Berlin version).

Additional components Subtitle Workshop requires:
- SWComponents (included in source, see "SWComponents" directory)
- PascalScript from REMObjects (included in source, see "3rd party components" directory, https://github.com/remobjects/pascalscript)
- VirtualTreeView (included in source, v6.7.0 was used, see https://github.com/Virtual-TreeView/Virtual-TreeView/releases)
- Hunspell spellchecker DLL and Dictionaries

Additional components Subtitle API requires (no longer needed from v6.0d/28 onwards):
- XML Parser (included in source, v1.0.20 was used, see http://www.destructor.de/xmlparser/index.htm)

To compile Subtitle Workshop's source code successfully:
a. Use Delphi 10.x, other versions possibly won't work or will generate errors. Ignore any warnings generated by Delphi 10.
b. Download the source code (section 1) in the correct folder structure (section 1.1).
c. Install all the components listed above (see also folder 'Packages to be installed for the pre-compiled packages), see section 2.
d. Compile the only DLL in the project (if necessary and only for versions prior to v6.2.12), see section 3.
e. Make sure the Hunspell DLL is available at the correct place, see section 5. 
f. To compile the main Subtitle Workshop project: see section 4.

The INNO setup compiler is used for the creation of the installer file 'Subtitle Workshop Setup.exe' version 5/5/9(a), see http://www.jrsoftware.org/isinfo.php.

Subtitle Workshop (and Subtitle API for versions prior to v6.2.12) are released under the GNU/GPL 3 license.



1. Downloading and Unpacking the source code
============================================

Make following folder structure:

C:\Deplhi10 Projects\Subtitle Workshop\main
C:\Deplhi10 Projects\Subtitle Workshop\3rd party components

Download:

goto https://sourceforge.net/projects/subtitle-workshop-classic/
select 'Files'
goto 'Sources'
single click 'Subtitle Workshop Sources.zip'
after the download ended:
unpack the zipfile in C:\Delphi10 Projects\Subtitle Workshop\main

goto https://sourceforge.net/projects/subtitle-workshop-classic/
select 'Files'
goto 'Sources'
single click '3rd party components Sources.zip'
after the download ended:
unpack the zipfile in C:\Delphi10 Projects\Subtitle Workshop\3rd party components


1.1. Expected folder structure for package installation instructions below:
===========================================================================

C:\Delphi10 Projects
	Subtitle Workshop
		main
			Bin
			DCU
			Forms
			Graphics
			Lib
			Manual_Files
			Packages to be Installed
			SubtitleAPI (only for versions prior to v6.2.12)
			SubtitleAPI_New (only for versions from v6.2.12 onwards)
			SWComponents
			Units
		3rd party components
			pascalscript-master
			Virtual TreeView
			Hunspell
            xmlparser-1.0.20 (no longer needed from v6.0d/28 onwards)
			

If you have a different structure then adapt the paths below.


2. Package Installation
=======================

--> Only for software developers (contributors to the project).

Make sure that packages to be installed are not yet installed (check in Menu 'Component' -> 'Install Packages').
To remove packages, select them and click 'Remove'.

The already installed pacakges (if any) are named:
	RemObjects Pascal Script - Core Package
	Subtitle Workshop Components
	VirtualTreeview Controls
	XML Parser Components (no longer needed from v6.0d/28 onwards)

2 methods of installation exist:
- using the precompiled version (so, without compiling again)
- with compiling (e.g. after a change in its code)


2.1. Without compiling
----------------------

All packages are delivered pre-compiled in the software (C:\Delphi10 Projects\Subtitle Workshop\main\Packages to be installed)

Copy all files 
from C:\Delphi10 Projects\Subtitle Workshop\main\Packages to be installed\bpl
to   C:\Users\Public\Documents\Embarcadero\Studio\19.0\bpl
 
Copy all files
from C:\Delphi10 Projects\Subtitle Workshop\main\Packages to be installed\dcp
to   C:\Users\Public\Documents\Embarcadero\Studio\19.0\dcp

Enter Delphi 
Menu 'Component' -> 'Install Packages'

Click Add 
select C:\Users\Public\Documents\Embarcadero\Studio\19.0\bpl\PascalScript_Core_D25.bpl
Click Open

Click Add
select C:\Users\Public\Documents\Embarcadero\Studio\19.0\bpl\VirtualTreesD25.bpl
Click Open


Click Add (no longer needed from v6.0d/28 onwards)
select C:\Users\Public\Documents\Embarcadero\Studio\19.0\bpl\XmlComponents_2007_XE.bpl (no longer needed from v6.0d/28 onwards)
Click Open (no longer needed from v6.0d/28 onwards)

Click Add
select C:\Users\Public\Documents\Embarcadero\Studio\19.0\\bpl\SWComponents.bpl
Click Open

Click OK

Done...


2.2. With Compiling
-------------------

Enter Delphi
 
(* = in the project manager)  
 
Open Project C:\Delphi10 Projects\Subtitle Workshop\3rd party components\pascalscript-master\Source\PascalScript_Core_D25.dproj
*Click right on PascalScript_Core_D25.bpl
*Click Clean
*Click Build
*Click right on PascalScript_Core_D25.bpl
*Click Install

Open Project C:\Delphi10 Projects\Subtitle Workshop\3rd party components\Virtual TreeView\Packages\RAD Studio 10.1\VirtualTreeView.groupproj
*Click right on VirtualTreeView (top line!)
*Click Clean All
*Click Build All
*Click right on VirtualTreesD24.bpl
*Click Install

Open Project C:\Delphi10 Projects\Subtitle Workshop\3rd party components\xmlparser-1.0.20\XmlComponents_2007_XE.dproj (no longer needed from v6.0d/28 onwards)
*Click right on XmlComponents_2007_XE.bpl
*Click Clean
*Click Build
*Click right on XmlComponents_2007_XE.bpl
*Click Install

Open Project C:\Delphi10 Projects\Subtitle Workshop\main\SWComponents\SWComponents.dproj
*Click right on SWComponents.bpl
*Click Clean
*Click Build
*Click right on SWComponents.bpl
*Click Install

Done...


3. SubtitleAPI DLL (only for versions prior to v6.2.12)
=======================================================

The DLL is needed together with the subtitle workshop executable (SubtitleWorkshop.exe).

It is delivered pre-compiled in the software (C:\Delphi10 Projects\Subtitle Workshop\main\Bin\SubtitleAPI\SubtitleAPI.dll).

The DLL does not need to be installed as packages do, it has to be  placed in '.\SubtitleAPI\SubtitleAPI.dll' wherein '.' is the directory where the subtitle workshop executable (SubtitleWorkshop.exe) resides. 


To compile it: 
-------------

--> Only for software developers (contributors to the project).

Open Project C:\Delphi10 Projects\Subtitle Workshop\main\SubtitleAPI\SubtitleAPI.dproj
*Click right on SubtitleAPI.dll
*Click Clean
*Click Build

Done...

4. The Subtitle workshop executable
===================================

Its name is SubtitleWorkshop.exe and it resides pre-compiled here: 'C:\Delphi10 Projects\Subtitle Workshop\main\Bin\SubtitleWorkshop.exe'.

To compile it:
-------------

--> Only for software developers (contributors to the project).

Open Project C:\Delphi10 Projects\Subtitle Workshop\main\SubtitleWorkshop.dproj
*Click right on SubtitleWorkshop.exe
*Click Build

Done ...

5. FFmpeg tools
===============

For the waveform tool to work the FFmpeg tools are necessary, except if you have VLC (32 bits version) installed. 
If you do not have VLC, then before the first usage of the Waveform tool the download of the tools has to be done in menu 'Settings' -> 'Waveform'. The tools are installed in the 'ffmpeg*\bin' subdirectory of te Subtitle Workshop executable.
The name of the subdir depends on the version downloaded.

6. Additional
=============

a. From version 6.3.2 onwards the real (translated) language names are shown in the language menu. To prevent the necessity to read those from all language files at startup a cache for the languagenames translations was created. It is located in the registry at:
HKEY_CURRENT_USER sws_Languages.

b. Richedit components (e.g. the text edit fields) show wrong colors when disabled in darkmode. So, they are always enebled to solve this problem. 
Their popup menus have to be disabled however when the richedit components should be disabled. This is done by manipulating the PopUpMenu event.

[end of document]
 







