Skip to content

Commit

Permalink
add support for Journeys in Middle-Earth; bump ver
Browse files Browse the repository at this point in the history
closes #2
  • Loading branch information
gurnec committed Dec 1, 2019
1 parent f879156 commit 70c6d0a
Show file tree
Hide file tree
Showing 8 changed files with 207 additions and 86 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Undo for FFG Games
Copyright (C) 2017 Christopher Gurnee
Copyright (C) 2017-2019 Christopher Gurnee
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If you'd prefer to run Undo for FFG Games from the Python source code directly:

2. Download the latest version of Undo for FFG Games from <https://github.com/gurnec/Undo_FFG/archive/master.zip> and unzip it to a location of your choice.

3. In the folder you unzipped above, double-click the `Undo_MoM2e.pyw` file for Mansions of Madness, `Undo_RtL.pyw` for Road to Legend, or `Undo_LotA.pyw` for Legends of the Alliance.
3. In the folder you unzipped above, double-click the `Undo_MoM2e.pyw` file for Mansions of Madness, `Undo_RtL.pyw` for Road to Legend, `Undo_LotA.pyw` for Legends of the Alliance, or `Undo_JiME.pyw` for Journeys in Middle-Earth.


## Q & A ##
Expand Down
40 changes: 40 additions & 0 deletions Undo_JiME.pyw
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!python3.8
# Undo_LotA.py - stub for Undo for LotR Journeys in Middle-Earth
# Copyright (C) 2019 Christopher Gurnee
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import Undo_MoM2e, traceback, sys
from tkinter import messagebox

if __name__ == '__main__':
try:
Undo_MoM2e.main(Undo_MoM2e.JIME)
except Exception:
msg = ''.join(traceback.format_exc())
messagebox.showerror('Exception', msg)
if Undo_MoM2e.root:
Undo_MoM2e.root.destroy()
sys.exit(msg)
213 changes: 146 additions & 67 deletions Undo_MoM2e.pyw

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
3. Download `VC_redist.x86.exe` (Microsoft Visual C++ 2015-2019 Redistributable (x86)) into this directory from here:
<https://aka.ms/vs/16/release/vc_redist.x86.exe>.

4. Double-click the `build_installer.py` file in this directory. The built installer (`Undo_v2.1_for_FFG_setup.exe`) will be placed in this directory.
4. Double-click the `build_installer.py` file in this directory. The built installer (`Undo_v3.0_for_FFG_setup.exe`) will be placed in this directory.
24 changes: 13 additions & 11 deletions installer/Undo_MoM2e.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
!include MUI2.nsh

Name "Undo for FFG Games"
OutFile "Undo_v2.1_for_FFG_setup.exe"
OutFile "Undo_v3.0_for_FFG_setup.exe"

RequestExecutionLevel admin
ManifestSupportedOS all
Expand Down Expand Up @@ -36,13 +36,13 @@ Var StartMenuFolder

!insertmacro MUI_LANGUAGE "English"

VIProductVersion "2.1.0.0"
VIProductVersion "3.0.0.0"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Undo for FFG Games"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "2.1"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "3.0"
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "Installer distributed from https://github.com/gurnec/Undo_FFG/releases"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright © 2017 Christopher Gurnee. All rights reserved."
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright © 2017-2019 Christopher Gurnee. All rights reserved."
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Undo for FFG Games Installer"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "2.1"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "3.0"


; The install script
Expand Down Expand Up @@ -91,19 +91,20 @@ Section
; Install the Start Menu shortcuts
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Undo for Mansions of Madness.lnk" "$INSTDIR\Undo_MoM2e.exe" "--game=mom"
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Undo for Road to Legend.lnk" "$INSTDIR\Undo_MoM2e.exe" "--game=rtl"
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Undo for Legends of the Alliance.lnk" "$INSTDIR\Undo_MoM2e.exe" "--game=lota"
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall Undo for FFG.lnk" "$INSTDIR\Uninstall.exe"
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Undo for Mansions of Madness.lnk" "$INSTDIR\Undo_MoM2e.exe" "--game=mom2e"
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Undo for Road to Legend.lnk" "$INSTDIR\Undo_MoM2e.exe" "--game=rtl"
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Undo for Legends of the Alliance.lnk" "$INSTDIR\Undo_MoM2e.exe" "--game=lota"
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Undo for Journeys in Middle-Earth.lnk" "$INSTDIR\Undo_MoM2e.exe" "--game=jime"
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall Undo for FFG.lnk" "$INSTDIR\Uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_END

; Install the uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Undo for MoM2e" "" $INSTDIR
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Undo for MoM2e" "DisplayIcon" "$INSTDIR\Undo_MoM2e.ico"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Undo for MoM2e" "DisplayName" "Undo for FFG Games"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Undo for MoM2e" "DisplayVersion" "2.1"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Undo for MoM2e" "EstimatedSize" 16722
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Undo for MoM2e" "DisplayVersion" "3.0"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Undo for MoM2e" "EstimatedSize" 15348
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Undo for MoM2e" "HelpLink" "https://github.com/gurnec/Undo_FFG/issues"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Undo for MoM2e" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Undo for MoM2e" "NoRepair" 1
Expand Down Expand Up @@ -147,6 +148,7 @@ Section "Uninstall"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\Undo for Mansions of Madness.lnk"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\Undo for Road to Legend.lnk"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\Undo for Legends of the Alliance.lnk"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\Undo for Journeys in Middle-Earth.lnk"
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuFolder\Uninstall Undo for FFG.lnk"
RMDir /REBOOTOK "$SMPROGRAMS\$StartMenuFolder"

Expand Down
2 changes: 1 addition & 1 deletion installer/build_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

if cert_name:
print()
filename_to_sign = 'Undo_v2.1_for_FFG_setup.exe',
filename_to_sign = 'Undo_v3.0_for_FFG_setup.exe',
run(sign_args_sha1 + filename_to_sign, check=True)
run(sign_args_sha256 + filename_to_sign, check=True)

Expand Down
8 changes: 4 additions & 4 deletions installer/file_version_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ VSVersionInfo(
ffi=FixedFileInfo(
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
# Set not needed items to zero 0.
filevers=(2, 1, 0, 0),
prodvers=(2, 1, 0, 0),
filevers=(3, 0, 0, 0),
prodvers=(3, 0, 0, 0),
# Contains a bitmask that specifies the valid bits 'flags'r
mask=0x3f,
# Contains a bitmask that specifies the Boolean attributes of the file.
Expand All @@ -30,8 +30,8 @@ VSVersionInfo(
StringTable(
u'040904b0',
[StringStruct(u'FileDescription', u'Undo for FFG Games'),
StringStruct(u'FileVersion', u'2.1.0.0'),
StringStruct(u'LegalCopyright', u'Copyright © 2017 Christopher Gurnee. All rights reserved.'),
StringStruct(u'FileVersion', u'3.0.0.0'),
StringStruct(u'LegalCopyright', u'Copyright © 2017-2019 Christopher Gurnee. All rights reserved.'),
StringStruct(u'OriginalFilename', u'Undo_MoM2e.exe')])
]),
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
Expand Down

0 comments on commit 70c6d0a

Please sign in to comment.