mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 11:06:06 -04:00
Fix update script on linux not restarting launcher.
This commit is contained in:
parent
869b4132be
commit
357b20619a
@ -106,13 +106,12 @@ namespace ClassicalSharp {
|
||||
}
|
||||
|
||||
public override void MoveTo( int newX, int newY ) {
|
||||
int deltaX = newX - X;
|
||||
int deltaY = newY - Y;
|
||||
int dx = newX - X, dy = newY - Y;
|
||||
X = newX; Y = newY;
|
||||
chatCaretTexture.X1 += deltaX;
|
||||
chatCaretTexture.Y1 += deltaY;
|
||||
chatInputTexture.X1 += deltaX;
|
||||
chatInputTexture.Y1 += deltaY;
|
||||
chatCaretTexture.X1 += dx;
|
||||
chatCaretTexture.Y1 += dy;
|
||||
chatInputTexture.X1 += dx;
|
||||
chatInputTexture.Y1 += dy;
|
||||
}
|
||||
|
||||
static bool IsInvalidChar( char c ) {
|
||||
|
@ -58,7 +58,6 @@ namespace ClassicalSharp {
|
||||
api.AlphaTest = true;
|
||||
LocalPlayer localP = game.LocalPlayer;
|
||||
Vector3 eyePos = localP.EyePosition;
|
||||
Vector3 dir = Utils.GetDirVector( localP.HeadYawRadians, localP.PitchRadians );
|
||||
closestId = 255;
|
||||
|
||||
if( NamesMode != NameMode.AllNames )
|
||||
|
@ -38,8 +38,6 @@ namespace ClassicalSharp.Particles {
|
||||
rec.V1 = baseRec.V1 + rnd.Next( minV, maxUsedV ) * vScale;
|
||||
rec.U2 = Math.Min( baseRec.U1 + maxU * uScale, rec.U1 + 4 * uScale ) - 0.01f * uScale;
|
||||
rec.V2 = Math.Min( baseRec.V1 + maxV * vScale, rec.V1 + 4 * vScale ) - 0.01f * vScale;
|
||||
int pixU1 = (int)(rec.U1 / uScale), pixU2 = (int)(rec.U2 / uScale);
|
||||
int pixV1 = (int)(rec.V1 / vScale), pixV2 = (int)(rec.V2 / vScale);
|
||||
double life = 0.3 + rnd.NextDouble() * 0.7;
|
||||
|
||||
TerrainParticle p = AddParticle( terrainParticles, ref terrainCount, false );
|
||||
|
@ -28,7 +28,7 @@ namespace ClassicalSharp {
|
||||
|
||||
Game game;
|
||||
IGraphicsApi api;
|
||||
int _1Dcount = 1, _1DUsed = 1;
|
||||
int _1DUsed = 1;
|
||||
ChunkMeshBuilder builder;
|
||||
BlockInfo info;
|
||||
|
||||
@ -41,7 +41,6 @@ namespace ClassicalSharp {
|
||||
|
||||
public MapRenderer( Game game ) {
|
||||
this.game = game;
|
||||
_1Dcount = game.TerrainAtlas1D.TexIds.Length;
|
||||
_1DUsed = game.TerrainAtlas1D.CalcMaxUsedRow( game.TerrainAtlas, game.BlockInfo );
|
||||
RecalcBooleans( true );
|
||||
|
||||
@ -89,9 +88,8 @@ namespace ClassicalSharp {
|
||||
}
|
||||
|
||||
void TerrainAtlasChanged( object sender, EventArgs e ) {
|
||||
_1Dcount = game.TerrainAtlas1D.TexIds.Length;
|
||||
bool fullResetRequired = elementsPerBitmap != game.TerrainAtlas1D.elementsPerBitmap;
|
||||
if( fullResetRequired )
|
||||
bool refreshRequired = elementsPerBitmap != game.TerrainAtlas1D.elementsPerBitmap;
|
||||
if( refreshRequired )
|
||||
Refresh();
|
||||
|
||||
elementsPerBitmap = game.TerrainAtlas1D.elementsPerBitmap;
|
||||
|
@ -3,6 +3,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using ClassicalSharp.TexturePack;
|
||||
|
||||
namespace Launcher2.Updater {
|
||||
@ -14,8 +15,8 @@ namespace Launcher2.Updater {
|
||||
byte[] zipData = client.DownloadData( UpdateCheckTask.UpdatesUri + dir );
|
||||
MakeUpdatesFolder( zipData );
|
||||
}
|
||||
if( !OpenTK.Configuration.RunningOnWindows ) return;
|
||||
LaunchUpdateScript();
|
||||
Thread.Sleep( 200 );
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
|
||||
@ -32,10 +33,8 @@ namespace Launcher2.Updater {
|
||||
int code = chmod( path, (flags << 6) | (flags << 3) | 4 );
|
||||
if( code != 0 )
|
||||
throw new InvalidOperationException( "chmod returned : " + code );
|
||||
info = new ProcessStartInfo( "/bin/bash", "-c " + path );
|
||||
info = new ProcessStartInfo( "xterm", '"' + path + '"');
|
||||
}
|
||||
// TODO: delete directory
|
||||
// TODO: why no start new window?
|
||||
info.CreateNoWindow = false;
|
||||
info.UseShellExecute = false;
|
||||
Process.Start( info );
|
||||
|
@ -49,16 +49,14 @@ echo Extracting files from CS_Update folder
|
||||
UPDATEDIR=""`pwd`/CS_Update/""
|
||||
find ""$UPDATEDIR"" -name '*.*' | xargs cp -t `pwd`
|
||||
|
||||
rm -r ""$UPDATEDIR""
|
||||
echo Starting launcher again
|
||||
if [ -f ""Launcher.exe"" ];
|
||||
then
|
||||
mono Launcher.exe &
|
||||
mono Launcher.exe
|
||||
else
|
||||
mono Launcher2.exe &
|
||||
mono Launcher2.exe
|
||||
fi
|
||||
disown
|
||||
echo Waiting
|
||||
sleep 10
|
||||
";
|
||||
}
|
||||
}
|
||||
|
@ -213,9 +213,7 @@ namespace OpenTK.Platform.X11 {
|
||||
|
||||
public static IntPtr CreatePixmapFromImage(Display display, System.Drawing.Bitmap image)
|
||||
{
|
||||
int width = image.Width;
|
||||
int height = image.Height;
|
||||
int size = width * height;
|
||||
int width = image.Width, height = image.Height;
|
||||
|
||||
System.Drawing.Imaging.BitmapData data = image.LockBits(new System.Drawing.Rectangle(0, 0, width, height),
|
||||
System.Drawing.Imaging.ImageLockMode.ReadOnly,
|
||||
|
@ -56,7 +56,6 @@ namespace OpenTK.Platform.X11 {
|
||||
|
||||
IntPtr net_wm_icon;
|
||||
IntPtr net_frame_extents;
|
||||
IntPtr motif_wm_hints;
|
||||
|
||||
static readonly IntPtr xa_cardinal = (IntPtr)6;
|
||||
static readonly IntPtr _remove = (IntPtr)0;
|
||||
@ -190,7 +189,6 @@ namespace OpenTK.Platform.X11 {
|
||||
net_wm_state_maximized_vertical = API.XInternAtom(window.Display, "_NET_WM_STATE_MAXIMIZED_VERT", false);
|
||||
net_wm_icon = API.XInternAtom(window.Display, "_NEW_WM_ICON", false);
|
||||
net_frame_extents = API.XInternAtom(window.Display, "_NET_FRAME_EXTENTS", false);
|
||||
motif_wm_hints = API.XInternAtom(window.Display, "_MOTIF_WM_HINTS", true);
|
||||
}
|
||||
|
||||
void SetWindowMinMax(short min_width, short min_height, short max_width, short max_height) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user