{"id":1132,"date":"2013-09-17T09:14:32","date_gmt":"2013-09-17T09:14:32","guid":{"rendered":"https:\/\/raspberry-projects.com\/pi\/?p=1132"},"modified":"2016-02-03T16:45:53","modified_gmt":"2016-02-03T16:45:53","slug":"distribution-using-dropbox","status":"publish","type":"post","link":"https:\/\/raspberry-projects.com\/pi\/programming-in-c\/distribution-of-applicaitons\/distribution-using-dropbox","title":{"rendered":"Distribution using dropbox, web server, etc"},"content":{"rendered":"<h4>\nCreating The Install File &#8211; Zip<br \/>\n<\/h4>\n<p>\nZip your file or files following the instructions <a href=\"https:\/\/raspberry-projects.com\/pi\/uncategorized\/tar-for-zipping-files-an-ddirectories-etc\">here<\/a>.\n<\/p>\n<p>\nThe files executable permission is kept when it is zipped and&nbsp;will remain when it is unzipped again.\n<\/p>\n<p>\nCopy the .gz zip file to the public folder in your dropbox.\n<\/p>\n<p>\nGet its public link.\n<\/p>\n<h4>\nInstructions To Then Install From The Dropbox Zip<br \/>\n<\/h4>\n<p>\nIf upgrading, on the Raspberry Pi ensure the application isn&#39;t already running.\n<\/p>\n<p>\nPress the bottom left start button, select &#39;Accessories&#39; and then &#39;LXTerminal&#39;\n<\/p>\n<p>\nThis opens the Linux command prompt. &nbsp;Enter this command:\n<\/p>\n<pre>\r\n<code>\r\ncd projects\/the_install_directory\r\n<\/code><\/pre>\n<p>\nNow enter this command to download the new version\n<\/p>\n<pre>\r\n<code>\r\nwget -N https:\/\/dl.dropboxusercontent.com\/u\/123456789\/your_zip_file.gz\r\n<\/code><\/pre>\n<p>\nWait for it to complete (it will probably take a few seconds). &nbsp;Then enter this to install it:\n<\/p>\n<pre>\r\n<code>\r\ntar zxvf your_zip_file.gz\r\n<\/code><\/pre>\n<p>\nThat&#39;s is, assuming you didn&#39;t get any error messages the new version is installed\n<\/p>\n<h5>\nNotes<br \/>\n<\/h5>\n<p>\nThe &quot;-N&quot; option causes the wget to overwrite the local file if it already exists (otherwise you_zip_file.gz.1 is created instead) and to only bother with the download if the remote file is newer. &nbsp;If you ommit it then if a&nbsp;file with the same name already exists it will be retained and the new file renamed with&nbsp;&quot;.1&quot; on&nbsp;the end.\n<\/p>\n<h4>\nSimpler Instructions For Downloading The Executable Directly<br \/>\n<\/h4>\n<pre>\r\n<code>\r\nsudo killall my_app_name\r\n\r\ncd \/home\/pi\/\r\n\r\nsudo wget -N http:\/\/www.my_website.com\/apps\/my_app_name\r\nsudo chmod +x \/home\/pi\/my_app_name\r\n<\/code><\/pre>\n<p>\nThis does the following:\n<\/p>\n<p style=\"margin-left: 40px;\">\nStops the application if it is already running\n<\/p>\n<p style=\"margin-left: 40px;\">\nDownloads the new version,&nbsp;overwriting the existing file if present.\n<\/p>\n<p style=\"margin-left: 40px;\">\nSets it to executible\n<\/p>\n<p style=\"margin-left: 40px;\">\n&nbsp;\n<\/p>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating The Install File &#8211; Zip Zip your file or files following the instructions here. The files executable permission is kept when it is zipped and&nbsp;will remain when it is unzipped again. Copy the .gz zip file to the public folder in your dropbox. Get its public link. Instructions To Then Install From The Dropbox [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74],"tags":[],"class_list":["post-1132","post","type-post","status-publish","format-standard","hentry","category-distribution-of-applicaitons"],"_links":{"self":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/1132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/comments?post=1132"}],"version-history":[{"count":7,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/1132\/revisions"}],"predecessor-version":[{"id":2511,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/posts\/1132\/revisions\/2511"}],"wp:attachment":[{"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/media?parent=1132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/categories?post=1132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberry-projects.com\/pi\/wp-json\/wp\/v2\/tags?post=1132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}