Skip to content

Commit

Permalink
Cleanup for project template
Browse files Browse the repository at this point in the history
  • Loading branch information
purplecabbage committed Oct 20, 2011
1 parent bfb46b3 commit 59c9544
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 68 deletions.
Binary file modified GapAppStarter.zip
Binary file not shown.
16 changes: 5 additions & 11 deletions template/GapAppProj.csproj
Expand Up @@ -78,20 +78,13 @@
</ItemGroup>
<ItemGroup>
<Content Include="GapLib\WP7GapClassLib.dll" />
<Content Include="GapSourceDictionary.xml">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>GapSourceDictionary.tt</DependentUpon>
</Content>
<Content Include="GapSourceDictionary.xml" />
<Content Include="ManifestProcessor.js" />
<Content Include="www\index.html">
<SubType>Designer</SubType>
</Content>
<Content Include="www\master.css" />
<Content Include="www\phonegap-1.1.0.js" />
<None Include="GapSourceDictionary.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>GapSourceDictionary.xml</LastGenOutput>
</None>
<None Include="Properties\AppManifest.xml">
<SubType>Designer</SubType>
</None>
Expand Down Expand Up @@ -125,9 +118,10 @@
-->
<ProjectExtensions />
<PropertyGroup>
<PreBuildEvent>@echo about to build GapExample</PreBuildEvent>
<PreBuildEvent>CScript "$(ProjectDir)/ManifestProcessor.js"</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>@echo done GapExample</PostBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
Binary file modified template/GapLib/WP7GapClassLib.dll
Binary file not shown.
6 changes: 0 additions & 6 deletions template/GapSolution.sln
Expand Up @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010 Express for Windows Phone
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GapAppProj", "GapAppProj.csproj", "{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WP7GapClassLib", "..\framework\WP7GapClassLib.csproj", "{FC6A1A70-892D-46AD-9E4A-9793F72AF780}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -17,10 +15,6 @@ Global
{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}.Release|Any CPU.Build.0 = Release|Any CPU
{3677C1B7-D68B-4CF9-BF8A-E869D437A6DF}.Release|Any CPU.Deploy.0 = Release|Any CPU
{FC6A1A70-892D-46AD-9E4A-9793F72AF780}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FC6A1A70-892D-46AD-9E4A-9793F72AF780}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FC6A1A70-892D-46AD-9E4A-9793F72AF780}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FC6A1A70-892D-46AD-9E4A-9793F72AF780}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
35 changes: 0 additions & 35 deletions template/GapSourceDictionary.tt

This file was deleted.

10 changes: 5 additions & 5 deletions template/GapSourceDictionary.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is auto-generated, do not edit! -jm -->
<GapSourceDictionary>
<FilePath Value="www\index.html"/>
<FilePath Value="www\master.css"/>
<FilePath Value="www\phonegap-1.1.0.js"/>
<FilePath Value="www\index.html"/>
<FilePath Value="www\master.css"/>
<FilePath Value="www\phonegap-1.1.0.js"/>
</GapSourceDictionary>

18 changes: 8 additions & 10 deletions template/MainPage.xaml
Expand Up @@ -11,16 +11,14 @@
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True" d:DesignHeight="768" d:DesignWidth="480" xmlns:my="clr-namespace:WP7GapClassLib;assembly=WP7GapClassLib">
<Grid>

<my:PGView Name="pGView1" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"></my:PGView>
<!--<phone:WebBrowser x:Name="GapBrowser"
Loaded="GapBrowser_Loaded"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
IsScriptEnabled="True" />-->

<Grid x:Name="LayoutRoot" Background="Transparent" HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<my:PGView HorizontalAlignment="Stretch"
Margin="0,0,0,0"
Name="PGView"
VerticalAlignment="Stretch" />
</Grid>

</phone:PhoneApplicationPage>
40 changes: 40 additions & 0 deletions template/ManifestProcessor.js
@@ -0,0 +1,40 @@

var objArgs = WScript.Arguments;
for (i = 0; i < objArgs.length; i++)
{
WScript.Echo("Arg :: " + objArgs(i));
}


var fso = WScript.CreateObject("Scripting.FileSystemObject");

var folder = fso.GetFolder("..\\..\\www");

var outFile = fso.CreateTextFile("..\\..\\GapSourceDictionary.xml", true);

outFile.WriteLine('<?xml version="1.0" encoding="utf-8"?>');
outFile.WriteLine('<!-- This file is auto-generated, do not edit! -jm -->');
outFile.WriteLine('<GapSourceDictionary>');

function enumerateFolder(folder,parentPath)
{
var files = new Enumerator(folder.files);
while(!files.atEnd())
{
WScript.Echo(parentPath + "\\" + fso.GetFileName(files.item()));
outFile.WriteLine(' <FilePath Value="' + parentPath + "\\" + fso.GetFileName(files.item()) + '"/>');
files.moveNext();
}

var subFolders = new Enumerator(folder.SubFolders);
while(!subFolders.atEnd())
{
var item = subFolders.item();
enumerateFolder(item, parentPath + "\\" + fso.GetFileName(item));
subFolders.moveNext();
}
}
enumerateFolder(folder,"www");

outFile.WriteLine('</GapSourceDictionary>');

2 changes: 1 addition & 1 deletion tests/MobileSpecUnitTests/MobileSpecUnitTests.csproj
Expand Up @@ -159,6 +159,6 @@
-->
<ProjectExtensions />
<PropertyGroup>
<PreBuildEvent>CScript $(ProjectDir)/ManifestProcessor.js</PreBuildEvent>
<PreBuildEvent>CScript "$(ProjectDir)/ManifestProcessor.js"</PreBuildEvent>
</PropertyGroup>
</Project>

0 comments on commit 59c9544

Please sign in to comment.