@@ -61,86 +61,21 @@ jobs:
6161
6262 - name : Cross-Compile, Optimize, and Compress
6363 env :
64- URL_386 : " https://github.com/ip7z/7zip/releases/download/26.01/7z2601 -linux-x86.tar.xz"
65- URL_AMD64 : " https://github.com/ip7z/7zip/releases/download/26.01/7z2601 -linux-x64.tar.xz"
66- URL_ARM64 : " https://github.com/ip7z/7zip/releases/download/26.01/7z2601 -linux-arm64.tar.xz"
64+ URL_386 : " https://github.com/ip7z/7zip/releases/download/26.02/7z2602 -linux-x86.tar.xz"
65+ URL_AMD64 : " https://github.com/ip7z/7zip/releases/download/26.02/7z2602 -linux-x64.tar.xz"
66+ URL_ARM64 : " https://github.com/ip7z/7zip/releases/download/26.02/7z2602 -linux-arm64.tar.xz"
6767 run : |
6868 mkdir -p ./public
6969
7070 NAME="7z-GUI-Linux"
7171
7272 archs=("amd64" "386" "arm64")
73+ servers=("x11" "wayland")
7374
7475 for arch in "${archs[@]}"; do
75- echo "Building for Linux ${arch}"
76-
77- # Setup Staging Areas
78- STAGING_DIR="./staging"
79- STAGING_DEBUG_DIR="./debug-staging"
80- rm -rf "${STAGING_DIR}" "${STAGING_DEBUG_DIR}"
81- mkdir -p "${STAGING_DIR}" "${STAGING_DEBUG_DIR}"
82-
83- echo "------------ fyne-cross working... ------------"
84- echo "------------ RELEASE BUILD... ------------"
85- # we have removed -s and -w from ldflags for now as fyne-cross has issues passing ldflags to Go
86- # -release flag doesn't work. https://github.com/fyne-io/fyne-cross/issues/272
87- fyne-cross linux \
88- --arch ${arch} \
89- --env GOTOOLCHAIN=auto \
90- --tags "no_emoji,no_animations,no_metadata" \
91- --icon "assets/logo.png" \
92- --name "${NAME}"
93-
94- echo "--- Directory structure for fyne-cross: ---"
95- ls -R fyne-cross
96- echo "--- End of directory structure ---"
97-
98- # fyne-cross names the binary after name of the folder in which main package is
99- RAW_BINARY_OUTPUT="./fyne-cross/bin/linux-${arch}/7z-gui-linux"
100-
101- echo "Checking if release binary exists before proceeding"
102- if [ ! -f "${RAW_BINARY_OUTPUT}" ]; then
103- echo "Error: Release binary for ${arch} not found at ${RAW_BINARY_OUTPUT}"
104- exit 1
105- fi
106-
107- # Move release binary to staging
108- mv "${RAW_BINARY_OUTPUT}" "${STAGING_DIR}/${NAME}"
109- echo "Done: Release binary moved to staging."
110-
111- #echo "------------ DEBUG build... ------------"
112- #fyne-cross linux \
113- # --arch ${arch} \
114- # --env GOTOOLCHAIN=auto \
115- # --icon "assets/logo.png" \
116- # --ldflags="-X=main.version=${{ env.GIT_TAG }}" \
117- # --name "${NAME}-debug"
118-
119- # see the folder structure
120- #ls -R fyne-cross
121-
122- #echo "Checking if debug binary exists before proceeding"
123- # NOTE: The binary is still named $NAME because --name only changes Fyne's app metadata, not the executable file name
124- #if [ ! -f "${RAW_BINARY_OUTPUT}" ]; then
125- # echo "Error: Debug binary for ${arch} not found at ${RAW_BINARY_OUTPUT}"
126- # exit 1
127- #fi
128-
129- # Move debug binary to its staging directory, manually renaming it to have the -debug suffix
130- #mv "${RAW_BINARY_OUTPUT}" "${STAGING_DEBUG_DIR}/${NAME}-debug"
131- #echo "Done: Debug binary moved to debug-staging."
132- echo "------------ fyne-cross worked hard. ------------"
133-
134- echo "Copy supporting files"
135- cp ./dist/release/install.sh "${STAGING_DIR}/" || true
136- cp ./dist/release/update.sh "${STAGING_DIR}/" || true
137- cp ./dist/release/uninstall.sh "${STAGING_DIR}/" || true
138- cp ./README.md "${STAGING_DIR}/" || true
139- cp ./assets/logo.png "${STAGING_DIR}/${NAME}.png" || true
140- cp ./dist/release/7z-GUI-Linux.desktop "${STAGING_DIR}/" || true
141- echo "Done"
142-
76+ echo "========================================================"
14377 echo "Downloading 7zzs for architecture: ${arch}"
78+ echo "========================================================"
14479 case $arch in
14580 "386")
14681 DL_URL="${URL_386}"
@@ -153,38 +88,89 @@ jobs:
15388 ;;
15489 esac
15590
156- # Download the archive (-f fails silently on server errors, -L follows redirects)
91+ # Download and extract 7zzs once per architecture
15792 curl -f -L "${DL_URL}" -o "downloaded_7z_${arch}.tar.xz"
158-
159- # Extract it to a temporary directory
160- mkdir -p temp_extract
161- tar -xf "downloaded_7z_${arch}.tar.xz" -C temp_extract
162-
163- # Find 7zzs file and copy it to STAGING_DIR (futureproofing with find, in case it's in a nested folder in future)
164- find temp_extract -type f -name "7zzs" -exec cp {} "${STAGING_DIR}/" \;
165- find temp_extract -type f -iname "license*" -exec cp {} "${STAGING_DIR}/7-zip.license" \;
166-
167- # Make the binary executable
168- chmod +x "${STAGING_DIR}/7zzs"
169-
170- # Clean up download files before compression
171- rm -rf temp_extract "downloaded_7z_${arch}.tar.xz"
172- echo "7zzs added to Staging Area successfully."
173-
174- echo "Create Archive"
175- TAR_NAME="${NAME}-${arch}-${{ env.GIT_TAG }}.tar.xz"
176- echo "Compressing to ${TAR_NAME}..."
177- tar -cJf "./public/${TAR_NAME}" -C "${STAGING_DIR}" .
178- #tar -cJf "./public/debug-build-${TAR_NAME}" -C "${STAGING_DEBUG_DIR}" .
179- sha256sum "./public/${TAR_NAME}" > "./public/${TAR_NAME}.sha256"
180- #sha256sum "./public/debug-build-${TAR_NAME}" > "./public/debug-build-${TAR_NAME}.sha256"
181- echo "Done"
182-
183- # Cleanup for next iteration
184- echo "Cleaning up ${arch} files..."
185- rm -rf "${STAGING_DIR}"
186- rm -rf "./fyne-cross/bin/linux-${arch}"
187- echo "Done"
93+ mkdir -p "temp_extract_${arch}"
94+ tar -xf "downloaded_7z_${arch}.tar.xz" -C "temp_extract_${arch}"
95+
96+ for server in "${servers[@]}"; do
97+ echo "--------------------------------------------------------"
98+ echo "Building for Linux ${arch} (${server})"
99+ echo "--------------------------------------------------------"
100+
101+ # Dynamic Tags setup
102+ TAGS="no_emoji,no_animations,no_metadata"
103+ if [ "${server}" = "wayland" ]; then
104+ TAGS="wayland,no_emoji,no_animations,no_metadata"
105+ fi
106+
107+ # Setup Staging Areas
108+ STAGING_DIR="./staging"
109+ STAGING_DEBUG_DIR="./debug-staging"
110+ rm -rf "${STAGING_DIR}" "${STAGING_DEBUG_DIR}"
111+ mkdir -p "${STAGING_DIR}" "${STAGING_DEBUG_DIR}"
112+
113+ echo "------------ fyne-cross working... ------------"
114+ echo "------------ RELEASE BUILD... ------------"
115+ # we have removed -s and -w from ldflags for now as fyne-cross has issues passing ldflags to Go
116+ # -release flag doesn't work. https://github.com/fyne-io/fyne-cross/issues/272
117+ fyne-cross linux \
118+ --arch ${arch} \
119+ --env GOTOOLCHAIN=auto \
120+ --tags "${TAGS}" \
121+ --icon "assets/logo.png" \
122+ --name "${NAME}"
123+
124+ echo "--- Directory structure for fyne-cross: ---"
125+ ls -R fyne-cross
126+ echo "--- End of directory structure ---"
127+
128+ # fyne-cross names the binary after name of the folder in which main package is
129+ RAW_BINARY_OUTPUT="./fyne-cross/bin/linux-${arch}/7z-gui-linux"
130+
131+ echo "Checking if release binary exists before proceeding"
132+ if [ ! -f "${RAW_BINARY_OUTPUT}" ]; then
133+ echo "Error: Release binary for ${arch} (${server}) not found at ${RAW_BINARY_OUTPUT}"
134+ exit 1
135+ fi
136+
137+ # Move release binary to staging
138+ mv "${RAW_BINARY_OUTPUT}" "${STAGING_DIR}/${NAME}"
139+ echo "Done: Release binary moved to staging."
140+
141+ echo "------------ fyne-cross worked hard. ------------"
142+
143+ echo "Copy supporting files"
144+ cp ./dist/release/install.sh "${STAGING_DIR}/" || true
145+ cp ./dist/release/update.sh "${STAGING_DIR}/" || true
146+ cp ./dist/release/uninstall.sh "${STAGING_DIR}/" || true
147+ cp ./README.md "${STAGING_DIR}/" || true
148+ cp ./assets/logo.png "${STAGING_DIR}/${NAME}.png" || true
149+ cp ./dist/release/7z-GUI-Linux.desktop "${STAGING_DIR}/" || true
150+ echo "Done"
151+
152+ # Copy downloaded 7zzs files from pre-extracted folder
153+ # Find 7zzs file and copy it to STAGING_DIR (futureproofing with find, in case it's in a nested folder in future)
154+ find "temp_extract_${arch}" -type f -name "7zzs" -exec cp {} "${STAGING_DIR}/" \;
155+ find "temp_extract_${arch}" -type f -iname "license*" -exec cp {} "${STAGING_DIR}/7-zip.license" \;
156+ chmod +x "${STAGING_DIR}/7zzs"
157+
158+ echo "Create Archive"
159+ TAR_NAME="${NAME}-${server}-${arch}-${{ env.GIT_TAG }}.tar.xz"
160+ echo "Compressing to ${TAR_NAME}..."
161+ tar -cJf "./public/${TAR_NAME}" -C "${STAGING_DIR}" .
162+ sha256sum "./public/${TAR_NAME}" > "./public/${TAR_NAME}.sha256"
163+ echo "Done"
164+
165+ # Cleanup for next server iteration
166+ echo "Cleaning up staging and build files for ${arch} (${server})..."
167+ rm -rf "${STAGING_DIR}"
168+ rm -rf "./fyne-cross/bin/linux-${arch}"
169+ echo "Done"
170+ done
171+
172+ # Cleanup 7z download for this architecture
173+ rm -rf "temp_extract_${arch}" "downloaded_7z_${arch}.tar.xz"
188174 done
189175
190176 - name : Output the files structure into a JSON file
@@ -217,9 +203,13 @@ jobs:
217203 Thank you for using this tool!
218204
219205 **Installation:**
220- - Download the `.tar.xz` for your architecture below.
206+
207+ - Download the `.tar.xz` for your display server (x11 or wayland) and architecture below.
208+
221209 - Make the `install.sh` script executable (right click -> properties -> permissions -> Make executable).
210+
222211 - Double click `install.sh` to install.
212+
223213 - You now have 7z-GUI-Linux installed!
224214
225215 Star this repo if you find this tool useful!
0 commit comments