Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: installer/emb.vbs

Issue 4565805475823616: Issue 1984 - Do not use VBScript in installer build tools (Closed)
Patch Set: Created April 13, 2015, 10:39 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « installer/emb.py ('k') | installer/msibuild.cmd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: installer/emb.vbs
===================================================================
deleted file mode 100644
--- a/installer/emb.vbs
+++ /dev/null
@@ -1,40 +0,0 @@
-' Emb.vbs.
-' Argument(0) is the name of the storage.
-' Argument(1) is the original database.
-' Argument(2) is the path to the transform file.
-' This was changed from the original to work around a gyp defect involved that rewrites whole command lines rather than just path-containing variables.
-
-Option Explicit
-
-' Check arguments
-If WScript.Arguments.Count < 2 Then
- WScript.Echo "Usage is emb.vbs [storage name] [original database] [transform]"
- WScript.Quit(1)
-End If
-
-' Connect to Windows Installer object
-On Error Resume Next
-Dim installer : Set installer = Nothing
-Set installer = Wscript.CreateObject("WindowsInstaller.Installer")
-
-' Evaluate command-line arguments and set open and update modes
-Dim databasePath: databasePath = Wscript.Arguments(1)
-Dim importPath : importPath = Wscript.Arguments(2)
-Dim storageName : storageName = Wscript.Arguments(0)
-
-' Open database and create a view on the _Storages table
-Dim sqlQuery : sqlQuery = "SELECT `Name`,`Data` FROM _Storages"
-Dim database : Set database = installer.OpenDatabase(databasePath, 1)
-Dim view : Set view = database.OpenView(sqlQuery)
-
-'Create and Insert the row.
-Dim record : Set record = installer.CreateRecord(2)
-record.StringData(1) = storageName
-view.Execute record
-
-'Insert storage - copy data into stream
-record.SetStream 2, importPath
-view.Modify 3, record
-database.Commit
-Set view = Nothing
-Set database = Nothing
« no previous file with comments | « installer/emb.py ('k') | installer/msibuild.cmd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld