-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathHowToBuild.txt
91 lines (65 loc) · 5.26 KB
/
HowToBuild.txt
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
Visual Studio
Download and install "Visual Studio Community 2013" from http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_2
Boost library
1) Visual Studio project uses environment variable BOOST_DIR which points to root of Boost library.
2) Prepare boost build system
execute bootstrap.bat
3) Following libraries must be built: filesystem, date_time, thread, regex, log.
Commands sequence without explanation(see details below):
Current directory: boost root directory. For example, C:\libraries\boost\boost_1_61_0
3.1) for Release config:
bjam --toolset=msvc-14.0 --with-date_time --with-thread --with-regex --with-filesystem --with-log define=BOOST_LOG_NO_COMPILER_TLS link=static runtime-link=static
3.2) for Debug config:
bjam --toolset=msvc-14.0 --with-date_time --with-thread --with-regex --with-filesystem --with-log define=BOOST_LOG_NO_COMPILER_TLS
Details:
To build as "Multi-threaded DLL" (currently used by Debug configuration) use command:
bjam --with-filesystem --with-date_time --with-thread --with-regex
Boost Log must be built with BOOST_LOG_NO_COMPILER_TLS macro, since crash occurs inside void boost::log::source::aux::set_severity_level(int level) without it on Windows XP(on Windows Vista+ it works fine).
See details at http://msdn.microsoft.com/ru-ru/library/2s9wt68x.aspx, note about __declspec(thread) in DLL on Windows before Vista.
bjam --with-log define=BOOST_LOG_NO_COMPILER_TLS
To build with "Multi-threaded" runtime (currently used by Release configuration) add options to bjam:
link=static runtime-link=static
To rebuild library use "bjam --with-XXX --clean" command, then build as usual.
To choose VS version use "--toolset=XXX", when XXX can be following: msvc-9.0, msvc-10.0, msvc-11.0, msvc-12.0, msvc-14.0.
Python
Download and install Python 2.7 and module lxml for this version.
Required to run tools\html_optimizer.py script which makes release version of client scripts.
SubWCRev
This tool is used to update build version of project in version.txt file.
It is included in TortoiseSVN client, but can be downloaded separately from http://sourceforge.net/projects/tortoisesvn/files/Tools
If you don't care about build version just comment out UPDATE_PROJECT_BUILD_VERSION code in build_installer.bat script.
Inno Setup
Download and install Inno Setup QuickStart Pack from here: http://www.jrsoftware.org/isdl.php#qsp
This pack includes preprocessor(which is not included in Inno Setup distrib) used by aimp_control_plugin.iss script.
Perl
Download and install Perl from http://www.activestate.com/activeperl
Used to create PDB file which usefull for debugging release version of plugin DLL.
Debugging Tools for Windows
Download and install from http://msdn.microsoft.com/en-us/windows/hardware/gg463009
Contains symbol server which syncronizes plugin DLL with it's PDB file. Usefull for debugging.
Win32 build of Subversion
Download and install from http://sourceforge.net/projects/win32svn
Used for creating PDB file with links to source files in SVN repository. Usefull for debugging.
FreeImage
Download FreeImage DLL(for example, FreeImage 3.16.0 [WIN32]) from http://freeimage.sourceforge.net/download.html and unzip to some folder.
If you do not want use precompiled package you can download source distribution.
Required only for enabling Rpc function which extracts album cover on AIMP2 and extended support on AIMP3.
SQLite
It will be needed if AIMP will use sqlite with new interface.
To create *.lib file from *.def use command:
lib /DEF: sqlite3.def /OUT:sqlite3.lib
After installing software mentioned above set actual paths in setup_environment.bat and setup_vs_project_variables.bat scripts.
To create Release version run build_plugin.bat script.
It will create temp_build\Release folder with plugin DLL, client scripts.
To create installer build installer use build_installer.bat script.
It will create installer in temp_build\Release\distrib.
To debug plugin in Visual Studio launch vs_launch.bat script.
Important note: do not launch msvc/aimp_control_plugin.vcxproj project directly since project relies on environment variables which are set by vs_launch.bat script.
To easy switch between AIMP2 and AIMP3:
1) Make symbolic links with name AIMP.exe (or simple copy) for AIMP2.exe and AIMP3.exe and put them near correspond executable files.
2) In project properties, Configuration Properties->Debugging
set Command field to "$(AIMP_PLUGINS_DIR)\..\AIMP2.exe"
set Environment field to "PATH=$(FREEIMAGELIB_DIR)\Dist;$(FREEIMAGELIB_DIR)\Wrapper\FreeImagePlus\Dist"
We must to add path to FreeImagePlus.dll and to FreeImage.dll to have working getAlbumCover Rpc function.
If that libraries not found album cover cannot be retrieved through Rpc.
3) Set AIMP_PLUGINS_DIR variable in setup_vs_project_variables.bat script.