Repository: robotdad/vclinux
Branch: master
Commit: f452c76e8283
Files: 4
Total size: 13.8 KB
Directory structure:
gitextract_01bppl0p/
├── LICENSE
├── README.md
└── bash/
├── genfilters.sh
└── genvcxproj.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2016 Marc Goodner
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# vclinux
Unofficial scripts and stuff related to the [Visual C++ for Linux Development extension](http://aka.ms/vslinux).
Yes I'm the program manger for that but this is stuff I've made on the side. Think about it. If this was good enough to ship it'd be in the box right?
I hope you find this useful, especially for modifying to fit for your needs. If you have any comments or suggestions I'd love to hear them.
## Project generation bash scripts
### genvcxproj.sh
This script generates a VC Linux project file that includes your source files from the directory specified. The project type is makefile and it is set to not copy sources since the assumption here is the files have been mapped to a Windows drive.
This leaves your source in a flat list. To organize your files as seen in your directory use genfilters.sh to generate an accompanying filter file.
The assumption this script has is that your source code is on a Linux machine and that this directory has been mapped to Windows so the code can be edited in Visual Studio.
Input for this script is:
1. is the directory of source code to create a project file for
2. is file name to create, should be projectname.vcxproj
Example usage:
```
$ ./genvcxproj.sh ~/repos/preciouscode/ preciouscode.vcxproj
```
Once you have your project open in Visual Studio connect to your Linux machine using the extension, [as shown here](https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/#consoleapp).
Now add any paths needed for your includes to light up intellisense, and setup your remote build command line on the property page. This is specific to your project but would be something like:
```
cd ~/repos/preciouscode/; make
```
As you can see multiple commands can be used ; seperated.
### genfilters.sh
This script generates a filter file for organizing source files in a VC Linux project based on the directory structure. The filter file must be the same name as your project file + .filters. So if your project file is preciouscode.vcxproj your filter file needs to be named preciouscode.vcxproj.filters.
The assumption this script has is that your source code is on a Linux machine and that this directory has been mapped to Windows so the code can be edited in Visual Studio.
To generate a project file for your source code see genvcxproj.sh
1. is the directory of source code to create project filters from
2. is file name to create, should be projectname.vcxproj.filters
Example usage:
```
$ ./genfilters.sh ~/repos/preciouscode/ preciouscode.vcxproj.filters
```
================================================
FILE: bash/genfilters.sh
================================================
#!/bin/bash
# Here for latest: https://github.com/robotdad/vclinux
#
# This script generates a filter file for organizing source files in a VC Linux project based on the directory structure.
# The filter file must be the same name as your project file + .filters.
# So if your project file is preciouscode.vcxproj your filter file needs to be named preciouscode.vcxproj.filters.
#
# The assumption this script has is that your source code is on a Linux machine and that
# this directory has been mapped to Windows so the code can be edited in Visual Studio.
# To generate a project file for your source code see genvcxproj.sh
#
# You can find out more about VC++ for Linux here: http://aka.ms/vslinux
#
# Usage:
# $1 is the directory of source code to create project filters from
# $2 is file name to create, should be projectname.vcxproj.filters
# $3 is the root of your Windows fodler where these files will be mapped
# the meat of this is after the printheader/footer functions
function printheader(){
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"
}
function printfooter(){
echo "</Project>"
}
function listfilters(){
echo " <ItemGroup>"
for i in $(find . -not -path '*/\.*' -type d)
do
f=${i##./}
f=${f//\//\\}
uuid="$(uuidgen)"
printf " <Filter Include=\"%s\">\n" "$f"
printf " <UniqueIdentifier>{%s}</UniqueIdentifier>\n" "$uuid"
printf " </Filter>\n"
done
echo " </ItemGroup>"
}
function listothers(){
echo " <ItemGroup>"
for i in $(find . -not -path '*/\.*' -type f ! -iname "*.c" ! -iname "*.cpp" ! -iname "*.h" ! -iname "*.txt" ! -iname "*.o" ! -iname "*.vcxproj")
do
d=${i%/*}
fd=${d##*/}
fp=${d##./}
fp=${fp//\//\\}
d=${d//\//\\}
f=${i##*/}
if [ $fd = "." ]
then
printf " <None Include=\"%s\\%s\" />\n" "$d" "$f"
else
printf " <None Include=\"%s\\%s\" >\n" "$d" "$f"
printf " <Filter>%s</Filter>\n" "$fp"
printf " </None>\n"
fi
done
echo " </ItemGroup>"
}
function listtxt(){
echo " <ItemGroup>"
for i in $(find . -not -path '*/\.*' -type f -iname "*.txt")
do
d=${i%/*}
fd=${d##*/}
fp=${d##./}
fp=${fp//\//\\}
d=${d//\//\\}
f=${i##*/}
if [ $fd = "." ]
then
printf " <Text Include=\"%s\\%s\" />\n" "$d" "$f"
else
printf " <Text Include=\"%s\\%s\">\n" "$d" "$f"
printf " <Filter>%s</Filter>\n" "$fp"
printf " </Text>\n"
fi
done
echo " </ItemGroup>"
}
function listcompile(){
echo " <ItemGroup>"
for i in $(find . -not -path '*/\.*' -type f -iname "*.c" -or -iname "*.cpp")
do
d=${i%/*}
fd=${d##*/}
fd=${d##*/}
fp=${d##./}
fp=${fp//\//\\}
d=${d//\//\\}
f=${i##*/}
if [ $fd = "." ]
then
printf " <ClCompile Include=\"%s\\%s\" />\n" "$d" "$f"
else
printf " <ClCompile Include=\"%s\\%s\">\n" "$d" "$f"
printf " <Filter>%s</Filter>\n" "$fp"
printf " </ClCompile>\n" "$d" "$f"
fi
done
echo " </ItemGroup>"
}
function listinclude(){
echo " <ItemGroup>"
for i in $(find . -not -path '*/\.*' -type f -iname "*.h")
do
d=${i%/*}
fd=${d##*/}
fd=${d##*/}
fp=${d##./}
fp=${fp//\//\\}
d=${d//\//\\}
f=${i##*/}
if [ $fd = "." ]
then
printf " <ClInclude Include=\"%s\\%s\" />\n" "$d" "$f"
else
printf " <ClInclude Include=\"%s\\%s\">\n" "$d" "$f"
printf " <Filter>%s</Filter>\n" "$fp"
printf " </ClInclude>\n"
fi
done
echo " </ItemGroup>"
}
cd $1 || exit 2;
touch $2 && test -w $2 || exit 2;
printheader > $2
listfilters >> $2
listothers >> $2
listtxt >> $2
listcompile >> $2
listinclude >> $2
printfooter >> $2
exit
================================================
FILE: bash/genvcxproj.sh
================================================
#!/bin/bash
# Here for latest: https://github.com/robotdad/vclinux
#
# This script generates a VC Linux project file that includes your source files from the directory specified.
# The project type is makefile and it is set to not copy sources since the assumption here is the files have
# been mapped to a Windows drive.
#
# This leaves your source in a flat list.
# To organize your files as seen in your directory use genfilters.sh to generate an accompanying filter file.
#
# The assumption this script has is that your source code is on a Linux machine and that
# this directory has been mapped to Windows so the code can be edited in Visual Studio.
#
# You can find out more about VC++ for Linux here: http://aka.ms/vslinux
# Usage:
# $1 is the directory of source code to create a project file for
# $2 is file name to create, should be projectname.vcxproj
# $3 is the root of your Windows fodler where these files will be mapped
# the meat of this is after the printheader/footer functions
function printheader(){
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">
<ItemGroup Label=\"ProjectConfigurations\">
<ProjectConfiguration Include=\"Debug|ARM\">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include=\"Release|ARM\">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include=\"Debug|x86\">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include=\"Release|x86\">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include=\"Debug|x64\">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include=\"Release|x64\">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label=\"Globals\">
<ProjectGuid>{d14472f1-e80c-4d22-a2b5-6694cdc04c48}</ProjectGuid>
<Keyword>Linux</Keyword>
<RootNamespace>makefile</RootNamespace>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<ApplicationType>Linux</ApplicationType>
<ApplicationTypeRevision>1.0</ApplicationTypeRevision>
<TargetLinuxPlatform>Generic</TargetLinuxPlatform>
<LinuxProjectType>{FC1A4D80-50E9-41DA-9192-61C0DBAA00D2}</LinuxProjectType>
</PropertyGroup>
<Import Project=\"\$(VCTargetsPath)\Microsoft.Cpp.Default.props\" />
<PropertyGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Debug|ARM'\" Label=\"Configuration\">
<UseDebugLibraries>true</UseDebugLibraries>
<ConfigurationType>Makefile</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Release|ARM'\" Label=\"Configuration\">
<UseDebugLibraries>false</UseDebugLibraries>
<ConfigurationType>Makefile</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Debug|x86'\" Label=\"Configuration\">
<UseDebugLibraries>true</UseDebugLibraries>
<ConfigurationType>Makefile</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Release|x86'\" Label=\"Configuration\">
<UseDebugLibraries>false</UseDebugLibraries>
<ConfigurationType>Makefile</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Debug|x64'\" Label=\"Configuration\">
<UseDebugLibraries>true</UseDebugLibraries>
<ConfigurationType>Makefile</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Release|x64'\" Label=\"Configuration\">
<UseDebugLibraries>false</UseDebugLibraries>
<ConfigurationType>Makefile</ConfigurationType>
</PropertyGroup>
<Import Project=\"\$(VCTargetsPath)\Microsoft.Cpp.props\" />
<ImportGroup Label=\"ExtensionSettings\" />
<ImportGroup Label=\"Shared\" />
<ImportGroup Label=\"PropertySheets\" />
<PropertyGroup Label=\"UserMacros\" />
<PropertyGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Debug|ARM'\">
<LocalRemoteCopySources>false</LocalRemoteCopySources>
</PropertyGroup>
<PropertyGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Debug|x64'\">
<LocalRemoteCopySources>false</LocalRemoteCopySources>
</PropertyGroup>
<PropertyGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Debug|x86'\">
<LocalRemoteCopySources>false</LocalRemoteCopySources>
</PropertyGroup>
<PropertyGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Release|ARM'\">
<LocalRemoteCopySources>false</LocalRemoteCopySources>
</PropertyGroup>
<PropertyGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Release|x64'\">
<LocalRemoteCopySources>false</LocalRemoteCopySources>
</PropertyGroup>
<PropertyGroup Condition=\"'\$(Configuration)|\$(Platform)'=='Release|x86'\">
<LocalRemoteCopySources>false</LocalRemoteCopySources>
</PropertyGroup>"
}
function printfooter(){
echo " <ItemDefinitionGroup />
<Import Project=\"\$(VCTargetsPath)\Microsoft.Cpp.targets\" />
<ImportGroup Label=\"ExtensionTargets\" />
</Project>"
}
function listothers(){
echo " <ItemGroup>"
for i in $(find . -not -path '*/\.*' -type f ! -iname "*.c" ! -iname "*.cpp" ! -iname "*.h" ! -iname "*.txt" ! -iname "*.o" ! -iname "*.vcxproj" ! -iname "*.filters")
do
d=${i%/*}
d=${d//\//\\}
f=${i##*/}
printf " <None Include=\"%s\\%s\" />\n" "$d" "$f"
done
echo " </ItemGroup>"
}
function listtxt(){
echo " <ItemGroup>"
for i in $(find . -not -path '*/\.*' -type f -iname "*.txt")
do
d=${i%/*}
d=${d//\//\\}
f=${i##*/}
printf " <Text Include=\"%s\\%s\" />\n" "$d" "$f"
done
echo " </ItemGroup>"
}
function listcompile(){
echo " <ItemGroup>"
for i in $(find . -not -path '*/\.*' -type f -iname "*.c" -or -iname "*.cpp")
do
d=${i%/*}
d=${d//\//\\}
f=${i##*/}
printf " <ClCompile Include=\"%s\\%s\" />\n" "$d" "$f"
done
echo " </ItemGroup>"
}
function listinclude(){
echo " <ItemGroup>"
for i in $(find . -not -path '*/\.*' -type f -iname "*.h")
do
d=${i%/*}
d=${d//\//\\}
d=${d/.}
f=${i##*/}
printf " <ClInclude Include=\"%s\\%s\" />\n" "$d" "$f"
done
echo " </ItemGroup>"
}
cd $1 || exit 2;
touch $2 && test -w $2 || exit 2;
printheader > $2
listothers >> $2
listtxt >> $2
listcompile >> $2
listinclude >> $2
printfooter >> $2
exit
gitextract_01bppl0p/
├── LICENSE
├── README.md
└── bash/
├── genfilters.sh
└── genvcxproj.sh
Condensed preview — 4 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (15K chars).
[
{
"path": "LICENSE",
"chars": 1069,
"preview": "MIT License\n\nCopyright (c) 2016 Marc Goodner\n\nPermission is hereby granted, free of charge, to any person obtaining a co"
},
{
"path": "README.md",
"chars": 2568,
"preview": "# vclinux\nUnofficial scripts and stuff related to the [Visual C++ for Linux Development extension](http://aka.ms/vslinux"
},
{
"path": "bash/genfilters.sh",
"chars": 3748,
"preview": "#!/bin/bash\n# Here for latest: https://github.com/robotdad/vclinux\n#\n# This script generates a filter file for organizin"
},
{
"path": "bash/genvcxproj.sh",
"chars": 6718,
"preview": "#!/bin/bash\n# Here for latest: https://github.com/robotdad/vclinux \n#\n# This script generates a VC Linux project file th"
}
]
About this extraction
This page contains the full source code of the robotdad/vclinux GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 4 files (13.8 KB), approximately 3.9k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.