Aptana中的自定义碎石未自动激活

时间:2012-11-30 16:23:03

标签: aptana

我是Aptana的新手,所以我可能会遗漏一些明显的东西。我在Aptana加载时没有激活我创建的捆绑包中的问题。我必须更新rubble.rb文件的日期才能使用。

touch ~/Documents/Aptana Rubles/ioncubeEncode.ruble

在我这样做之后,对于Aptana会议的剩余时间来说,事情是很好的。

我不认为它是相关的,但这里是捆绑代码,它工作正常(当它工作时):

require 'ruble'
#Ruble::Logger.log_level = :trace

bundle do |bundle|
  bundle.author = "Sasha"
  bundle.copyright = "None"
  bundle.display_name = "Ioncube Encode"
  bundle.description = "Encode just saved php file form base_local to base folder"
end

command "Ioncube Encode" do |cmd|
  cmd.input = :document
  cmd.output = :output_to_console
  cmd.trigger = :execution_listener , "org.eclipse.ui.file.save"
  cmd.invoke do |ctx|
    source_path = ENV['TM_FILEPATH']
    ext = File.extname(source_path)
    if ext == '.php'
        if ( source_path =~ /base_local/)
                destination_path = source_path.sub('/base_local/','/base/')
                #CONSOLE.puts "Ioncube Encoding: " + source_path + " to " + destination_path
                exec="/usr/local/ioncube/ioncube_encoder5 -v --optimize more --without-loader-check " + source_path + " -o " +destination_path + " 2>&1"
                IO.popen(exec, 'r+') do |io|
                        io.close_write
                        CONSOLE.puts  io.read
                end
        end
    end
  end
end

这可能看起来不是什么大问题,但它让我感到困扰 - 很多。

0 个答案:

没有答案