namespace App\Fluidbook\Packager;
use App\Models\FluidbookPublication;
+use Fluidbook\Tools\Compiler\Compiler;
+
class Online extends Packager
{
protected $origHTML;
protected $_ext = 'html';
public $type = 'html';
protected $_compileOnConstruct = false;
+
protected function preparePackage()
{
parent::preparePackage();
$this->prepareFluidbook();
}
+
+ /**
+ * @throws \Exception
+ */
public function prepareFluidbook()
{
$dest = $this->vdir;
$mfid = $this->book->getSettings()->get('mobilefirstFluidbookId', '');
if ($mfid != '' && (int)$mfid > 0) {
$mfbook = FluidbookPublication::find($mfid);
- $this->_compileFluidbook($this->book, $dest . '/d', true);
- $vars = wsDAOBook::$lastHTML5Compiler->getIndexVars();
- $this->_compileFluidbook($mfbook, $dest . '/mf', true);
+ $desktopCompiler = $this->_compileFluidbook($this->book, $dest . 'd/', true);
+ $vars = $desktopCompiler->getIndexVars();
+ $this->_compileFluidbook($mfbook, $dest . 'mf/', true);
$hybrid = file_get_contents($this->resource_path('hybrid.html'));
$replace = [
}
}
+
public function makePackage($zip)
{
parent::makePackage($zip);