diff --git a/Makefile b/Makefile index 82c109c49f..bbf0ed5608 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ CSC = gmcs CSFLAGS = -nologo -warn:4 -debug:+ -debug:full -optimize- -codepage:utf8 -unsafe DEFINE = DEBUG;TRACE -PROGRAMS =fileformats gl game ra cnc aftermath seqed mapcvtr editor ralint uploader +PROGRAMS =fileformats gl game ra cnc aftermath seqed mapcvtr editor ralint prefix = /usr/local datarootdir = $(prefix)/share datadir = $(datarootdir) @@ -78,16 +78,10 @@ ralint_KIND = winexe ralint_DEPS = $(fileformats_TARGET) $(game_TARGET) ralint_LIBS = $(COMMON_LIBS) $(ralint_DEPS) -uploader_SRCS = $(shell find OpenRAUploader/ -iname '*.cs') -uploader_TARGET = RAUploader.exe -uploader_KIND = winexe -uploader_LIBS = $(COMMON_LIBS) - - # -platform:x86 .SUFFIXES: -.PHONY: clean all game tool default mods mod_ra mod_aftermath mod_cnc install uninstall editor_res editor ralint uploader seqed mapcvtr +.PHONY: clean all game tool default mods mod_ra mod_aftermath mod_cnc install uninstall editor_res editor ralint seqed mapcvtr game: $(fileformats_TARGET) $(gl_TARGET) $(game_TARGET) $(ra_TARGET) $(cnc_TARGET) $(aftermath_TARGET) @@ -145,11 +139,10 @@ editor_res: resgen2 OpenRA.Editor/Form1.resx OpenRA.Editor.Form1.resources editor: editor_res $(editor_TARGET) ralint: $(ralint_TARGET) -uploader: $(uploader_TARGET) seqed: $(seqed_TARGET) mapcvtr: $(mapcvtr_TARGET) -tools: editor ralint uploader seqed mapcvtr +tools: editor ralint seqed mapcvtr all: game tools define BUILD_ASSEMBLY diff --git a/packaging/uploader.sh b/packaging/uploader.sh new file mode 100755 index 0000000000..776d52f80c --- /dev/null +++ b/packaging/uploader.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# OpenRA Package uploader script +# Usage: uploader.sh +# Will upload as user openra and prompt for a password if it's not defined in ~/.netrc + +PLATFORM=$1 +VERSION=$2 +FILENAME=$3 +FTP="ftp://openra@open-ra.org/httpdocs/releases/${PLATFORM}/" + +if [ ! -e "${FILENAME}" ]; then + echo "File not found: ${FILENAME}" + exit 1 +fi + +SIZE=`ls -lh "${FILENAME}" | awk '{ print $5 }'`B +echo "{\n\t\"version\":\"${VERSION}\",\n\t\"size\":\"${SIZE}\"\n}" > version.json +echo `basename ${FILENAME}` > latest.txt + +ftp "${FTP}" <