Commits

Anonymous committed d8ef173

contl10n01: added gregors windows hack, upload before setstati, mainbot now windows

Comments (0)

Files changed (4)

l10ntools/scripts/tool/botctrl.py

     def is_mainbot():        
         #linux64 is mainbot
         pf = sys.platform
-        if pf.strip() == "linux2":  #TODO: better search for linux
-            return True # all linux
-            uname = os.uname()
-            if uname[4] == "amd64" or uname[4] == "x86_64":
-                print "I am main bot"
-                return True 
-        print "I am client bot"
+        #if pf.strip() == "linux2":  #TODO: better search for linux
+        #    return True # all linux
+        #    uname = os.uname()
+        #    if uname[4] == "amd64" or uname[4] == "x86_64":
+        #        print "I am main bot"
+        
+        # windows is mainbot
+        if pf == "cygwin" or pf == "win32":
+            return True 
         return False 
 
 class State(object):

l10ntools/scripts/tool/commands.py

         
     def do(self, env):
         """Supported locations for downloading sdf files are scp, zipfile and local filesystem"""
-      
+        
+        if self._dest_path[1] == ":":
+            self._dest_path = "/cygdrive/" + self._dest_path[0] + self._dest_path[2:]
         utils.Util.makedirs(self._dest_path, self._log)
         # Pootle server 
         if not self._server_url == "" and not self._server_path == "":
         that potential have to be checked but the setup_native/source/win32/msi-encodinglist.txt 
         is already a good starting point. If the language is not present there no windows build can be made."""
 
+        if self._cws_root[1] == ":":
+            self._cws_root = "/cygdrive/" + self._cws_root[0] + self._cws_root[2:]
         enabled_langs_file = self._cws_root + "/setup_native/source/win32/msi-encodinglist.txt"
         try:
             fh = open(enabled_langs_file, "r")
         self._server_user       = utils.Util.replace_variables(tool_cfg.get("Upload Server", "server_user"), env, tool_cfg, self._log)
         self._server_keyfile    = utils.Util.replace_variables(tool_cfg.get("Upload Server", "server_keyfile"), env, tool_cfg, self._log)
         #self._server_path       = utils.Util.replace_variables(self._server_path, env, tool_cfg, self._log)
+
+        if self._cws_root[1] == ":":
+            self._cws_root = "/cygdrive/" + self._cws_root[0] + self._cws_root[2:]
+        if self._sdf_error_pattern[1] == ":":
+            self._sdf_error_pattern = "/cygdrive/" + self._sdf_error_pattern[0] + self._sdf_error_pattern[2:]
+        if self._log_file_pattern[1] == ":":
+            self._log_file_pattern = "/cygdrive/" + self._log_file_pattern[0] + self._log_file_pattern[2:]
+
         self._files = glob.glob(self._cws_root+"/"+self._source_pattern)
         self._sdf_error_files = glob.glob(self._sdf_error_pattern)
         self._log_files = glob.glob(self._log_file_pattern)

l10ntools/scripts/tool/contl10n.py

                             "PREBUILD": State(PreBuild(),  "GETSDF"),
                             "GETSDF":   State(GetSdf(),    "MERGE"),
                             "MERGE":    State(Merge(),     "COMPILE"),
-                            "COMPILE":  State(Compile(),   "SETSTATI"),
-                            "SETSTATI": State(SetStati(),  "UPLOAD"),
-                            "UPLOAD":   State(Upload(),    "END"),
+                            "COMPILE":  State(Compile(),   "UPLOAD"),
+                            "UPLOAD":   State(Upload(),    "SETSTATI"),
+                            "SETSTATI": State(SetStati(),  "END"),
                             "END":      State(End(),       "END") })
  
  

l10ntools/scripts/tool/sdf.py

     const._TITLE_POS           = 13
     const._DATE_POS            = 14
         
-    def __init__(self, project="", source_file="", dummy1="", resource_type="", gid="", lid="", helpid="", platform="", dummy2="", langid="", 
+    def __init__(self, project="", source_file="", dummy1="0", resource_type="", gid="", lid="", helpid="", platform="", dummy2="0", langid="", 
                        text="", helptext="", quickhelptext="", title="", date="2002-02-02 02:02:02"):
         self.project        = project;
         self.source_file    = source_file;