Added Warcraft 3 ROC

This commit is contained in:
grepwood@sucs.org 2020-03-22 19:38:03 +01:00
parent 7f4b5fe55a
commit 9136cf5dff
8 changed files with 258 additions and 0 deletions

View File

@ -0,0 +1,6 @@
AUX install_wc3_linux.sh 2842 BLAKE2B bb2512f37eff9caa6bcf74aee7ca6c14960070909580fd792bac80894485bce11ba16732ee82131f7e5ffe387a7566ca0215a2136ef267a5d0b7c0201956b62d SHA512 cc42b335a9a9b43b272f659646d38555e74ebaa1913ea115ccea1147cabaf710089d8aca111f524eac07ea7eb18398cdc0a5262d775b65934287c6ba91677c48
AUX warcraft3 465 BLAKE2B 1a759e7adc9fecbefb0f1da81c0d72d743433813896ba5288c621936f5c2f086842e36c015fd7873232287f019e123abb6aacba5ce518542a3c2d742342cb4a0 SHA512 c9a2d7c6fab6fe81513d6598c39b8191bb3ef17db9647a88b02f11511d03e304842328c8ccb1f1db8c70323ce7372c7b70cd157093b0ce1b72d31c86dc68d172
AUX warcraft3.desktop 137 BLAKE2B 7a20014483906327a566b58c14915cd83804327aa1f666855e354ad78a4eccc233b2d9753e4b79f3aa6a01bbcf69bfaebd9dbd3e159b6c81d857e25bcc295bd4 SHA512 819ed9aad584c1e278be33a861067a899088e71b1b4ed6c01b68670f617d746df2eb57056a93adc60cdee563ea212a5a6ef01cbc51245898d3ed6ec637cc4453
AUX warcraft3_worldedit 470 BLAKE2B 6da8ac771cfe9949566a50f478c83ff134c16f6f62d507f88bb0a9dbebd85772f1962da31bc4ae76f2c8c1caba066c9a0ef2e99a011355f35f33831d27ab66ac SHA512 4c453e2646a5c2d647c86e69ff88c6e33d78f17ff0f6e1375a74b998364bd431dd0c9131a45501b0ceca84c67036a98fdcf925f93a304398987a289dfbe243ec
AUX warcraft3_worldedit.desktop 156 BLAKE2B 78905fe58229db4a0e118aa1575ee55e2924250cba47b5f25f261b6322dd555cbd0506f3a56afa2699cdc8ccdddd3f7cbb857d522480c29b0a7066a8669cdc48 SHA512 9f80697f8930d01823e796492fdbdb3b02dcd7c7d4a3127979e0257958daac084e1295addf2ca96a31cf569c6c29e4c01ad6508605bd63b3b7ba520dfcac286f
EBUILD warcraft3-1.0.ebuild 2004 BLAKE2B 40b0bf193b870c26cc8e3871594b0594ccacdbe776a060d4be6ea4832f9c1965048392c194ad70d41e90728c8e6953e2aa0e3f5cb9958830c21e06dde9b7e781 SHA512 408f78a52e029f683d24764e06d98fa75640859655b547f98b844be98ae384a30f1b7c2a530a5e05dc4de664f208c496accc71cbf5a183edb40660657ccc1b68

View File

@ -0,0 +1,89 @@
#!/usr/bin/env bash
set -xeuo pipefail
wine_window_stage1=""
wine_window_stage2=""
wine_window_stage3=""
wine_window_stage4=""
wine_window_stage5=""
wine_window_stage6=""
wine_window_stage7=""
installer_window=""
eula_window=""
cdkey_window=""
location_window=""
installation_window=""
shortcut_window=""
registration_window=""
XAUTHORITY=$(pwd)/xauth
DISPLAY=""
function list_wine_windows {
xdotool search --class wine
}
function last_wine_window {
for((counter=0, limit=$(($# - 1)); counter < limit; counter++)); do
shift
done
echo $1
}
function start_installer {
xvfb-run -a -f ${XAUTHORITY} openbox --sync --startup ${WORKDIR}/run_installer_in_openbox.sh &
sleep 120
DISPLAY=$(ps aux | awk '{if($1 == "'$(whoami)'") print $0}' | grep Xvfb\ :[0-9]* | grep -v grep | grep -o Xvfb\ :[0-9]* | awk '{print $2}')
}
function main {
start_installer
wine_window_stage1=($(list_wine_windows))
installer_window=$(last_wine_window ${wine_window_stage1[@]})
# Initiate installation
xdotool windowactivate --sync ${installer_window} key W
wine_window_stage2=($(list_wine_windows))
eula_window=$(last_wine_window ${wine_window_stage2[@]})
xdotool windowactivate --sync ${eula_window} key A
wine_window_stage3=($(list_wine_windows))
cdkey_window=$(last_wine_window ${wine_window_stage3[@]})
# Input Gentoo as the owner
for i in G e n t o o; do
xdotool windowactivate --sync ${cdkey_window} key $i
done
xdotool windowactivate --sync ${cdkey_window} key Tab
# Input CDKEY
for (( i=0; i<${#CDKEY}; i++ )); do
if [ "${CDKEY:$i:1}" != "-" ]; then
xdotool windowactivate --sync ${cdkey_window} key ${CDKEY:$i:1}
fi
done
xdotool windowactivate --sync ${cdkey_window} key Tab
xdotool windowactivate --sync ${cdkey_window} key KP_Enter
# Input location
wine_window_stage4=($(list_wine_windows))
location_window=$(last_wine_window ${wine_window_stage4[@]})
xdotool windowactivate --sync ${location_window} key KP_Enter
xdotool windowactivate --sync ${location_window} key KP_Enter
# Wait through installation
wine_window_stage5=($(list_wine_windows))
installation_window=$(last_wine_window ${wine_window_stage5[@]})
while [ $(list_wine_windows | grep -c ^${installation_window}$) -eq 1 ]; do
sleep 5
done
sleep 5
# No shortcut please
wine_window_stage6=($(list_wine_windows))
shortcut_window=$(last_wine_window ${wine_window_stage6[@]})
xdotool windowactivate --sync ${shortcut_window} key Tab
xdotool windowactivate --sync ${shortcut_window} key KP_Enter
# No registration please
wine_window_stage7=($(list_wine_windows))
registration_window=$(last_wine_window ${wine_window_stage7[@]})
xdotool windowactivate --sync ${registration_window} key Tab
xdotool windowactivate --sync ${registration_window} key KP_Enter
# Exit from installer
xdotool windowactivate --sync ${installer_window} key X
}
main $@

View File

@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -xeuo pipefail
export WC3_DATA_DIR="/usr/share/games/warcraft3"
export WINEPREFIX=~/.wine_wc3roc
export WINEARCH=win32
if [ ! -d ~/.local/share/Warcraft3 ]; then
mkdir -p ~/.local/share/Warcraft3
pushd ~/.local/share/Warcraft3
for i in $(ls ${WC3_DATA_DIR} | grep -vE '^replay$|^save$'); do
ln -s ${WC3_DATA_DIR}/$i $i
done
mkdir replay
mkdir save
popd
fi
pushd ~/.local/share/Warcraft3
winetricks quartz
wine War3.exe
popd

View File

@ -0,0 +1,7 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Warcraft 3: Reign of Chaos
Exec=warcraft3
Icon=warcraft3
Categories=Game;StrategyGame;

View File

@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -xeuo pipefail
export WC3_DATA_DIR="/usr/share/games/warcraft3"
export WINEPREFIX=~/.wine_wc3roc
export WINEARCH=win32
if [ ! -d ~/.local/share/Warcraft3 ]; then
mkdir -p ~/.local/share/Warcraft3
pushd ~/.local/share/Warcraft3
for i in $(ls ${WC3_DATA_DIR} | grep -vE '^replay$|^save$'); do
ln -s ${WC3_DATA_DIR}/$i $i
done
mkdir replay
mkdir save
popd
fi
pushd ~/.local/share/Warcraft3
winetricks quartz
wine WorldEdit.exe
popd

View File

@ -0,0 +1,7 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Map editor for Warcraft 3
Exec=warcraft3_worldedit
Icon=warcraft3_worldedit
Categories=Game;StrategyGame;

View File

@ -0,0 +1,76 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION=""
HOMEPAGE=""
LICENSE="Warcraft3_EULA"
SLOT="0"
KEYWORDS="~amd64 ~x86"
BDEPEND="
sys-apps/sed
sys-apps/coreutils
sys-apps/grep
sys-apps/gawk
sys-process/procps
media-gfx/icoutils
media-gfx/imagemagick
x11-misc/xvfb-run
x11-wm/openbox"
RDEPEND="
app-emulation/wine-vanilla[abi_x86_32]
app-emulation/winetricks
app-shells/bash"
DEPEND="${RDEPEND}"
S=${WORKDIR}
src_unpack() {
if [ -z ${CDKEY} ] || [ -z ${CDROM_ROOT} ]; then
eerror "Missing CDKEY and CDROM_ROOT environment variables. Without them, Warcraft 3 cannot be installed."
exit
fi
export WINEPREFIX="$(pwd)/wineprefix"
export WINEARCH="win32"
export WINEDEBUG="-all"
export HID_DEVICES=($(ls /dev | grep ^hid | sed 's_^_/dev/_'))
einfo "Adding temporary pseudo rw to /dev/input"
addpredict /dev/input
for hid_device in ${HID_DEVICES[@]}; do
einfo "Adding temporary pseudo rw to ${hid_device}"
addpredict ${hid_device}
done
cat <<EOF > run_installer_in_openbox.sh
#!/usr/bin/env bash
set -euo pipefail
cd ${CDROM_ROOT}
wine install.exe &
EOF
chmod +x run_installer_in_openbox.sh
CDKEY=${CDKEY} CDROM_ROOT=${CDROM_ROOT} ${FILESDIR}/install_wc3_linux.sh
mv ${WINEPREFIX}/drive_c/Program\ Files/Warcraft\ III warcraft3
wrestool -x -t14 -n WAR3.ICO -o . warcraft3/War3.exe
wrestool -x -t14 -n WORLDEDIT_ICON -o . warcraft3/WorldEdit.exe
convert War3.exe_14_WAR3.ICO_0.ico warcraft3.png
convert WorldEdit.exe_14_WORLDEDIT_ICON.ico warcraft3_worldedit.png
mv warcraft3-8.png warcraft3.png
mv warcraft3_worldedit-8.png warcraft3_worldedit.png
}
src_install() {
insinto /usr/share/games
doins -r warcraft3
insinto /usr/share/pixmaps
doins warcraft3.png
doins warcraft3_worldedit.png
insinto /usr/share/applications
doins "${FILESDIR}/warcraft3.desktop"
doins "${FILESDIR}/warcraft3_worldedit.desktop"
dobin "${FILESDIR}/warcraft3"
dobin "${FILESDIR}/warcraft3_worldedit"
}

29
licenses/Warcraft3_EULA Normal file
View File

@ -0,0 +1,29 @@
YOU SHOULD CAREFULLY READ THE FOLLOWING END USER LICENSE AGREEMENT BEFORE INSTALLING THIS SOFTWARE PROGRAM. BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE PROGRAM, YOU AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, PROMPTLY RETURN THE UNUSED SOFTWARE PROGRAM TO THE PLACE OF PURCHASE OR CONTACT BLIZZARD ENTERTAINMENT CUSTOMER SERVICE AT (949) 955-1382 FOR A FULL REFUND OF THE PURCHASE PRICE WITHIN 30 DAYS OF THE ORIGINAL PURCHASE.
This software program including any and all subsequent patches (the "Program"), any printed materials, any on-line or electronic documentation, and any and all copies and derivative works of such software program and materials are the copyrighted work of Blizzard Entertainment, a division of Vivendi Universal Games, Inc. and/or its wholly owned subsidiaries, or its suppliers. All use of the Program is governed by the terms of the End User License Agreement which is provided below ("License Agreement"). The Program is solely for use by end users according to the terms of the License Agreement. Any use, reproduction, or redistribution of the Program not in accordance with the terms of the License Agreement is expressly prohibited.
END USER LICENSE AGREEMENT
1. Limited Use License. Blizzard Entertainment ("Blizzard") hereby grants, and by installing the Program you thereby accept, a limited, non-exclusive license and right to install and use one (1) copy of the Program for your use on a home, business, or portable computer. The Program also contains a 'World Editor' (the "Editor") that allows you to create custom levels or other materials for your personal use in connection with the Program ("New Materials"). All use of the Editor or any New Materials is subject to this License Agreement. In addition, the Program has a multiplayer capability that allows users to utilize the Program over the Internet exclusively via Blizzard Entertainment's online game network Battle.net or other hosting service authorized by Blizzard Entertainment. Use of the Program over Battle.net or other hosting service authorized by Blizzard Entertainment is subject to your acceptance of Battle.net's Terms of Use Agreement. Blizzard Entertainment reserves the right to update, modify or change the Battle.net Terms of Use Agreement at any time.
2. Ownership. All title, ownership rights, and intellectual property rights in and to the Program and any and all copies thereof (including, but not limited to, any titles, computer code, themes, objects, characters, character names, stories, dialog, catch phrases, locations, concepts, artwork, animations, sounds, musical compositions, audio-visual effects, methods of operation, moral rights, any related documentation, and "applets" incorporated into the Program) are owned by Blizzard Entertainment or its licensors. The Program is protected by the copyright laws of the United States, international copyright treaties, and conventions and other laws. All rights are reserved. The Program contains certain licensed materials, and Blizzard's licensors may protect their rights in the event of any violation of this Agreement.
3. Responsibilities of End User.
A. Subject to the Grant of License hereinabove, you may not, in whole or in part, copy, photocopy, reproduce, sublicense, translate, reverse engineer, derive source code, modify, disassemble, decompile, create a source code equivalent, create derivative works based on the Program, or remove any proprietary notices or labels on the Program, or allow others to do so, without the prior consent, in writing, of Blizzard.
B. The Program is licensed to you as a single product. Its component parts may not be separated for use on more than one computer.
C. You are entitled to use the Program for your own use, but you are not entitled to:
(i) sell, grant a security interest in, or transfer reproductions of the Program to other parties in any way, nor to rent, lease, or license the Program to others without the prior written consent of Blizzard;
(ii) exploit the Program or any of its parts for any commercial purpose including, but not limited to, use at a cyber café, computer gaming center, or any other location-based site. Blizzard may offer a separate Site License Agreement to permit you to make the Program available for commercial use; contact Blizzard for details;
(iii) use or allow third parties to use the Editor and the New Materials created thereby for commercial purposes including, but not limited to, distribution of New Materials on a stand-alone basis or packaged with other software or hardware through any and all distribution channels, including, but not limited to, retail sales and on-line electronic distribution without the express written consent of Blizzard;
(iv) host or provide matchmaking services for the Program, or emulate or redirect the communication protocols used by Blizzard in the network feature of the Program, through protocol emulation, tunneling, modifying or adding components to the Program, use of a utility program, or any other techniques now known or hereafter developed, for any purpose including, but not limited to, network play over the Internet, network play utilizing commercial or non-commercial gaming networks, or as part of content aggregation networks without the prior written consent of Blizzard; and
(v) create or maintain, under any circumstance, more than one simultaneous connection to Battle.net or other hosting services authorized by Blizzard Entertainment. All such connections to Battle.net or other hosting services authorized by Blizzard Entertainment, whether created by the Program or by other tools and utilities, may only be made through methods and means expressly approved by Blizzard Entertainment. Under no circumstances may you connect, or create tools that allow you to connect to Battle.net's private binary interface or interfaces other than those explicitly provided by Blizzard Entertainment for public use.
4. Program Transfer. You may permanently transfer all of your rights under this License Agreement, provided the recipient agrees to the terms of this License Agreement and you agree to remove the Program and any New Materials from your home, business, or portable computer.
5. Termination. This License Agreement is effective until terminated. You may terminate the License Agreement at any time by destroying the Program and any New Materials. Blizzard may, at its discretion, terminate this License Agreement in the event that you fail to comply with the terms and conditions contained herein. In such event, you must immediately destroy the Program and any New Materials.
6. Export Controls. The Program may not be re-exported, downloaded, or otherwise exported into (or to a national or resident of) any country to which the U.S. has embargoed goods, or to anyone on the U.S. Treasury Department's list of Specially Designated Nationals or the U.S. Commerce Department's Table of Denial Orders. By installing the Program, you are agreeing to the foregoing, and you are representing and warranting that you are not located in, under the control of, or a national or resident of any such country or on any such list.
7. Customer Service/Technical Support. Blizzard agrees to provide Customer Service and Technical Support for this Program until such time as the Program is "Out of Publication." The Program shall be considered "Out of Publication" one (1) year following the date that the Program is no longer manufactured and/or distributed by Blizzard, or its licensors. "Customer Service" as used herein may be provided to you by Blizzard representatives by telephone and/or by electronic message (e-mail). "Technical Support" may be provided to you by Blizzard by telephone, electronic message (e-mail), or by posting of information related to known technical support issues on a web site. Unless otherwise stated in the Program's packaging or in the Program's user manual, nothing herein shall be construed so as to place a duty upon Blizzard to provide Customer Service or Technical Support via a toll-free telephone number for an unlimited period of time.
8. Duration of the "On-Line" component of the Program. This Program contains an 'on-line' component that allows you to utilize the Product over the Internet utilizing servers and software maintained or authorized by Blizzard. Blizzard agrees to provide the servers and software technology necessary to utilize the "on-line" component of the Program until such time as the Program is Out of Publication, as defined above. Thereafter, Blizzard may, in its sole discretion, continue to provide the servers and software technology necessary to utilize the "on-line" component of the Program, or Blizzard may license to third parties the right to provide the servers and software technology necessary to utilize the "on-line" component of this Program. However, nothing contained herein shall be construed so as to place an obligation upon Blizzard to provide the servers and software technology necessary to utilize the "on-line" beyond the time that the Program is Out of Publication.
9. Limited Warranty. Blizzard expressly disclaims any warranty for the Program, Editor, and Manual(s). The Program, Editor, and Manual(s) are provided "as is" without warranty of any kind, either express or implied, including, without limitation, the implied warranties of merchantability, fitness for a particular purpose, or noninfringement. The entire risk arising out of use or performance of the Program, Editor, and Manual(s) remains with the User; however Blizzard warrants up to and including ninety (90) days from the date of your purchase of the Program that the media containing the Program shall be free from defects in material and workmanship. In the event that the media proves to be defective during that time period, and upon presentation to Blizzard of proof of purchase of the defective Program, Blizzard will at its option 1) correct any defect, 2) provide you with a product of equal or lesser value, or 3) refund your money. Some states do not allow the exclusion or limitation of implied warranties or liability for incidental damages, so the above limitations may not apply to you.
10. Limitation of Liability. NEITHER BLIZZARD, VIVENDI UNIVERSAL GAMES, INC., ITS PARENT, SUBSIDIARIES, OR AFFILIATES SHALL BE LIABLE IN ANY WAY FOR LOSS OR DAMAGE OF ANY KIND RESULTING FROM THE USE OF THE PROGRAM, THE EDITOR, OR BLIZZARD ENTERTAINMENT'S ONLINE GAME NETWORK, BATTLE.NET, OR OTHER ON-LINE PROVIDER AUTHORIZED BY BLIZZARD ENTERTAINMENT, INCLUDING, BUT NOT LIMITED TO, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES. ANY WARRANTY AGAINST INFRINGEMENT THAT MAY BE PROVIDED IN SECTION 2-312(3) OF THE UNIFORM COMMERCIAL CODE AND/OR IN ANY OTHER COMPARABLE STATE STATUTE IS EXPRESSLY DISCLAIMED. FURTHER, BLIZZARD ENTERTAINMENT SHALL NOT BE LIABLE IN ANY WAY FOR THE LOSS OR DAMAGE TO ACCOUNTS (INCLUDING BUT NOT LIMITED TO PLAYER CHARACTERS OR ITEMS), STATISTICS, OR USER PROFILE INFORMATION STORED ON BATTLE.NET OR OTHER ON-LINE PROVIDER AUTHORIZED BY BLIZZARD ENTERTAINMENT. BLIZZARD ENTERTAINMENT SHALL NOT BE RESPONSIBLE FOR ANY INTERRUPTIONS OF SERVICE ON BATTLE.NET OR OTHER ON-LINE PROVIDER AUTHORIZED BY BLIZZARD ENTERTAINMENT INCLUDING, BUT NOT LIMITED TO, ISP DISRUPTIONS, SOFTWARE OR HARDWARE FAILURES, OR ANY OTHER EVENT WHICH MAY RESULT IN A LOSS OF DATA OR DISRUPTION OF SERVICE. Some states do not allow the exclusion or limitation of incidental or consequential damages, or allow limitations on how long an implied warranty lasts, so the above limitations may not apply.
11. Equitable Remedies. You hereby agree that Blizzard would be irreparably damaged if the terms of this License Agreement were not specifically enforced, and therefore you agree that Blizzard shall be entitled, without bond, other security, or proof of damages, to appropriate equitable remedies with respect to breaches of this License Agreement, in addition to such other remedies as Blizzard may otherwise have available to it under applicable laws. In the event any litigation is brought by either party in connection with this License Agreement, the prevailing party, in such litigation shall be entitled to recover from the other party all the costs, attorneys' fees and other expenses incurred by such prevailing party in the litigation.
12. Limitations on License. Nothing in this License Agreement shall preclude you from making or authorizing the making of another copy or adaptation of the Program provided, however, that (1) such new copy or adaptation is created as an essential step in your utilization of the Program in accordance with the terms of this License Agreement and for NO OTHER PURPOSE; or (2) such new copy or adaptation is for archival purposes ONLY and all archival copies are destroyed in the event of your Transfer of the Program, the Termination of this Agreement, or other circumstances under which your continued use of the Program ceases to be rightful.
13. Miscellaneous. This License Agreement shall be deemed to have been made and executed in the State of California, and any dispute arising hereunder shall be resolved in accordance with the law of California. You agree that any claim asserted in any legal proceeding by one of the parties against the other shall be commenced and maintained in any state or federal court located in the State of California, County of Los Angeles, having subject matter jurisdiction with respect to the dispute between the parties. This License Agreement may be amended, altered, or modified only by an instrument in writing, specifying such amendment, alteration, or modification, executed by both parties. In the event that any provision of this License Agreement shall be held by a court or other tribunal of competent jurisdiction to be unenforceable, such provision will be enforced to the maximum extent permissible, and the remaining portions of this License Agreement shall remain in full force and effect. This License Agreement constitutes and contains the entire agreement between the parties with respect to the subject matter hereof and supersedes any prior oral or written agreements.
I hereby acknowledge that I have read and understand the foregoing License Agreement and agree that the action of installing the Program is an acknowledgment of my agreement to be bound by the terms and conditions of the License Agreement contained herein. I also acknowledge and agree that this License Agreement is the complete and exclusive statement of the agreement between Blizzard and me and that the License Agreement supersedes any prior or contemporaneous agreement, either oral or written, and any other communications between Blizzard and me.