Skip to content

Commit 0d4e494

Browse files
committed
License Tool
1 parent 92f1e51 commit 0d4e494

File tree

3 files changed

+53
-8
lines changed

3 files changed

+53
-8
lines changed

HOWTO.txt

+9-5
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,18 @@ Add -> Existing files.
1010
OSX:
1111
Navigate to EngineRoom/EngineRoom-OSX and choose EngineRoom-OSX.xcodeproj
1212

13-
On opening the new entry it should reveal EngineRoom.framework.
13+
Do not tick "Copy".
1414

15-
Open the inspector for your target, add EngineRoom-OSX as a dependency.
16-
Drag the framework from the EngineRoom project to 'Link Binary with Libraries'
17-
for your target.
15+
On opening the new entry it should reveal EngineRoom.framework.
1816

1917
Create a new Copy Files Build Phase with target "Frameworks" and drag the
20-
framework to it (from the EngineRoom project as before).
18+
framework to it (from the EngineRoom project ).
19+
20+
Option-Drag the framework from there to your targets 'Link Binary with Libraries'.
21+
22+
Open the inspector for your target, Tab "General",
23+
add EngineRoom-OSX as a dependency.
24+
2125

2226
Optional:
2327
Open your MainMenu NIB and add an NSObject, set its class to EngineRoom,

LICENSE.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ Regards, Bjoern
1010

1111

1212
LICENSE TERMS:
13-
14-
Copyright (c) 2010 Bjoern Kriews - All rights reserved.
13+
This file is part of EngineRoom, Copyright (c) 2007-2010 Bjoern Kriews, Hamburg - All rights reserved.
1514

1615
Redistribution and use in source and binary forms, with or without modification,
1716
are permitted provided that the following conditions are met:
@@ -30,4 +29,3 @@ SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, I
3029
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
3130
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
3231
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33-

tools/patchLicense

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/perl
2+
3+
use strict;
4+
use warnings;
5+
6+
my $licenseFile = shift @ARGV;
7+
8+
my @license = qx{ sed '1,/^LICENSE TERMS/d' $licenseFile };
9+
10+
my @files = @ARGV;
11+
12+
for my $file ( @files ) {
13+
warn "# working on $file\n";
14+
15+
open(FILE, "<", "$file") or die "$0: can't open '$file' for reading ($!)\n";
16+
17+
my @lines = <FILE>;
18+
19+
close(FILE);
20+
21+
shift @lines while($lines[0] =~ /^\s*$/ ); # skip whitespace
22+
23+
shift @lines while $lines[0] =~ m!^\s*//!; # skip // lines
24+
25+
shift @lines while($lines[0] =~ /^\s*$/ ); # skip whitespace
26+
27+
if( $lines[0] =~ m!^\s*/\*! ) {
28+
shift @lines while( $lines[0] !~ m!\*/! ); # skip /* ... */
29+
shift @lines if $lines[0] =~ m!^\s\*/!;
30+
}
31+
32+
shift @lines while($lines[0] =~ /^\s*$/ ); # skip whitespace
33+
34+
unshift @lines, "/*\n", ( map { " " . $_ } @license ) , "*/\n", "\n"; # add license
35+
36+
push @lines, "\n" unless $lines[-1] =~ /\n/; # end trailing newline
37+
38+
open(FILE, ">", $file) or die "$0: can't open '$file' for writing ($!)\n";
39+
print FILE @lines;
40+
close(FILE);
41+
}
42+
43+
exit 0;

0 commit comments

Comments
 (0)