Created
October 6, 2012 04:27
-
-
Save DinisCruz/3843849 to your computer and use it in GitHub Desktop.
O2 Script - that created the "Util - view and extract MSI files (using LessMSI) v1.0.exe"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //**************** StandAlone exe package and setup **************** | |
| //O2Embed:LessMsi\lessmsi.exe | |
| //O2Package:E:\O2_V4\_TempDir_v4.3.2.0\_ToolsOrApis\LessMsi\wix.dll | |
| //O2Package:E:\O2_V4\_TempDir_v4.3.2.0\_ToolsOrApis\LessMsi\wixcab.dll | |
| //O2Package:MSI_Icon.ico | |
| O2ConfigSettings.O2Version = "LessMSI"; | |
| O2Setup.extractEmbededConfigZips(); | |
| if ("wixcab.dll".local().fileExists()) | |
| { | |
| "wixcab.dll".local().file_Copy(PublicDI.config.EmbeddedAssemblies.createDir()); | |
| "wix.dll".local().file_Copy(PublicDI.config.EmbeddedAssemblies); | |
| } | |
| //******************************************************************* | |
| var mainForm = (Form)"lessmsi.exe".assembly().type("MainForm").ctor(""); | |
| O2Thread.staThread(()=> mainForm.ShowDialog()); | |
| mainForm.wait(500) | |
| .parentForm().set_Form_Icon("MSI_Icon.ico".local()); | |
| Action<string> loadMSI = | |
| (path)=>{ | |
| mainForm.invokeOnThread( | |
| ()=>{ | |
| mainForm.prop("SelectedMsiFile", new FileInfo(path)); | |
| mainForm.prop("Presenter").invoke("LoadCurrentFile"); | |
| mainForm.field("btnUnselectAll").cast<Button>().click(); | |
| }); | |
| }; | |
| mainForm.controls<DataGridView>(true) | |
| .forEach<DataGridView>((dataGridView)=> dataGridView.onDrop(loadMSI)); | |
| var menuStrip = mainForm.control<MenuStrip>(); | |
| menuStrip.add_MenuItem("REPL") | |
| .add_MenuItem("C# REPL main panel", ()=> mainForm.control<Panel>().script_Me()) | |
| .add_MenuItem("C# REPL file list", ()=> mainForm.field("fileGrid").script_Me("fileGrid")); | |
| //using LessMsi.UI | |
| //using System.IO; | |
| //O2File:API_LessMsi.cs | |
| //O2Ref:LessMsi/lessmsi.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment