Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kumir
kumir2
Commits
f101bf76
Commit
f101bf76
authored
Sep 28, 2016
by
Victor Yacovlev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NSIS version info
parent
d00c82fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
17 deletions
+44
-17
kumir2.nsi
kumir2.nsi
+17
-16
scripts/query_version_info.py
scripts/query_version_info.py
+27
-1
No files found.
kumir2.nsi
View file @
f101bf76
!include MUI2.nsh
# This include is used only by build system
# For manual build change th
is line to something line
:
# For manual build change th
ese lines to set variables OutFile, Name, and InstallDir
:
# OutFile "kumir2-...exe"
!include outfilename.nsh
# Name "-2.x"
# InstallDir "$PROGRAMFILES\Kumir2x"
!include nsis_version_info.nsh
Name "-2.x"
InstallDir "$PROGRAMFILES\Kumir2x"
RequestExecutionLevel admin
...
...
@@ -17,7 +18,7 @@ RequestExecutionLevel admin
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "Russian"
!define SHCNE_ASSOCCHANGED 0x08000000
!define SHCNF_IDLIST 0
...
...
@@ -81,18 +82,18 @@ Section "Kumir" Kumir
WriteUninstaller $INSTDIR\uninstall.exe
SectionEnd
function un.onInit
SetShellVarContext all
#Verify the uninstaller - last chance to back out
MessageBox MB_OKCANCEL " 2.1?" IDOK next
Abort
next:
function un.onInit
SetShellVarContext all
#Verify the uninstaller - last chance to back out
MessageBox MB_OKCANCEL " 2?" IDOK next
Abort
next:
functionEnd
Section "uninstall"
Section "uninstall"
Delete /REBOOTOK "$INSTDIR\uninstall.exe"
RMDir /r /REBOOTOK "$INSTDIR"
...
...
scripts/query_version_info.py
View file @
f101bf76
...
...
@@ -180,14 +180,40 @@ def package_bundle_name():
OUT_FILE
.
write
(
output
)
def
nsis_include_file
():
version_name
=
get_version_information
(
os
.
getcwd
())
data
=
""
if
is_tag
(
version_name
):
data
+=
"OutFile
\"
kumir2-"
+
version_name
+
"-install.exe
\"\r\n
"
data
+=
"Name
\"
Кумир "
+
version_name
+
"
\"\r\n
"
data
+=
"InstallDir
\"
$PROGRAMFILES
\\
Kumir-"
+
version_name
+
"
\"\r\n
"
else
:
branch
,
ghash
=
_split_into_branch_and_hash
(
version_name
)
data
+=
"OutFile
\"
kumir2-"
+
branch
+
"-"
+
ghash
+
"-install.exe
\"\r\n
"
data
+=
"Name
\"
Кумир2-"
+
version_name
+
"
\"\r\n
"
data
+=
"InstallDir
\"
$PROGRAMFILES
\\
Kumir2x-"
+
branch
+
"
\"\r\n
"
if
sys
.
stdout
==
OUT_FILE
:
OUT_FILE
.
write
(
data
)
else
:
OUT_FILE
.
write
(
data
.
encode
(
"CP1251"
))
def
main
():
global
OUT_FILE
mode
=
"package_bundle_name"
out_file_name
=
None
for
arg
in
sys
.
argv
:
if
arg
.
startswith
(
"--mode="
):
mode
=
arg
[
7
:]
elif
arg
.
startswith
(
"--out="
):
OUT_FILE
=
open
(
arg
[
6
:],
'w'
)
out_file_name
=
arg
[
6
:]
if
out_file_name
:
if
mode
.
startswith
(
"nsis"
):
open_mode
=
"wb"
else
:
open_mode
=
"w"
OUT_FILE
=
open
(
out_file_name
,
open_mode
)
if
mode
in
globals
():
globals
()[
mode
]()
OUT_FILE
.
close
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment