AppDelegate.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #import <Cocoa/Cocoa.h>
  2. @interface AppDelegate : NSObject <NSApplicationDelegate, NSURLDownloadDelegate>
  3. {
  4. NSString* outputDir;
  5. NSString* tempDir;
  6. NSString* dataDir;
  7. NSString* currentArchiveName;
  8. NSString* currentArchiveFilename;
  9. NSMutableArray* actions;
  10. int64_t bytesRecieved;
  11. int64_t bytesExpected;
  12. BOOL installationCompleted;
  13. }
  14. @property (strong) IBOutlet NSWindow *window;
  15. @property (weak) IBOutlet NSButton *cd1Button;
  16. @property (weak) IBOutlet NSTextField *cd1TextField;
  17. @property (weak) IBOutlet NSButton *cd2Button;
  18. @property (weak) IBOutlet NSTextField *cd2TextField;
  19. @property (weak) IBOutlet NSProgressIndicator *progressIndicator;
  20. @property (weak) IBOutlet NSTextField *progressLabel;
  21. @property (weak) IBOutlet NSButton *installButton;
  22. @property (weak) IBOutlet NSTextField *errorLabel;
  23. @property (strong) NSURLDownload* download;
  24. - (IBAction)selectCD1:(id)sender;
  25. - (IBAction)selectCD2:(id)sender;
  26. - (IBAction)install:(id)sender;
  27. - (void)selectFile:(NSArray*)fileTypes withTextField:(NSTextField*)textField;
  28. - (void)showProgressText:(NSString*)text;
  29. - (void)showErrorText:(NSString*)text;
  30. - (void)showNotification:(NSString*)text;
  31. - (void)nextAction;
  32. - (int)runTask:(NSString*)executable withArgs:(NSArray*)args withWorkingDir:(NSString*)workingDir withPipe:(NSPipe*)pipe;
  33. - (void)downloadWogArchive;
  34. - (void)unzipWogArchive;
  35. - (void)downloadVcmiArchive;
  36. - (void)unzipVcmiArchive;
  37. - (void)extractGameData;
  38. - (void)innoexctract;
  39. - (NSString*)attachDiskImage:(NSString*)path;
  40. - (void)unshield;
  41. - (void)detachDiskImage:(NSString*)mountedPath;
  42. - (void)extractionCompleted;
  43. @end