-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpsrip.cpp
65 lines (52 loc) · 1.08 KB
/
psrip.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include <iostream>
#include <cstdio>
#include <cstring>
#include <gtk/gtk.h>
#include "imagesource/imagesource_util.h"
#include "imagesource/pixbuf_from_imagesource.h"
#include "miscwidgets/imageselector.h"
#include "miscwidgets/pixbufview.h"
#include "miscwidgets/generaldialogs.h"
#include "support/progresstext.h"
#include "support/util.h"
#include "psripui.h"
#include "debug.h"
#include "config.h"
#include "gettext.h"
#define _(x) gettext(x)
using namespace std;
int main(int argc,char *argv[])
{
gtk_init(&argc,&argv);
Debug.SetLevel(TRACE);
try
{
// PSRipOptions opts;
// PSRip ripper;
// ripper.Rip(argv[1],opts);
PSRipUI ripper;
if(argc>1)
{
char *filename;
#ifdef WIN32
if(argv[1][1]!=':' && argv[1][0]!='/')
filename=BuildAbsoluteFilename(argv[1]);
else
filename=strdup(argv[1]);
#else
if(argv[1][0]!='/')
filename=BuildAbsoluteFilename(argv[1]);
else
filename=strdup(argv[1]);
#endif
ripper.Rip(filename);
free(filename);
}
gtk_main();
}
catch(const char *err)
{
cerr << "Error: " << err << endl;
}
return(0);
}