Author: remi
Date: 2009-05-29 10:51:23 +0200 (Fri, 29 May 2009)
New Revision: 4698

Removed:
   software_suite_v3/smart-core/smart-server/trunk/content/
Modified:
   software_suite_v3/smart-core/smart-server/trunk/TDSConfiguration.py
   
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/00_resourceAttituneManager.py
   
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py
   
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/02_resourceGagdetsServer.py
Log:
* default content of the server (att, scp, scg, tools) is now out of the server 
directory.
 - C:\Program Files\Kysoh\Tuxdroid\resources on Windows
 - /usr/share/tuxdroid/resources on Linux
 - Server create directories if not exists

Modified: software_suite_v3/smart-core/smart-server/trunk/TDSConfiguration.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/TDSConfiguration.py 
2009-05-29 08:02:22 UTC (rev 4697)
+++ software_suite_v3/smart-core/smart-server/trunk/TDSConfiguration.py 
2009-05-29 08:51:23 UTC (rev 4698)
@@ -15,7 +15,7 @@
 import os
 
 from util.logger import *
-import util.misc.tuxPaths
+from util.misc.tuxPaths import *
 
 # 
==============================================================================
 # Class to retrieve the py file path.
@@ -78,15 +78,16 @@
 TDS_RESOURCES_PATH = os.path.join(TDS_APPLICATION_PATH, 'resources')
 # Path of the resources configurations of the httpserver
 if os.name == 'nt':
-    TDS_RESOURCES_CONF_PATH = os.path.join(TDS_APPLICATION_PATH, 
"resources_conf")
+    TDS_RESOURCES_CONF_PATH = os.path.join(TUXDROID_BASE_PATH, 
"configurations", "resources")
 else:
     TDS_RESOURCES_CONF_PATH = os.path.join("/etc/tuxdroid", "resources_conf")
 # Path of the user configurations
 if os.name == 'nt':
-    TDS_USERS_CONF_PATH = os.path.join(os.path.split(TDS_APPLICATION_PATH)[0],
-        "users_conf")
+    TDS_USERS_CONF_PATH = os.path.join(TUXDROID_BASE_PATH, "configurations", 
"users_conf")
 else:
     TDS_USERS_CONF_PATH = os.path.join("/etc/tuxdroid", "users_conf")
+# Path of the default content of the server
+TDS_DEFAULT_CONTENT_PATH = os.path.join(TUXDROID_BASE_PATH, "resources")
 
 # 
------------------------------------------------------------------------------
 # Resources configuration

Modified: 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/00_resourceAttituneManager.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/00_resourceAttituneManager.py
  2009-05-29 08:02:22 UTC (rev 4697)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/00_resourceAttituneManager.py
  2009-05-29 08:51:23 UTC (rev 4698)
@@ -60,7 +60,8 @@
         self.logger.logInfo("Licence : GPL")
         self.logger.logInfo("-----------------------------------------------")
         # Get the attitunes path
-        attitunesPath = os.path.join(TDS_APPLICATION_PATH, "content", 
"attitunes")
+        attitunesPath = os.path.join(TDS_DEFAULT_CONTENT_PATH, "attitunes")
+        DirectoriesAndFilesTools.MKDirs(attitunesPath)
         self.logger.logInfo("Add directory in the container [%s]." %\
                 attitunesPath)
         self.__attitunesContainer.addDirectory(attitunesPath)

Modified: 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py
    2009-05-29 08:02:22 UTC (rev 4697)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py
    2009-05-29 08:51:23 UTC (rev 4698)
@@ -67,7 +67,8 @@
             language, country, locutor, pitch))
         self.__pluginsContainer.setLocales(language, country, locutor, pitch)
         # Get the plugins path
-        pluginsPath = os.path.join(TDS_APPLICATION_PATH, "content", "plugins")
+        pluginsPath = os.path.join(TDS_DEFAULT_CONTENT_PATH, "plugins")
+        DirectoriesAndFilesTools.MKDirs(pluginsPath)
         self.logger.logInfo("Add directory in the container [%s]." %\
                 pluginsPath)
         self.__pluginsContainer.addDirectory(pluginsPath)

Modified: 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/02_resourceGagdetsServer.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/02_resourceGagdetsServer.py
    2009-05-29 08:02:22 UTC (rev 4697)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/02_resourceGagdetsServer.py
    2009-05-29 08:51:23 UTC (rev 4698)
@@ -54,7 +54,8 @@
         
self.__gadgetsContainer.setOnGadgetDeployedCallback(self.__onGadgetDeployed)
         
self.__gadgetsContainer.setOnGadgetDeploymentErrorCallback(self.__onGadgetDeploymentError)
         
self.__gadgetsContainer.setOnGadgetUndeployedCallback(self.__onGadgetUndeployed)
-        gadgetsPath = os.path.join(TDS_APPLICATION_PATH, "content", "gadgets")
+        gadgetsPath = os.path.join(TDS_DEFAULT_CONTENT_PATH, "gadgets")
+        DirectoriesAndFilesTools.MKDirs(gadgetsPath)
         self.logger.logInfo("Add directory in the container [%s]." %\
                 gadgetsPath)
         self.__gadgetsContainer.addDirectory(gadgetsPath)


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to