{"id":66,"date":"2010-08-18T01:11:16","date_gmt":"2010-08-18T01:11:16","guid":{"rendered":""},"modified":"2010-08-18T01:11:16","modified_gmt":"2010-08-18T01:11:16","slug":"redirection-fix","status":"publish","type":"post","link":"http:\/\/www.icetips.com\/blog_wp\/2010\/08\/18\/redirection-fix\/","title":{"rendered":"Redirection fix"},"content":{"rendered":"<p>Apparently my brain kept working on the redirection problem that I blogged about yesterday as when I woke up the morning I had a good clue what the problem was:  Long path names.  That turned out to be at least big part of the problem.  However, it was not quite that simple, it never is!  I didn't have time to do a complete research into the problem and nail down everything, but here is my findings and theories.  <\/p>\n<p>It appears that the compiler has issues finding files if the path to them includes pathnames that are more than 8 characters long.  For example:<\/p>\n<div style=\"border: 1px solid gray;padding: 2px;background:#FBFFE8;margin-bottom:10px\">\n<pre>\r\nC:\\Dev\\Prod\\Utilities\\Src\r\n<\/pre>\n<\/div>\n<p>causes problems, but <\/p>\n<div style=\"border: 1px solid gray;padding: 2px;background:#FBFFE8;margin-bottom:10px\">\n<pre>\r\nC:\\DEV\\PROD\\UTILIT~1\\SRC\r\n<\/pre>\n<\/div>\n<p>does not cause a problem.  But like I said, that is just part of it, as:<\/p>\n<div style=\"border: 1px solid gray;padding: 2px;background:#FBFFE8;margin-bottom:10px\">\n<pre>\r\nC:\\Dev\\Prod\\XPTheme\\Src\r\n<\/pre>\n<\/div>\n<p>also caused problem.  Either the problem is that there were other paths in the *.INC<br \/>\nline that use long path names (and there were) OR the compiler didn't grasp somehow that <\/p>\n<div style=\"border: 1px solid gray;padding: 2px;background:#FBFFE8;margin-bottom:10px\">\n<pre>\r\nC:\\DEV\\PROD\\XPTHEME\\SRC\r\n<\/pre>\n<\/div>\n<p>is a short path name!  I'm not sure which it is and didn't have time to figure it out.  <\/p>\n<p>Using a macro for any part of the path fixes the problem completely.  For example, I created this macro:<\/p>\n<div style=\"border: 1px solid gray;padding: 2px;background:#FBFFE8;margin-bottom:10px\">\n<pre>\r\nDEV=C:\\Dev\r\n<\/pre>\n<\/div>\n<p>and then used <\/p>\n<div style=\"border: 1px solid gray;padding: 2px;background:#FBFFE8;margin-bottom:10px\">\n<pre>\r\n%DEV%\\Prod\\Utilities\\Src\r\n<\/pre>\n<\/div>\n<p>and there was no problem at all.  So using the macros somehow makes the IDE correctly interpret the path name and probably convert it to a short path and the compiler is happy.  When I had cleaned everything up, I ended up with just two macros being defined in my C60EE.ini:<\/p>\n<div style=\"border: 1px solid gray;padding: 2px;background:#FBFFE8;margin-bottom:10px\">\n<pre>\r\nProd=C:\\Dev\\Prod\r\nDev=C:\\Dev\r\n<\/pre>\n<\/div>\n<p>I also came to a final consensus on the folder structures I'm using, which seems to be working pretty well so far.  The Dev folder has 3 folders now:<\/p>\n<table width=\"100%\" border=\"0\" cellpadding=\"5px\" cellspacing=\"5px\">\n<tr>\n<td valign=\"top\">\n      <b>C:\\Dev\\Prod<\/b>\n    <\/td>\n<td>\n      <b>Products<\/b>.  Each product has its own subfolder so it can be easily added to version control.  This way the entire product folder can be checked out and committed.\n    <\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n      <b>C:\\Dev\\Projects<\/b>\n    <\/td>\n<td>\n      <b>Non product projects<\/b>.  This folder contains client projects, in-house projects and anything that cannot be classified as a product, free or commercial.\n    <\/td>\n<\/tr>\n<tr>\n<td valign=\"top\">\n      <b>C:\\Dev\\Source<\/b>\n    <\/td>\n<td>\n      <b>Other sources<\/b>.  This is basically a catch all folder for anything that doesn't directly belong in either of the above.  Currently it holds templates and classes that I use in some of my own apps, but are neither a product or a project on their own, nor do they belong to a specific product or project.\n    <\/td>\n<\/tr>\n<\/table>\n<p>With the structure in place I spent most of today copying and moving files from my old structure to the new one and test compiling various projects and products in both Clarion 6.3.9053 which I use for one client project, and Clarion 6.3.9058, which I use for pretty much everything else.  <\/p>\n<p>So tomorrow will be the day that I convert all my editor projects to work with the new folder structure as well as my Build Automator scripts.  Then I will get this on to a virtual machine and test the structure with Subversion to make sure that it holds up for the version control!  <\/p>\n<p>Arnor Baldvinsson<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_66\" class=\"pvc_stats all  \" data-element-id=\"66\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Apparently my brain kept working on the redirection problem that I blogged about yesterday as when I woke up the morning I had a good clue what the problem was: Long path names. That turned out to be at least big part of the problem. However, it was not quite that simple, it never is! <a href=\"http:\/\/www.icetips.com\/blog_wp\/2010\/08\/18\/redirection-fix\/\" class=\"more-link\">...continue reading <span class=\"screen-reader-text\">Redirection fix<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_66\" class=\"pvc_stats all  \" data-element-id=\"66\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-66","post","type-post","status-publish","format-standard","hentry","category-technical"],"_links":{"self":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":0,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}