From 7c33b61bd89b8e527e51aebb209eb616e120fdc5 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 24 Mar 2011 03:39:30 -0400 Subject: Roel Vanhout's build files for Visual Studio 2008 --- dist/win/installer/Calculator.png | Bin 0 -> 1194 bytes dist/win/installer/Calculator_16x16.ico | Bin 0 -> 1150 bytes dist/win/installer/build.bat | 28 ++ dist/win/installer/ledger.wxs | 63 +++ dist/win/vc9/extract_version_numbers.bat | 7 + dist/win/vc9/ledger.sln | 93 +++++ dist/win/vc9/ledger.vcproj | 619 ++++++++++++++++++++++++++++ dist/win/vc9/windows_build_instructions.txt | 50 +++ 8 files changed, 860 insertions(+) create mode 100644 dist/win/installer/Calculator.png create mode 100644 dist/win/installer/Calculator_16x16.ico create mode 100644 dist/win/installer/build.bat create mode 100644 dist/win/installer/ledger.wxs create mode 100644 dist/win/vc9/extract_version_numbers.bat create mode 100644 dist/win/vc9/ledger.sln create mode 100755 dist/win/vc9/ledger.vcproj create mode 100644 dist/win/vc9/windows_build_instructions.txt (limited to 'dist') diff --git a/dist/win/installer/Calculator.png b/dist/win/installer/Calculator.png new file mode 100644 index 00000000..cf9c87c7 Binary files /dev/null and b/dist/win/installer/Calculator.png differ diff --git a/dist/win/installer/Calculator_16x16.ico b/dist/win/installer/Calculator_16x16.ico new file mode 100644 index 00000000..59a6ba8a Binary files /dev/null and b/dist/win/installer/Calculator_16x16.ico differ diff --git a/dist/win/installer/build.bat b/dist/win/installer/build.bat new file mode 100644 index 00000000..1f3b69ff --- /dev/null +++ b/dist/win/installer/build.bat @@ -0,0 +1,28 @@ +@echo off + +rem Call the script that will read and parse version.m4, and store the version +rem number in the ledger_version_nr environment variable. +call ..\vc9\extract_version_numbers.bat +del config.h +rem Ledgers uses x.y.z-date format, but MSI needs x.y.z.b numbering. Can be +rem solved with simple string replace. +set ledger_version_nr=%ledger_version_nr:-=.% + +rmdir /S /Q content +mkdir content +rem Now, gather all the files we need in a directory +copy ..\vc9\Release\ledger.exe content +copy ..\..\..\doc\ledger.pdf content +copy ..\..\..\doc\LICENSE.rtf content +copy Calculator_16x16.ico content +copy ledger.wxs content + +cd content +rem Finally, call the WiX compiler & linker +"%WIX%\bin\candle.exe" ledger.wxs +"%WIX%\bin\light.exe" -ext WixUIExtension ledger.wixobj + +rem Hopefully everything went well, copy the result back +copy ledger.msi ..\ledger-%ledger_version_nr%.msi + +cd .. diff --git a/dist/win/installer/ledger.wxs b/dist/win/installer/ledger.wxs new file mode 100644 index 00000000..711c9477 --- /dev/null +++ b/dist/win/installer/ledger.wxs @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dist/win/vc9/extract_version_numbers.bat b/dist/win/vc9/extract_version_numbers.bat new file mode 100644 index 00000000..71a339cd --- /dev/null +++ b/dist/win/vc9/extract_version_numbers.bat @@ -0,0 +1,7 @@ +set target_file=config.h +set /p version_file_contents=<..\..\..\version.m4 +set ledger_version_nr=%version_file_contents:m4_define([VERSION_NUMBER], [=% +set ledger_version_nr=%ledger_version_nr:])=% +echo #pragma once> %target_file% +echo #define PACKAGE_VERSION "%ledger_version_nr%">> %target_file% +echo #define VERSION "%ledger_version_nr%">> %target_file% diff --git a/dist/win/vc9/ledger.sln b/dist/win/vc9/ledger.sln new file mode 100644 index 00000000..a713475c --- /dev/null +++ b/dist/win/vc9/ledger.sln @@ -0,0 +1,93 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ledger", "ledger.vcproj", "{33A6F094-A973-4FB6-9DED-F4F0568359E1}" + ProjectSection(ProjectDependencies) = postProject + {4AF4FD03-C169-456A-966A-081DE6BB71C7} = {4AF4FD03-C169-456A-966A-081DE6BB71C7} + {96DA1C71-3895-49FA-A4F1-2775C650AF3D} = {96DA1C71-3895-49FA-A4F1-2775C650AF3D} + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{36984A95-E409-4254-9018-F65C78A32000}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen-bases", "..\..\..\lib\win\mpir\build.vc9\gen-bases\gen-bases.vcproj", "{2297FA81-6D9D-4DC3-BA42-04E93F397047}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen-fac_ui", "..\..\..\lib\win\mpir\build.vc9\gen-fac_ui\gen-fac_ui.vcproj", "{001E0D42-4AF4-44B8-A8B2-3CD46D537DBE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen-fib", "..\..\..\lib\win\mpir\build.vc9\gen-fib\gen-fib.vcproj", "{D3C6D6B7-CD38-4D49-9BA7-1FBB35F77223}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen-mpir", "..\..\..\lib\win\mpir\build.vc9\gen-mpir\gen-mpir.vcproj", "{EAFA3E0D-5B34-43A3-A08A-B5E3839BF66A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpfr", "..\..\..\lib\win\mpfr\build.vc9\lib_mpfr\lib_mpfr.vcproj", "{96DA1C71-3895-49FA-A4F1-2775C650AF3D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_cxx", "..\..\..\lib\win\mpir\build.vc9\lib_mpir_cxx\lib_mpir_cxx.vcproj", "{C82A62DB-DDB4-4072-832F-6DD841C6D80E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_mpir_gc", "..\..\..\lib\win\mpir\build.vc9\lib_mpir_gc\lib_mpir_gc.vcproj", "{4AF4FD03-C169-456A-966A-081DE6BB71C7}" + ProjectSection(ProjectDependencies) = postProject + {EAFA3E0D-5B34-43A3-A08A-B5E3839BF66A} = {EAFA3E0D-5B34-43A3-A08A-B5E3839BF66A} + {001E0D42-4AF4-44B8-A8B2-3CD46D537DBE} = {001E0D42-4AF4-44B8-A8B2-3CD46D537DBE} + {2297FA81-6D9D-4DC3-BA42-04E93F397047} = {2297FA81-6D9D-4DC3-BA42-04E93F397047} + {D3C6D6B7-CD38-4D49-9BA7-1FBB35F77223} = {D3C6D6B7-CD38-4D49-9BA7-1FBB35F77223} + {C82A62DB-DDB4-4072-832F-6DD841C6D80E} = {C82A62DB-DDB4-4072-832F-6DD841C6D80E} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {33A6F094-A973-4FB6-9DED-F4F0568359E1}.Debug|Win32.ActiveCfg = Debug|Win32 + {33A6F094-A973-4FB6-9DED-F4F0568359E1}.Debug|Win32.Build.0 = Debug|Win32 + {33A6F094-A973-4FB6-9DED-F4F0568359E1}.Debug|x64.ActiveCfg = Debug|Win32 + {33A6F094-A973-4FB6-9DED-F4F0568359E1}.Release|Win32.ActiveCfg = Release|Win32 + {33A6F094-A973-4FB6-9DED-F4F0568359E1}.Release|Win32.Build.0 = Release|Win32 + {33A6F094-A973-4FB6-9DED-F4F0568359E1}.Release|x64.ActiveCfg = Release|Win32 + {2297FA81-6D9D-4DC3-BA42-04E93F397047}.Debug|Win32.ActiveCfg = Debug|Win32 + {2297FA81-6D9D-4DC3-BA42-04E93F397047}.Debug|Win32.Build.0 = Debug|Win32 + {2297FA81-6D9D-4DC3-BA42-04E93F397047}.Debug|x64.ActiveCfg = Debug|Win32 + {2297FA81-6D9D-4DC3-BA42-04E93F397047}.Release|Win32.ActiveCfg = Release|Win32 + {2297FA81-6D9D-4DC3-BA42-04E93F397047}.Release|Win32.Build.0 = Release|Win32 + {2297FA81-6D9D-4DC3-BA42-04E93F397047}.Release|x64.ActiveCfg = Release|Win32 + {001E0D42-4AF4-44B8-A8B2-3CD46D537DBE}.Debug|Win32.ActiveCfg = Debug|Win32 + {001E0D42-4AF4-44B8-A8B2-3CD46D537DBE}.Debug|Win32.Build.0 = Debug|Win32 + {001E0D42-4AF4-44B8-A8B2-3CD46D537DBE}.Debug|x64.ActiveCfg = Debug|Win32 + {001E0D42-4AF4-44B8-A8B2-3CD46D537DBE}.Release|Win32.ActiveCfg = Release|Win32 + {001E0D42-4AF4-44B8-A8B2-3CD46D537DBE}.Release|Win32.Build.0 = Release|Win32 + {001E0D42-4AF4-44B8-A8B2-3CD46D537DBE}.Release|x64.ActiveCfg = Release|Win32 + {D3C6D6B7-CD38-4D49-9BA7-1FBB35F77223}.Debug|Win32.ActiveCfg = Debug|Win32 + {D3C6D6B7-CD38-4D49-9BA7-1FBB35F77223}.Debug|Win32.Build.0 = Debug|Win32 + {D3C6D6B7-CD38-4D49-9BA7-1FBB35F77223}.Debug|x64.ActiveCfg = Debug|Win32 + {D3C6D6B7-CD38-4D49-9BA7-1FBB35F77223}.Release|Win32.ActiveCfg = Release|Win32 + {D3C6D6B7-CD38-4D49-9BA7-1FBB35F77223}.Release|Win32.Build.0 = Release|Win32 + {D3C6D6B7-CD38-4D49-9BA7-1FBB35F77223}.Release|x64.ActiveCfg = Release|Win32 + {EAFA3E0D-5B34-43A3-A08A-B5E3839BF66A}.Debug|Win32.ActiveCfg = Debug|Win32 + {EAFA3E0D-5B34-43A3-A08A-B5E3839BF66A}.Debug|Win32.Build.0 = Debug|Win32 + {EAFA3E0D-5B34-43A3-A08A-B5E3839BF66A}.Debug|x64.ActiveCfg = Debug|Win32 + {EAFA3E0D-5B34-43A3-A08A-B5E3839BF66A}.Release|Win32.ActiveCfg = Release|Win32 + {EAFA3E0D-5B34-43A3-A08A-B5E3839BF66A}.Release|Win32.Build.0 = Release|Win32 + {EAFA3E0D-5B34-43A3-A08A-B5E3839BF66A}.Release|x64.ActiveCfg = Release|Win32 + {96DA1C71-3895-49FA-A4F1-2775C650AF3D}.Debug|Win32.ActiveCfg = Debug|Win32 + {96DA1C71-3895-49FA-A4F1-2775C650AF3D}.Debug|Win32.Build.0 = Debug|Win32 + {96DA1C71-3895-49FA-A4F1-2775C650AF3D}.Debug|x64.ActiveCfg = Debug|Win32 + {96DA1C71-3895-49FA-A4F1-2775C650AF3D}.Release|Win32.ActiveCfg = Release|Win32 + {96DA1C71-3895-49FA-A4F1-2775C650AF3D}.Release|Win32.Build.0 = Release|Win32 + {96DA1C71-3895-49FA-A4F1-2775C650AF3D}.Release|x64.ActiveCfg = Release|Win32 + {C82A62DB-DDB4-4072-832F-6DD841C6D80E}.Debug|Win32.ActiveCfg = Debug|Win32 + {C82A62DB-DDB4-4072-832F-6DD841C6D80E}.Debug|Win32.Build.0 = Debug|Win32 + {C82A62DB-DDB4-4072-832F-6DD841C6D80E}.Debug|x64.ActiveCfg = Debug|Win32 + {C82A62DB-DDB4-4072-832F-6DD841C6D80E}.Release|Win32.ActiveCfg = Release|Win32 + {C82A62DB-DDB4-4072-832F-6DD841C6D80E}.Release|Win32.Build.0 = Release|Win32 + {C82A62DB-DDB4-4072-832F-6DD841C6D80E}.Release|x64.ActiveCfg = Release|Win32 + {4AF4FD03-C169-456A-966A-081DE6BB71C7}.Debug|Win32.ActiveCfg = Debug|Win32 + {4AF4FD03-C169-456A-966A-081DE6BB71C7}.Debug|Win32.Build.0 = Debug|Win32 + {4AF4FD03-C169-456A-966A-081DE6BB71C7}.Debug|x64.ActiveCfg = Debug|Win32 + {4AF4FD03-C169-456A-966A-081DE6BB71C7}.Release|Win32.ActiveCfg = Release|Win32 + {4AF4FD03-C169-456A-966A-081DE6BB71C7}.Release|Win32.Build.0 = Release|Win32 + {4AF4FD03-C169-456A-966A-081DE6BB71C7}.Release|x64.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/dist/win/vc9/ledger.vcproj b/dist/win/vc9/ledger.vcproj new file mode 100755 index 00000000..628150a6 --- /dev/null +++ b/dist/win/vc9/ledger.vcproj @@ -0,0 +1,619 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dist/win/vc9/windows_build_instructions.txt b/dist/win/vc9/windows_build_instructions.txt new file mode 100644 index 00000000..48561d21 --- /dev/null +++ b/dist/win/vc9/windows_build_instructions.txt @@ -0,0 +1,50 @@ + + How to build ledger with Visual Studio 2008 + +Let me start by saying that this is probably not suitable for someone with +little C++ and/or Visual Studio experience. This document does assume some +basic knowledger about configuring VS, building C++ projects in general etc. + +1. To start, get git from http://code.google.com/p/msysgit/ and install + it. Checkout ledger from the git repository using the instructions on + http://github.com/jwiegley/ledger. + +2. Next, Download the libraries you need: + + - mpir: http://www.mpir.org/ + (mpir is a source-level alternative for GMP, which supports Windows) + - mpfr: http://www.mpfr.org/ + - boost: http://www.boost.org/ + + Extract mpir & mpfr to lib/win/mpfr & lib/win/mpir. + +3. Download the mpfr Visual Studio project files from + + http://gladman.plushost.co.uk/oldsite/computing/gmp4win.php + +4. If you didn't download the binary distribution of boost, build it yourself. + These libraries are linked statically so you need to the static versions. + + Use the following command to build boost (bjam is a separate tool to be + downloaded from the boost website): + + bjam toolset=msvc-9.0 --build-type=complete + define=_BIND_TO_CURRENT_MFC_VERSION=1 + define=_BIND_TO_CURRENT_CRT_VERSION=1 + stage + +5. Add the boost directory to your VS include directories, and the stage/lib + directory to the library directories. + +6. Checkout utfcpp by updating Ledger's Git submodules: + + git submodule update --init + +7. Finally, open the ledger.sln solution and hit build. + + +If you also want to build the installer, you will first need to somehow +generate the documentation pdf in the doc/ directory. You can either do this +using a TeX distribution for Windows, or copy it from a Linux machine. Next +run the build.bat command in the dist/win/installer directory. The resulting +installer package will be copied to this directory, too. -- cgit v1.2.3