Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

License Tool

  • Loading branch information...
commit 0d4e494acdb3fc74c846871ed6ca72d3b38a27ab 1 parent 92f1e51
@bkrpub authored
Showing with 53 additions and 8 deletions.
  1. +9 −5 HOWTO.txt
  2. +1 −3 LICENSE.txt
  3. +43 −0 tools/patchLicense
View
14 HOWTO.txt
@@ -10,14 +10,18 @@ Add -> Existing files.
OSX:
Navigate to EngineRoom/EngineRoom-OSX and choose EngineRoom-OSX.xcodeproj
-On opening the new entry it should reveal EngineRoom.framework.
+Do not tick "Copy".
-Open the inspector for your target, add EngineRoom-OSX as a dependency.
-Drag the framework from the EngineRoom project to 'Link Binary with Libraries'
-for your target.
+On opening the new entry it should reveal EngineRoom.framework.
Create a new Copy Files Build Phase with target "Frameworks" and drag the
-framework to it (from the EngineRoom project as before).
+framework to it (from the EngineRoom project ).
+
+Option-Drag the framework from there to your targets 'Link Binary with Libraries'.
+
+Open the inspector for your target, Tab "General",
+add EngineRoom-OSX as a dependency.
+
Optional:
Open your MainMenu NIB and add an NSObject, set its class to EngineRoom,
View
4 LICENSE.txt
@@ -10,8 +10,7 @@ Regards, Bjoern
LICENSE TERMS:
-
-Copyright (c) 2010 Bjoern Kriews - All rights reserved.
+This file is part of EngineRoom, Copyright (c) 2007-2010 Bjoern Kriews, Hamburg - All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
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
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
View
43 tools/patchLicense
@@ -0,0 +1,43 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+my $licenseFile = shift @ARGV;
+
+my @license = qx{ sed '1,/^LICENSE TERMS/d' $licenseFile };
+
+my @files = @ARGV;
+
+for my $file ( @files ) {
+ warn "# working on $file\n";
+
+ open(FILE, "<", "$file") or die "$0: can't open '$file' for reading ($!)\n";
+
+ my @lines = <FILE>;
+
+ close(FILE);
+
+ shift @lines while($lines[0] =~ /^\s*$/ ); # skip whitespace
+
+ shift @lines while $lines[0] =~ m!^\s*//!; # skip // lines
+
+ shift @lines while($lines[0] =~ /^\s*$/ ); # skip whitespace
+
+ if( $lines[0] =~ m!^\s*/\*! ) {
+ shift @lines while( $lines[0] !~ m!\*/! ); # skip /* ... */
+ shift @lines if $lines[0] =~ m!^\s\*/!;
+ }
+
+ shift @lines while($lines[0] =~ /^\s*$/ ); # skip whitespace
+
+ unshift @lines, "/*\n", ( map { " " . $_ } @license ) , "*/\n", "\n"; # add license
+
+ push @lines, "\n" unless $lines[-1] =~ /\n/; # end trailing newline
+
+ open(FILE, ">", $file) or die "$0: can't open '$file' for writing ($!)\n";
+ print FILE @lines;
+ close(FILE);
+}
+
+exit 0;
Please sign in to comment.
Something went wrong with that request. Please try again.