Skip to content

Commit

Permalink
Add installer option to schedule admin launch task
Browse files Browse the repository at this point in the history
  • Loading branch information
psieg committed Jul 23, 2015
1 parent 8279b0a commit c5d9b21
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
19 changes: 16 additions & 3 deletions Software/dist_windows/script.iss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
; 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={{2175EE1B-0160-4862-9096-C522B1B99042}
AppID={{ABD88CE7-1FFA-416C-96CA-CCC6F2B34236}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
Expand Down Expand Up @@ -45,7 +45,8 @@ Name: "russian"; MessagesFile: "compiler:Languages\Russian.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
Name: "startupicon"; Description: "{cm:CreateStartupIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "startupicon"; Description: "{cm:CreateStartupIcon}"; GroupDescription: "{cm:StartupGroup}"; Flags: unchecked
Name: "adminstartuptask"; Description: "{cm:CreateAdminStartupTask}"; GroupDescription: "{cm:StartupGroup}"; Flags: unchecked

[Files]
Source: "content/Prismatik.exe"; DestDir: "{app}"; Flags: ignoreversion
Expand Down Expand Up @@ -83,17 +84,29 @@ Name: "{commonstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks:

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "https://github.com/woodenshark/Lightpack-docs"; Description: "{cm:OpenWiki}"; Flags: postinstall shellexec skipifsilent runasoriginaluser
Filename: "https://github.com/psieg/Lightpack/wiki"; Description: "{cm:OpenWiki}"; Flags: postinstall shellexec skipifsilent runasoriginaluser
Filename: "schtasks"; Parameters: "/create /f /RU Administrators /RL HIGHEST /SC onlogon /TN ""Prismatik with Admin Rights"" /TR ""{app}\{#MyAppExeName}"""; Tasks: adminstartuptask; Flags: runhidden skipifsilent

[UninstallRun]
Filename: "schtasks"; Parameters: "/delete /f /TN ""Prismatik with Admin Rights"""; Flags: runhidden

[UninstallDelete]
Name: "{app}\*.*"; Type: filesandordirs
Name: (app); Type: dirifempty

[CustomMessages]
; Startup group name
russian.StartupGroup =€âòîìàòè÷åñêèé çàïóñê:
english.StartupGroup =Automatic Startup:

; Startup icon name
russian.CreateStartupIcon=Äîáàâèòü â àâòîçàãðóçêó
english.CreateStartupIcon=Add to startup folder

; Admin task name
russian.CreateAdminStartupTask =€âòîìàòè÷åñêèé çàïóñê ñ ïðàâàìè àäìèíèñòðàòîðà
english.CreateAdminStartupTask =Automatically launch with admin rights

; Uninstall name
russian.UninstallName =Prismatik (òîëüêî óäàëåíèå)
english.UninstallName =Prismatik (remove only)
Expand Down
21 changes: 15 additions & 6 deletions Software/dist_windows/script32.iss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ Name: "russian"; MessagesFile: "compiler:Languages\Russian.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
Name: "startupicon"; Description: "{cm:CreateStartupIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "startupicon"; Description: "{cm:CreateStartupIcon}"; GroupDescription: "{cm:StartupGroup}"; Flags: unchecked
Name: "adminstartuptask"; Description: "{cm:CreateAdminStartupTask}"; GroupDescription: "{cm:StartupGroup}"; Flags: unchecked

[Files]
Source: "content/Prismatik.exe"; DestDir: "{app}"; Flags: ignoreversion
Expand All @@ -59,11 +60,7 @@ Source: "gpl-3.0.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "content/icudt54.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "content/icuin54.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "content/icuuc54.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "content/D3Dcompiler_47.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "content/libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "content/libGLESV2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "content/libraryinjector.dll"; DestDir: "{app}"; MinVersion: 6.1.7600; Flags: 32bit regserver ignoreversion
;Source: "content/opengl32sw.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "content/prismatik-hooks.dll"; DestDir: "{app}"; MinVersion: 6.1.7600; Flags: ignoreversion
Source: "content/prismatik-unhook.dll"; DestDir: "{app}"; MinVersion: 6.1.7600; Flags: ignoreversion
Source: "content/platforms/*"; DestDir: "{app}\platforms"; Flags: ignoreversion
Expand All @@ -84,17 +81,29 @@ Name: "{commonstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks:

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "https://github.com/woodenshark/Lightpack-docs"; Description: "{cm:OpenWiki}"; Flags: postinstall shellexec skipifsilent runasoriginaluser
Filename: "https://github.com/psieg/Lightpack/wiki"; Description: "{cm:OpenWiki}"; Flags: postinstall shellexec skipifsilent runasoriginaluser
Filename: "schtasks"; Parameters: "/create /f /RU Administrators /RL HIGHEST /SC onlogon /TN ""Prismatik with Admin Rights"" /TR ""{app}\{#MyAppExeName}"""; Tasks: adminstartuptask; Flags: runhidden skipifsilent

[UninstallRun]
Filename: "schtasks"; Parameters: "/delete /f /TN ""Prismatik with Admin Rights"""; Flags: runhidden

[UninstallDelete]
Name: "{app}\*.*"; Type: filesandordirs
Name: (app); Type: dirifempty

[CustomMessages]
; Startup group name
russian.StartupGroup =€âòîìàòè÷åñêèé çàïóñê:
english.StartupGroup =Automatic Startup:

; Startup icon name
russian.CreateStartupIcon=Äîáàâèòü â àâòîçàãðóçêó
english.CreateStartupIcon=Add to startup folder

; Admin task name
russian.CreateAdminStartupTask =€âòîìàòè÷åñêèé çàïóñê ñ ïðàâàìè àäìèíèñòðàòîðà
english.CreateAdminStartupTask =Automatically launch with admin rights

; Uninstall name
russian.UninstallName =Prismatik (òîëüêî óäàëåíèå)
english.UninstallName =Prismatik (remove only)
Expand Down
3 changes: 2 additions & 1 deletion Software/scripts/win32/generate_sln.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function fix_static {
for f in $1
do
if [ -f $f -a -r $f ]; then
echo "rewriting to staic linkage: $f"
sed "s/MultiThreadedDLL/MultiThreaded/g" "$f" | sed "s/MultiThreadedDebugDLL/MultiThreadedDebug/g" > "$f.tmp" && mv "$f.tmp" "$f"
else
echo "Error: Cannot read $f"
Expand All @@ -29,8 +30,8 @@ PATHS=("unhook/prismatik-unhook32.vcxproj" "hooks/prismatik-hooks32.vcxproj" "of
do
if [ -e $f ]; then
GUID=$(sed -n 's/.*\({[0-9A-Z\-]*}\).*/\1/p' "$f")
echo "rewriting to Win32: $GUID ($f)"
SLN=$(echo "$SLN" | sed "s/\($GUID.*\)|x64/\1|Win32/g")
echo "$GUID rewritten to Win32"
fi
done
echo "$SLN" > Lightpack.sln

0 comments on commit c5d9b21

Please sign in to comment.