Skip to content

Commit

Permalink
Update build scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Apr 13, 2024
1 parent 586a69c commit 6351c9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 44 deletions.
22 changes: 1 addition & 21 deletions utils/build/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ git pull

PROG=sw
EXE=sw.client.sw-1.0.0
GUI=sw.client.sw.gui-0.4.0
COMPILER="-compiler gcc"

function run {
Expand All @@ -16,38 +15,19 @@ function run {
PLATFORM=$1
shift

DIR=~/Nextcloud/sw/$PLATFORM/$ARCH
BUILD_TYPE=r # rwdi is too big for github
CFG=${ARCH}_${BUILD_TYPE}
OUT=.sw/out/$CFG

$PROG build -sd -sfc -static -config ${BUILD_TYPE} $COMPILER -platform $ARCH -config-name $CFG $* #-Dwith-gui=true
mkdir -p $DIR

REMOTE_DIR=sw/client_sync/$PLATFORM/$ARCH
ssh sw "mkdir -p $REMOTE_DIR"

$PROG build -sd -sfc -static -config ${BUILD_TYPE} $COMPILER -platform $ARCH -config-name $CFG $*
chmod 755 $OUT/$EXE
7z a sw.7z $OUT/$EXE
cp sw.7z $DIR/
scp sw.7z sw:$REMOTE_DIR
rm sw.7z

if [ "$ARCH" = "${BASE_PLATFORM}" ]; then
#sudo rm /usr/local/bin/sw
sudo cp $OUT/$EXE /usr/local/bin/sw
sudo chmod 755 /usr/local/bin/sw
sw setup
fi

#return

#$PROG build -sd -static -config ${BUILD_TYPE} $COMPILER -platform $ARCH -config-name $CFG $* -Dwith-gui=true
chmod 755 $OUT/$GUI
7z a swgui.7z $OUT/$GUI
cp swgui.7z $DIR/
scp swgui.7z sw:$REMOTE_DIR
rm swgui.7z
}

BASE_PLATFORM=x86_64
Expand Down
26 changes: 3 additions & 23 deletions utils/build/macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ git pull

PROG=sw
EXE=sw.client.sw-1.0.0
GUI=sw.client.sw.gui-0.4.0
COMPILER=

function run {
Expand All @@ -16,37 +15,18 @@ function run {
PLATFORM=$1
shift

DIR=~/Nextcloud/sw/$PLATFORM/$ARCH
BUILD_TYPE=r #rwdi is too big for github
BUILD_TYPE=r # rwdi is too big for github
CFG=${ARCH}_${BUILD_TYPE}
OUT=.sw/out/$CFG

REMOTE_DIR=sw/client_sync/$PLATFORM/$ARCH
ssh sw "mkdir -p $REMOTE_DIR"

$PROG build -sd -static -config ${BUILD_TYPE} $COMPILER -platform $ARCH -config-name $CFG $* -Dwith-gui=true -sfc
mkdir -p $DIR

$PROG build -sd -sfc -static -config ${BUILD_TYPE} $COMPILER -platform $ARCH -config-name $CFG $*
chmod 755 $OUT/$EXE
7zz a sw.7z $OUT/$EXE
cp sw.7z $DIR/
scp sw.7z sw:$REMOTE_DIR
rm sw.7z

if [ "$ARCH" = "${BASE_PLATFORM}" ]; then
sudo rm /usr/local/bin/sw
sudo cp $OUT/$EXE /usr/local/bin/sw
fi

#return

chmod 755 $OUT/$GUI
7zz a swgui.7z $OUT/$GUI
cp swgui.7z $DIR/
scp swgui.7z sw:$REMOTE_DIR
rm swgui.7z
}

BASE_PLATFORM=arm64
run x86_64 macos -os macos-11 $* # goes first because we might update abi and will not able to build next version until deps are uploaded
run arm64 macos -os macos-12.0 $*
run arm64 macos -os macos-13.0 $*

0 comments on commit 6351c9b

Please sign in to comment.