r1156 - in branches/unified-sdl: . code/renderer code/sdl code/sys misc misc/setup misc/setup/MacOSX
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Sep 4 23:23:19 EDT 2007
Author: tjw
Date: 2007-09-04 23:23:19 -0400 (Tue, 04 Sep 2007)
New Revision: 1156
Added:
branches/unified-sdl/misc/quake3.icns
branches/unified-sdl/misc/setup/MacOSX/
branches/unified-sdl/misc/setup/MacOSX/SLA-dmg.sh
branches/unified-sdl/misc/setup/MacOSX/SLA.r
Modified:
branches/unified-sdl/code/renderer/qgl.h
branches/unified-sdl/code/sdl/sdl_glimp.c
branches/unified-sdl/code/sys/sys_local.h
branches/unified-sdl/code/sys/sys_main.c
branches/unified-sdl/code/sys/sys_unix.c
branches/unified-sdl/make-macosx-ub.sh
Log:
* Mac OS X support for sdl-unified
Modified: branches/unified-sdl/code/renderer/qgl.h
===================================================================
--- branches/unified-sdl/code/renderer/qgl.h 2007-09-04 19:54:11 UTC (rev 1155)
+++ branches/unified-sdl/code/renderer/qgl.h 2007-09-05 03:23:19 UTC (rev 1156)
@@ -139,12 +139,12 @@
//===========================================================================
// extensions will be function pointers on all platforms
-void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t );
-void ( APIENTRY * qglActiveTextureARB )( GLenum texture );
-void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture );
+extern void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t );
+extern void ( APIENTRY * qglActiveTextureARB )( GLenum texture );
+extern void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture );
-void ( APIENTRY * qglLockArraysEXT)( GLint, GLint);
-void ( APIENTRY * qglUnlockArraysEXT) ( void );
+extern void ( APIENTRY * qglLockArraysEXT)( GLint, GLint);
+extern void ( APIENTRY * qglUnlockArraysEXT) ( void );
//===========================================================================
Modified: branches/unified-sdl/code/sdl/sdl_glimp.c
===================================================================
--- branches/unified-sdl/code/sdl/sdl_glimp.c 2007-09-04 19:54:11 UTC (rev 1155)
+++ branches/unified-sdl/code/sdl/sdl_glimp.c 2007-09-05 03:23:19 UTC (rev 1156)
@@ -35,6 +35,12 @@
#include "../sys/sys_local.h"
#include "sdl_icon.h"
+void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t );
+void ( APIENTRY * qglActiveTextureARB )( GLenum texture );
+void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture );
+void ( APIENTRY * qglLockArraysEXT)( GLint, GLint);
+void ( APIENTRY * qglUnlockArraysEXT) ( void );
+
/* Just hack it for now. */
#ifdef MACOS_X
typedef CGLContextObj QGLContext;
Modified: branches/unified-sdl/code/sys/sys_local.h
===================================================================
--- branches/unified-sdl/code/sys/sys_local.h 2007-09-04 19:54:11 UTC (rev 1155)
+++ branches/unified-sdl/code/sys/sys_local.h 2007-09-05 03:23:19 UTC (rev 1156)
@@ -40,3 +40,7 @@
void TTY_Shutdown( void );
void TTY_Init( void );
char *TTY_ConsoleInput(void);
+
+#ifdef MACOS_X
+char *Sys_StripAppBundle( char *pwd );
+#endif
Modified: branches/unified-sdl/code/sys/sys_main.c
===================================================================
--- branches/unified-sdl/code/sys/sys_main.c 2007-09-04 19:54:11 UTC (rev 1155)
+++ branches/unified-sdl/code/sys/sys_main.c 2007-09-05 03:23:19 UTC (rev 1156)
@@ -644,32 +644,6 @@
#ifndef DEFAULT_BASEDIR
# ifdef MACOS_X
-/*
-=================
-Sys_EscapeAppBundle
-
-Discovers if passed dir is suffixed with the directory structure of a Mac OS X
-.app bundle. If it is, the .app directory structure is stripped off the end and
-the result is returned. If not, dir is returned untouched.
-=================
-*/
-char *Sys_StripAppBundle( char *dir )
-{
- static char cwd[MAX_OSPATH];
-
- Q_strncpyz(cwd, dir, sizeof(cwd));
- if(strcmp(basename(cwd), "MacOS"))
- return dir;
- Q_strncpyz(cwd, dirname(cwd), sizeof(cwd));
- if(strcmp(basename(cwd), "Contents"))
- return dir;
- Q_strncpyz(cwd, dirname(cwd), sizeof(cwd));
- if(!strstr(basename(cwd), ".app"))
- return dir;
- Q_strncpyz(cwd, dirname(cwd), sizeof(cwd));
- return cwd;
-}
- // if run from an .app bundle, we want to also search its containing dir
# define DEFAULT_BASEDIR Sys_StripAppBundle(Sys_BinaryPath())
# else
# define DEFAULT_BASEDIR Sys_BinaryPath()
Modified: branches/unified-sdl/code/sys/sys_unix.c
===================================================================
--- branches/unified-sdl/code/sys/sys_unix.c 2007-09-04 19:54:11 UTC (rev 1155)
+++ branches/unified-sdl/code/sys/sys_unix.c 2007-09-05 03:23:19 UTC (rev 1156)
@@ -411,3 +411,30 @@
Z_Free( list );
}
+#ifdef MACOS_X
+/*
+=================
+Sys_StripAppBundle
+
+Discovers if passed dir is suffixed with the directory structure of a Mac OS X
+.app bundle. If it is, the .app directory structure is stripped off the end and
+the result is returned. If not, dir is returned untouched.
+=================
+*/
+char *Sys_StripAppBundle( char *dir )
+{
+ static char cwd[MAX_OSPATH];
+
+ Q_strncpyz(cwd, dir, sizeof(cwd));
+ if(strcmp(basename(cwd), "MacOS"))
+ return dir;
+ Q_strncpyz(cwd, dirname(cwd), sizeof(cwd));
+ if(strcmp(basename(cwd), "Contents"))
+ return dir;
+ Q_strncpyz(cwd, dirname(cwd), sizeof(cwd));
+ if(!strstr(basename(cwd), ".app"))
+ return dir;
+ Q_strncpyz(cwd, dirname(cwd), sizeof(cwd));
+ return cwd;
+}
+#endif // MACOS_X
Modified: branches/unified-sdl/make-macosx-ub.sh
===================================================================
--- branches/unified-sdl/make-macosx-ub.sh 2007-09-04 19:54:11 UTC (rev 1155)
+++ branches/unified-sdl/make-macosx-ub.sh 2007-09-05 03:23:19 UTC (rev 1156)
@@ -2,7 +2,7 @@
APPBUNDLE=ioquake3.app
BINARY=ioquake3.ub
PKGINFO=APPLIOQ3
-ICNS=code/unix/MacSupport/ioquake3.icns
+ICNS=misc/quake3.icns
DESTDIR=build/release-darwin-ub
BASEDIR=baseq3
MPACKDIR=missionpack
Added: branches/unified-sdl/misc/quake3.icns
===================================================================
(Binary files differ)
Property changes on: branches/unified-sdl/misc/quake3.icns
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/unified-sdl/misc/setup/MacOSX/SLA-dmg.sh
===================================================================
--- branches/unified-sdl/misc/setup/MacOSX/SLA-dmg.sh (rev 0)
+++ branches/unified-sdl/misc/setup/MacOSX/SLA-dmg.sh 2007-09-05 03:23:19 UTC (rev 1156)
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# This script appends a SLA.r (Software License Agreement) resource to a .dmg
+#
+# usage is './SLA-dmg.sh SLA.r /path/to/ioquake3.dmg'
+#
+
+if [ "x$1" = "x" ] || [ "x$2" = "x"]; then
+ echo "usage: ./SLA-dmg.sh SLAFILE DMGFILE"
+ exit 1;
+fi
+
+if [ ! -r $1 ]; then
+ echo "$1 is not a readable .r file"
+ exit 1;
+fi
+if [ ! -w $2 ]; then
+ echo "$2 is not writable .dmg file"
+ exit 1;
+fi
+
+hdiutil convert -format UDCO -o tmp.dmg $2 || exit 1
+hdiutil unflatten tmp.dmg || exit 1
+/Developer/Tools/Rez /Developer/Headers/FlatCarbon/*.r $1 -a -o tmp.dmg \
+ || exit 1
+hdiutil flatten tmp.dmg || exit 1
+hdiutil internet-enable -yes tmp.dmg || exit 1
+mv tmp.dmg $2 || (echo "Could not copy tmp.dmg to $2" && exit 1)
+rm tmp.dmg
+echo "SLA $1 successfully added to $2"
Property changes on: branches/unified-sdl/misc/setup/MacOSX/SLA-dmg.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/unified-sdl/misc/setup/MacOSX/SLA.r
===================================================================
--- branches/unified-sdl/misc/setup/MacOSX/SLA.r (rev 0)
+++ branches/unified-sdl/misc/setup/MacOSX/SLA.r 2007-09-05 03:23:19 UTC (rev 1156)
@@ -0,0 +1,260 @@
+data 'LPic' (5000) {
+ $"0002 0011 0003 0001 0000 0000 0002 0000"
+ $"0008 0003 0000 0001 0004 0000 0004 0005"
+ $"0000 000E 0006 0001 0005 0007 0000 0007"
+ $"0008 0000 0047 0009 0000 0034 000A 0001"
+ $"0035 000B 0001 0020 000C 0000 0011 000D"
+ $"0000 005B 0004 0000 0033 000F 0001 000C"
+ $"0010 0000 000B 000E 0000"
+};
+
+
+data 'TEXT' (5002, "English") {
+"LIMITED USE SOFTWARE LICENSE AGREEMENT\n"
+"\n"
+"\n"
+"\n"
+"This Limited Use Software License Agreement (the \"Agreement\") is a legal"
+"agreement between you, the end-user, and Id Software, Inc. (\"ID\"). BY"
+"CONTINUING THE INSTALLATION OF THIS GAME DEMO PROGRAM ENTITLED QUAKE III:"
+"ARENA (THE \"SOFTWARE\"), BY LOADING OR RUNNING THE SOFTWARE, OR BY PLACING"
+"OR COPYING THE SOFTWARE ONTO YOUR COMPUTER HARD DRIVE, COMPUTER RAM OR"
+"OTHER STORAGE, YOU ARE AGREEING TO BE BOUND BY THE TERMS OF THIS "
+"AGREEMENT.\n"
+"\n"
+"\n"
+"\n"
+"1. Grant of License. Subject to the terms and provisions of this"
+"Agreement, ID grants to you the non-exclusive and limited right to use the"
+"Software only in executable or object code form. The term \"Software\""
+"includes all elements of the Software, including, without limitation, data"
+"files and screen displays. You are not receiving any ownership or"
+"proprietary right, title or interest in or to the Software or the "
+"copyright, trademarks, or other rights related thereto. For purposes of"
+"this section, \"use\" means loading the Software into RAM and/or onto "
+"computer hard drive, as well as installation of the Software on a hard"
+"disk or other storage device and means the uses permitted in section 3."
+"hereinbelow. You agree that the Software will not be shipped,"
+"transferred or exported into any country in violation of the U.S. Export"
+"Administration Act (or any other law governing such matters) by you or"
+"anyone at your direction and that you will not utilize and will not"
+"authorize anyone to utilize, in any other manner, the Software in"
+"violation of any applicable law. The Software may not be downloaded"
+"or otherwise exported or exported into (or to a national or resident"
+"of) any country to which the U.S. has embargoed goods or to anyone"
+"or into any country who/which are prohibited, by applicable law, from"
+"receiving such property."
+"\n"
+"\n"
+"\n"
+"2. Prohibitions. You, either directly or indirectly, shall not do"
+"any of the following acts:"
+"\n"
+"\n"
+"\n"
+"a. rent the Software;"
+"\n"
+"\n"
+"\n"
+"b. sell the Software;"
+"\n"
+"\n"
+"\n"
+"c. lease or lend the Software;"
+"\n"
+"\n"
+"\n"
+"d. offer the Software on a \"pay-per-play\" basis;"
+"\n"
+"\n"
+"\n"
+"e. distribute the Software (except as permitted by section 3."
+"hereinbelow);"
+"\n"
+"\n"
+"\n"
+"f. in any other manner and through any medium whatsoever"
+"commercially exploit the Software or use the Software for any commercial"
+"purpose;"
+"\n"
+"\n"
+"\n"
+"g. disassemble, reverse engineer, decompile, modify or alter the"
+"Software including, without limitation, creating or developing extra or"
+"add-on levels for the Software;"
+"\n"
+"\n"
+"\n"
+"h. translate the Software;"
+"\n"
+"\n"
+"\n"
+"i. reproduce or copy the Software (except as permitted by section"
+"3. hereinbelow);"
+"\n"
+"\n"
+"\n"
+"j. publicly display the Software;"
+"\n"
+"\n"
+"\n"
+"k. prepare or develop derivative works based upon the Software; or"
+"\n"
+"\n"
+"\n"
+"l. remove or alter any legal notices or other markings or "
+"legends, such as trademark and copyright notices, affixed on or within"
+"the Software."
+"\n"
+"\n"
+"\n"
+"3. Permitted Distribution and Copying. So long as this Agreement"
+"accompanies each copy you make of the Software, and so long as you fully"
+"comply, at all times, with this Agreement, ID grants to you the"
+"non-exclusive and limited right to copy the Software and to distribute "
+"such copies of the Software free of charge for non-commercial purposes "
+"which shall include the free of charge distribution of copies of the"
+"Software as mounted on the covers of magazines; provided, however, you"
+"shall not copy or distribute the Software in any infringing manner or"
+"in any manner which violates any law or third party right and you shall"
+"not distribute the Software together with any material which is "
+"infringing, libelous, defamatory, obscene, false, misleading, or "
+"otherwise illegal or unlawful. You agree to label conspicuously as "
+"\"SHAREWARE\" or \"DEMO\" each CD or other non-electronic copy of the "
+"Software that you make and distribute. ID reserves all rights not"
+"granted in this Agreement. You shall not commercially distribute the"
+"Software unless you first enter into a separate contract with ID, a"
+"copy of which you may request, but which ID may decline to execute."
+"For more information visit www.quake3arena.com."
+"\n"
+"\n"
+"\n"
+"4. Intellectual Property Rights. The Software and all copyrights,"
+"trademarks and all other conceivable intellectual property rights related"
+"to the Software are owned by ID and are protected by United States"
+"copyright laws, international treaty provisions and all applicable law,"
+"such as the Lanham Act. You must treat the Software like any other"
+"copyrighted material, as required by 17 U.S.C., §101 et seq. and othen"
+"applicable law. You agree to use your best efforts to see that any user"
+"of the Software licensed hereunder complies with this Agreement. You"
+"agree that you are receiving a copy of the Software by license only"
+"and not by sale and that the \"first sale\" doctrine of 17 U.S.C. §10"
+"does not apply to your receipt or use of the Software."
+"\n"
+"\n"
+"\n"
+"5. NO WARRANTIES. ID DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR"
+"IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF"
+"MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE"
+"SOFTWARE. ID DOES NOT WARRANT THAT THE OPERATION OF THE SOFTWARE WILL BE"
+"UNINTERRUPTED OR ERROR FREE OR THAT THE SOFTWARE WILL MEET YOUR SPECIFIC"
+"REQUIREMENTS. ADDITIONAL STATEMENTS SUCH AS PRESENTATIONS, WHETHER ORAL"
+"OR WRITTEN, DO NOT CONSTITUTE WARRANTIES BY ID AND SHOULD NOT BE RELIED"
+"UPON. THIS SECTION 5. SHALL SURVIVE CANCELLATION OR TERMINATION OF THIS"
+"AGREEMENT."
+"\n"
+"\n"
+"\n"
+"6. Governing Law, Venue, Indemnity and Liability Limitation. This"
+"Agreement shall be construed in accordance with and governed by the"
+"applicable laws of the State of Texas and applicable United States federal"
+"law. Copyright and other proprietary matters will be governed by United"
+"States laws and international treaties. Exclusive venue for all"
+"litigation regarding this Agreement shall be in Dallas County, Texas"
+"and you agree to submit to the jurisdiction of the courts in Dallas,"
+"Texas for any such litigation. You agree to indemnify, defend and hold"
+"harmless ID and ID's officers, employees, directors, agents, licensees"
+"(excluding you), successors and assigns from and against all losses,"
+"lawsuits, damages, causes of action and claims relating to and/or"
+"arising from your breach of this Agreement. You agree that your"
+"unauthorized use of the Software, or any part thereof, may immediately"
+"and irreparably damage ID such that ID could not be adequately"
+"compensated solely by a monetary award and that at ID's option ID shall"
+"be entitled to an injunctive order, in addition to all other available"
+"remedies including a monetary award, appropriately restraining and/or"
+"prohibiting such unauthorized use without the necessity of ID posting"
+"bond or other security. IN ANY CASE, ID AND ID'S OFFICERS, EMPLOYEES,"
+"DIRECTORS, AGENTS, LICENSEES, SUBLICENSEES, SUCCESSORS AND ASSIGNS"
+"SHALL NOT BE LIABLE FOR LOSS OF DATA, LOSS OF PROFITS, LOST SAVINGS,"
+"SPECIAL, INCIDENTAL, CONSEQUENTIAL, INDIRECT, PUNITIVE OR OTHER SIMILAR"
+"DAMAGES ARISING FROM ANY ALLEGED CLAIM FOR BREACH OF WARRANTY, BREACH"
+"OF CONTRACT, NEGLIGENCE, STRICT PRODUCT LIABILITY, OR OTHER LEGAL"
+"THEORY EVEN IF ID OR ITS AGENT HAVE BEEN ADVISED OF THE POSSIBILITY"
+"OF SUCH DAMAGES OR EVEN IF SUCH DAMAGES ARE FORESEEABLE, OR LIABLE"
+"FOR ANY CLAIM BY ANY OTHER PARTY. Some jurisdictions do not allow"
+"the exclusion or limitation of incidental or consequential damages,"
+"so the above limitation or exclusion may not apply to you. This"
+"Section 6. shall survive cancellation or termination of this Agreement."
+"\n"
+"\n"
+"\n"
+"7. U.S. Government Restricted Rights. To the extent applicable,"
+"the United States Government shall only have those rights to use the"
+"Software as expressly stated and expressly limited and restricted in"
+"this Agreement, as provided in 48 C.F.R. §§ 227.7201 through 227.7204,"
+"inclusive."
+"\n"
+"\n"
+"\n"
+"8. General Provisions. Neither this Agreement nor any part or"
+"portion hereof shall be assigned or sublicensed by you. ID may assign its"
+"rights under this Agreement in ID's sole discretion. Should any provision"
+"of this Agreement be held to be void, invalid, unenforceable or illegal by"
+"a court of competent jurisdiction, the validity and enforceability of the"
+"other provisions shall not be affected thereby. If any provision is"
+"determined to be unenforceable by a court of competent jurisdiction, you"
+"agree to a modification of such provision to provide for enforcement of"
+"the provision's intent, to the extent permitted by applicable law."
+"Failure of ID to enforce any provision of this Agreement shall not"
+"constitute or be construed as a waiver of such provision or of the right"
+"to enforce such provision. Immediately upon your failure to comply with"
+"or breach of any term or provision of this Agreement, THIS AGREEMENT"
+"AND YOUR LICENSE SHALL AUTOMATICALLY TERMINATE, WITHOUT NOTICE, AND ID"
+"MAY PURSUE ALL RELIEF AND REMEDIES AGAINST YOU WHICH ARE AVAILABLE UNDER"
+"APPLICABLE LAW AND/OR THIS AGREEMENT. In the event this Agreement is"
+"terminated, you shall have no right to use the Software, in any manner,"
+"and you shall immediately destroy all copies of the Software in your"
+"possession, custody or control."
+"\n"
+"\n"
+"\n"
+"YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, YOU UNDERSTAND THIS"
+"AGREEMENT, AND UNDERSTAND THAT BY CONTINUING THE INSTALLATION OF THE"
+"SOFTWARE, BY LOADING OR RUNNING THE SOFTWARE, OR BY PLACING OR COPYING"
+"THE SOFTWARE ONTO YOUR COMPUTER HARD DRIVE OR RAM, YOU AGREE TO BE BOUND"
+"BY THE TERMS AND CONDITIONS OF THIS AGREEMENT. YOU FURTHER AGREE THAT,"
+"EXCEPT FOR WRITTEN SEPARATE AGREEMENTS BETWEEN ID AND YOU, THIS "
+"AGREEMENT IS A COMPLETE AND EXCLUSIVE STATEMENT OF THE RIGHTS AND"
+"LIABILITIES OF THE PARTIES HERETO. THIS AGREEMENT SUPERSEDES ALL PRIOR"
+"ORAL AGREEMENTS, PROPOSALS OR UNDERSTANDINGS, AND ANY OTHER"
+"COMMUNICATIONS BETWEEN ID AND YOU RELATING TO THE SUBJECT MATTER OF"
+"THIS AGREEMENT."
+"\n"
+};
+
+resource 'STR#' (5002, "English") {
+ { /* array StringArray: 9 elements */
+ /* [1] */
+ "English",
+ /* [2] */
+ "Agree",
+ /* [3] */
+ "Disagree",
+ /* [4] */
+ "Print",
+ /* [5] */
+ "Save...",
+ /* [6] */
+ "IMPORTANT - Read this License Agreement carefully before clicking on "
+ "the \"Agree\" button. By clicking on the \"Agree\" button, you agree "
+ "to be bound by the terms of the License Agreement.",
+ /* [7] */
+ "Software License Agreement",
+ /* [8] */
+ "This text cannot be saved. This disk may be full or locked, or the file "
+ "may be locked.",
+ /* [9] */
+ "Unable to print. Make sure you have selected a printer."
+ }
+};
+
More information about the quake3-commits
mailing list