Skip to content

Commit

Permalink
64 bit support for Windows and Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
rlabrecque committed Feb 18, 2014
1 parent 2a2aa48 commit fcaf938
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 31 deletions.
33 changes: 23 additions & 10 deletions Editor/Steamworks.NET/RedistCopy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,33 @@ public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProj
#if !DISABLEREDISTCOPY
string strProjectName = Path.GetFileNameWithoutExtension(pathToBuiltProject);

if (target == BuildTarget.StandaloneWindows) {
CopyFile("steam_api.dll", "steam_api.dll", pathToBuiltProject);
switch(target) {
case BuildTarget.StandaloneWindows:
CopyFile("steam_api.dll", "steam_api.dll", pathToBuiltProject);
break;
case BuildTarget.StandaloneWindows64:
CopyFile("steam_api64.dll", "steam_api64.dll", pathToBuiltProject);
break;
case BuildTarget.StandaloneLinux:
CopyFile("linux/launchscript", strProjectName, pathToBuiltProject);
break;
case BuildTarget.StandaloneLinux64:
CopyFile("linux/launchscript64", strProjectName, pathToBuiltProject);
break;
case BuildTarget.StandaloneLinuxUniversal:
CopyFile("linux/launchscriptuniversal", strProjectName, pathToBuiltProject);
break;
case BuildTarget.StandaloneOSXIntel:
break;
default:
Debug.Log(string.Format("[Steamworks.NET] {0} Is not a supported platform.", target));
return;
}
else if (target == BuildTarget.StandaloneLinux || target == BuildTarget.StandaloneLinux64 || target == BuildTarget.StandaloneLinuxUniversal) {
CopyFile("linux/launchscript", strProjectName, pathToBuiltProject);
}
else {
Debug.Log(string.Format("[Steamworks.NET] {0} Is not a supported platform.", target));
}


string controllerCfg = Path.Combine(Application.dataPath, "controller.vdf");
if (File.Exists(controllerCfg)) {
string dir = "_Data";
if (target == BuildTarget.StandaloneOSXIntel || target == BuildTarget.StandaloneOSXIntel64 || target == BuildTarget.StandaloneOSXUniversal) {
if (target == BuildTarget.StandaloneOSXIntel) {
dir = ".app/Contents";
}

Expand Down
18 changes: 0 additions & 18 deletions Editor/Steamworks.NET/x86_64Warning.cs

This file was deleted.

Binary file modified Plugins/CSteamworks.bundle/Contents/MacOS/CSteamworks
Binary file not shown.
11 changes: 8 additions & 3 deletions Plugins/Steamworks.NET/redist/linux/launchscript
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#!/bin/sh
export LD_LIBRARY_PATH="./REPLACEWITHYOURGAMENAME_Data/Plugins/x86/:$LD_LIBRARY_PATH"
exec ./REPLACEWITHYOURGAMENAME.x86 "$@"
#!/usr/bin/env bash

GAMENAME="REPLACEWITHYOURGAMENAME"
ARCH="x86"

export LD_LIBRARY_PATH="./"$GAMENAME"_Data/Plugins/"$ARCH"/:$LD_LIBRARY_PATH"

exec "./"$GAMENAME"."$ARCH "$@"
8 changes: 8 additions & 0 deletions Plugins/Steamworks.NET/redist/linux/launchscript64
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

GAMENAME="REPLACEWITHYOURGAMENAME"
ARCH="x86_64"

export LD_LIBRARY_PATH="./"$GAMENAME"_Data/Plugins/"$ARCH"/:$LD_LIBRARY_PATH"

exec "./"$GAMENAME"."$ARCH "$@"
12 changes: 12 additions & 0 deletions Plugins/Steamworks.NET/redist/linux/launchscriptuniversal
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

GAMENAME="REPLACEWITHYOURGAMENAME"
ARCH=`uname -m`

if [ "$ARCH" != "x86_64" ]; then
ARCH="x86"
fi

export LD_LIBRARY_PATH="./"$GAMENAME"_Data/Plugins/"$ARCH"/:$LD_LIBRARY_PATH"

exec "./"$GAMENAME"."$ARCH "$@"
Binary file added Plugins/Steamworks.NET/redist/steam_api64.dll
Binary file not shown.
Binary file modified Plugins/x86/libCSteamworks.so
Binary file not shown.
Binary file added Plugins/x86_64/CSteamworks.dll
Binary file not shown.
Binary file added Plugins/x86_64/libCSteamworks.so
Binary file not shown.
Binary file added Plugins/x86_64/libsteam_api.so
Binary file not shown.

0 comments on commit fcaf938

Please sign in to comment.