Skip to content

Commit f679f9c

Browse files
committed
chore
1 parent b7d940e commit f679f9c

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#define LOGD(fmt, ...) /* fprintf(stdout, OBF(fmt "\n"), ##__VA_ARGS__) */
3434
#define LOGE(fmt, ...) fprintf(stderr, OBF(fmt "\n"), ##__VA_ARGS__)
3535

36-
inline int is_big_endian() {
36+
FORCE_INLINE int is_big_endian() {
3737
int i = 1;
3838
return ! *((char*) &i);
3939
}

ssc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ if [ -n "$SHOW_USAGE" -o $# != 2 ]; then
5454
exit 0
5555
fi
5656

57-
DIR="$(dirname "$0")/src"
57+
SRC_DIR="$(dirname "$0")/src"
5858
[ -z "$CXX" ] && CXX=${CROSS_COMPILE}g++
5959
[ -z "$LD" ] && LD=${CROSS_COMPILE}ld
6060
[ -z "$STRIP" ] && STRIP=${CROSS_COMPILE}strip
@@ -127,12 +127,12 @@ if [ "$(head -c2 "$1")" = "#!" ]; then
127127
fi
128128

129129
# cleanup on exit
130-
trap "rm -f \"$1.cpp\" i.o i s.o s rc4 crc32 d.squashfs" EXIT
130+
trap "rm -f \"$1.cpp\" i.o i s.o s rc4 crc32 d.sfs" EXIT
131131

132132
echo '=> build rc4 tool...'
133133
[ -n "$RAND_KEY" ] && RC4_KEY="$(perl -e 'printf("%x", rand 16) for 1..8')" || RC4_KEY=ssc@2024
134134
CXXFLAGS="$CXXFLAGS -DRC4_KEY=$RC4_KEY"
135-
g++ -std=$CXX_STANDARD -w "$DIR/rc4.cpp" -o rc4 || exit 1
135+
g++ -std=$CXX_STANDARD -w "$SRC_DIR/rc4.cpp" -o rc4 || exit 1
136136

137137
echo '=> encrypt script...'
138138
[ -n "$SEGMENT" ] || SEGMENT=1
@@ -149,7 +149,7 @@ if [ -n "$EMBED_FILE" ]; then
149149
fi
150150

151151
echo '=> generate c++ code...'
152-
perl -pe "s|SCRIPT_FILE_NAME|$1|g; s@SCRIPT_SHEBANG@$SHEBANG@g" "$DIR/main.cpp" >"$1.cpp" || exit 1
152+
perl -pe "s|SCRIPT_FILE_NAME|$1|g; s@SCRIPT_SHEBANG@$SHEBANG@g" "$SRC_DIR/main.cpp" >"$1.cpp" || exit 1
153153

154154
if [ -n "$EXPIRE_MESSAGE" ]; then
155155
if [ -f "$EXPIRE_MESSAGE" ]; then
@@ -160,22 +160,22 @@ if [ -n "$EXPIRE_MESSAGE" ]; then
160160
fi
161161

162162
echo '=> compile c++ code...'
163-
$CXX -I"$DIR" -std=$CXX_STANDARD $CXXFLAGS "$1.cpp" $LDFLAGS -o "$2" || exit 1
163+
$CXX -I"$SRC_DIR" -std=$CXX_STANDARD $CXXFLAGS "$1.cpp" $LDFLAGS -o "$2" || exit 1
164164
$STRIP "$2"
165165

166166
if [ -n "$SQUASHFS_DATA" ]; then
167167
echo '=> append squashfs to binary...'
168168
if [ -d "$SQUASHFS_DATA" ]; then
169-
mksquashfs "$SQUASHFS_DATA" d.squashfs -root-owned -noappend || exit
170-
cat d.squashfs >>"$2"
169+
mksquashfs "$SQUASHFS_DATA" d.sfs -root-owned -noappend || exit
170+
cat d.sfs >>"$2"
171171
else
172172
cat $SQUASHFS_DATA >>"$2"
173173
fi
174174
fi
175175

176176
if [ -n "$VERIFY_CHECKSUM" ]; then
177177
echo '=> build crc32 tool...'
178-
g++ -std=$CXX_STANDARD -w "$DIR/crc32.cpp" -o crc32 || exit 1
178+
g++ -std=$CXX_STANDARD -w "$SRC_DIR/crc32.cpp" -o crc32 || exit 1
179179
echo '=> write checksum to binary...'
180180
OFFSET="$(LC_ALL=C grep -abo ssccksum "$2" | grep -o '^[0-9]*')"
181181
CKSUM="$(./crc32 "$2")"

0 commit comments

Comments
 (0)