Commit da0e1b76 authored by Yavor Doganov's avatar Yavor Doganov

Import upstream wrapperfactory.app version 0.1.0

Imported GNUstepWrapper-0.1.0
into pkg-gnustep-maintainers@lists.alioth.debian.org--debian/wrapperfactory-app--head--1.0



git-archimport-id: pkg-gnustep-maintainers@lists.alioth.debian.org--debian/wrapperfactory-app--head--1.0--patch-1
parent abca29ca
GSWrapper
=========
Copyright (c) 2004, Raffael Herzog <herzog@raffael.ch>
Main Programmers:
- Raffael Herzog <herzog@raffael.ch>
Testers:
- Sascha Erni <rb@nggalai.com>
Documentation:
- Sascha Erni <rb@nggalai.com>
Special thanks to Patrick Tilp <Patrix@swiss-made-monster.ch> for the
icon.
$Id: AUTHORS 103 2004-08-09 16:30:51Z rherzog $
$HeadURL: file:///home/rherzog/Subversion/GNUstep/GSWrapper/tags/release-0.1.0/AUTHORS $
This diff is collapsed.
# -*- Mode: Makefile -*-
#
# Copyright (C) 2004 Raffael Herzog
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# $Id: Directories.make 103 2004-08-09 16:30:51Z rherzog $
# $HeadURL: file:///home/rherzog/Subversion/GNUstep/GSWrapper/tags/release-0.1.0/Directories.make $
ifeq ($(debug),yes)
APP_DIR=WrapperFactory.debug
OBJ_BASE_DIR=shared_debug_obj
else
APP_DIR=WrapperFactory.app
OBJ_BASE_DIR=shared_obj
endif
ARCH_DIR=$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/$(LIBRARY_COMBO)
ifneq ($(GNUSTEP_FLATTENED),yes)
OBJ_DIR=$(OBJ_BASE_DIR)/$(ARCH_DIR)
else
OBJ_DIR=$(OBJ_BASE_DIR)
endif
# Copyright (C) 2004 Raffael Herzog
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# $Id: GNUmakefile 103 2004-08-09 16:30:51Z rherzog $
# $HeadURL: file:///home/rherzog/Subversion/GNUstep/GSWrapper/tags/release-0.1.0/GNUmakefile $
include $(GNUSTEP_MAKEFILES)/common.make
include Directories.make
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
PACKAGE_NAME=GNUstepWrapper
include Version
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
#$(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/$(LIBRARY_COMBO)/GSWrapper_Launcher
SUBPROJECTS = libGSWrapper Launcher WrapperFactory
-include GNUmakefile.preamble
ifeq ($(GSWrapper_Development),yes)
-include GNUmakefile.development
endif
include $(GNUSTEP_MAKEFILES)/aggregate.make
-include GNUmakefile.postamble
GNUSTEP_INSTALLATION_DIR=$(GNUSTEP_USER_ROOT)
OBJCFLAGS+=-Werror -DFREEDESKTOP
# Copyright (C) 2004 Raffael Herzog
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# $Id: GNUmakefile 103 2004-08-09 16:30:51Z rherzog $
# $HeadURL: file:///home/rherzog/Subversion/GNUstep/GSWrapper/tags/release-0.1.0/Launcher/GNUmakefile $
include $(GNUSTEP_MAKEFILES)/common.make
include ../Directories.make
GNUSTEP_INSTALLATION_DIR=$(GNUSTEP_SYSTEM_ROOT)
OBJC_PROGRAM_NAME=GSWrapper_Launcher
GSWrapper_Launcher_OBJC_FILES=main.m
GSWrapper_Launcher_OBJC_LIBS += -lGSWrapper -lgnustep-base -lgnustep-gui
GSWrapper_Launcher_INCLUDE_DIRS += -I../libGSWrapper
GSWrapper_Launcher_LIB_DIRS += -L../libGSWrapper/$(OBJ_DIR)
GSWrapper_Launcher_COPY_INTO_LOCAL_BUNDLE = ../$(APP_DIR)/Resources/$(ARCH_DIR)
-include GNUmakefile.preamble
ifeq ($(GSWrapper_Development),yes)
include ../GNUmakefile.development
endif
include $(GNUSTEP_MAKEFILES)/objc.make
-include GNUmakefile.postamble
/* Copyright (C) 2004 Raffael Herzog
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id: main.m 103 2004-08-09 16:30:51Z rherzog $
* $HeadURL: file:///home/rherzog/Subversion/GNUstep/GSWrapper/tags/release-0.1.0/Launcher/main.m $
*/
#include <Foundation/Foundation.h>
#include <AppKit/AppKit.h>
#include "WrapperDelegate.h"
int main(int argc, const char *argv[]) {
[NSApplication sharedApplication];
[NSApp setDelegate: [[WrapperDelegate alloc] init]];
return NSApplicationMain(argc, argv);
}
No news yet... :)
$Id: NEWS 103 2004-08-09 16:30:51Z rherzog $
$HeadURL: file:///home/rherzog/Subversion/GNUstep/GSWrapper/tags/release-0.1.0/NEWS $
GNUstepWrapper
=============
GNUstepWrapper is an easy way to create GNUstep app-wrappers of non-GNUstep
binaries. It is the most useful in conjunction with Enrico Sersale's
GWorkspace environment.
INSTALL
=======
GNUstepWrapper needs a fairly current build of GNUstep installed.
Get GNUstep here: http://www.gnustep.org/
Also, a recent installation of GWorkspace.app is highly recommended.
Get GWorkspace here: http://www.gnustep.it/enrico/gworkspace/
Decompress the archive:
tar xfvz GNUstepWrapper-[Version].tar.gz
Next, compile and install the application:
$ make
# make install (as root)
GNUstepWrapper installs a tool to $GNUSTEP_SYSTEM_ROOT/Tools, a library
(libGSWrapper) to $GNUSTEP_SYSTEM_ROOT/Libraries, and an application / GUI
for creating and editing wrappers in $GNUSTEP_SYSTEM_ROOT/Applications.
Now, update the available services for GWorkspace.app:
$ make_services
You may need to restart GWorkspace to make it stick.
If everything went well, you will have two new entries in GWorkspace.app's
"Services" menu: WrapperFactory > Create Wrapper / Edit Wrapper.
USAGE
=====
Create a Wrapper
----------------
1. Browse to the application binary you want to wrap.
2. Select the binary and hit "Services > WrapperFactoryWrapper > Create
Wrapper". WrapperFactory will launch and create a basic wrapper for the
application you selected.
3. If applicable, use the "Start" dropdown to change the application's
behaviour when starting by opening a file ("Start Application and Open
Files") and when opening additional files ("Open Files in Running
Application"). The code used for the selected file to be opened is "$@",
including the " ".
EXAMPLE: Gimp
Start Application: exec /usr/bin/gimp
Start Application and Open Files: exec /usr/bin/gimp "$@"
Open Files in Running Application: exec /usr/bin/gimp-remote "$@"
4. Add your wrapped application's app-icon by dragging it from a GWorkspace
window to the "AppIcon" area. By default, WrapperFactory uses the GNUstep
logo as app-icon. Supported image formats are GIF, JPEG, PNG, XPM and
TIFF (non-compressed). As of now, overlarge images are not properly
scaled, hence you should chose a 48x48px image as your app-icon. You can
also use preview images provided by Inspector.app by dragging the preview
to the "AppIcon" area.
5. If you feel like it, add application specific meta-information to the
fields in the upper part of WrapperFactory's window and define the
application's role (none, editor, viewer). This information is not
necessary for creating a working app-wrapper.
Add File Types
--------------
1. Click the "Types" tab to edit the file types to be associated with your
wrapped application.
2. Hit the "New Type" button. The right side of WrapperFactory's window will
show you a drag-and-drop area for the file icon, and two text fields for
extensions and file type names to be supported by the wrapped
application.
3. Enter the file type extensions in the "Extensions" field. You can use
comma (,) to seperate multiple extensions. Extensions are case
insensitive.
4. Next, enter the proper name of the file type in the "Name" field.
EXAMPLE: HTML
Extensions: htm,html,xhtml
Name: Hypertext Markup Language File
5. Add the icon for the file type you are creating, using drag-and-drop from
a GWorkspace window. By default, WrapperFactory uses the GNUstep logo as
file type icon. Supported image formats are GIF, JPEG, PNG, XPM and TIFF
(non-compressed). As of now, overlarge images are not properly scaled,
hence you should chose a 48x48px image as your file type icon. You can
also use preview images provided by Inspector.app by dragging the preview
to the "Icon" area.
6. Hit "New Type" for adding further file types, or "Delete Type" to get rid
of a superfluous file type.
When you're done configuring your app-wrapper, use "Document > Save" to save
the wrapper. By default, WrapperFactory saves wrapped applications in
~/GNUstep/Applications/. Naturally, you can move all wrapped applications to
wherever you see fit.
Edit a Wrapper
--------------
1. Browse to the wrapped application you want to edit.
2. Select the application and hit "Services > WrapperFactory > Edit
Wrapper". WrapperFactory will launch, opening the previously created
app-wrapper.
3. Make your changes. You have all the same options as described above.
4. Save your edited app-wrapper by using "Document > Save" or "Document >
Save As".
CONTACT
=======
Bug reports, feature requests and comments regarding this documentation should
be directed to:
Raffael Herzog <herzog@raffael.ch>.
http://www.raffael.ch
$Id: README 103 2004-08-09 16:30:51Z rherzog $
$HeadURL: file:///home/rherzog/Subversion/GNUstep/GSWrapper/tags/release-0.1.0/README $
* [BUG] Crashes
WrapperFactory.app still crashes from time to time, e.g. when
opening a wrapped application while WrapperFactory is
running already.
* [BUG] File Types
The file type description is only shown in the table after the
window has been resized at least once.
* [BUG] Create / Edit wrapper
Do not open two WrapperFactory.app windows if WrapperFactory is not
running already.
* [FEATURE] Icon scaling
As of now, icon images larger than 48x48px are stored in their
original formats assuming that the window manager will rescale them.
However, Window Maker doesn't, so WrapperFactory should rescale.
WrapperFactory.app will rescale such icons to 48x48px while creating
a new app-wrapper and save both the original icon file and the
scaled version in the app-wrapper.
* [DOC] Provide the documentation in HelpViewer.app format.
* [FEATURE] Freedesktop integration
There are many ways of realising this:
- import .desktop files to create wrappers
- directly use .desktop files ("Use .desktop" action)
* [FEATURE] Scriptability
For automation of wrapper creation, WrapperFactory should be
scriptable. Three possible approaches:
- enable WrapperFactory for StepTalk
- move wrapper handling out to a library and create a command line
tool
- both
* [FEATURE] File type library
Store previously defined file types and icon associations and show
said file types when creating and editing an app-wrapper. Could be
done with Freedesktop integration.
* [FEATURE] Multiple instances
Some wrappers, e.g. xpdf or gv, should actually launch
several instances of the application to simulate multiple open
files.
* [FEATURE] More messages
Implement more messages like e.g. applicationShouldTerminate.
* [FEATURE] Window tracking
Try tracking windows opened by a wrapped application to keep control
of said windows (hiding, move up in window stack etc.). Maybe in
collaboration with Window Maker?
* [FEATURE] DE integration
Check whether a wrapper could map GNUstep messages to GNOME/KDE
messages.
$Id: TODO 103 2004-08-09 16:30:51Z rherzog $
$HeadURL: file:///home/rherzog/Subversion/GNUstep/GSWrapper/tags/release-0.1.0/TODO $
# -*- Mode: Makefile -*-
#
# Copyright (C) 2004 Raffael Herzog
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# $Id: Version 103 2004-08-09 16:30:51Z rherzog $
# $HeadURL: file:///home/rherzog/Subversion/GNUstep/GSWrapper/tags/release-0.1.0/Version $
# The version number of this release.
MAJOR_VERSION=0
MINOR_VERSION=1
SUBMINOR_VERSION=0
APP_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${SUBMINOR_VERSION}
VERSION=${APP_VERSION}
/* Copyright (C) 2004 Raffael Herzog
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id: ApplicationDelegate.h 103 2004-08-09 16:30:51Z rherzog $
* $HeadURL: file:///home/rherzog/Subversion/GNUstep/GSWrapper/tags/release-0.1.0/WrapperFactory/ApplicationDelegate.h $
*/
#ifndef _GSWrapper_GSWrapper_H
#define _GSWrapper_GSWrapper_H
#include <AppKit/AppKit.h>
#include "ServicesProvider.h"
@interface ApplicationDelegate : NSObject
{
IBOutlet NSMenuItem *windowsMenuItem;
IBOutlet NSMenuItem *servicesMenuItem;
ServicesProvider *servicesProvider;
}
- (void)awakeFromNib;
/*
* application delegate
*/
- (void)applicationDidFinishLaunching: (NSNotification *)not;
- (void)applicationDidFinishLaunching: (NSNotification *)not;
- (NSApplicationTerminateReply)applicationShouldTerminate: (NSNotification *)not;
- (void)applicationWillTerminate: (NSNotification *)not;
- (void)application: (NSApplication *)app
openFile: (NSString *)file;
- (void)application: (NSApplication *)app
openFiles: (NSArray *)files;
/*
* outlets
*/
- (void)setWindowsMenuItem: (NSMenuItem *)menuItem;
//- (NSMenu *)windowsMenu;
- (void)setServicesMenuItem: (NSMenuItem *)menuItem;
//- (NSMenu *)servicesMenu;
@end
#endif
/* Copyright (C) 2004 Raffael Herzog
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id: ApplicationDelegate.m 103 2004-08-09 16:30:51Z rherzog $
* $HeadURL: file:///home/rherzog/Subversion/GNUstep/GSWrapper/tags/release-0.1.0/WrapperFactory/ApplicationDelegate.m $
*/
#include <AppKit/AppKit.h>
#include "ApplicationDelegate.h"
#include "WrapperDocument.h"
@implementation ApplicationDelegate
- (void)awakeFromNib
{
//documentController = [NSDocumentController sharedController];
}
/*
* Application delegate
*/
- (void)applicationWillFinishLaunching: (NSNotification *)not
{
[NSApp setWindowsMenu: [windowsMenuItem submenu]];
[NSApp setServicesMenu: [servicesMenuItem submenu]];
NSArray *types = [NSArray arrayWithObjects: NSStringPboardType, NSTIFFPboardType, nil];
RETAIN(types);
[NSApp registerServicesMenuSendTypes: types
returnTypes: (types)];
}
- (void)applicationDidFinishLaunching: (NSNotification *)not
{
servicesProvider = [[ServicesProvider alloc] init];
[NSApp setServicesProvider: servicesProvider];
}
- (BOOL)applicationOpenUntitledFile: (NSApplication *)app
{
[[NSDocumentController sharedDocumentController] openUntitledDocumentOfType: ApplicationType
display: (YES)];
return YES;
}
- (BOOL)applicationShouldOpenUntitledFile: (NSApplication *)app
{
return YES;
}
- (NSApplicationTerminateReply)applicationShouldTerminate: (NSNotification *)not
{
if ( [[NSDocumentController sharedDocumentController] closeAllDocuments] ) {
return NSTerminateNow;
}
else {
return NSTerminateCancel;
}
}
- (void)applicationWillTerminate: (NSNotification *)not
{
}
- (void)application: (NSApplication *)app
openFile: (NSString *)file
{
[self application: app
openFiles: ([NSArray arrayWithObject: file])];
//openFiles: (AUTORELEASE([NSArray arrayWithObject: file]))];
}
- (void)application: (NSApplication *)app
openFiles: (NSArray *)files
{
int i;
int count = [files count];
NSDocumentController *documentController = [NSDocumentController sharedDocumentController];
for ( i=0; i<count; i++ ) {
NSString *f = [files objectAtIndex: i];
[documentController openDocumentWithContentsOfFile: f
display: (YES)];
}
}
/*
* outlets
*/
- (void)setWindowsMenuItem: (NSMenuItem *)menuItem
{
windowsMenuItem = menuItem;
}
- (void)setServicesMenuItem: (NSMenuItem *)menuItem
{
servicesMenuItem = menuItem;
}
@end
/* Copyright (C) 2004 Raffael Herzog
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id: Localizable.strings 103 2004-08-09 16:30:51Z rherzog $
* $HeadURL: file:///home/rherzog/Subversion/GNUstep/GSWrapper/tags/release-0.1.0/WrapperFactory/English.lproj/Localizable.strings $
*/
"Untitled.app" = "Untitled.app";
"A wrapped application" = "A wrapped application";
"Failed to open file:\n%@" = "Failed to open file:\n%@";
"Failed to open files:\n%@" = "Failed to open files:\n%@";
{
FirstResponder = {
Actions = (
"activateContextHelpMode:",
"alignCenter:",
"alignJustified:",
"alignLeft:",
"alignRight:",
"arrangeInFront:",
"cancel:",
"capitalizeWord:",
"changeColor:",
"changeFont:",
"checkSpelling:",
"close:",
"complete:",
"copy:",
"copyFont:",
"copyRuler:",
"cut:",
"delete:",
"deleteBackward:",
"deleteForward:",
"deleteToBeginningOfLine:",
"deleteToBeginningOfParagraph:",
"deleteToEndOfLine:",
"deleteToEndOfParagraph:",
"deleteToMark:",
"deleteWordBackward:",
"deleteWordForward:",
"deminiaturize:",
"deselectAll:",
"fax:",
"hide:",
"hideOtherApplications:",
"indent:",
"loosenKerning:",
"lowerBaseline:",
"lowercaseWord:",
"makeKeyAndOrderFront:",
"miniaturize:",
"miniaturizeAll:",
"moveBackward:",
"moveBackwardAndModifySelection:",
"moveDown:",
"moveDownAndModifySelection:",
"moveForward:",
"moveForwardAndModifySelection:",
"moveLeft:",
"moveRight:",
"moveToBeginningOfDocument:",
"moveToBeginningOfLine:",
"moveToBeginningOfParagraph:",
"moveToEndOfDocument:",
"moveToEndOfLine:",
"moveToEndOfParagraph:",
"moveUp:",
"moveUpAndModifySelection:",
"moveWordBackward:",
"moveWordBackwardAndModifySelection:",
"moveWordForward:",
"moveWordForwardAndModifySelection:",
"newDocument:",
"ok:",
"openDocument:",
"orderBack:",
"orderFront:",
"orderFrontColorPanel:",
"orderFrontDataLinkPanel:",
"orderFrontFontPanel:",
"orderFrontHelpPanel:",
"orderFrontStandardAboutPanel:",
"orderFrontStandardInfoPanel:",
"orderOut:",
"pageDown:",
"pageUp:",
"paste:",