我正在尝试从控制台使用 slimer.js 制作 webgl 模型的屏幕截图
我安装依赖项
# sudo apt-get install libc6 libstdc++6 libgcc1 libgtk2.0-0 libasound2 libxrender1
我从http://slimerjs.org/download.html下载 Linux x86_64 的软件包
安装火狐
# apt-get 安装火狐
创建脚本
var system = require('system'), page = require('webpage').create();
page.open(' http://github.com/ ', function() { page.render('test.png'); phantom.exit(); }); page.onError = function(msg, trace) { console.log(msg); }
添加到 firefox.app 的路径
# 导出 SLIMERJSLAUNCHER=/usr/bin/firefox
用 xulrunner 跑得更苗条
# ./slimerjs/xulrunner/xulrunner ./slimerjs/slimerjs screen.js
最后得到错误:
# ./slimerjs/xulrunner/xulrunner ./slimerjs/slimerjs screen.js
(process:23815): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Error: App:Name not specified in application.ini
我做错了什么?请帮助我找出答案。
致以最诚挚的问候。安东。