Skip to content

Commit e4c9c29

Browse files
committed
Fix package generation when building with the scripts
1 parent fe7a7f4 commit e4c9c29

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

gen-deb.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Package: sunshine
3737
Architecture: amd64
3838
Maintainer: @loki
3939
Priority: optional
40-
Version: 0.11.0
40+
Version: 0.11.1
4141
Depends: libssl1.1, libavdevice58, libboost-thread1.67.0 | libboost-thread1.71.0 | libboost-thread1.74.0, libboost-filesystem1.67.0 | libboost-filesystem1.71.0 | libboost-filesystem1.74.0, libboost-log1.67.0 | libboost-log1.71.0 | libboost-log1.74.0, libpulse0, libopus0, libxcb-shm0, libxcb-xfixes0, libxtst6, libevdev2, libdrm2, libcap2
4242
Description: Gamestream host for Moonlight
4343
EOF

scripts/build-container.sh

+10-6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ usage() {
77
echo " | build --> Build the container, Dockerfile is mandatory"
88
echo " | compile --> Builds the container, then compiles it. Dockerfile is mandatory"
99
echo ""
10+
echo " -s: path: The path to the source for compilation"
1011
echo " -n: name: Docker container name --> default [sunshine]"
1112
echo " --> all: Build/Compile/Delete all available docker containers"
1213
echo " -f: Dockerfile: The name of the docker file"
@@ -113,25 +114,28 @@ compile() {
113114
do
114115
CURRENT_CONTAINER="sunshine-$(echo $file | cut -c 14-)"
115116

116-
echo "$PWD/build-sunshine.sh -p -n $CURRENT_CONTAINER"
117-
"$PWD/build-sunshine.sh" -p -n "$CURRENT_CONTAINER"
117+
echo "$PWD/build-sunshine.sh -p -n $CURRENT_CONTAINER $SUNSHINE_SOURCES"
118+
"$PWD/build-sunshine.sh" -p -n "$CURRENT_CONTAINER" $SUNSHINE_SOURCES
118119
done
119120
shopt -u nullglob #revert nullglob back to it's normal default state
120121
else
121122
# If container exists
122-
if docker inspect "$CURRENT_CONTAINER" > /dev/null 2> /dev/null
123+
if docker inspect "$CONTAINER_NAME" > /dev/null 2> /dev/null
123124
then
124-
echo "$PWD/build-sunshine.sh -p -n $CONTAINER_NAME"
125-
"$PWD/build-sunshine.sh" -p -n "$CONTAINER_NAME"
125+
echo "$PWD/build-sunshine.sh -p -n $CONTAINER_NAME $SUNSHINE_SOURCES"
126+
"$PWD/build-sunshine.sh" -p -n "$CONTAINER_NAME" $SUNSHINE_SOURCES
126127
else
127128
echo "Error: container image [$CONTAINER_NAME] doesn't exist"
128129
exit 9
129130
fi
130131
fi
131132
}
132133

133-
while getopts ":c:hn:f:" arg; do
134+
while getopts ":c:hn:f:s:" arg; do
134135
case ${arg} in
136+
s)
137+
SUNSHINE_SOURCES="-s $OPTARG"
138+
;;
135139
c)
136140
COMMAND=$(echo $OPTARG | tr '[:lower:]' '[:upper:]')
137141
;;

scripts/build-sunshine.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,10 @@ done
8484
[ "$USERNAME" = "" ] && USERNAME=$(logname)
8585

8686
BUILD_DIR="$PWD/$CONTAINER_NAME-build"
87-
SUNSHINE_ASSETS_DIR="-e SUNSHINE_ASSETS_DIR=$BUILD_DIR/assets"
88-
SUNSHINE_EXECUTABLE_PATH="-e SUNSHINE_EXECUTABLE_PATH=$BUILD_DIR/sunshine"
87+
[ "$SUNSHINE_ASSETS_DIR" = "" ] && SUNSHINE_ASSETS_DIR="-e SUNSHINE_ASSETS_DIR=$BUILD_DIR/assets"
88+
[ "$SUNSHINE_EXECUTABLE_PATH" = "" ] && SUNSHINE_EXECUTABLE_PATH="-e SUNSHINE_EXECUTABLE_PATH=$BUILD_DIR/sunshine"
8989

90+
echo "docker run $DOCKER_INTERACTIVE --privileged $SUNSHINE_ROOT $CMAKE_ROOT $SUNSHINE_ASSETS_DIR $SUNSHINE_EXECUTABLE_PATH $CMAKE_BUILD_TYPE --name $CONTAINER_NAME $CONTAINER_NAME"
9091
docker run $DOCKER_INTERACTIVE --privileged $SUNSHINE_ROOT $CMAKE_ROOT $SUNSHINE_ASSETS_DIR $SUNSHINE_EXECUTABLE_PATH $CMAKE_BUILD_TYPE --name $CONTAINER_NAME $CONTAINER_NAME
9192

9293
exit_code=$?

0 commit comments

Comments
 (0)