File: synfig_osx_launcher.cpp

package info (click to toggle)
synfig 1.5.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 59,132 kB
  • sloc: cpp: 109,639; sh: 6,121; makefile: 1,458; csh: 243; perl: 238; python: 124; ruby: 73
file content (15 lines) | stat: -rw-r--r-- 375 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <cstdlib>
#include <string>

int main(int argc, char* argv[]) {
  std::string buf(argv[0]);

  std::size_t found = buf.rfind('/'); // looking for a last slash in path
  if (found != std::string::npos) {
    buf = buf.substr(0, found + 1); // get the directory where exe is located
  }

  buf = "\"" + buf + "SynfigStudio.sh" + "\"";

  return system(buf.c_str());
}