kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
Squashed commits '${title}
rodzic
c3cf911642
commit
106662f5dc
|
@ -11,3 +11,4 @@ debian/tmp
|
|||
node_modules
|
||||
package-lock.json
|
||||
.vscode
|
||||
desktop.ini
|
|
@ -86,11 +86,14 @@ win:package:
|
|||
mkdir -p artifacts
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_get[collapsed=true]\r\e[0KGetting Build Dependencies"
|
||||
apt-get update && apt-get upgrade -y
|
||||
apt-get install p7zip -y
|
||||
wget https://nsis.sourceforge.io/mediawiki/images/4/47/Registry.zip
|
||||
unzip Registry.zip
|
||||
mv Desktop/Plugin/registry.dll /usr/share/nsis/Plugins/x86-unicode/
|
||||
mv Desktop/Include/Registry.nsh /usr/share/nsis/Include/
|
||||
rm -Rf Desktop PocketPC Source
|
||||
unzip -bj Registry.zip Desktop/Plugin/registry.dll -d /usr/share/nsis/Plugins/x86-unicode/
|
||||
unzip -bj Registry.zip Desktop/Include/Registry.nsh -d /usr/share/nsis/Include/
|
||||
wget https://nsis.sourceforge.io/mediawiki/images/1/18/NsProcess.zip
|
||||
7zr e NsProcess.zip -y -o/usr/share/nsis/Include/ Include/nsProcess.nsh
|
||||
7zr e NsProcess.zip -y -o/usr/share/nsis/Plugins/x86-unicode/ Plugin/nsProcessW.dll
|
||||
mv /usr/share/nsis/Plugins/x86-unicode/nsProcessW.dll /usr/share/nsis/Plugins/x86-unicode/nsProcess.dll
|
||||
eval $(ssh-agent -s)
|
||||
echo "$NR0Q_PRIV" | tr -d '\r' | ssh-add -
|
||||
mkdir -p ~/.ssh; chmod 700 ~/.ssh
|
||||
|
@ -104,13 +107,7 @@ win:package:
|
|||
npm install --prefer-offline
|
||||
npm run dist-win
|
||||
for dir in dist/*-win-* ; do
|
||||
if [ -d $dir ] ; then
|
||||
rm $dir/locales/*.info
|
||||
mkdir $dir/package.nw
|
||||
for file in package.nw/* ; do
|
||||
mv $dir/`basename $file` $dir/package.nw
|
||||
done
|
||||
elif [ -f $dir ] && [[ "$dir" == *"win-x86-Setup.exe"* ]] ; then
|
||||
if [ -f $dir ] && [[ "$dir" == *"-Setup.exe" ]] ; then
|
||||
echo "deleting broken installer $dir"
|
||||
rm $dir
|
||||
fi
|
||||
|
@ -119,14 +116,12 @@ win:package:
|
|||
# using mono signcode
|
||||
signcode -spc codecert.spc -t http://time.certum.pl/ -a sha256 dist/GridTracker-*-win-*/*.exe
|
||||
# Now the executable should be signed
|
||||
sed "s#GridTracker-\${VERSION}-win-x86/#`pwd`/dist/GridTracker-\${VERSION}-win-x86/#g" windows/setup.nsi.tmpl > windows/setup.nsi.tmp.1
|
||||
sed "s#GridTracker-Installer.#`pwd`/dist/GridTracker-Installer.#g" windows/setup.nsi.tmp.1 > windows/setup.nsi.tmp.2
|
||||
sed "s#define VERSION <placeholder#define VERSION `node version.js`#g" windows/setup.nsi.tmp.2 > windows/setup.nsi
|
||||
sed "s#<versionplaceholder>#`node version.js`#g" windows/win_installer.nsi > windows/setup.nsi.tmp.1
|
||||
sed "s#<buildplaceholder>#`pwd`#g" windows/setup.nsi.tmp.1 > windows/setup.nsi
|
||||
makensis windows/setup.nsi
|
||||
# clean up generated files
|
||||
rm windows/setup.nsi
|
||||
rm windows/setup.nsi.tmp.1
|
||||
rm windows/setup.nsi.tmp.2
|
||||
signcode -spc codecert.spc -t http://time.certum.pl/ -a sha256 dist/GridTracker-Installer.*.exe
|
||||
(cd dist ; mv GridTracker-Installer.*.exe ../artifacts)
|
||||
echo -e "\e[0Ksection_end:`date +%s`:native_build\e[0K"
|
||||
|
|
|
@ -15,26 +15,18 @@ for dir in dist/*-linux-* ; do
|
|||
fi
|
||||
done
|
||||
for dir in dist/*-win-* ; do
|
||||
if [ -d $dir ] ; then
|
||||
mkdir $dir/package.nw
|
||||
for file in package.nw/* ; do
|
||||
mv $dir/`basename $file` $dir/package.nw
|
||||
done
|
||||
elif [ -f $dir ] && [[ "$dir" == *"win-x86-Setup.exe"* ]] ; then
|
||||
if [ -f $dir ] && [[ "$dir" == *"-Setup.exe" ]] ; then
|
||||
echo "deleting broken installer $dir"
|
||||
rm $dir
|
||||
fi
|
||||
done
|
||||
|
||||
sed "s#GridTracker-\${VERSION}-win-x86/#`pwd`/dist/GridTracker-\${VERSION}-win-x86/#g" windows/setup.nsi.tmpl > windows/setup.nsi.tmp.1
|
||||
sed "s#GridTracker-Installer.#`pwd`/dist/GridTracker-Installer.#g" windows/setup.nsi.tmp.1 > windows/setup.nsi.tmp.2
|
||||
sed "s#define VERSION <placeholder#define VERSION `node version.js`#g" windows/setup.nsi.tmp.2 > windows/setup.nsi
|
||||
|
||||
sed "s#<versionplaceholder>#`node version.js`#g" windows/win_installer.nsi > windows/setup.nsi.tmp.1
|
||||
sed "s#<buildplaceholder>#`pwd`#g" windows/setup.nsi.tmp.1 > windows/setup.nsi
|
||||
makensis windows/setup.nsi
|
||||
# clean up generated files
|
||||
rm windows/setup.nsi
|
||||
rm windows/setup.nsi.tmp.1
|
||||
rm windows/setup.nsi.tmp.2
|
||||
|
||||
mv dist/*{.exe,mac-x64.zip,.tar.gz} ../dist
|
||||
rpmbuild -D "version `node ./version.js`" --build-in-place -bb gridtracker.i386.spec
|
||||
|
|
|
@ -756,6 +756,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
id="myTooltip"
|
||||
style="
|
||||
-webkit-user-select: text;
|
||||
user-select: text;
|
||||
background-color: black;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
|
@ -3635,6 +3636,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
<h2>GridTracker is up to date!</h2>
|
||||
<div class="button" onclick="closeUpdateToDateDiv();">OK</div>
|
||||
</div>
|
||||
<div id="selectNodeDiv" style="-webkit-user-select: text; display: block; z-index: -10000"></div>
|
||||
<div id="selectNodeDiv" style="-webkit-user-select: text; user-select: text; display: block; z-index: -10000"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,170 @@
|
|||
/*
|
||||
GridTracker Installation Script
|
||||
*/
|
||||
|
||||
# Installer Attributes
|
||||
RequestExecutionLevel highest
|
||||
SetCompressor /SOLID LZMA
|
||||
Unicode true
|
||||
!include Sections.nsh
|
||||
!include Registry.nsh
|
||||
!include LogicLib.nsh
|
||||
ReserveFile "${NSISDIR}/Plugins/x86-unicode/registry.dll"
|
||||
CRCCheck on
|
||||
|
||||
|
||||
# Define Common Variables
|
||||
!define NAME "GridTracker"
|
||||
!define COMPANY "Gridtracker.org"
|
||||
!define VERSION <versionplaceholder>
|
||||
!define URL "http://gridtracker.org"
|
||||
!define HELPURL "https://gitlab.com/gridtracker.org/gridtracker/-/wikis/Home"
|
||||
!define REGPATH_UNINSTSUBKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}"
|
||||
!define SMPATH "$SMPROGRAMS\${NAME}"
|
||||
!define /date CPYEAR "%Y"
|
||||
!define BUILDPATH "<buildplaceholder>"
|
||||
Name "${NAME} ${VERSION} Installer"
|
||||
Icon "${BUILDPATH}/dist/GridTracker-${VERSION}-win-x86/gridview.ico"
|
||||
OutFile "${BUILDPATH}/dist/GridTracker-Installer.${VERSION}.exe"
|
||||
|
||||
|
||||
VIProductVersion ${VERSION}.0
|
||||
VIAddVersionKey ProductName "${NAME}"
|
||||
VIAddVersionKey ProductVersion "${VERSION}"
|
||||
VIAddVersionKey CompanyName "${COMPANY}"
|
||||
VIAddVersionKey CompanyWebsite "${URL}"
|
||||
VIAddVersionKey FileVersion "${VERSION}"
|
||||
VIAddVersionKey FileDescription "An Amateur Radio Community"
|
||||
VIAddVersionKey LegalCopyright "${CPYEAR} Gridtracker.org"
|
||||
|
||||
|
||||
# Add registry reading plugin early on as we need to see if we are installed already
|
||||
|
||||
# Set Default install dir then look at uninstall key to find if previously installed #
|
||||
InstallDir "$ProgramFiles\${NAME}"
|
||||
|
||||
## For 32 bit installs on 64 bit OS this is located in the WOW6432Node [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall] ##
|
||||
InstallDirRegKey HKLM "${REGPATH_UNINSTSUBKEY}" "InstallPath"
|
||||
|
||||
|
||||
# Pages displayed
|
||||
#Page license
|
||||
Page directory
|
||||
Page components
|
||||
Page instfiles
|
||||
|
||||
# Display license file to user #
|
||||
#LicenseData "LICENSE"
|
||||
|
||||
Function .onInit
|
||||
nsProcess::_FindProcess "GridTracker.exe"
|
||||
Pop $R0
|
||||
${If} $R0 = 0
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION "GridTracker is still running. Please close GridTracker and run the installer again."
|
||||
Abort
|
||||
${EndIf}
|
||||
call checkMSVC
|
||||
FunctionEnd
|
||||
|
||||
Function checkMSVC
|
||||
ClearErrors
|
||||
ReadRegStr $0 HKCR "Installer\Dependencies\VC,redist.x86,x86,14.30,bundle" ""
|
||||
IfErrors 0 +15
|
||||
ClearErrors
|
||||
ReadRegStr $0 HKCR "Installer\Dependencies\Microsoft.VS.VC_RuntimeMinimumVSU_x86,v14" ""
|
||||
IfErrors 0 +12
|
||||
ClearErrors
|
||||
ReadRegStr $0 HKCR "Installer\Dependencies\Microsoft.VS.VC_RuntimeAdditionalVSU_x86,v14" ""
|
||||
IfErrors 0 +9
|
||||
ClearErrors
|
||||
ReadRegStr $0 HKCR "Installer\Products\679E80FBE29B63345BF612177149674C" "PackageCode"
|
||||
IfErrors 0 +6
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION "GridTracker requires MSVC Runtime Libraries. Do you want to install them now?" IDYES InstallNow IDNO Next
|
||||
InstallNow:
|
||||
Call InstallMSVC
|
||||
Goto Next
|
||||
Next:
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function InstallMSVC
|
||||
NSISdl::download "https://aka.ms/vs/17/release/vc_redist.x86.exe" "$TEMP\vc_redist.x86.exe" $0
|
||||
StrCmp $0 success fail
|
||||
success:
|
||||
ExecWait '"$TEMP\vc_redist.x86.exe" /PASSIVE /NORESTART' $1
|
||||
Goto is_reboot_requested
|
||||
fail:
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION "Unable to download MSVC Runtime files. Please see GridTracker.org for details on download"
|
||||
is_reboot_requested:
|
||||
${If} $1 = 1641
|
||||
${OrIf} $1 = 3010
|
||||
SetRebootFlag true
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
InstType "Full"
|
||||
InstType "Minimal"
|
||||
|
||||
Section "Program Files (Required)"
|
||||
SectionIn 1 2 RO
|
||||
SetOverwrite ifdiff
|
||||
|
||||
SetOutPath $InstDir
|
||||
File /r "${BUILDPATH}/dist/GridTracker-${VERSION}-win-x86/*"
|
||||
|
||||
CreateDirectory "${SMPATH}"
|
||||
CreateShortcut "${SMPATH}\${NAME}.lnk" "$InstDir\${NAME}.exe"
|
||||
CreateShortcut "${SMPATH}\Help Wiki.lnk" "${HELPURL}" "" "$InstDir\gridview.ico"
|
||||
CreateShortcut "${SMPATH}\Uninstall.lnk" $INSTDIR\uninstall.exe
|
||||
|
||||
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "DisplayName" "${NAME}"
|
||||
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "DisplayVersion" "${VERSION}"
|
||||
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "Publisher" "${COMPANY}"
|
||||
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "URLInfoAbout" "${URL}"
|
||||
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "DisplayIcon" "$InstDir\gridview.ico"
|
||||
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "UninstallString" '"$InstDir\uninstall.exe"'
|
||||
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "QuietUninstallString" '"$InstDir\uninstall.exe" /S'
|
||||
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "InstallPath" $InstDir
|
||||
WriteRegDWORD HKLM "${REGPATH_UNINSTSUBKEY}" "NoModify" 1
|
||||
WriteRegDWORD HKLM "${REGPATH_UNINSTSUBKEY}" "NoRepair" 1
|
||||
|
||||
WriteUninstaller "$InstDir\uninstall.exe"
|
||||
|
||||
SectionEnd
|
||||
|
||||
# Section for PDF when we have it #
|
||||
/*
|
||||
Section "Offline Help Docs"
|
||||
SectionIn 1
|
||||
SectionEnd
|
||||
*/
|
||||
|
||||
# Section for Locales when we have it #
|
||||
/*
|
||||
SectionGroup "Locales"
|
||||
SetOutPath $INSTDIR\locales
|
||||
Section "de"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section "es"
|
||||
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
*/
|
||||
|
||||
# Give User Option for Desktop Shortcut #
|
||||
Section "Desktop Shortcut"
|
||||
SectionIn 1
|
||||
CreateShortcut /NoWorkingDir "$DESKTOP\${NAME}.lnk" "$InstDir\${NAME}.exe"
|
||||
SectionEnd
|
||||
|
||||
# Uninstall stuffs #
|
||||
Section -un.Main
|
||||
RmDir /r /REBOOTOK $INSTDIR
|
||||
RmDir /r /REBOOTOK "${SMPATH}"
|
||||
Delete /REBOOTOK "$DESKTOP\${NAME}.lnk"
|
||||
DeleteRegKey HKLM "${REGPATH_UNINSTSUBKEY}"
|
||||
Delete "$InstDir\uninstall.exe"
|
||||
SectionEnd
|
Ładowanie…
Reference in New Issue