]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Sun, 16 Oct 2011 17:21:20 +0000 (17:21 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Sun, 16 Oct 2011 17:21:20 +0000 (17:21 +0000)
inc/ws/DAO/class.ws.dao.book.php
inc/ws/Util/_common.php
inc/ws/Util/class.ws.svn.php [new file with mode: 0644]
inc/ws/Util/packager/class.ws.packager.air.php [new file with mode: 0644]

index f9e74551d383270d6ebf24173b93a4bd63efbee9..12a5b1345726a17870472ecb692ba9e1f059be71 100644 (file)
@@ -689,7 +689,7 @@ class wsDAOBook extends commonDAO {
 \r
                $this->compileFlex($book_id, $complete, $compilerDir, $finalDir, $filesToCopy, $book, $pages, $flex, $flexLight);\r
 \r
-               $flexLight->addVariable('checksum', $hash, false, true, 'String');\r
+\r
                $res .= $flex->compile() . "\n\n-------------------\n\n";\r
                $flexLight->addVariable('datasSize', filesize($compilerDir . '/FluidbookDatas.swf'));\r
                $res .= $flexLight->compile();\r
@@ -751,11 +751,21 @@ class wsDAOBook extends commonDAO {
                        $lib10 . 'flex.swc',\r
                        $lib10 . 'framework.swc',\r
                );\r
-               $flex = new cubeFlexCompiler('FluidbookAirProjector' . $book_id, $compilerDir, 'com.fluidbook.player.AIRMain', $libs, '/usr/local/flex_sdk_4.5/bin/mxmlc', 'air', 45,800,600,true);\r
+\r
+               wsSVN::updateToLastRevision();\r
+\r
+               $swf = 'FluidbookAirProjector' . $book_id;\r
+               $flex = new cubeFlexCompiler($swf, $compilerDir, 'com.fluidbook.player.AIRMain', $libs, '/usr/local/flex/bin/mxmlc', 10, 45, 800, 600, true);\r
 \r
                $this->compileFlex($book_id, true, $compilerDir, $finalDir, $filesToCopy, $book, $pages, $flex, $flex);\r
+               $res = $flex->compile();\r
 \r
-               return $flex->compile();\r
+               $air = new cubeAIRCompiler($compilerDir . '/' . $swf . '.swf', '/usr/local/flex/bin', $compilerDir, '2.7');\r
+               $air->setApplicationDatas('com.fluidbook' . $book_id, $book->parametres->titre, $book->parametres->titre, cubeText::str2URL($book->parametres->titre), $book->parametres->lang);\r
+               $air->setInitialWindow($book->parametres->titre);\r
+               $res.=$air->compile();\r
+\r
+               return $res;\r
        }\r
 \r
        public function compileFlex($book_id, $complete, $compilerDir, $finalDir, &$filesToCopy, $book, $pages, $flex, $flexLight) {\r
@@ -947,6 +957,8 @@ class wsDAOBook extends commonDAO {
                $flex->addFont(FONT_PATH . '/' . $lang->font, 'GeneralFont', $lang->charset);\r
                $flex->addFont(FONT_PATH . '/FluidbookCredits.ttf', 'CreditsFont', 'ASCII');\r
                $flexLight->addFont(FONT_PATH . '/FluidbookLoader.ttf', 'LoaderFont', 'Numerals');\r
+\r
+               $flexLight->addVariable('checksum', $hash, false, true, 'String');\r
        }\r
 \r
        public function compileWidget($book, $pages) {\r
index 5edcef271422758e09c2d588058817c596fb1002..0b86df328e46e65e9c3afe5549fa4a18a797eda6 100644 (file)
@@ -13,4 +13,5 @@ $__autoload['wsHTML5Compiler'] = dirname(__FILE__) . '/html5/class.ws.html5.comp
 $__autoload['wsHTML5Link'] = dirname(__FILE__) . '/html5/class.ws.html5.links.php';\r
 $__autoload['wsPDFFontExtractor'] = dirname(__FILE__) . '/fontextractor/class.ws.pdf.fontextractor.php';\r
 $__autoload['wsPDFFont'] = dirname(__FILE__) . '/fontextractor/class.ws.pdf.font.php';\r
+$__autoload['wsSVN'] = dirname(__FILE__) . '/class.ws.svn.php';\r
 ?>
\ No newline at end of file
diff --git a/inc/ws/Util/class.ws.svn.php b/inc/ws/Util/class.ws.svn.php
new file mode 100644 (file)
index 0000000..8d0fb1b
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Description of class
+ *
+ * @author Cube
+ */
+class wsSVN {
+
+       public static function updateToLastRevision($onlyCore=true) {
+               $svn = new cubeCommandLine('svn');
+               $svn->setPath(CONVERTER_PATH);
+               if ($onlyCore) {
+                       $svn->setManualArg('up /home/ws/sources/fluidbook/_src/com/fluidbook/*');
+               } else {
+                       $svn->setManualArg('up /home/ws/sources/*');
+               }
+               $svn->execute();
+       }
+
+}
+
+?>
diff --git a/inc/ws/Util/packager/class.ws.packager.air.php b/inc/ws/Util/packager/class.ws.packager.air.php
new file mode 100644 (file)
index 0000000..21fec50
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+class wsPackagerAIR extends wsPackager {
+       
+}
+
+?>