X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fjarsigner.cpp;h=b8c9a5092607f2c817147bb2b877864f465705cc;hb=HEAD;hp=ac7c779b7c1c957c56d56c47505262c9f5bf6b3f;hpb=1ed833343bc83b83c5f61cbfd74423bbba677a04;p=builder.git diff --git a/source/jarsigner.cpp b/source/jarsigner.cpp deleted file mode 100644 index ac7c779..0000000 --- a/source/jarsigner.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include "component.h" -#include "externaltask.h" -#include "filetarget.h" -#include "jarsigner.h" -#include "sourcepackage.h" - -using namespace std; -using namespace Msp; - -JarSigner::JarSigner(Builder &b): - Tool(b, "JSGN") -{ - set_command("jarsigner"); - set_run(_run); -} - -Target *JarSigner::create_target(const vector &, const string &) -{ - throw logic_error("not implemented"); -} - -Task *JarSigner::_run(const FileTarget &file) -{ - const Tool &tool = *file.get_tool(); - - ExternalTask::Arguments argv; - argv.push_back(tool.get_executable()->get_path().str()); - - // TODO Make this generic - FS::Path home_dir = Msp::getenv("HOME"); - argv.push_back("-keystore"); - argv.push_back((home_dir/".android"/"debug.keystore").str()); - argv.push_back("-storepass"); - argv.push_back("android"); - - FS::Path work_dir = file.get_component()->get_package().get_source_directory(); - - argv.push_back(FS::relative(file.get_path(), work_dir).str()); - argv.push_back("androiddebugkey"); - - return new ExternalTask(argv, work_dir); -}