mirror of
https://github.com/etlegacy/etlegacy-tools.git
synced 2024-11-25 05:21:22 +00:00
added Windows NSIS script
Based on original work of Harlekin
This commit is contained in:
parent
2d473bbba5
commit
875d294c24
4 changed files with 317 additions and 0 deletions
47
nsis/EULA_Wolfenstein_Enemy_Territory.txt
Normal file
47
nsis/EULA_Wolfenstein_Enemy_Territory.txt
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
LIMITED USE SOFTWARE LICENSE AGREEMENT
|
||||||
|
|
||||||
|
This Limited Use Software License Agreement (this "Agreement") is a legal agreement between you, the end-user, and Id Software, Inc. ("ID"). BY CONTINUING THE DOWNLOAD OR INSTALLATION OF THE GAME PROGRAM ENTITLED WOLFENSTEIN: ENEMY TERRITORY (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. You agree that you are obtaining a copy of the Software via download only, and you acknowledge and agree that you shall not copy or retain the Software except as expressly permitted herein.
|
||||||
|
|
||||||
|
1. Grant of License. Subject to the terms and provisions of this Agreement and so long as you fully comply at all times with 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 copyrights, trademarks or other rights related thereto. For purposes of the first sentence 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 sections 2 and 4 hereinbelow. You agree that the Software will not be downloaded, shipped, transferred, exported or re-exported into any country or to a national or resident of any country in violation of the United States 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 shall not be downloaded or otherwise exported or re-exported into any country or to a national or resident of any country to which the United States has embargoed goods or to anyone or into any country who/that are prohibited, by applicable law, from receiving such property. In exercising your limited rights hereunder, you shall comply, at all times, with all applicable laws, regulations, ordinances and statutes. ID reserves all rights not granted in this Agreement, including, without limitation, all rights to ID's trademarks.
|
||||||
|
|
||||||
|
2. Permitted New Creations. Subject to the terms and provisions of this Agreement and so long as you fully comply at all times with this Agreement, ID grants to you the non-exclusive and limited right to create for the Software (except any Software code) your own modifications (the "New Creations") that shall operate only with the Software (but not any demo, test or other version of the Software). You may include within the New Creations certain textures and other images (the "Software Images") from the Software. You shall not create any New Creations that infringe against any third-party right or that are libelous, defamatory, obscene, false, misleading, or otherwise illegal or unlawful. You agree that the New Creations will not be downloaded, shipped, transferred, exported or re-exported into any country or to a national or resident of any country in violation of the United States 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 New Creations in violation of any applicable law. The New Creations shall not be downloaded or otherwise exported or re-exported into any country or to a national or resident of any country to which the United States has embargoed goods or to anyone or into any country who/that are prohibited, by applicable law, from receiving such property. You shall not rent, sell, lease, lend, offer on a pay-per-play basis or otherwise commercially exploit or commercially distribute the New Creations. You are permitted only to distribute, without any cost or charge, the New Creations to other end-users so long as such distribution is not infringing against any third-party right and is not otherwise illegal or unlawful. As noted below, in the event you commit any breach of this Agreement, your license and this Agreement automatically shall terminate, without notice.
|
||||||
|
|
||||||
|
3. Prohibitions with Regard to the Software. You, whether directly or indirectly, shall not do any of the following acts:
|
||||||
|
|
||||||
|
a. rent the Software;
|
||||||
|
|
||||||
|
b. sell the Software;
|
||||||
|
|
||||||
|
c. lease or lend the Software;
|
||||||
|
|
||||||
|
d. offer the Software on a "pay-per-play" basis;
|
||||||
|
|
||||||
|
e. distribute the Software by any means, except as permitted by section 4 hereinbelow;
|
||||||
|
|
||||||
|
f. in any other manner and through any medium whatsoever commercially exploit the Software, or use the Software for any commercial purpose, including, without limitation, giving away copies of the Software for free to promote or market any other material;
|
||||||
|
|
||||||
|
g. disassemble, reverse engineer, decompile, modify, except as permitted by section 2 hereinabove, or alter the Software;
|
||||||
|
|
||||||
|
h. translate the Software;
|
||||||
|
|
||||||
|
i. reproduce or copy the Software, except as permitted by section 4 hereinbelow;
|
||||||
|
|
||||||
|
j. publicly display the Software;
|
||||||
|
|
||||||
|
k. prepare or develop derivative works based upon the Software; or
|
||||||
|
|
||||||
|
l. modify, remove or alter this Agreement or any notices or other markings or legends, such as trademark or copyright notices, affixed on or within the Software.
|
||||||
|
|
||||||
|
4. 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: (i) copy the Software from the download onto your computer hard drive; (ii) copy the Software from your computer hard drive into your computer RAM; (iii) copy on one (1) hard disk one (1) "back up" or archival copy of the Software; and (iv) copy the Software and distribute such copies as standalone copies on physical media or in electronic format of the Software free of charge for non-commercial purposes and not in connection with any other material. You shall not distribute copies of the Software as mounted on or attached to the covers or any other part of magazines or other printed material. You shall not copy or distribute the Software in any manner that infringes against, misappropriates or otherwise violates any third-party right or that is libelous, defamatory, obscene, false, misleading, or otherwise illegal or unlawful. You shall not receive any postage, shipping, handling or other charge, payment, fee, or other consideration, including items in trade, in exchange for or in connection with copies of Software you may distribute, even if only for reimbursement. You shall not receive any value or consideration in exchange for or in connection with copies of the Software you may distribute. You shall not distribute the Software bundled, co-packaged or together with any material. You shall not distribute the Software in connection with the promotion or marketing of any material. Except as such are included by ID within copies of the Software that you are permitted to make under this Agreement, you shall not reproduce, depict, display or copy the title of the Software, the ID name or any screen display or other element or part of the Software. In exercising your limited rights hereunder, you shall comply, at all times, with all applicable laws, regulations, ordinances and statutes. 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, on terms and conditions determined in ID's sole discretion, and only upon your receipt of a written agreement executed by an authorized officer of ID.
|
||||||
|
|
||||||
|
5. 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 other applicable law. You agree to use your best efforts to see that any user of the Software licensed hereunder, or the New Creations, complies with this Agreement. You agree that you are receiving a copy of the Software by limited license only and not by sale and that the "first sale" doctrine of 17 U.S.C. § 109 does not apply to your receipt or use of the Software. This section shall survive the cancellation or termination of this Agreement.
|
||||||
|
|
||||||
|
6. NO ID WARRANTIES. ID DISCLAIMS , AND ITS LICENSEE'S (INCLUDING, WITHOUT LIMITATION, ACTIVISION INC. AND ITS AFFILIATES) DISCLAIM, ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OF NON-INFRINGEMENT, WITH RESPECT TO THE SOFTWARE, THE SOFTWARE IMAGES AND OTHERWISE. THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY. ID DOES NOT (AND ITS LICENSEES DO NOT) WARRANT THAT THE SOFTWARE OR THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR FREE OR THAT THE SOFTWARE WILL MEET YOUR SPECIFIC OR SPECIAL REQUIREMENTS. ADDITIONAL STATEMENTS, WHETHER ORAL OR WRITTEN, DO NOT CONSTITUTE WARRANTIES BY ID (OR ANY ID LICENSEE) AND SHOULD NOT BE RELIED UPON. THIS SECTION SHALL SURVIVE THE CANCELLATION OR TERMINATION OF THIS AGREEMENT.
|
||||||
|
|
||||||
|
7. 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. Exclusive venue for all litigation regarding this Agreement shall be in Dallas County, Texas, and you agree to submit to the jurisdiction of the federal and state courts in Dallas County, Texas, for any such litigation. You hereby agree to indemnify, defend and hold harmless ID and ID's officers, employees, directors, agents, licensees (excluding you), sub-licensees (excluding you), successors and assigns from and against all losses, lawsuits, damages, causes of action and claims relating to and/or arising from the New Creations or the distribution or other use of the New Creations or relating to and/or arising from your breach of this Agreement. You agree that your unauthorized use of the Software Images, or the Software, or any part thereof, immediately and irreparably will damage ID such that ID could not be compensated adequately solely by a monetary award, and upon such actual or threatened unauthorized use, at ID's option, that ID shall be entitled to an injunctive order, in addition to all other available remedies, including a monetary award, to prohibit such unauthorized use without the necessity of ID posting bond or other security. IN ANY CASE, ID, AND ID'S OFFICERS, EMPLOYEES, DIRECTORS, SHAREHOLDERS, REPRESENTATIVES, AGENTS, LICENSEES (EXCLUDING YOU), SUBLICENSEES (EXCLUDING YOU), SUCCESSORS AND ASSIGNS SHALL NOT BE LIABLE FOR ANY CLAIM BY ANY THIRD PARTY OR FOR ANY LOSS OF DATA, LOSS OF PROFITS, LOST SAVINGS, SPECIAL, INCIDENTAL, CONSEQUENTIAL, INDIRECT OR PUNITIVE DAMAGES OR ANY OTHER 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 ID'S REPRESENTATIVES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY SUCH DAMAGES, OR EVEN IF SUCH DAMAGES ARE FORESEEABLE. 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 shall survive the cancellation or termination of this Agreement.
|
||||||
|
|
||||||
|
8. United States 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.
|
||||||
|
|
||||||
|
9. 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 maximum 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, YOUR LICENSE GRANTED HEREIN AND THIS AGREEMENT AUTOMATICALLY SHALL TERMINATE, WITHOUT NOTICE, AND ID MAY PURSUE ALL RELIEF AND REMEDIES AGAINST YOU THAT ARE AVAILABLE UNDER APPLICABLE LAW AND/OR THIS AGREEMENT. Immediately upon termination of this Agreement, any and all rights you are granted hereunder shall terminate, you shall have no right to use the Software or the New Creations, in any manner, and you immediately shall destroy all copies of the Software and the New Creations in your possession, custody or control, and all rights granted hereunder shall revert, without notice, to and be vested in ID.
|
||||||
|
|
||||||
|
YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, YOU UNDERSTAND THIS AGREEMENT, AND UNDERSTAND THAT BY CONTINUING THE DOWNLOAD OR 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, IF ANY, BETWEEN ID AND YOU, THIS AGREEMENT IS A COMPLETE AND EXCLUSIVE STATEMENT OF THE RIGHTS AND LIABILITIES OF THE PARTIES HERETO, RELATING TO THE SUBJECT MATTER HEREOF. THIS AGREEMENT SUPERSEDES ALL PRIOR ORAL AGREEMENTS, PROPOSALS OR UNDERSTANDINGS, AND ANY OTHER COMMUNICATIONS, IF ANY, BETWEEN ID AND YOU RELATING TO THE SUBJECT MATTER OF THIS AGREEMENT.
|
270
nsis/etlegacy.nsi
Normal file
270
nsis/etlegacy.nsi
Normal file
|
@ -0,0 +1,270 @@
|
||||||
|
; ------------------------
|
||||||
|
; ET:Legacy NSIS installer
|
||||||
|
; ------------------------
|
||||||
|
; Files should be in ./etlegacy-windows-${VERSION}
|
||||||
|
|
||||||
|
!define VERSION "2.71rc3"
|
||||||
|
|
||||||
|
; Variables
|
||||||
|
Name "ET:Legacy ${VERSION}"
|
||||||
|
OutFile "etlegacy-windows-${VERSION}-full-installer.exe"
|
||||||
|
BrandingText "ET:Legacy ${VERSION} | http://www.etlegacy.com"
|
||||||
|
!define PRODUCT_DIR_REGKEY "SOFTWARE\Enemy Territory - Legacy"
|
||||||
|
!define PRODUCT_UNINST_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Enemy Territory - Legacy"
|
||||||
|
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "InstallPath"
|
||||||
|
InstallDir "$PROGRAMFILES\Enemy Territory - Legacy\"
|
||||||
|
|
||||||
|
; ------------------------
|
||||||
|
; GENERAL
|
||||||
|
; ------------------------
|
||||||
|
|
||||||
|
CRCCheck on
|
||||||
|
RequestExecutionLevel admin
|
||||||
|
|
||||||
|
; Header file
|
||||||
|
!include MUI2.nsh
|
||||||
|
|
||||||
|
; Interface configuration
|
||||||
|
!define MUI_ICON "etlegacy-windows-${VERSION}\etl.ico"
|
||||||
|
!define MUI_UNICON "etlegacy-windows-${VERSION}\etl.ico"
|
||||||
|
!define MUI_HEADERIMAGE
|
||||||
|
!define MUI_HEADERIMAGE_BITMAP "header.bmp" ; 150x57
|
||||||
|
!define MUI_WELCOMEFINISHPAGE_BITMAP "side.bmp" ; 164x314
|
||||||
|
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "side.bmp"
|
||||||
|
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||||
|
!define MUI_ABORTWARNING
|
||||||
|
!define MUI_UNCOMPONENTSPAGE_SMALLDESC
|
||||||
|
|
||||||
|
; Pages
|
||||||
|
;!define MUI_FINISHPAGE_TEXT "ET:Legacy ${VERSION} has been installed on your computer.$\r$\n$\rYou will find all downloaded files, etkey and profile folder at $DOCUMENTS\WolfETL.$\r$\n$\rClick Finish to close Setup."
|
||||||
|
!define MUI_FINISHPAGE_RUN "$INSTDIR\etl.exe"
|
||||||
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
|
!insertmacro MUI_PAGE_LICENSE "etlegacy-windows-${VERSION}\COPYING.txt"
|
||||||
|
!define MUI_PAGE_HEADER_TEXT "License Agreement - Assets"
|
||||||
|
!insertmacro MUI_PAGE_LICENSE "EULA_Wolfenstein_Enemy_Territory.txt"
|
||||||
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
!insertmacro MUI_PAGE_FINISH
|
||||||
|
!insertmacro MUI_UNPAGE_WELCOME
|
||||||
|
!insertmacro MUI_UNPAGE_COMPONENTS
|
||||||
|
!insertmacro MUI_UNPAGE_INSTFILES
|
||||||
|
!insertmacro MUI_UNPAGE_FINISH
|
||||||
|
|
||||||
|
; Language files
|
||||||
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
|
|
||||||
|
; ------------------------
|
||||||
|
; INSTALL
|
||||||
|
; ------------------------
|
||||||
|
|
||||||
|
; Sections
|
||||||
|
Section "Enemy Territory: Legacy" FILES
|
||||||
|
SectionIn RO
|
||||||
|
SetOverwrite ifnewer
|
||||||
|
AddSize 75000 ; approx
|
||||||
|
SetOutPath $INSTDIR
|
||||||
|
File /r "etlegacy-windows-${VERSION}\*.*"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Wolfenstein: Enemy Territory assets" ASSETS
|
||||||
|
SetOverwrite ifdiff
|
||||||
|
AddSize 224530
|
||||||
|
SetOutPath $TEMP
|
||||||
|
|
||||||
|
SetRegView 32
|
||||||
|
ReadRegStr $1 HKLM "Software\Activision\Wolfenstein - Enemy Territory" "InstallPath"
|
||||||
|
|
||||||
|
IfFileExists "$INSTDIR\etmain\pak0.pk3" COPY_PAK1
|
||||||
|
IfFileExists "$1\etmain\pak0.pk3" 0 +3
|
||||||
|
copyfiles "$1\etmain\pak0.pk3" "$INSTDIR\etmain\"
|
||||||
|
GOTO COPY_PAK1
|
||||||
|
IfFileExists '$TEMP\etl_install\pak0.pk3' 0 GET_INSTALL
|
||||||
|
copyfiles "$TEMP\etl_install\pak0.pk3" "$INSTDIR\etmain\"
|
||||||
|
GOTO COPY_PAK1
|
||||||
|
|
||||||
|
COPY_PAK1:
|
||||||
|
IfFileExists "$INSTDIR\etmain\pak1.pk3" COPY_PAK2
|
||||||
|
IfFileExists "$1\etmain\pak1.pk3" 0 +3
|
||||||
|
copyfiles "$1\etmain\pak1.pk3" "$INSTDIR\etmain\"
|
||||||
|
GOTO COPY_PAK2
|
||||||
|
IfFileExists '$TEMP\etl_install\pak1.pk3' 0 GET_PATCH
|
||||||
|
copyfiles "$TEMP\etl_install\pak1.pk3" "$INSTDIR\etmain\"
|
||||||
|
GOTO COPY_PAK2
|
||||||
|
|
||||||
|
COPY_PAK2:
|
||||||
|
IfFileExists "$INSTDIR\etmain\pak2.pk3" COPY_MP_BIN
|
||||||
|
IfFileExists "$1\etmain\pak2.pk3" 0 +3
|
||||||
|
copyfiles "$1\etmain\pak2.pk3" "$INSTDIR\etmain\"
|
||||||
|
GOTO COPY_MP_BIN
|
||||||
|
IfFileExists '$TEMP\etl_install\pak2.pk3' 0 GET_PATCH
|
||||||
|
copyfiles "$TEMP\etl_install\pak2.pk3" "$INSTDIR\etmain\"
|
||||||
|
GOTO COPY_MP_BIN
|
||||||
|
|
||||||
|
COPY_MP_BIN:
|
||||||
|
IfFileExists "$INSTDIR\etmain\mp_bin.pk3" END
|
||||||
|
IfFileExists "$1\etmain\mp_bin.pk3" 0 +3
|
||||||
|
copyfiles "$1\etmain\mp_bin.pk3" "$INSTDIR\etmain\"
|
||||||
|
GOTO END
|
||||||
|
IfFileExists '$TEMP\etl_install\mp_bin.pk3' 0 GET_PATCH
|
||||||
|
copyfiles "$TEMP\etl_install\mp_bin.pk3" "$INSTDIR\etmain\"
|
||||||
|
GOTO END
|
||||||
|
|
||||||
|
GET_INSTALL:
|
||||||
|
IfFileExists "$TEMP\WolfET.exe" UNPACK_INSTALL
|
||||||
|
NSISdl::download "http://wolffiles.de/filebase/ET/Full%20Version/WolfET.exe" WolfET.exe
|
||||||
|
IfFileExists "$TEMP\WolfET.exe" UNPACK_INSTALL
|
||||||
|
NSISdl::download "http://mirror.etlegacy.com/WolfET.exe" WolfET.exe
|
||||||
|
IfFileExists "$TEMP\WolfET.exe" UNPACK_INSTALL
|
||||||
|
NSISdl::download "http://ftp.freenet.de/pub/4players/hosted/et/official/WolfET.exe" WolfET.exe
|
||||||
|
IfFileExists "$TEMP\WolfET.exe" UNPACK_INSTALL
|
||||||
|
NSISdl::download "http://ftp.games.skynet.be/pub/wolfenstein/WolfET.exe" WolfET.exe
|
||||||
|
IfFileExists "$TEMP\WolfET.exe" UNPACK_INSTALL
|
||||||
|
NSISdl::download "http://download.hirntot.org/misc/WolfET.exe" WolfET.exe
|
||||||
|
IfFileExists "$TEMP\WolfET.exe" UNPACK_INSTALL
|
||||||
|
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "Download Error: Couldn't fetch Installer file." \
|
||||||
|
IDCANCEL USERCANCEL IDRETRY GET_INSTALL
|
||||||
|
|
||||||
|
UNPACK_INSTALL:
|
||||||
|
MessageBox MB_ICONINFORMATION|MB_OK "During extraction of W:ET assets the screen will get black for a few seconds."
|
||||||
|
ExecWait "$TEMP\WolfET.exe /x $TEMP\etl_install"
|
||||||
|
IfFileExists "$TEMP\etl_install\pak0.pk3" +2
|
||||||
|
MessageBox MB_ICONEXCLAMATION|MB_OK "Fatal Error: Installer extraction failed."
|
||||||
|
copyfiles '$TEMP\etl_install\pak0.pk3' '$INSTDIR\etmain'
|
||||||
|
IfFileExists "$INSTDIR\etmain\pak0.pk3" COPY_PAK1
|
||||||
|
MessageBox MB_ICONEXCLAMATION|MB_OK "Fatal Error: Copy failed (pak0.pk3)."
|
||||||
|
|
||||||
|
GET_PATCH:
|
||||||
|
IfFileExists "$TEMP\ET_Patch_2_60.exe" UNPACK_PATCH
|
||||||
|
NSISdl::download "http://wolffiles.de/filebase/ET/Patches/ET_Patch_2_60.exe" ET_Patch_2_60.exe
|
||||||
|
IfFileExists "$TEMP\ET_Patch_2_60.exe" UNPACK_PATCH
|
||||||
|
NSISdl::download "http://mirror.etlegacy.com/ET_Patch_2_60.exe" ET_Patch_2_60.exe
|
||||||
|
IfFileExists "$TEMP\ET_Patch_2_60.exe" UNPACK_PATCH
|
||||||
|
NSISdl::download "http://ftp.freenet.de/pub/4players/hosted/et/official/ET_Patch_2_60.exe" ET_Patch_2_60.exe
|
||||||
|
IfFileExists "$TEMP\ET_Patch_2_60.exe" UNPACK_PATCH
|
||||||
|
NSISdl::download "http://ftp.games.skynet.be/pub/wolfenstein/ET_Patch_2_60.exe" ET_Patch_2_60.exe
|
||||||
|
IfFileExists "$TEMP\ET_Patch_2_60.exe" UNPACK_PATCH
|
||||||
|
NSISdl::download "http://download.hirntot.org/misc/ET_Patch_2_60.exe" ET_Patch_2_60.exe
|
||||||
|
IfFileExists "$TEMP\ET_Patch_2_60.exe" UNPACK_PATCH
|
||||||
|
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "Download Error: Couldn't fetch Patch file." \
|
||||||
|
IDCANCEL USERCANCEL IDRETRY GET_PATCH
|
||||||
|
|
||||||
|
UNPACK_PATCH:
|
||||||
|
ExecWait "$TEMP\ET_Patch_2_60.exe /x $TEMP\etl_install"
|
||||||
|
IfFileExists "$TEMP\etl_install\pak1.pk3" +2
|
||||||
|
MessageBox MB_ICONEXCLAMATION|MB_OK "Fatal Error: Patch extraction failed."
|
||||||
|
copyfiles "$TEMP\etl_install\pak1.pk3" "$INSTDIR\etmain\"
|
||||||
|
IfFileExists "$INSTDIR\etmain\pak1.pk3" +2
|
||||||
|
MessageBox MB_ICONEXCLAMATION|MB_OK "Fatal Error: Copy failed (pak1.pk3)."
|
||||||
|
copyfiles "$TEMP\etl_install\pak2.pk3" "$INSTDIR\etmain\"
|
||||||
|
IfFileExists "$INSTDIR\etmain\pak2.pk3" +2
|
||||||
|
MessageBox MB_ICONEXCLAMATION|MB_OK "Fatal Error: Copy failed (pak2.pk3)."
|
||||||
|
copyfiles "$TEMP\etl_install\mp_bin.pk3" "$INSTDIR\etmain\"
|
||||||
|
IfFileExists "$INSTDIR\etmain\mp_bin.pk3" +2
|
||||||
|
MessageBox MB_ICONEXCLAMATION|MB_OK "Fatal Error: Copy failed (mp_bin.pk3)."
|
||||||
|
GOTO END
|
||||||
|
|
||||||
|
USERCANCEL:
|
||||||
|
Messagebox MB_OK|MB_ICONEXCLAMATION "Make sure to copy W:ET assets files (pak0.pk3, pak1.pk3, pak2.pk3 and mp_bin.pk3) into $INSTDIR\etmain before you run ET:Legacy."
|
||||||
|
|
||||||
|
END:
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Protocol registration" URI
|
||||||
|
WriteRegStr HKCR "et" "URL Protocol" ""
|
||||||
|
WriteRegStr HKCR "et" "" "URL: Enemy Territory Protocol"
|
||||||
|
WriteRegStr HKCR "et\DefaultIcon" "" "$INSTDIR\etl.exe"
|
||||||
|
WriteRegStr HKCR "et\shell\open\command" "" "$INSTDIR\etl.exe +set fs_basepath $\"$INSTDIR$\" +connect $\"%1$\""
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section -ETKEY
|
||||||
|
IfFileExists "$DOCUMENTS\WolfETL\etmain\etkey" END
|
||||||
|
IfFileExists "$LOCALAPPDATA\Punkbuster\ET\etmain\etkey" COPYAPPDATA
|
||||||
|
ReadRegStr $1 HKLM "Software\Activision\Wolfenstein - Enemy Territory" "InstallPath"
|
||||||
|
IfFileExists "$1\etmain\etkey" COPYETMAIN
|
||||||
|
GOTO NOKEY
|
||||||
|
|
||||||
|
COPYAPPDATA:
|
||||||
|
MessageBox MB_YESNO "ETKEY found. Do you want to use it with ET:Legacy?" IDNO END
|
||||||
|
CreateDirectory `$DOCUMENTS\WolfETL\etmain`
|
||||||
|
CopyFiles `$LOCALAPPDATA\Punkbuster\ET\etmain\etkey` `$DOCUMENTS\WolfETL\etmain`
|
||||||
|
GOTO END
|
||||||
|
|
||||||
|
COPYETMAIN:
|
||||||
|
MessageBox MB_YESNO "ETKEY found. Do you want to use it with ET:Legacy?" IDNO END
|
||||||
|
CreateDirectory `$DOCUMENTS\WolfETL\etmain`
|
||||||
|
CopyFiles `$1\etmain\etkey` `$DOCUMENTS\WolfETL\etmain`
|
||||||
|
GOTO END
|
||||||
|
|
||||||
|
NOKEY:
|
||||||
|
Messagebox MB_OK|MB_ICONINFORMATION "No ETKEY found. ET:Legacy will create a new ETKEY upon start. If you got a Backup of your own ETKEY copy it to $DOCUMENTS\WolfETL\etmain."
|
||||||
|
GOTO END
|
||||||
|
|
||||||
|
END:
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section -Shortcuts
|
||||||
|
SetOverwrite on
|
||||||
|
SetOutPath $INSTDIR
|
||||||
|
CreateDirectory "$SMPROGRAMS\Enemy Territory - Legacy"
|
||||||
|
CreateShortCut "$SMPROGRAMS\Enemy Territory - Legacy\Enemy Territory - Legacy Homepage.lnk" "http://www.etlegacy.com"
|
||||||
|
CreateShortCut "$SMPROGRAMS\Enemy Territory - Legacy\Enemy Territory - Legacy.lnk" "$INSTDIR\etl.exe"
|
||||||
|
CreateShortCut "$SMPROGRAMS\Enemy Territory - Legacy\Enemy Territory - Legacy with Omni-Bots.lnk" "$INSTDIR\etl.exe" "+set omni_bot enable 1 +set omnibot_path legacy\omni-bot\"
|
||||||
|
CreateShortCut "$SMPROGRAMS\Enemy Territory - Legacy\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
||||||
|
CreateShortCut "$DESKTOP\ET-Legacy.lnk" "$INSTDIR\etl.exe"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section -Post
|
||||||
|
SetOverwrite on
|
||||||
|
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||||
|
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallPath" "$INSTDIR"
|
||||||
|
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
|
||||||
|
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "DisplayName" "Enemy Territory: Legacy"
|
||||||
|
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${VERSION}"
|
||||||
|
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "Publisher" "ET:Legacy Team"
|
||||||
|
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "http://www.etlegacy.com"
|
||||||
|
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\etl.exe"
|
||||||
|
WriteRegDWORD HKLM "${PRODUCT_UNINST_KEY}" "NoModify" 1
|
||||||
|
WriteRegDWORD HKLM "${PRODUCT_UNINST_KEY}" "NoRepair" 1
|
||||||
|
WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
; Section descriptions
|
||||||
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${FILES} "Install Enemy Territory: Legacy files with Omni-Bot."
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${ASSETS} "Retrieve Wolfenstein: Enemy Territory .pk3 assets. Data files will be downloaded if not found locally."
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${URI} "Register et:// protocol with Enemy Territory: Legacy."
|
||||||
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
|
; ------------------------
|
||||||
|
; UNINSTALL
|
||||||
|
; ------------------------
|
||||||
|
|
||||||
|
Section "un.ET:Legacy" UNFILES
|
||||||
|
SectionIN RO
|
||||||
|
Delete "$INSTDIR\*.*"
|
||||||
|
Delete "$INSTDIR\etmain\*.cfg"
|
||||||
|
RMDir /r "$INSTDIR\legacy"
|
||||||
|
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
|
||||||
|
DeleteRegKey HKLM "${PRODUCT_UNINST_KEY}"
|
||||||
|
DeleteRegKey HKCR "et"
|
||||||
|
RMDir /r "$SMPROGRAMS\Enemy Territory - Legacy"
|
||||||
|
Delete "$DESKTOP\ET-Legacy.lnk"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section /o "un.Wolf:ET assets" UNASSETS
|
||||||
|
Delete "$INSTDIR\etmain\*.pk3"
|
||||||
|
RMDir "$INSTDIR\etmain"
|
||||||
|
RMDir "$INSTDIR"
|
||||||
|
SectionEND
|
||||||
|
|
||||||
|
Section /o "un.ET:Legacy User files" WOLFETL
|
||||||
|
RMDir /r "$DOCUMENTS\WolfETL"
|
||||||
|
SectionEND
|
||||||
|
|
||||||
|
; Section descriptions
|
||||||
|
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${UNFILES} "Uninstall Enemy Territory: Legacy"
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${UNASSETS} "Uninstall Wolfenstein: Enemy Territory .pk3 assets (pak0.pk3, pak1.pk3, pak2.pk3 and mp_bin.pk3)."
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${WOLFETL} "Delete ETKEY and all files created or downloaded inside the MyDocuments\WolfETL folder."
|
||||||
|
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
|
BIN
nsis/header.bmp
Normal file
BIN
nsis/header.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
nsis/side.bmp
Normal file
BIN
nsis/side.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 151 KiB |
Loading…
Reference in a new issue