PageRenderTime 18ms CodeModel.GetById 2ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 1ms

/Source Code/Build/Build.vb

#
Visual Basic | 73 lines | 55 code | 11 blank | 7 comment | 0 complexity | 31989c2eb740a236d9a54145b4be8183 MD5 | raw file
 1Imports PowerSong.FileArchive
 2Imports System.IO
 3Imports PowerSong.SongDatabase
 4
 5''' <summary>
 6''' Builds PowerSong.
 7''' </summary>
 8Module Main
 9
10    Friend Const INITIAL_CONTENT_FOLDER As String = "..\..\..\PowerSong\Initial Content"
11
12    Sub Main()
13
14        ' Create bible archive files
15        CreateBibleArchive.Create("..\..\Bibles\kjv.txt", INITIAL_CONTENT_FOLDER + "\KJV.Bible")
16        CreateBibleArchive.Create("..\..\Bibles\bbe.txt", INITIAL_CONTENT_FOLDER + "\BBE.Bible")
17
18        ' Build the blank plugin
19        Console.WriteLine()
20        BuildBlankPlugin()
21
22        ' Build deployment plugins
23        Console.WriteLine("Building deployment plugins...")
24        BuildPlugin("CountDownPlugin", "CountDown.Plugin", "CountDownPlugin.dll")
25        BuildPlugin("TestProjectionPlugin", "TestProjection.Plugin", "TestProjectionPlugin.dll")
26        BuildPlugin("FpsPlugin", "Fps.Plugin", "FpsPlugin.dll")
27        Console.WriteLine("Completed.")
28
29        ' Finished
30        Console.WriteLine()
31        Console.WriteLine("Build process completed.")
32        Console.WriteLine("Press the enter key to quit.")
33        Console.ReadLine()
34
35    End Sub
36
37    Private Sub BuildPlugin(ByVal projectName As String, ByVal targetFilename As String, ByVal mainAssembly As String)
38
39        Console.WriteLine("Building '" + projectName + "' plugin...")
40
41        Dim PluginFilename As String = INITIAL_CONTENT_FOLDER + "\" + targetFilename
42
43        Dim FileTable As New FileTable
44        FileTable.AddFile(mainAssembly, "..\..\..\Plugins\" + projectName + "\bin\Debug\" + mainAssembly)
45
46        ArchiveFile.Create(PluginFilename, FileTable)
47
48    End Sub
49
50    Private Sub BuildBlankPlugin()
51
52        Console.Write("Building blank plugin... ")
53
54        Dim PluginFilename As String = INITIAL_CONTENT_FOLDER + "\New.plugin"
55
56        Dim FileTable As New FileTable
57        FileTable.AddFile("BasicPlugin.vbproj", "..\..\..\Plugins\BasicPlugin\BasicPlugin.vbproj")
58        FileTable.AddFile("BasicPlugin.vb", "..\..\..\Plugins\BasicPlugin\BasicPlugin.vb")
59        FileTable.AddFile("My Project\Application.Designer.vb", "..\..\..\Plugins\BasicPlugin\My Project\Application.Designer.vb")
60        FileTable.AddFile("My Project\Application.myapp", "..\..\..\Plugins\BasicPlugin\My Project\Application.myapp")
61        FileTable.AddFile("My Project\AssemblyInfo.vb", "..\..\..\Plugins\BasicPlugin\My Project\AssemblyInfo.vb")
62        FileTable.AddFile("My Project\Resources.Designer.vb", "..\..\..\Plugins\BasicPlugin\My Project\Resources.Designer.vb")
63        FileTable.AddFile("My Project\Resources.resx", "..\..\..\Plugins\BasicPlugin\My Project\Resources.resx")
64        FileTable.AddFile("My Project\Settings.Designer.vb", "..\..\..\Plugins\BasicPlugin\My Project\Settings.Designer.vb")
65        FileTable.AddFile("My Project\Settings.settings", "..\..\..\Plugins\BasicPlugin\My Project\Settings.settings")
66
67        ArchiveFile.Create(PluginFilename, FileTable)
68
69        Console.WriteLine("DONE.")
70
71    End Sub
72
73End Module