{"id":222,"date":"2016-09-19T19:00:22","date_gmt":"2016-09-19T19:00:22","guid":{"rendered":"http:\/\/memnarch.bplaced.net\/blog\/?p=222"},"modified":"2016-09-19T19:06:42","modified_gmt":"2016-09-19T19:06:42","slug":"delphinus-commandline-open-for-early-testing","status":"publish","type":"post","link":"https:\/\/memnarch.bplaced.net\/blog\/2016\/09\/delphinus-commandline-open-for-early-testing\/","title":{"rendered":"Delphinus Commandline open for early testing!"},"content":{"rendered":"<p>I think the time has come to let everyone (who is willing to participate) test out the commandline for Delphinus! <!--more-->Before we start, this is still a work in progress, and therefore not in the Masterbranch. You can grab the source from the extrabranch here (Tools\\Commandline): <a href=\"https:\/\/github.com\/Memnarch\/Delphinus\/tree\/feature\/Commandline\">Delphinus Commandline<\/a>. Before we start a little sidenote: The commandline pulls the settings (OAUTH-Token) from the same place as the UI. To configure it you need to install Delphinus.<\/p>\n<h1>Lets get started!<\/h1>\n<p>DPM.exe supports interactive and non-interactive sessions. For simplicity, lets start with interactive. Just start it without any parameter. This is what you&#8217;ll see when opening DPM.exe:<\/p>\n<p><a href=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/startscreen.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-full wp-image-224 aligncenter\" src=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/startscreen.png\" alt=\"startscreen\" width=\"979\" height=\"512\" srcset=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/startscreen.png 979w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/startscreen-459x240.png 459w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/startscreen-300x157.png 300w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/a>Not much to see. The first line tells you which Delphi-Version is currently selected. You can switch the current Delphi at any time in the same session to operate on different Delphis! But more on this at a later time. To get an overview of what is possible, just type &#8220;help&#8221; which will give you a complete overview of all commands:<\/p>\n<p><a href=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/Help.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-full wp-image-225 aligncenter\" src=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/Help.png\" alt=\"Help\" width=\"979\" height=\"565\" srcset=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/Help.png 979w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/Help-416x240.png 416w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/Help-300x173.png 300w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/a>For a detailed help, simply type &#8220;Help commandname&#8221;. Lets try that with the &#8220;list&#8221; command:<\/p>\n<p><a href=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/HelpDetail.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-full wp-image-226 aligncenter\" src=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/HelpDetail.png\" alt=\"HelpDetail\" width=\"979\" height=\"239\" srcset=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/HelpDetail.png 979w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/HelpDetail-770x188.png 770w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/HelpDetail-300x73.png 300w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/a>To get a list of all online available packages type &#8220;list&#8221; or &#8220;list online&#8221; and you should see something like this:<\/p>\n<p><a href=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/packages.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-full wp-image-227 aligncenter\" src=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/packages.png\" alt=\"packages\" width=\"979\" height=\"450\" srcset=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/packages.png 979w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/packages-522x240.png 522w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/packages-300x138.png 300w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/a><\/p>\n<p>We can see which packages are available, and which version. Packages without a version are unversioned. Use versioned ones whereever possible to take advantage of the updatesystem. The &#8220;Info&#8221; command will give us more details. Type &#8220;info asciiimage&#8221;:<\/p>\n<p><a href=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/AciiImage.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-full wp-image-228 aligncenter\" src=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/AciiImage.png\" alt=\"AciiImage\" width=\"979\" height=\"248\" srcset=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/AciiImage.png 979w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/AciiImage-770x195.png 770w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/AciiImage-300x76.png 300w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/a>Using &#8220;Info AsciiImage -Versions&#8221; will give you a complete list of available versions and &#8220;Info AsciiImage -License&#8221; will show the license-text. But we&#8217;ll skip that for now. If we want to install it, we can simply type &#8220;install Asciiimage&#8221;, if we want the most recent version. Add the version as second parameter to select anotherone. I&#8217;ll skip the picture for this right now, the log is a bit long. Type &#8220;list installed&#8221; to get a listed of installed packages. Asciimage will show up in this list (the other ones were installed before):<\/p>\n<p><a href=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/installed.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-full wp-image-229 aligncenter\" src=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/installed.png\" alt=\"installed\" width=\"979\" height=\"168\" srcset=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/installed.png 979w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/installed-770x132.png 770w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/installed-300x51.png 300w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/a>Mh.. it has been a while since i installed Spring4D. Lets check for updates!<\/p>\n<p><a href=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/updates.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-full wp-image-230 aligncenter\" src=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/updates.png\" alt=\"updates\" width=\"979\" height=\"132\" srcset=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/updates.png 979w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/updates-770x104.png 770w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/updates-300x40.png 300w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/a><\/p>\n<p>Aha! From thereon we have 2 options. We can use the &#8220;Install&#8221; command to update a specific package or use the &#8220;Update&#8221; command if we have multiple pending updates. The Update-Command simply installs all available updates. Quite handy to keep your environment uptodate with a single line!<\/p>\n<h1>Switching\/Selecting Delphi-Versions<\/h1>\n<p>The DPM.exe has the &#8220;-Delphi&#8221; switch. That one is supported on Environmentsensitive-commands (like install\/update) and on the exe itself. When you start DPM.exe with &#8220;-Delphi XE6&#8221;. It will select the XE6 environment, and throw an error if XE6 is not installed.\u00a0 At anytime in an interactive session, you can simply write &#8220;-Delphi Shortname&#8221; to switch the Environment permanently (for the active session). To get a list of valid shortnames, use the Delphis-Command:<\/p>\n<p><a href=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/Delphis.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-full wp-image-231 aligncenter\" src=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/Delphis.png\" alt=\"Delphis\" width=\"979\" height=\"132\" srcset=\"https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/Delphis.png 979w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/Delphis-770x104.png 770w, https:\/\/memnarch.bplaced.net\/blog\/wp-content\/uploads\/2016\/09\/Delphis-300x40.png 300w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/a>The Column &#8220;Shortname&#8221; shows the available shortnames for the &#8220;-Delphi&#8221; switch. Keep in mind that Starter-Editions are not supported. Trying to select one will result in an errormessage.<\/p>\n<h1>Simple Setupscript for your environment<\/h1>\n<p>Imagine you have setup your IDE and want to install your favourite packages. By preparing a batch it is even simpler if you have to reinstall at a later time! To do this, we will pipe a list of commands into DPM.exe and specify the target Delphi at calltime. Open a new textdocument and write the following:<\/p>\n<blockquote><p>install AsciiImage<\/p>\n<p>install Spring4D<\/p>\n<p>Exit<\/p><\/blockquote>\n<p>save the document as Packages.txt (or any other name). The last line is <strong>VERY <\/strong>important. Otherwhise DPM will not exit after execution! After adding all of your packages, you cann call DPM.exe like this:<\/p>\n<blockquote><p>DPM.exe -Delphi XE &lt; Packages.txt<\/p><\/blockquote>\n<p>The &#8220;&lt;&#8221; is the default PipeIn-operator supported by the windows CMD and allows us to feed the Inputbuffer of a commandline tool with content from a file instead of typing. Do not get confused by the input cursor &#8220;DPM&gt;&#8221;. At this time it loads the online list of packages which needs some time. Just wait.<\/p>\n<h1>The future<\/h1>\n<p>This is just the first iteration and i am seeking for help to find bugs and improve. Right now only the Online-Repository is supported. For a proper Commandline, local repositories are required. Those are on my list. However the Dependency-feature i postponed for so long is now at the top of my list. (And it must be available in Commandline and UI ofcourse).<\/p>\n<p>When this tool has become stable enough (which means tested enough) i will merge it back to master.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I think the time has come to let everyone (who is willing to participate) test out the commandline for Delphinus!<\/p>\n","protected":false},"author":1,"featured_media":223,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/memnarch.bplaced.net\/blog\/wp-json\/wp\/v2\/posts\/222"}],"collection":[{"href":"https:\/\/memnarch.bplaced.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/memnarch.bplaced.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/memnarch.bplaced.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/memnarch.bplaced.net\/blog\/wp-json\/wp\/v2\/comments?post=222"}],"version-history":[{"count":4,"href":"https:\/\/memnarch.bplaced.net\/blog\/wp-json\/wp\/v2\/posts\/222\/revisions"}],"predecessor-version":[{"id":235,"href":"https:\/\/memnarch.bplaced.net\/blog\/wp-json\/wp\/v2\/posts\/222\/revisions\/235"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/memnarch.bplaced.net\/blog\/wp-json\/wp\/v2\/media\/223"}],"wp:attachment":[{"href":"https:\/\/memnarch.bplaced.net\/blog\/wp-json\/wp\/v2\/media?parent=222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/memnarch.bplaced.net\/blog\/wp-json\/wp\/v2\/categories?post=222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/memnarch.bplaced.net\/blog\/wp-json\/wp\/v2\/tags?post=222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}