compiling tab for windows
This is a bit arcane because it has information that I use myself.
It also assumes you are very familiar with Command Prompt, shells, and compilers.
April 2019 - a new version
updated slightly April 4 2020
And again March 2023
- There is currently (April 2019) a minimal Windows executable at
https://www.cs.dartmouth.edu/~wbc/wtab/
which will save you from the whole compile/build process.
You may need to get the distribution files to get more font files if you need them.
- Get Visual Studio for C++. Try going to visualstudio.microsoft.com and click the "Download" button. I got the community edition because it is free. Get it from a microsoft.com web site to be sure you are getting a good version. Put it on your computer. You will be building a C++ application, not C#, and you only need the components for a Desktop Console application, not all the extra net and web tools.
When you start Visual Studio you will be asked to personalize your experience. Choose Visual C++
As of 2023 I had to install the C++ package separately
- build the tab executable . . .
- Start a new project.
- New New Idea: make a Console App - C++ Windows Console. That option only show up if C++ is installed.
- New idea - "File/New/Project From Existing Code"
- New Idea apr 2020 choose a console app project to use windows compiler - you may have to comment out main() from the project file.
- Old idea - Select "Create a new project".
- Old idea - Select Empty Project, C++, Windows, Console.
- Give the project a name like "tab" and use the default location
- select "Release" and x86 or x64 in the top bar
- file - clone or checkout code
- local git repositories - Clone - enter URL git://github.com/mandovinnie/Lute-Tab or https://github.com/mandovinnie/Lute-Tab
- Project - add existing item - find the locat git repository you just downloaded (look in the window on the right)
- on the bottom right of the add item browser window select Visual C++ files
- select all the files but not the folders. *Add*
- open the project tab, at the bottom select "properties" and there select "C/C++" (which won't show up until some c++ files are installed. (2023 Open the Code Generation tab) In "Runtime Library" select MultiThreaded with no DLL. If you use DLL you will find that your clients won't have certain debugging DLL's installed.
- go to the Build tab on the top. select "Build Solution"
- in the [Output] window in the bottom look for "Build: 1 succeeded, 0 failed . . ."
- (2023) As of 2023 look in some place like C\Users\your name here\source\repos\project name\Release
- (2023) When you find your .exe open Command Prompt, cd to that directory, and type the name of the executable to run it. It should run, though it will just give you a Usage: message and say "No file name given". If it doesn't run then you have problems!
- as of 2020 Notepad seems to work to edit tab files
- In a file browser go to your repo, with the name you gave the project up above.
- From there go to x86 for 32 bit or x64 for 64 bit and then Release. The tab.exe file is there.
- You can move the tab.exe file somewhere if you want to.
- You can also go to the source file where you downloaded the git stuff and copy the font files that end in .tfm and 600pk and copy them to where you put tab.exe.
- life will be easier if you right click "My Computer" select "Properties/Advanced"
(2023) it is easier to open control panel and search for environment
then to "Environmental Variables" "User Variables" "New" "Var Name" TABFONTS. The value should be the folder where the downloaded source and fonts are. Don't use quotes!!
You can add the location of tab.exe to the "System variables" "Path" value as well, and then you can just type "tab" to run the program. These settings take effect when you create new windows after you modify the values.
- As of 2019 there seems to be a good selection of PostScript viewers for windows available on the web.
- (2023) https://epsviewer.org/      EPS Viewer works for single page files.
December 2006 with updates April 2019
- Be sure to read
http://www.cs.dartmouth.edu/~wbc/lute/AboutTab.html
- There is currently (April 2019) a minimal Windows executable at
https://home.cs.dartmouth.edu/~wbc/wtab/
which will save you from the whole compile/build process.
You may need to get the distribution files to get more font files if you need them.
continue here (13)
- Get the distribution file - version 4.30.51 is the first that should compile
on windows using Visuall C++ without editing.
- on linux, run "make win" which renames the files, adds the necessary include files and macro definitions, and copies them to the "win" suddirectory.
This step won't be necessary if you get a special windows distribution.
- It seems that you can get Visual C++ "Express Edition" for
free at http://msdn.microsoft.com/vstudio/express/visualc/ .
I have not tried this, as I use Visual Studio 2005.
As of 2013 it is still available, though you have to sign up for a MicroSoft account.
As of April 2019 I did a web search and found visualstudio.microsoft.com has a downloadable
"Visual Studio Community" which looked to be free. (Community often implies free with no
support.) I installed "Desktop development with C++ and also C++/CLI support .
- on windows, open the win folder, and copy the files to a folder on the desktop.
- If there is a win.exe file in the distribution you may skip the visual
studio steps and go directly to adding the environmental variable.
- open visual studio, select "Release" and x64 in the top bar, make a new project in the file tab, C++, new win32 console empty project.
- Go to project/add existing item and navigate to the desktop folder
of source files, and add all that appear, CPP and .h
using "Project/Add Existing Item"
- 2019 - (this may have been done already) fix the compiler to avoid buffer overflow warnings. add _CRT_SECURE_NO_WARNINGS symbol to your project settings via "Project"->"Properties"->"Configuration properties"->"C/C++"->"Preprocessor"->Preprocessor definitions".
put a semicolon ; after it, in the middle of the line.
- 2019 - (this may have been done already) in the file ps_print.cpp near line 196 there are the words "open" and "read" - prepend an underscore before them as in _open and _read . In the file ibuf.cpp line 249 put an underscore before fdopen.
- Build the project. In the build tab select "Configuration Manager" and
in the active solution window find and select "Release".
Then "Build Solution". Ignore any "Warnings" - you will see a lot.
Let me know about any Errors that prevent compilation.
The output would be in something like My Documents\Visual Studio 2005\Projects\tab\release\tab.exe if the project name is tab.
You can drag the tab.exe file somewhere else if you like.
- right click "My Computer" select "Properties/Advanced" then to "Environmental Variables"
"User Variables" "New" "Var Name" TABFONTS.
The value should be the folder where the downloaded source and fonts are.
You can add the location of tab.exe to the "System variables" "Path" value
as well, and then you can just type "tab" to run the program.
These settings take effect when you create new windows after you modify the values.
- As of 2019 there seems to be a good selection of PostScript viewers for windows
available on the web.
(old) you will need gsview (1.5 meg) and AFPL Ghostscript (9 meg) installed
to look at the postScript format output files that tab makes.
GS view is nice because it updates the display as soon as you
reformat a file. I use WordPad to edit the tab file.
I save the file as a plain Text file - no RTF or unicode please!
- Please tell me about any technical errors or omissions. Please
be as verbose as you can and tell me all the details.
I don't expect computer novices will be able to build and install this
program.
My thanks to Rainer for his tips!