Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auto-tx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
879834c7
Commit
879834c7
authored
6 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Move build-package-deploy details to Scripts/README
Relates to
#60
parent
63b29437
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CONTRIBUTING.md
+1
-68
1 addition, 68 deletions
CONTRIBUTING.md
Scripts/README.md
+74
-8
74 additions, 8 deletions
Scripts/README.md
with
75 additions
and
76 deletions
CONTRIBUTING.md
+
1
−
68
View file @
879834c7
...
@@ -73,74 +73,7 @@ To run a typical development cycle, a few helper scripts are provided, most
...
@@ -73,74 +73,7 @@ To run a typical development cycle, a few helper scripts are provided, most
notably to facilitate / automate that cycle whilst using the common
notably to facilitate / automate that cycle whilst using the common
functionalities coming with AutoTx (like the updater).
functionalities coming with AutoTx (like the updater).
### Building / Compiling
For details, please have a look at
[
Build-Package-Deploy
](
Scripts/README.md
)
.
Open a shell session using the
`Developer Command Prompt for VS 2017`
shortcut
(doesn't require any special permissions, i.e. can be your user that's also
running Visual Studio). For convenience reasons it is recommended to start
`PowerShell`
within this terminal, but this is not strictly required. Navigate
to the
`AutoTx`
source code base directory, then call any of the
`.cmd`
scripts
under
`Scripts/msbuild`
depending on your needs. For a
*Debug*
build this would
be something like this:
```
PowerShell
cd C:\Devel\AutoTx ## <- adjust path to your requirements
.\Scripts\msbuild\build\debug.cmd
```
### Creating an Installation / Updater Package
After building the service has completed, use the
`Deploy-NewBuild.ps1`
script,
optionally with specifying the path to the updater configuration (by default
the script will assume "
`C:\Tools\AutoTx-Updater\UpdaterConfig.inc.ps1`
" for
this).
```
PowerShell
.\Scripts\Deploy-NewBuild.ps1
# or by specifying the config explicitly:
.\Scripts\Deploy-NewBuild.ps1 -UpdaterSettings C:\Path\To\UpdaterConfig.inc.ps1
```
Running this should produce output similar to the one shown here:
```
Creating package [build_2019-04-23_14-14-42__3.0-70-gf90a55c] using binaries from:
[C:\Devel\AutoTx\ATxService\bin\Debug]
[C:\Devel\AutoTx\ATxTray\bin\Debug]
[C:\Devel\AutoTx\ATxConfigTest\bin\Debug]
[C:\Devel\AutoTx\ATxDiagnostics\bin\Debug]
Removing existing package dir [build_2019-04-23_14-14-42__3.0-70-gf90a55c]...
Done creating package [build_2019-04-23_14-14-42__3.0-70-gf90a55c]
[configuration: Debug]
[commit: 3.0-70-gf90a55c]
Location: [C:\Devel\AutoTx\Scripts\build_2019-04-23_14-14-42__3.0-70-gf90a55c]
```
### Triggering the Updater
Running the updater can be done in various ways, for example you could simply
call the script manually from a PowerShell session with sufficient privileges.
However, the recommended method is to actually trigger the scheduled task to
mimick a "
*real-life*
" run as closely as possible. This is doable using the
GUI (e.g. by launching
`compmgmt.msc`
and clicking all your way through the
"Task Scheduler" tree jungle). A much easier approach is to use the command line
again to run the job. Unfortunately there is no
*straightforward*
way to launch
a registered job on Windows 7 (on Windows 10 there is the
`Start-ScheduledTask`
cmdlet), so you have to take a little detour. First of all make sure to have a
PowerShell session running with
*elevated privileges*
(i.e. it is
**not enough**
to run it with an administrator account, you explicitly need to start it with
the "Run as Administrator" option), then issue this command:
```
PowerShell
(Get-ScheduledJob -Name "AutoTx-Updater").StartJob()
```
This should trigger a run of the updater, any actions will be recorded to the
Windows Event Log. In case the service was running before, it will be restarted
and show its related messages in the service log file.
## Coding Conventions
## Coding Conventions
...
...
This diff is collapsed.
Click to expand it.
Scripts/README.md
+
74
−
8
View file @
879834c7
Build-Package-Deploy Cycle
# Build-Package-Deploy Cycle
==========================
NOTE: everything here assumes default installation locations!
Instructions on running a typical development cycle using the helper /
convenience scripts provided here to automate the steps as much as possible.
Run the
`Deploy-NewBuild.ps1`
script to package a new build, place the files at
## Building / Compiling
their appropriate location and remove the update marker file for this host. Then
use a shell with the appropriate permissions and run the updater script using
the following command (or trigger it through the scheduled jobs if installed):
```
powershell
Open a shell session using the
`Developer Command Prompt for VS 2017`
shortcut
(doesn't require any special permissions, i.e. can be your user that's also
running Visual Studio). For convenience reasons it is recommended to start
`PowerShell`
within this terminal, but this is not strictly required. Navigate
to the
`AutoTx`
source code base directory, then call any of the
`.cmd`
scripts
under
`Scripts/msbuild`
depending on your needs. For a
*Debug*
build this would
be something like this:
```
PowerShell
cd C:\Devel\AutoTx ## <- adjust path to your requirements
.\Scripts\msbuild\build\debug.cmd
```
## Creating an Installation / Updater Package
After building the service has completed, use the
`Deploy-NewBuild.ps1`
script,
optionally with specifying the path to the updater configuration (by default
the script will assume "
`C:\Tools\AutoTx-Updater\UpdaterConfig.inc.ps1`
" for
this).
```
PowerShell
.\Scripts\Deploy-NewBuild.ps1
# or by specifying the config explicitly:
.\Scripts\Deploy-NewBuild.ps1 -UpdaterSettings C:\Path\To\UpdaterConfig.inc.ps1
```
Running this should produce output similar to the one shown here:
```
Creating package [build_2019-04-23_14-14-42__3.0-70-gf90a55c] using binaries from:
[C:\Devel\AutoTx\ATxService\bin\Debug]
[C:\Devel\AutoTx\ATxTray\bin\Debug]
[C:\Devel\AutoTx\ATxConfigTest\bin\Debug]
[C:\Devel\AutoTx\ATxDiagnostics\bin\Debug]
Removing existing package dir [build_2019-04-23_14-14-42__3.0-70-gf90a55c]...
Done creating package [build_2019-04-23_14-14-42__3.0-70-gf90a55c]
[configuration: Debug]
[commit: 3.0-70-gf90a55c]
Location: [C:\Devel\AutoTx\Scripts\build_2019-04-23_14-14-42__3.0-70-gf90a55c]
```
## Triggering the Updater
Running the updater can be done in various ways, for example you could simply
call the script manually from a PowerShell session with sufficient privileges
(
*NOT recommended though*
):
```
PowerShell
C:\Tools\AutoTx-Updater\Update-Service.ps1 -UpdaterSettings C:\Tools\AutoTx-Updater\UpdaterConfig.inc.ps1
C:\Tools\AutoTx-Updater\Update-Service.ps1 -UpdaterSettings C:\Tools\AutoTx-Updater\UpdaterConfig.inc.ps1
```
```
However, the way better approach is to actually trigger the scheduled task to
mimick a "
*real-life*
" run as closely as possible. This is doable using the
GUI (e.g. by launching
`compmgmt.msc`
and clicking all your way through the
"Task Scheduler" tree jungle). A much easier approach is to use the command line
again to run the job. Unfortunately there is no
*straightforward*
way to launch
a registered job on Windows 7 (on Windows 10 there is the
`Start-ScheduledTask`
cmdlet), so you have to take a little detour. First of all make sure to have a
PowerShell session running with
*elevated privileges*
(i.e. it is
**not enough**
to run it with an administrator account, you explicitly need to start it with
the "Run as Administrator" option), then issue this command:
```
PowerShell
(Get-ScheduledJob -Name "AutoTx-Updater").StartJob()
```
This should trigger a run of the updater, any actions will be recorded to the
Windows Event Log. In case the service was running before, it will be restarted
and show its related messages in the service log file.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment