Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding StarCraft to WinePak #121

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions com.blizzard.StarCraft/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# StarCraft
The Ultimate Real-time Strategy Game

## Status

| Arch | Installs | Runs | Notes |
| ----- | -------- | ---- | ----- |
| 32bit | N/A | N/A | |
| 64bit | NeedsTest | NeedsTest | NeedsTest |

## Build & Install
### Repo
#### 32bit

flatpak-builder --arch=i386 --force-clean builds --repo=winepak com.blizzard.StarCraft.yml
flatpak --user install winepak com.blizzard.StarCraft

#### 64bit

flatpak-builder --arch=x86_64 --force-clean builds --repo=winepak com.blizzard.StarCraft.yml
flatpak --user install winepak com.blizzard.StarCraft

### Direct
#### 32bit

flatpak-builder --user --arch=i386 --force-clean --install builds com.blizzard.StarCraft.yml

#### 64bit

flatpak-builder --user --arch=x86_64 --force-clean --install builds com.blizzard.StarCraft.yml

## Run

flatpak run com.blizzard.StarCraft

90 changes: 90 additions & 0 deletions com.blizzard.StarCraft/com.blizzard.StarCraft.appdata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>com.blizzard.StarCraft.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LicenseRef-proprietary</project_license>
<name>StarCraft</name>
<summary>The Ultimate Real-time Strategy Game</summary>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took that text from official website. I don't see the need to change it.

<summary xml:lang="pt_BR">Estratégia em tempo real (RTS)</summary>
<summary xml:lang="es">(RTS) Estrategia en tiempo real</summary>
<description><p>Infinite fronts, infinite enemies. Real-time Strategy Restored. Command the mechanized Terrans, psi-powered Protoss, and insectoid Zerg as they vie for map control of eight unique environments. Build your base and conscript your army in a real-time, military sci-fi vision of the future. Once you’ve finished the campaign, go head-to-head or team up with other players online. Pit StarCraft’s iconic, radically-different races against one another in the ultimate theater of war.</p></description>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again this is from official website. I don't see the need to change it.

<description xml:lang="pt_BR"><p>Batalhas infinitas, inimigos infinitos.Estratégia em tempo real revitalizada. Lidere os terranos com suas máquinas mortíferas, os protoss de poderes psiônicos, e os zergs insectiformes em batalhas territoriais por oito cenários únicos. Mergulhe num futuro militarista de ficção-científica. Construa uma base e aliste o seu exército. Tudo isto numa experiência em tempo real! Terminou a campanha? Então aproveite para enfrentar ou cooperar com outros jogadores em batalhas online. Você terá o maior palco de guerra do universo à sua disposição, onde as inigualáveis raças de StarCraft se enfrentarão ao seu comando.</p></description>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yet again, the text is from official website.

<description xml:lang="es"><p>Infinidad de frentes, infinidad de enemigos Estrategia en tiempo real renovada. Dirige a los terran mecanizados, a los protoss con energía psiónica y a los zerg insectoides en su lucha por obtener el control del mapa en ocho entornos únicos. Construye tu base y recluta a tu ejército en tiempo real en esta versión militarizada de un futuro de ciencia ficción. Cuando hayas terminado la campaña, disfruta de las batallas en línea, tanto en equipo como mano a mano contra otro jugador. Enfrenta a las razas emblemáticas y radicalmente diferentes de StarCraft en el escenario de guerra final.</p></description>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SIGH I don't see a point in these changes. the text comes from the official website.


<screenshots>
<screenshot type="default">
<image width="1200" height="630">https://static.starcraft.com/images/content/share/share-1200x630-ca2d9035c74f9bb10faf142c83f76b47c909d6bbb177522676428d590c92ac16c99a92d1aea0afd4bbbd269e88b4341c4840d183d5555504f305c5a2a484469a.jpg</image>
</screenshot>
<screenshot>
<image width="1280" height="720">https://static.starcraft.com/videos/posters/terran-base-sd.mp4-8acd31f975586586c1cea364b36af668a85d93e8784e01b384f062cd68206621b3c0709c597e266f4b8adb034779025bd5939a16dbbbbcf380db4215fb6ef7c8.jpg</image>
</screenshot>
<screenshot>
<image width="1920" height="1080">https://bnetcmsus-a.akamaihd.net/cms/gallery/WP69H5HSD4JL1498596196607.png</image>
</screenshot>
<screenshot>
<image width="1920" height="1080">https://bnetcmsus-a.akamaihd.net/cms/gallery/U9E1ZAJGH5FF1498596198839.png</image>
</screenshot>
<screenshot>
<image width="1920" height="1080">https://bnetcmsus-a.akamaihd.net/cms/gallery/U9M6B5REQJ9T1498596196575.png</image>
</screenshot>
<screenshot>
<image width="2560" height="1600">https://bnetcmsus-a.akamaihd.net/cms/gallery/OKZIMO3EP35I1498596201630.png</image>
</screenshot>
</screenshots>

<project_group>winepak</project_group>
<developer_name>Blizzard Entertainment</developer_name>

<url type="homepage">https://StarCraft.com</url>
<url type="help">https://us.battle.net/support/en/games/StarCraft</url>
<url type="bugtracker">https://us.battle.net/forums/en/starcraft/22814093/</url>

<categories>
<category>Game</category>
<category>StrategyGame</category>
</categories>

<recommends>
<memory>2048</memory>
</recommends>

<content_rating type="oars-1.1">
<content_attribute id="violence-cartoon">none</content_attribute>
<content_attribute id="violence-fantasy">intense</content_attribute>
<content_attribute id="violence-realistic">none</content_attribute>
<content_attribute id="violence-bloodshed">intense</content_attribute>
<content_attribute id="violence-sexual">none</content_attribute>
<content_attribute id="violence-desecration">none</content_attribute>
<content_attribute id="violence-slavery">none</content_attribute>
<content_attribute id="violence-worship">none</content_attribute>
<content_attribute id="drugs-alcohol">moderate</content_attribute>
<content_attribute id="drugs-narcotics">none</content_attribute>
<content_attribute id="drugs-tobacco">moderate</content_attribute>
<content_attribute id="sex-nudity">none</content_attribute>
<content_attribute id="sex-themes">none</content_attribute>
<content_attribute id="sex-homosexuality">none</content_attribute>
<content_attribute id="sex-prostitution">none</content_attribute>
<content_attribute id="sex-adultery">none</content_attribute>
<content_attribute id="sex-appearance">moderate</content_attribute>
<content_attribute id="language-profanity">mild</content_attribute>
<content_attribute id="language-humor">none</content_attribute>
<content_attribute id="language-discrimination">none</content_attribute>
<content_attribute id="social-chat">intense</content_attribute>
<content_attribute id="social-info">none</content_attribute>
<content_attribute id="social-audio">none</content_attribute>
<content_attribute id="social-location">none</content_attribute>
<content_attribute id="social-contacts">none</content_attribute>
<content_attribute id="money-purchasing">none</content_attribute>
<content_attribute id="money-gambling">none</content_attribute>
</content_rating>

<releases>
<release date="2018-08-14" version="2018.08.14">
<description>
<ul>
<li>Initial release of StarCraft via winepak.</li>
</ul>
</description>
</release>
</releases>
</component>
11 changes: 11 additions & 0 deletions com.blizzard.StarCraft/com.blizzard.StarCraft.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Desktop Entry]
Name=StarCraft
Comment=The Ultimate Real-time Strategy Game
Exec=starcraft %U
Icon=com.blizzard.StarCraft
StartupNotify=true
Terminal=false
Type=Application
MimeType=application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut;
Categories=Game;StrategyGame;
Keywords=StarCraft;StarCraft;sc;Blizzard;Real-time;Strategy;
10 changes: 10 additions & 0 deletions com.blizzard.StarCraft/com.blizzard.StarCraft.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
126 changes: 126 additions & 0 deletions com.blizzard.StarCraft/com.blizzard.StarCraft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
app-id: com.blizzard.StarCraft
branch: stable

runtime: org.winepak.Platform
runtime-version: 3.0
sdk: org.winepak.Sdk

base: com.blizzard.BattleNet.BaseApp
base-version: stable

command: StarCraft

inherit-extensions:
- org.winepak.Platform.Compat32
- org.winepak.Platform.Extension.corefonts
- org.winepak.Platform.Extension.vcrun2015

add-extensions:
org.winepak.Platform.Wine:
directory: lib/wine
version: 3.11-staging
add-ld-path: lib
no-autodownload: false

org.winepak.Platform.Wine.Compat32:
directory: lib/wine-32bit
version: 3.11-staging
add-ld-path: lib
no-autodownload: false

tags:
- proprietary

finish-args:
- --socket=x11
- --socket=pulseaudio
- --share=ipc
- --share=network
- --device=dri
- --allow=multiarch
- --allow=devel
- --filesystem=xdg-documents

modules:
- name: setup-wine
buildsystem: simple
build-commands:
- mkdir -p /app/lib/wine

- name: setup-wine-compat32
buildsystem: simple
build-commands:
- mkdir -p /app/lib/wine-32bit

- name: StarCraft
only-arches:
- x86_64
buildsystem: simple
build-commands:
- install -d /app/bin
- install StarCraft-installer /app/bin
- install StarCraft /app/bin
- install -Dm644 com.blizzard.StarCraft.appdata.xml /app/share/appdata/com.blizzard.StarCraft.appdata.xml
- install -Dm644 com.blizzard.StarCraft.desktop /app/share/applications/com.blizzard.StarCraft.desktop
- install -Dm664 com.blizzard.StarCraft.svg /app/share/icons/hicolor/scalable/apps/com.blizzard.StarCraft.svg
sources:
- type: script
dest-filename: StarCraft-installer
commands:
- if [ -z "$WINEPREFIX" ] ; then
- ' echo "No wine prefix set or is empty, abort."'
- ' exit 1'
- fi
-
- source /app/bin/battlenet-installer "battlenet://starcraft"
-
- if [[ $? != 0 ]] ; then
- ' echo "Battle.net installer failed, abort."'
- ' exit 1'
- fi
-
- if [ -e "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/StarCraft" ] ; then
- ' echo "This prefix already has an exisiting ''StarCraft'' install at ${WINEPREFIX}"'
- ' echo "In order to install ''StarCraft'' you must move or delete the current prefix."'
- ' exit 1'
- fi
-
- echo "Set OffScreenRenderingMode to pbuffer..."
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\Direct3D" /v "OffScreenRenderingMode" /d "pbuffer" /f
-
- echo "Enable GLSL..."
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\Direct3D" /v "UseGLSL" /d "enabled" /f
-
- echo "Set VertexShaderMode to hardware..."
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\Direct3D" /v "VertexShaderMode" /d "hardware" /f
-
- echo "Setting Windows 10 mode for Wine"
- wine64 reg add "HKEY_CURRENT_USER\Software\Wine\" /v "Version" /d "win10" /f
-
- echo "Installer finished"
- type: script
dest-filename: StarCraft
commands:
- export WINEARCH=win64
-
- if ! [ -e "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net" ] ; then
- ' source /app/bin/StarCraft-installer'
- ' if [[ $? != 0 ]] ; then'
- ' echo "Installation failed, abort."'
- ' exit 1'
- ' fi'
- fi
-
- echo "Verify \"Battle.net Helper.exe\" doesn't launch..."
- if [ -f "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net/Battle.net*/Battle.net Helper.exe" ] ; then
- ' mv "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net/Battle.net*/Battle.net Helper.exe" "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net/Battle.net*/Battle.net Helper.exe.bak"'
- fi
-
- wine64 "${WINEPREFIX}/dosdevices/c:/Program Files (x86)/Battle.net/Battle.net Launcher.exe" "battlenet://starcraft"
- type: file
path: com.blizzard.StarCraft.appdata.xml
- type: file
path: com.blizzard.StarCraft.desktop
- type: file
path: com.blizzard.StarCraft.svg