mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-18 09:35:48 +00:00
Build Files
This commit is contained in:
parent
671096a758
commit
3cf9accefc
11 changed files with 599 additions and 3 deletions
6
src/.gitignore
vendored
6
src/.gitignore
vendored
|
|
@ -350,6 +350,6 @@ MigrationBackup/
|
||||||
.ionide/
|
.ionide/
|
||||||
|
|
||||||
# custom files
|
# custom files
|
||||||
Deploy*Github.cmd
|
#Deploy*Github.cmd
|
||||||
Installer.*
|
Installer.txt
|
||||||
MakeLatest*.ps1
|
#MakeLatest*.ps1
|
||||||
|
|
|
||||||
2
src/ARKServerManager/DeployBetaToGithub.cmd
Normal file
2
src/ARKServerManager/DeployBetaToGithub.cmd
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
powershell -ExecutionPolicy Bypass -File MakeLatestBetaVersionGithub.ps1
|
||||||
|
PAUSE
|
||||||
2
src/ARKServerManager/DeployToGithub.cmd
Normal file
2
src/ARKServerManager/DeployToGithub.cmd
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
powershell -ExecutionPolicy Bypass -File MakeLatestVersionGithub.ps1
|
||||||
|
PAUSE
|
||||||
54
src/ARKServerManager/Installer.iss
Normal file
54
src/ARKServerManager/Installer.iss
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
; Script generated by the Inno Setup Script Wizard.
|
||||||
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||||
|
#define rootPath "D:\GitHub\ServerManagers\src\ARKServerManager"
|
||||||
|
#include "D:\GitHub\ServerManagers\src\ARKServerManager\Installer.txt"
|
||||||
|
|
||||||
|
[Setup]
|
||||||
|
; NOTE: The value of AppId uniquely identifies this application.
|
||||||
|
; Do not use the same AppId value in installers for other applications.
|
||||||
|
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||||
|
AppId={{8CF4109C-917A-4F81-A189-164E4DF22C7C}
|
||||||
|
AppName=Ark Server Manager
|
||||||
|
AppVersion={#AppVer}
|
||||||
|
AppPublisher=Open Source Server Managers
|
||||||
|
AppPublisherURL=http://arkservermanager.freeforums.net/
|
||||||
|
AppSupportURL=http://arkservermanager.freeforums.net/board/3/tech-support-bug-reports
|
||||||
|
AppUpdatesURL=http://arkservermanager.freeforums.net/thread/5193/downloads
|
||||||
|
DefaultDirName={pf}\ArkServerManager
|
||||||
|
DisableProgramGroupPage=yes
|
||||||
|
SetupIconFile={#rootPath}\Art\favicon.ico
|
||||||
|
VersionInfoVersion={#AppVerFull}
|
||||||
|
|
||||||
|
ArchitecturesAllowed=x86 x64 ia64
|
||||||
|
ArchitecturesInstallIn64BitMode=x64 ia64
|
||||||
|
|
||||||
|
Compression=lzma
|
||||||
|
SolidCompression=yes
|
||||||
|
|
||||||
|
UninstallDisplayName=Ark Server Manager
|
||||||
|
UninstallDisplayIcon={app}\ARK Server Manager.exe
|
||||||
|
|
||||||
|
SourceDir={#rootPath}\publish\Application Files\ARK Server Manager_{#AppVerPath}
|
||||||
|
OutputDir={#rootPath}\publish\
|
||||||
|
OutputBaseFilename=ArkServerManager_{#AppVer}
|
||||||
|
|
||||||
|
[Languages]
|
||||||
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
|
[Tasks]
|
||||||
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
Source: "ARK Server Manager.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
|
Source: "*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{commonprograms}\ArkServerManager"; Filename: "{app}\ARK Server Manager.exe"; Comment: "Start Ark Server Manager"
|
||||||
|
Name: "{commondesktop}\ArkServerManager"; Filename: "{app}\ARK Server Manager.exe"; Comment: "Start Ark Server Manager"; Tasks: desktopicon
|
||||||
|
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\ArkServerManager"; Filename: "{app}\ARK Server Manager.exe"; Comment: "Start Ark Server Manager"; Tasks: quicklaunchicon
|
||||||
|
|
||||||
|
[Run]
|
||||||
|
Filename: "{app}\ARK Server Manager.exe"; Description: "{cm:LaunchProgram,Ark Server Manager}"; Flags: nowait postinstall skipifsilent unchecked
|
||||||
|
|
||||||
103
src/ARKServerManager/MakeLatestBetaVersionGithub.ps1
Normal file
103
src/ARKServerManager/MakeLatestBetaVersionGithub.ps1
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
Param
|
||||||
|
(
|
||||||
|
[Parameter()]
|
||||||
|
[string]$rootPath = "D:\GitHub\ServerManagers\src\ARKServerManager",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$publishDir = "publish",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$srcXmlFilename = "ARK Server Manager.application",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$destLatestFilename = "latestbeta.txt",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$filenamePrefix = "Ark Server Manager_",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$feedFilename = "VersionFeedBeta.xml",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$signTool = "C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\SignTool.exe",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$signNFlag = "${env:SIGN_NFLAG}",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$signTFlag = "http://timestamp.digicert.com",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$githubRoot = "D:\GitHub\ServerManagers\ASM\beta"
|
||||||
|
)
|
||||||
|
|
||||||
|
[string] $AppVersion = ""
|
||||||
|
[string] $AppVersionShort = ""
|
||||||
|
|
||||||
|
function Get-LatestVersion()
|
||||||
|
{
|
||||||
|
$xmlFile = "$($rootPath)\$($publishDir)\$($srcXmlFilename)"
|
||||||
|
$xml = [xml](Get-Content $xmlFile)
|
||||||
|
$version = $xml.assembly.assemblyIdentity | Select version
|
||||||
|
return $version.version;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Sign-Application ( $sourcedir , $signFile )
|
||||||
|
{
|
||||||
|
if(Test-Path $signTool)
|
||||||
|
{
|
||||||
|
if(($signFile -ne "") -and ($signNFlag -ne "") -and ($signTFlag -ne ""))
|
||||||
|
{
|
||||||
|
Write-Host "Signing $($signFile)"
|
||||||
|
& $signTool sign /n "$($signNFlag)" /t $signTFlag "$($sourcedir)\$($signFile)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Create-Zip( $sourcePath , $zipFile )
|
||||||
|
{
|
||||||
|
if(Test-Path $zipFile)
|
||||||
|
{
|
||||||
|
Remove-Item -LiteralPath:$zipFile -Force
|
||||||
|
}
|
||||||
|
Add-Type -Assembly System.IO.Compression.FileSystem
|
||||||
|
Write-Host "Zipping $($sourcePath) into $($zipFile)"
|
||||||
|
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
|
||||||
|
[System.IO.Compression.ZipFile]::CreateFromDirectory($sourcePath, $zipFile, $compressionLevel, $false)
|
||||||
|
}
|
||||||
|
|
||||||
|
$publishPath = "$($rootPath)\$($publishDir)"
|
||||||
|
$txtDestFile = "$($publishPath)\$($destLatestFilename)"
|
||||||
|
$feedFile = "$($rootPath)\$($feedFilename)"
|
||||||
|
$languageFile = "$($rootPath)\Globalization\en-US\en-US.xaml"
|
||||||
|
$filenamePrefixStripped = $filenamePrefix.Replace(' ', '')
|
||||||
|
|
||||||
|
$AppVersion = Get-LatestVersion
|
||||||
|
$AppVersionShort = $AppVersion
|
||||||
|
$AppVersionShort | Set-Content "$($txtDestFile)"
|
||||||
|
Write-Host "LatestVersion $($AppVersionShort) ($($AppVersion))"
|
||||||
|
|
||||||
|
$versionWithUnderscores = $AppVersion.Replace('.', '_')
|
||||||
|
$publishSrcDir = "$($publishPath)\Application Files\$($filenamePrefix)$($versionWithUnderscores)"
|
||||||
|
Remove-Item -Path "$($publishSrcDir)\$($srcXmlFilename)" -ErrorAction Ignore
|
||||||
|
|
||||||
|
#copy the server manager updater (exe) and prefix with 'New'
|
||||||
|
Write-Host "Copying the server manager updater (exe) and prefix with 'New'"
|
||||||
|
Copy-Item -Path "$($publishSrcDir)\ServerManagerUpdater.exe" -Destination "$($publishSrcDir)\NewServerManagerUpdater.exe"
|
||||||
|
|
||||||
|
#sign the executable files
|
||||||
|
Sign-Application $publishSrcDir "*.exe"
|
||||||
|
|
||||||
|
$zipDestFileName = "$($filenamePrefixStripped)$($AppVersionShort).zip"
|
||||||
|
$zipDestFile = "$($publishPath)\$($zipDestFileName)"
|
||||||
|
Create-Zip $publishSrcDir $zipDestFile
|
||||||
|
|
||||||
|
#delete the copied server manager updater File
|
||||||
|
Remove-Item -Path "$($publishSrcDir)\NewServerManagerUpdater.exe" -ErrorAction Ignore
|
||||||
|
|
||||||
|
# copy the files to the GITHUB folder
|
||||||
|
Write-Host "Copying files to the github folder"
|
||||||
|
Copy-Item -Path "$feedFile" -Destination "$githubRoot\VersionFeed.xml"
|
||||||
|
Copy-Item -Path "$languageFile" -Destination $githubRoot
|
||||||
|
Copy-Item -Path "$txtDestFile" -Destination "$githubRoot\latest.txt"
|
||||||
|
Copy-Item -Path "$zipDestFile" -Destination "$githubRoot\latest.zip"
|
||||||
137
src/ARKServerManager/MakeLatestVersionGithub.ps1
Normal file
137
src/ARKServerManager/MakeLatestVersionGithub.ps1
Normal file
|
|
@ -0,0 +1,137 @@
|
||||||
|
Param
|
||||||
|
(
|
||||||
|
[Parameter()]
|
||||||
|
[string]$rootPath = "D:\GitHub\ServerManagers\src\ARKServerManager",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$publishDir = "publish",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$srcXmlFilename = "ARK Server Manager.application",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$destLatestFilename = "latest.txt",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$filenamePrefix = "Ark Server Manager_",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$feedFilename = "VersionFeed.xml",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$signTool = "C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\SignTool.exe",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$signNFlag = "${env:SIGN_NFLAG}",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$signTFlag = "http://timestamp.digicert.com",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$installerTool = "C:\Program Files (x86)\Inno Setup 5\ISCC.exe",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$githubRoot = "D:\GitHub\ServerManagers\ASM"
|
||||||
|
)
|
||||||
|
|
||||||
|
[string] $AppVersion = ""
|
||||||
|
[string] $AppVersionShort = ""
|
||||||
|
|
||||||
|
function Get-LatestVersion()
|
||||||
|
{
|
||||||
|
$xmlFile = "$($rootPath)\$($publishDir)\$($srcXmlFilename)"
|
||||||
|
$xml = [xml](Get-Content $xmlFile)
|
||||||
|
$version = $xml.assembly.assemblyIdentity | Select version
|
||||||
|
return $version.version;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Sign-Application ( $sourcedir , $signFile )
|
||||||
|
{
|
||||||
|
if(Test-Path $signTool)
|
||||||
|
{
|
||||||
|
if(($signFile -ne "") -and ($signNFlag -ne "") -and ($signTFlag -ne ""))
|
||||||
|
{
|
||||||
|
Write-Host "Signing $($signFile)"
|
||||||
|
& $signTool sign /n "$($signNFlag)" /t $signTFlag "$($sourcedir)\$($signFile)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Create-Zip( $sourcePath , $zipFile )
|
||||||
|
{
|
||||||
|
if(Test-Path $zipFile)
|
||||||
|
{
|
||||||
|
Remove-Item -LiteralPath:$zipFile -Force
|
||||||
|
}
|
||||||
|
Add-Type -Assembly System.IO.Compression.FileSystem
|
||||||
|
Write-Host "Zipping $($sourcePath) into $($zipFile)"
|
||||||
|
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
|
||||||
|
[System.IO.Compression.ZipFile]::CreateFromDirectory($sourcePath, $zipFile, $compressionLevel, $false)
|
||||||
|
}
|
||||||
|
|
||||||
|
function Create-Installer()
|
||||||
|
{
|
||||||
|
if(Test-Path $installerTool)
|
||||||
|
{
|
||||||
|
if(($installScriptFile -ne "") -and ($installTextFile -ne ""))
|
||||||
|
{
|
||||||
|
$installTextFileContent = @"
|
||||||
|
#define AppVer "$($AppVersionShort)"
|
||||||
|
#define AppVerFull "$($AppVersion)"
|
||||||
|
#define AppVerPath "$($versionWithUnderscores)"
|
||||||
|
"@
|
||||||
|
$installTextFileContent | Out-File -LiteralPath:$installTextFile -Force -Encoding ascii
|
||||||
|
|
||||||
|
Write-Host "Creating installer $($installerFile)"
|
||||||
|
& "$installerTool" "$installScriptFile"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$publishPath = "$($rootPath)\$($publishDir)"
|
||||||
|
$txtDestFile = "$($publishPath)\$($destLatestFilename)"
|
||||||
|
$feedFile = "$($rootPath)\$($feedFilename)"
|
||||||
|
$languageFile = "$($rootPath)\Globalization\en-US\en-US.xaml"
|
||||||
|
$installTextFile = "$($rootPath)\Installer.txt"
|
||||||
|
$installScriptFile = "$($rootPath)\Installer.iss"
|
||||||
|
$filenamePrefixStripped = $filenamePrefix.Replace(' ', '')
|
||||||
|
|
||||||
|
$AppVersion = Get-LatestVersion
|
||||||
|
$AppVersionShort = $AppVersion.Substring(0, $AppVersion.LastIndexOf('.'))
|
||||||
|
$AppVersionShort | Set-Content "$($txtDestFile)"
|
||||||
|
Write-Host "LatestVersion $($AppVersionShort) ($($AppVersion))"
|
||||||
|
|
||||||
|
$versionWithUnderscores = $AppVersion.Replace('.', '_')
|
||||||
|
$publishSrcDir = "$($publishPath)\Application Files\$($filenamePrefix)$($versionWithUnderscores)"
|
||||||
|
Remove-Item -Path "$($publishSrcDir)\$($srcXmlFilename)" -ErrorAction Ignore
|
||||||
|
|
||||||
|
#copy the server manager updater (exe) and prefix with 'New'
|
||||||
|
Write-Host "Copying the server manager updater (exe) and prefix with 'New'"
|
||||||
|
Copy-Item -Path "$($publishSrcDir)\ServerManagerUpdater.exe" -Destination "$($publishSrcDir)\NewServerManagerUpdater.exe"
|
||||||
|
|
||||||
|
#sign the executable files
|
||||||
|
Sign-Application $publishSrcDir "*.exe"
|
||||||
|
|
||||||
|
$zipDestFileName = "$($filenamePrefixStripped)$($AppVersionShort).zip"
|
||||||
|
$zipDestFile = "$($publishPath)\$($zipDestFileName)"
|
||||||
|
Create-Zip $publishSrcDir $zipDestFile
|
||||||
|
|
||||||
|
#delete the copied server manager updater File - do not want to include in the installer
|
||||||
|
Remove-Item -Path "$($publishSrcDir)\NewServerManagerUpdater.exe" -ErrorAction Ignore
|
||||||
|
|
||||||
|
$installerFileName = "$($filenamePrefixStripped)$($AppVersionShort).exe"
|
||||||
|
$installerFile = "$($publishPath)\$($installerFileName)"
|
||||||
|
Create-Installer
|
||||||
|
|
||||||
|
#sign the installer file
|
||||||
|
Sign-Application $publishPath $installerFileName
|
||||||
|
|
||||||
|
# copy the files to the GITHUB folder
|
||||||
|
Write-Host "Copying files to the github folder"
|
||||||
|
Copy-Item -Path "$feedFile" -Destination "$githubRoot\VersionFeed.xml"
|
||||||
|
Copy-Item -Path "$languageFile" -Destination $githubRoot
|
||||||
|
Copy-Item -Path "$txtDestFile" -Destination "$githubRoot\latest.txt"
|
||||||
|
Copy-Item -Path "$zipDestFile" -Destination $githubRoot
|
||||||
|
Copy-Item -Path "$installerFile" -Destination $githubRoot
|
||||||
|
Copy-Item -Path "$zipDestFile" -Destination "$githubRoot\latest.zip"
|
||||||
|
Copy-Item -Path "$installerFile" -Destination "$githubRoot\latest.exe"
|
||||||
2
src/ConanServerManager/DeployBetaToGithub.cmd
Normal file
2
src/ConanServerManager/DeployBetaToGithub.cmd
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
powershell -ExecutionPolicy Bypass -File MakeLatestBetaVersionGithub.ps1
|
||||||
|
PAUSE
|
||||||
2
src/ConanServerManager/DeployToGithub.cmd
Normal file
2
src/ConanServerManager/DeployToGithub.cmd
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
powershell -ExecutionPolicy Bypass -File MakeLatestVersionGithub.ps1
|
||||||
|
PAUSE
|
||||||
54
src/ConanServerManager/Installer.iss
Normal file
54
src/ConanServerManager/Installer.iss
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
; Script generated by the Inno Setup Script Wizard.
|
||||||
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||||
|
#define rootPath "D:\GitHub\ServerManagers\src\ConanServerManager"
|
||||||
|
#include "D:\GitHub\ServerManagers\src\ConanServerManager\Installer.txt"
|
||||||
|
|
||||||
|
[Setup]
|
||||||
|
; NOTD: The value of AppId uniquely identifies this application.
|
||||||
|
; Do not use the same AppId value in installers for other applications.
|
||||||
|
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||||
|
AppId={{783D6AFF-E78C-44D5-B9E2-764D7C62C7FD}
|
||||||
|
AppName=Conan Server Manager
|
||||||
|
AppVersion={#AppVer}
|
||||||
|
AppPublisher=Open Source Server Managers
|
||||||
|
AppPublisherURL=http://servermanagers.freeforums.net
|
||||||
|
AppSupportURL=http://servermanagers.freeforums.net/board/39/tech-support-bug-reports
|
||||||
|
AppUpdatesURL=http://servermanagers.freeforums.net/thread/36/downloads
|
||||||
|
DefaultDirName={pf}\ConanServerManager
|
||||||
|
DisableProgramGroupPage=yes
|
||||||
|
SetupIconFile={#rootPath}\Art\favicon.ico
|
||||||
|
VersionInfoVersion={#AppVerFull}
|
||||||
|
|
||||||
|
ArchitecturesAllowed=x86 x64 ia64
|
||||||
|
ArchitecturesInstallIn64BitMode=x64 ia64
|
||||||
|
|
||||||
|
Compression=lzma
|
||||||
|
SolidCompression=yes
|
||||||
|
|
||||||
|
UninstallDisplayName=Conan Server Manager
|
||||||
|
UninstallDisplayIcon={app}\ConanServerManager.exe
|
||||||
|
|
||||||
|
SourceDir={#rootPath}\publish\Application Files\ConanServerManager_{#AppVerPath}
|
||||||
|
OutputDir={#rootPath}\publish\
|
||||||
|
OutputBaseFilename=ConanServerManager_{#AppVer}
|
||||||
|
|
||||||
|
[Languages]
|
||||||
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
|
[Tasks]
|
||||||
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
Source: "ConanServerManager.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
|
Source: "*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{commonprograms}\ConanServerManager"; Filename: "{app}\ConanServerManager.exe"; Comment: "Start Conan Server Manager"
|
||||||
|
Name: "{commondesktop}\ConanServerManager"; Filename: "{app}\ConanServerManager.exe"; Comment: "Start Conan Server Manager"; Tasks: desktopicon
|
||||||
|
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\ConanServerManager"; Filename: "{app}\ConanServerManager.exe"; Comment: "Start Conan Server Manager"; Tasks: quicklaunchicon
|
||||||
|
|
||||||
|
[Run]
|
||||||
|
Filename: "{app}\ConanServerManager.exe"; Description: "{cm:LaunchProgram,Conan Server Manager}"; Flags: nowait postinstall skipifsilent unchecked
|
||||||
|
|
||||||
103
src/ConanServerManager/MakeLatestBetaVersionGithub.ps1
Normal file
103
src/ConanServerManager/MakeLatestBetaVersionGithub.ps1
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
Param
|
||||||
|
(
|
||||||
|
[Parameter()]
|
||||||
|
[string]$rootPath = "D:\GitHub\ServerManagers\src\ConanServerManager",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$publishDir = "publish",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$srcXmlFilename = "ConanServerManager.application",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$destLatestFilename = "latestbeta.txt",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$filenamePrefix = "ConanServerManager_",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$feedFilename = "VersionFeedBeta.xml",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$signTool = "C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\SignTool.exe",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$signNFlag = "${env:SIGN_NFLAG}",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$signTFlag = "http://timestamp.digicert.com",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$githubRoot = "D:\GitHub\ServerManagers\CSM\beta"
|
||||||
|
)
|
||||||
|
|
||||||
|
[string] $AppVersion = ""
|
||||||
|
[string] $AppVersionShort = ""
|
||||||
|
|
||||||
|
function Get-LatestVersion()
|
||||||
|
{
|
||||||
|
$xmlFile = "$($rootPath)\$($publishDir)\$($srcXmlFilename)"
|
||||||
|
$xml = [xml](Get-Content $xmlFile)
|
||||||
|
$version = $xml.assembly.assemblyIdentity | Select version
|
||||||
|
return $version.version;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Sign-Application ( $sourcedir , $signFile )
|
||||||
|
{
|
||||||
|
if(Test-Path $signTool)
|
||||||
|
{
|
||||||
|
if(($signFile -ne "") -and ($signNFlag -ne "") -and ($signTFlag -ne ""))
|
||||||
|
{
|
||||||
|
Write-Host "Signing $($signFile)"
|
||||||
|
& $signTool sign /n "$($signNFlag)" /t $signTFlag "$($sourcedir)\$($signFile)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Create-Zip( $sourcePath , $zipFile )
|
||||||
|
{
|
||||||
|
if(Test-Path $zipFile)
|
||||||
|
{
|
||||||
|
Remove-Item -LiteralPath:$zipFile -Force
|
||||||
|
}
|
||||||
|
Add-Type -Assembly System.IO.Compression.FileSystem
|
||||||
|
Write-Host "Zipping $($sourcePath) into $($zipFile)"
|
||||||
|
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
|
||||||
|
[System.IO.Compression.ZipFile]::CreateFromDirectory($sourcePath, $zipFile, $compressionLevel, $false)
|
||||||
|
}
|
||||||
|
|
||||||
|
$publishPath = "$($rootPath)\$($publishDir)"
|
||||||
|
$txtDestFile = "$($publishPath)\$($destLatestFilename)"
|
||||||
|
$feedFile = "$($rootPath)\$($feedFilename)"
|
||||||
|
$languageFile = "$($rootPath)\Globalization\en-US\en-US.xaml"
|
||||||
|
$filenamePrefixStripped = $filenamePrefix.Replace(' ', '')
|
||||||
|
|
||||||
|
$AppVersion = Get-LatestVersion
|
||||||
|
$AppVersionShort = $AppVersion
|
||||||
|
$AppVersionShort | Set-Content "$($txtDestFile)"
|
||||||
|
Write-Host "LatestVersion $($AppVersionShort) ($($AppVersion))"
|
||||||
|
|
||||||
|
$versionWithUnderscores = $AppVersion.Replace('.', '_')
|
||||||
|
$publishSrcDir = "$($publishPath)\Application Files\$($filenamePrefix)$($versionWithUnderscores)"
|
||||||
|
Remove-Item -Path "$($publishSrcDir)\$($srcXmlFilename)" -ErrorAction Ignore
|
||||||
|
|
||||||
|
#copy the server manager updater (exe) and prefix with 'New'
|
||||||
|
Write-Host "Copying the server manager updater (exe) and prefix with 'New'"
|
||||||
|
Copy-Item -Path "$($publishSrcDir)\ServerManagerUpdater.exe" -Destination "$($publishSrcDir)\NewServerManagerUpdater.exe"
|
||||||
|
|
||||||
|
#sign the executable files
|
||||||
|
Sign-Application $publishSrcDir "*.exe"
|
||||||
|
|
||||||
|
$zipDestFileName = "$($filenamePrefixStripped)$($AppVersionShort).zip"
|
||||||
|
$zipDestFile = "$($publishPath)\$($zipDestFileName)"
|
||||||
|
Create-Zip $publishSrcDir $zipDestFile
|
||||||
|
|
||||||
|
#delete the copied server manager updater File
|
||||||
|
Remove-Item -Path "$($publishSrcDir)\NewServerManagerUpdater.exe" -ErrorAction Ignore
|
||||||
|
|
||||||
|
# copy the files to the GITHUB folder
|
||||||
|
Write-Host "Copying files to the github folder"
|
||||||
|
Copy-Item -Path "$feedFile" -Destination "$githubRoot\VersionFeed.xml"
|
||||||
|
Copy-Item -Path "$languageFile" -Destination $githubRoot
|
||||||
|
Copy-Item -Path "$txtDestFile" -Destination "$githubRoot\latest.txt"
|
||||||
|
Copy-Item -Path "$zipDestFile" -Destination "$githubRoot\latest.zip"
|
||||||
137
src/ConanServerManager/MakeLatestVersionGithub.ps1
Normal file
137
src/ConanServerManager/MakeLatestVersionGithub.ps1
Normal file
|
|
@ -0,0 +1,137 @@
|
||||||
|
Param
|
||||||
|
(
|
||||||
|
[Parameter()]
|
||||||
|
[string]$rootPath = "D:\GitHub\ServerManagers\src\ConanServerManager",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$publishDir = "publish",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$srcXmlFilename = "ConanServerManager.application",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$destLatestFilename = "latest.txt",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$filenamePrefix = "ConanServerManager_",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$feedFilename = "VersionFeed.xml",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$signTool = "C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool\SignTool.exe",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$signNFlag = "${env:SIGN_NFLAG}",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$signTFlag = "http://timestamp.digicert.com",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$installerTool = "C:\Program Files (x86)\Inno Setup 5\ISCC.exe",
|
||||||
|
|
||||||
|
[Parameter()]
|
||||||
|
[string]$githubRoot = "D:\GitHub\ServerManagers\CSM"
|
||||||
|
)
|
||||||
|
|
||||||
|
[string] $AppVersion = ""
|
||||||
|
[string] $AppVersionShort = ""
|
||||||
|
|
||||||
|
function Get-LatestVersion()
|
||||||
|
{
|
||||||
|
$xmlFile = "$($rootPath)\$($publishDir)\$($srcXmlFilename)"
|
||||||
|
$xml = [xml](Get-Content $xmlFile)
|
||||||
|
$version = $xml.assembly.assemblyIdentity | Select version
|
||||||
|
return $version.version;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Sign-Application ( $sourcedir , $signFile )
|
||||||
|
{
|
||||||
|
if(Test-Path $signTool)
|
||||||
|
{
|
||||||
|
if(($signFile -ne "") -and ($signNFlag -ne "") -and ($signTFlag -ne ""))
|
||||||
|
{
|
||||||
|
Write-Host "Signing $($signFile)"
|
||||||
|
& $signTool sign /n "$($signNFlag)" /t $signTFlag "$($sourcedir)\$($signFile)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Create-Zip( $sourcePath , $zipFile )
|
||||||
|
{
|
||||||
|
if(Test-Path $zipFile)
|
||||||
|
{
|
||||||
|
Remove-Item -LiteralPath:$zipFile -Force
|
||||||
|
}
|
||||||
|
Add-Type -Assembly System.IO.Compression.FileSystem
|
||||||
|
Write-Host "Zipping $($sourcePath) into $($zipFile)"
|
||||||
|
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal
|
||||||
|
[System.IO.Compression.ZipFile]::CreateFromDirectory($sourcePath, $zipFile, $compressionLevel, $false)
|
||||||
|
}
|
||||||
|
|
||||||
|
function Create-Installer()
|
||||||
|
{
|
||||||
|
if(Test-Path $installerTool)
|
||||||
|
{
|
||||||
|
if(($installScriptFile -ne "") -and ($installTextFile -ne ""))
|
||||||
|
{
|
||||||
|
$installTextFileContent = @"
|
||||||
|
#define AppVer "$($AppVersionShort)"
|
||||||
|
#define AppVerFull "$($AppVersion)"
|
||||||
|
#define AppVerPath "$($versionWithUnderscores)"
|
||||||
|
"@
|
||||||
|
$installTextFileContent | Out-File -LiteralPath:$installTextFile -Force -Encoding ascii
|
||||||
|
|
||||||
|
Write-Host "Creating installer $($installerFile)"
|
||||||
|
& "$installerTool" "$installScriptFile"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$publishPath = "$($rootPath)\$($publishDir)"
|
||||||
|
$txtDestFile = "$($publishPath)\$($destLatestFilename)"
|
||||||
|
$feedFile = "$($rootPath)\$($feedFilename)"
|
||||||
|
$languageFile = "$($rootPath)\Globalization\en-US\en-US.xaml"
|
||||||
|
$installTextFile = "$($rootPath)\Installer.txt"
|
||||||
|
$installScriptFile = "$($rootPath)\Installer.iss"
|
||||||
|
$filenamePrefixStripped = $filenamePrefix.Replace(' ', '')
|
||||||
|
|
||||||
|
$AppVersion = Get-LatestVersion
|
||||||
|
$AppVersionShort = $AppVersion.Substring(0, $AppVersion.LastIndexOf('.'))
|
||||||
|
$AppVersionShort | Set-Content "$($txtDestFile)"
|
||||||
|
Write-Host "LatestVersion $($AppVersionShort) ($($AppVersion))"
|
||||||
|
|
||||||
|
$versionWithUnderscores = $AppVersion.Replace('.', '_')
|
||||||
|
$publishSrcDir = "$($publishPath)\Application Files\$($filenamePrefix)$($versionWithUnderscores)"
|
||||||
|
Remove-Item -Path "$($publishSrcDir)\$($srcXmlFilename)" -ErrorAction Ignore
|
||||||
|
|
||||||
|
#copy the server manager updater (exe) and prefix with 'New'
|
||||||
|
Write-Host "Copying the server manager updater (exe) and prefix with 'New'"
|
||||||
|
Copy-Item -Path "$($publishSrcDir)\ServerManagerUpdater.exe" -Destination "$($publishSrcDir)\NewServerManagerUpdater.exe"
|
||||||
|
|
||||||
|
#sign the executable files
|
||||||
|
Sign-Application $publishSrcDir "*.exe"
|
||||||
|
|
||||||
|
$zipDestFileName = "$($filenamePrefixStripped)$($AppVersionShort).zip"
|
||||||
|
$zipDestFile = "$($publishPath)\$($zipDestFileName)"
|
||||||
|
Create-Zip $publishSrcDir $zipDestFile
|
||||||
|
|
||||||
|
#delete the copied server manager updater File - do not want to include in the installer
|
||||||
|
Remove-Item -Path "$($publishSrcDir)\NewServerManagerUpdater.exe" -ErrorAction Ignore
|
||||||
|
|
||||||
|
$installerFileName = "$($filenamePrefixStripped)$($AppVersionShort).exe"
|
||||||
|
$installerFile = "$($publishPath)\$($installerFileName)"
|
||||||
|
Create-Installer
|
||||||
|
|
||||||
|
#sign the installer file
|
||||||
|
Sign-Application $publishPath $installerFileName
|
||||||
|
|
||||||
|
# copy the files to the GITHUB folder
|
||||||
|
Write-Host "Copying files to the github folder"
|
||||||
|
Copy-Item -Path "$feedFile" -Destination "$githubRoot\VersionFeed.xml"
|
||||||
|
Copy-Item -Path "$languageFile" -Destination $githubRoot
|
||||||
|
Copy-Item -Path "$txtDestFile" -Destination "$githubRoot\latest.txt"
|
||||||
|
Copy-Item -Path "$zipDestFile" -Destination $githubRoot
|
||||||
|
Copy-Item -Path "$installerFile" -Destination $githubRoot
|
||||||
|
Copy-Item -Path "$zipDestFile" -Destination "$githubRoot\latest.zip"
|
||||||
|
Copy-Item -Path "$installerFile" -Destination "$githubRoot\latest.exe"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue