File get-source.sh of Package HeroicGamesLauncher
#!/bin/bash
# must be installed:
# < 2.15.0: yarn, husky, electron-builder
# >= 2.15.0: pnpm, husky, electron-builder
echo ""
echo "============================"
#echo "Info:npm modules yarn, husky, vite and electron-builder must be installed global before."
echo "Important Info!"
echo "npm modules esbuild, pnpm, husky, vite and electron, electron-builder, electron-vite, undici, node-gyp must be installed global before."
echo "Install local with: sudo npm install -g --save-dev electron-builder and so on."
echo "Specific version ca be install with: sudo npm install -g --save-dev electron-builder@24.13.3"
echo "And since V2.17.0 you need also nodejs >= 22, gcc13, gcc13-c++ and python >= 3.11 better python >= 3.12"
echo "Make sure that all node modules which must have executable, are executable."
echo "============================"
echo ""
#echo "Download src ($HEROICVERSION)..."
#echo "============================"
osc service mr
HEROICVERSION=`grep ^Version: HeroicGamesLauncher.spec | awk '" " { print $2 }'`
echo ""
echo "Download src again with submodules ($HEROICVERSION)..."
echo "Dont know how download submodules wit obs service."
echo "======================================================"
rm -rf HeroicGamesLauncher
rm -f HeroicGamesLauncher-$HEROICVERSION.tar.gz
git clone --branch v$HEROICVERSION https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher.git --recurse-submodules
mv HeroicGamesLauncher HeroicGamesLauncher-$HEROICVERSION
cd HeroicGamesLauncher-$HEROICVERSION
echo ""
echo "Generate development environment..."
echo "==================================="
pnpm install
pnpm download-helper-binaries
echo ""
echo "Generate Sourcefile..."
echo "======================"
cd ..
tar -cvzf HeroicGamesLauncher-$HEROICVERSION.tar.gz HeroicGamesLauncher-$HEROICVERSION
echo ""
#echo "Generate heroic.tar.xz with yarn dist:linux tar.xz..."
echo "Generate/Build heroic.tar.xz with pnpm dist:linux tar.xz..."
cd HeroicGamesLauncher-$HEROICVERSION
#yarn
#yarn dist:linux tar.xz
##esbuild --bundle --platform=node --target=node21 meta/downloadHelperBinaries.ts | node
pnpm dist:linux tar.xz
cp dist/Heroic-*.tar.xz ../
cd ..
echo "Clean up..."
rm -rf HeroicGamesLauncher
#rm -f HeroicGamesLauncher-*.tar.gz