copyright:

* change the man page to gpl3
* add missing copyrigh for zerogsshader
* re write bin2cpp tool (in perl) to avoid any copyright issue => hex2h.pl


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5155 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2012-04-12 17:52:43 +00:00
parent 72d47d547e
commit 5627b4dfaf
9 changed files with 169 additions and 24 deletions

View File

@ -79,9 +79,6 @@ if(common_libs)
add_subdirectory(common/src/x86emitter)
endif(common_libs)
# make tools
add_subdirectory(tools)
# make pcsx2
if(EXISTS "${PROJECT_SOURCE_DIR}/pcsx2" AND pcsx2_core)
add_subdirectory(pcsx2)

View File

@ -125,4 +125,21 @@ http://forums.pcsx2.net
.SH "COPYRIGHT NOTICE"
Copyright \(co 2002-2010 PCSX2 Dev Team
Permission is granted to copy and distribute this manual under the terms of the GNU Free Documentation License.
This is free documentation; 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 3 of
the License, or (at your option) any later version.
The GNU General Public License's references to "object code"
and "executables" are to be interpreted as the output of any
document formatting or typesetting system, including
intermediate and printed output.
This manual 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 manual; if not, see
<http://www.gnu.org/licenses/>.

97
linux_various/hex2h.pl Normal file
View File

@ -0,0 +1,97 @@
#!/usr/bin/perl
# PCSX2 - PS2 Emulator for PCs
# Copyright (C) 2002-2011 PCSX2 Dev Team
#
# PCSX2 is free software: you can redistribute it and/or modify it under the terms
# of the GNU Lesser General Public License as published by the Free Software Found-
# ation, either version 3 of the License, or (at your option) any later version.
#
# PCSX2 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 PCSX2.
# If not, see <http://www.gnu.org/licenses/>.
# This basic script convert an jpeg/png image to a .h include file
# compatible with PCSX2 gui
use File::Basename;
use strict;
use warnings;
sub ascii_to_hex ($)
{
(my $str = shift) =~ s/(.|\n)/sprintf("%02lx", ord $1)/eg;
return $str;
}
sub get_wx_ext ($)
{
my $ext = shift;
my $result = "BAD_FORMAT";
if ($ext =~ /png/i) {
$result = "wxBITMAP_TYPE_PNG";
} elsif ($ext =~ /jpe?g/i) {
$result = "wxBITMAP_TYPE_JPEG";
} else {
print "ERROR: bad format $ext\n";
}
return $result;
}
my $input=$ARGV[0];
my $output=$ARGV[1] . ".h" ;
my($filename, $directories, $suffix) = fileparse($input);
my ($name, $ext) = split(/\./,$filename);
my $wx_img_class = "res_$name";
my $wx_img_extension = get_wx_ext($ext);
my $filesize = -s $input;
### Collect binary data
my $lenght = 1;
my $binary = "\t\t";
my $data;
my $byte;
open(IN,"$input");
binmode IN;
while (($byte = read IN, $data, 1) != 0) {
my $hex = ascii_to_hex($data);
$binary .= "0x$hex";
if ($lenght % 17 == 0 && $lenght > 1) {
# End of line
$binary .= ",\n\t\t";
} elsif ($filesize == $lenght) {
# End of file
$binary .= "\n";
} else {
$binary .= ",";
}
$lenght++;
}
close(IN);
open(OUT,">$output");
### Print the header
print OUT "#pragma once\n\n";
print OUT "#include \"Pcsx2Types.h\"\n";
print OUT "#include <wx/gdicmn.h>\n\n";
print OUT "class $wx_img_class\n{\n";
print OUT "public:\n";
print OUT "\tstatic const uint Length = $filesize;\n";
print OUT "\tstatic const u8 Data[Length];\n";
print OUT "\tstatic wxBitmapType GetFormat() { return $wx_img_extension; }\n};\n\n";
print OUT "const u8 ${wx_img_class}::Data[Length] =\n{\n";
### Print the array
print OUT $binary;
print OUT "};\n";
close(OUT);

View File

@ -654,13 +654,13 @@ add_executable(${Output}
### Generate the resources files
file(MAKE_DIRECTORY ${res_bin})
add_custom_command(OUTPUT "${res_bin}/Dualshock.h" COMMAND bin2cpp "${res_src}/Dualshock.jpg" "${res_bin}/Dualshock" )
add_custom_command(OUTPUT "${res_bin}/Dualshock.h" COMMAND "${PROJECT_SOURCE_DIR}/linux_various/hex2h.pl" "${res_src}/Dualshock.jpg" "${res_bin}/Dualshock" )
foreach(res_file IN ITEMS
AppIcon16 AppIcon32 AppIcon64 BackgroundLogo ButtonIcon_Camera
ConfigIcon_Appearance ConfigIcon_Cpu ConfigIcon_Gamefixes ConfigIcon_MemoryCard
ConfigIcon_Paths ConfigIcon_Plugins ConfigIcon_Speedhacks ConfigIcon_Video)
add_custom_command(OUTPUT "${res_bin}/${res_file}.h" COMMAND bin2cpp "${res_src}/${res_file}.png" "${res_bin}/${res_file}" )
add_custom_command(OUTPUT "${res_bin}/${res_file}.h" COMMAND "${PROJECT_SOURCE_DIR}/linux_various/hex2h.pl" "${res_src}/${res_file}.png" "${res_bin}/${res_file}" )
endforeach(res_file IN ITEMS
AppIcon16 AppIcon32 AppIcon64 BackgroundLogo ButtonIcon_Camera
ConfigIcon_Appearance ConfigIcon_Cpu ConfigIcon_Gamefixes ConfigIcon_MemoryCard

View File

@ -1,3 +0,0 @@
INCLUDES = -I@srcdir@/../../../../common/include -I@srcdir@/../common -I@srcdir@/../../../../3rdparty/
noinst_PROGRAMS = zgsbuild
zgsbuild_SOURCES = zpipe.cpp zerogsshaders.cpp

View File

@ -1,10 +1,20 @@
/* ZeroGS KOSMOS
*
* Zerofrog's ZeroGS KOSMOS (c)2005-2008
*
* Zerofrog forgot to write any copyright notice after release the plugin into GPLv2
* If someone can contact him successfully to clarify this matter that would be great.
*/
/* ZZ Open GL graphics plugin
* Copyright on Zerofrog's ZeroGS KOSMOS (c)2005-2008
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define _CRT_SECURE_NO_DEPRECATE

View File

@ -1,10 +1,20 @@
/* ZeroGS KOSMOS
*
* Zerofrog's ZeroGS KOSMOS (c)2005-2008
*
* Zerofrog forgot to write any copyright notice after release the plugin into GPLv2
* If someone can contact him successfully to clarify this matter that would be great.
*/
/* ZZ Open GL graphics plugin
* Copyright on Zerofrog's ZeroGS KOSMOS (c)2005-2008
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __ZEROGS_SHADERS_H__
#define __ZEROGS_SHADERS_H__

View File

@ -1 +0,0 @@
/usr/share/automake-1.11/compile

View File

@ -1,3 +1,21 @@
// ZZ Open GL graphics plugin
// Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com
// Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008
//
// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
// Cg Shaders for PS2 GS emulation
// divides by z for every pixel, instead of in vertex shader