github.com/tooploox/oya@v0.0.21-0.20230524103240-1cda1861aad6/install/Oyafile (about) 1 Import: 2 innosetup: github.com/tooploox/oya-packs/innosetup 3 4 Values: 5 appName: 'Oya' 6 appPublisher: 'Tooploox' 7 appUrl: 'https://oya.sh/' 8 appExe: 'oya.exe' 9 appExe32: 'oya.exe' 10 appUid: 'C06341D8-9A5F-47C9-823C-4A336C83EC7F' 11 12 wineProjectPath: 'Z:\root\project' 13 projectPath: '/root/project' 14 installPath: 'install' 15 distPath: 'dist' 16 17 releasesUrl: "https://github.com/tooploox/oya/releases/download" 18 ghrUrl: "https://github.com/tcnksm/ghr/releases/download/v0.12.1/ghr_v0.12.1_linux_amd64.tar.gz" 19 20 21 fetchBinary: | 22 set -e 23 downloadUrl="${Oya[releasesUrl]}/${CIRCLE_TAG}/" 24 oya64="oya_${CIRCLE_TAG}_windows_amd64.exe" 25 oya32="oya_${CIRCLE_TAG}_windows_386.exe" 26 wget "${downloadUrl}/${oya64}.zip" "${downloadUrl}/${oya32}.zip" 27 unzip "${oya64}.zip"; unzip "${oya32}.zip" 28 mkdir 32bit 29 mv $oya64 ${Oya[appExe]} 30 mv $oya32 32bit/${Oya[appExe]} 31 32 buildInstaller: | 33 set -e 34 projectPath=${Oya[wineProjectPath]} 35 distPath="${projectPath}\\${Oya[distPath]}" 36 sourcePath="${projectPath}\\${Oya[installPath]}\\${Oya[appExe]}" 37 source32Path="${projectPath}\\${Oya[installPath]}\\32bit\\${Oya[appExe]}" 38 setupPath="${projectPath}\\${Oya[installPath]}\\setup.iss" 39 oya render \ 40 --set appVer=$CIRCLE_TAG \ 41 --set distDir=$distPath \ 42 --set sourceDir=$sourcePath \ 43 --set source32Dir=$source32Path \ 44 --set outputFileName="oya_${CIRCLE_TAG}_windows_installer" \ 45 installer_tpl/ 46 oya run innosetup.compile $setupPath 47 48 signInstaller: | 49 set -e 50 # TODO: use our certs this are generated? + secure store. 51 cert="cert/setup.cert" 52 key="cert/setup.key" 53 54 dist="${Oya[projectPath]}/${Oya[distPath]}" 55 in="oya_${CIRCLE_TAG}_windows_installer.exe" 56 out="oya_${CIRCLE_TAG}_windows_installer_signed.exe" 57 58 osslsigncode sign -certs $cert -key $key \ 59 -n "${Oya[appName]}" \ 60 -i ${Oya[appUrl]} \ 61 -t http://timestamp.verisign.com/scripts/timstamp.dll \ 62 -in $dist/$in \ 63 -out $dist/$out 64 65 mv $dist/$out $dist/$in 66 67 releaseInstaller: | 68 set -e 69 wget ${Oya[ghrUrl]} 70 tar zxf ghr*.tar.gz 71 ghr=`find "$(pwd)" -type f -name "ghr"` 72 73 if [ "$CIRCLE_TAG" ]; then 74 dist="${Oya[projectPath]}/${Oya[distPath]}" 75 sha256sum $dist/oya_* | tee "$dist/oya_${CIRCLE_TAG}_windows_installer_SHA256SUMS" 76 $ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace $CIRCLE_TAG $dist 77 else 78 echo "The build is missing Git / CircleCi Tag" 79 fi 80