{"id":451,"date":"2019-07-17T14:29:35","date_gmt":"2019-07-17T14:29:35","guid":{"rendered":"http:\/\/www.hammerdb.com\/blog\/?p=451"},"modified":"2019-07-19T14:09:15","modified_gmt":"2019-07-19T14:09:15","slug":"how-to-add-you-database-to-hammerdb-pt2-fork-clone-and-binary-downloads","status":"publish","type":"post","link":"https:\/\/www.hammerdb.com\/blog\/uncategorized\/how-to-add-you-database-to-hammerdb-pt2-fork-clone-and-binary-downloads\/","title":{"rendered":"How to add you database to HammerDB &#8211; Pt2 Fork, clone and binary downloads"},"content":{"rendered":"\n<p>As noted in the previous post to add a database to HammerDB you will need to change the source code.\u00a0 There are different ways to do this, however the recommended way is as follows.\u00a0 Firstly make a fork of the latest <a href=\"https:\/\/github.com\/TPC-Council\/HammerDB\">HammerDB source on GitHub<\/a> to your account. To do this select fork in the top right hand corner of the GitHub page and follow the instructions. Shortly you should have your own copy of HammerDB under your account showing that it was forked from the main site.<\/p>\n<p><a href=\"https:\/\/www.hammerdb.com\/blog\/wp-content\/uploads\/2019\/07\/forkandclone.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-457 aligncenter\" src=\"https:\/\/www.hammerdb.com\/blog\/wp-content\/uploads\/2019\/07\/forkandclone.png\" alt=\"\" width=\"253\" height=\"56\" \/><\/a><\/p>\n<p>Next you will want a development copy on your own system. This can be done with Clone or download.\u00a0 in this example we will use the command line to do this using the web URL shown in the Clone or download link.<\/p>\n<p><a href=\"https:\/\/www.hammerdb.com\/blog\/wp-content\/uploads\/2019\/07\/clone.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-459 aligncenter\" src=\"https:\/\/www.hammerdb.com\/blog\/wp-content\/uploads\/2019\/07\/clone.png\" alt=\"\" width=\"394\" height=\"203\" srcset=\"https:\/\/www.hammerdb.com\/blog\/wp-content\/uploads\/2019\/07\/clone.png 394w, https:\/\/www.hammerdb.com\/blog\/wp-content\/uploads\/2019\/07\/clone-300x155.png 300w\" sizes=\"auto, (max-width: 394px) 100vw, 394px\" \/><\/a><\/p>\n<p>For this example with a development system on Linux we will make a directory to show that we are working in a fork of HammerDB.<\/p>\n<pre>mkdir HammerDB-Fork<br \/>cd HammerDB-Fork<\/pre>\n<p>Then in this directory clone using the URL above.<\/p>\n<pre>git clone https:\/\/github.com\/sm-shaw\/HammerDB.git<br \/>Cloning into 'HammerDB'...<br \/>...<br \/>Resolving deltas: 100% (193\/193), done.<\/pre>\n<p>Under the working directory we know have the HammerDB source code in which to add the new database.<\/p>\n<pre>~\/HammerDB-Fork$ ls<br \/>HammerDB<br \/>~\/HammerDB-Fork$ ls HammerDB\/<br \/>agent hammerdbcli.bat hammerdbws.bat license<br \/>ChangeLog hammerdb modules config hammerdb.bat readme<br \/>config.xml hammerdbcli hammerdbws images src<\/pre>\n<p>It is also good practice to add the upstream HammerDB site so that you can also apply changes made here to your fork<\/p>\n<pre>git remote add upstream https:\/\/github.com\/TPC-Council\/HammerDB.git<\/pre>\n<p>The git remote command will show the remote repositories.<\/p>\n<pre>git remote<br \/>origin<br \/>upstream<\/pre>\n<p>So just for interest let&#8217;s try and run HammerDB from the source to see what happens.<\/p>\n<pre>~\/HammerDB-Fork\/HammerDB$ .\/hammerdb<br \/>While loading component file \"gentheme.tcl\"...<br \/>can't find package ttk::theme::clearlooks<br \/>while executing<br \/>\"package require ttk::theme::$theme\"<br \/>(procedure \"ttk::setTheme\" line 4)<br \/>invoked from within<br \/>\"ttk::setTheme $theme\"<br \/>(file \".\/src\/generic\/gentheme.tcl\" line 354)<br \/>invoked from within<br \/>\"source [ file join $UserDefaultDir src generic $f ]\"<\/pre>\n<p>So HammerDB started as I already had TCL installed on my system but then failed to find a package it needed.\u00a0 As identified in the previous post we don&#8217;t have the correct bin and lib directory so need to download the binaries version from <a href=\"https:\/\/www.hammerdb.com\/download.html\">here<\/a>.\u00a0 Install these alongside your source directory.\u00a0 In the newly installed binaries directory you will notice that there are the bin and lib directories we need and that HammerDB will run in this directory.<\/p>\n<pre>~\/HammerDB-Fork$ ls<br \/>HammerDB HammerDB-3.2 HammerDB-3.2-Linux.tar.gz<\/pre>\n<p>As the source directory will be updated from time to time from the upstream remote and the bin and lib directories are different for both Linux and Windows it is best to make your changes to the source and copy these to binary build for testing as you do not want to commit any of the binary files into the source.<\/p>\n<p>Now we have a copy of HammerDB that we can make changes to, to add a new database. In the next post &#8211; we will show adding MariaDB as a separate database into HammerDB.\u00a0 As a fork of MySQL this has the advantage that at least initially we can use the already provided mysqltcl3.052 interface.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As noted in the previous post to add a database to HammerDB you will need to change the source code.\u00a0 There are different ways to do this, however the recommended way is as follows.\u00a0 Firstly make a fork of the latest HammerDB source on GitHub to your account. To do this select fork in the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.hammerdb.com\/blog\/uncategorized\/how-to-add-you-database-to-hammerdb-pt2-fork-clone-and-binary-downloads\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to add you database to HammerDB &#8211; Pt2 Fork, clone and binary downloads&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"ppma_author":[5],"class_list":["post-451","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"authors":[{"term_id":5,"user_id":2,"is_guest":0,"slug":"hammerdb","display_name":"HammerDB","avatar_url":{"url":"https:\/\/www.hammerdb.com\/blog\/wp-content\/uploads\/2018\/10\/logo-white.png","url2x":"https:\/\/www.hammerdb.com\/blog\/wp-content\/uploads\/2018\/10\/logo-white.png"},"author_category":"","user_url":"http:\/\/www.hammerdb.com","last_name":"","first_name":"","job_title":"","description":""}],"_links":{"self":[{"href":"https:\/\/www.hammerdb.com\/blog\/wp-json\/wp\/v2\/posts\/451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hammerdb.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hammerdb.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hammerdb.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hammerdb.com\/blog\/wp-json\/wp\/v2\/comments?post=451"}],"version-history":[{"count":12,"href":"https:\/\/www.hammerdb.com\/blog\/wp-json\/wp\/v2\/posts\/451\/revisions"}],"predecessor-version":[{"id":532,"href":"https:\/\/www.hammerdb.com\/blog\/wp-json\/wp\/v2\/posts\/451\/revisions\/532"}],"wp:attachment":[{"href":"https:\/\/www.hammerdb.com\/blog\/wp-json\/wp\/v2\/media?parent=451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hammerdb.com\/blog\/wp-json\/wp\/v2\/categories?post=451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hammerdb.com\/blog\/wp-json\/wp\/v2\/tags?post=451"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.hammerdb.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}