Skip to content

Commit 5581009

Browse files
committed
fixed dependencies
1 parent 17e62a3 commit 5581009

File tree

3 files changed

+183
-0
lines changed

3 files changed

+183
-0
lines changed

build-scripts/decompile.py

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import os
2+
import shutil
3+
import zipfile
4+
5+
from uncompyle6 import decompile_file
6+
7+
CLIENT_PATH = '{}/IMVUClient'.format(os.getenv('APPDATA'))
8+
9+
if __name__ == '__main__':
10+
cwd = os.getcwd()
11+
12+
print('COPYING: {}'.format(CLIENT_PATH))
13+
14+
if os.path.isdir(os.path.join(cwd, 'IMVUClient')):
15+
shutil.rmtree(os.path.join(cwd, 'IMVUClient'))
16+
17+
shutil.copytree(
18+
CLIENT_PATH, os.path.join(cwd, 'IMVUClient'),
19+
ignore=shutil.ignore_patterns('*.lock')
20+
)
21+
22+
print('EXTRACTING: LIBRARY.ZIP')
23+
24+
if os.path.isdir('{}/library'.format(cwd)):
25+
shutil.rmtree('{}/library'.format(cwd))
26+
27+
with zipfile.ZipFile('{}/IMVUClient/library.zip'.format(cwd), 'r') as zip_file:
28+
zip_file.extractall('{}/library'.format(cwd))
29+
30+
print('DECOMPILING: LIBRARY')
31+
32+
def decompile(subdir):
33+
for root, dirs, files in os.walk('{}/library/{}'.format(cwd, subdir)):
34+
for compiled in files:
35+
print('DECOMPILING: {}'.format(compiled))
36+
if compiled.endswith('.pyo'):
37+
path = os.path.join(root, os.path.splitext(compiled)[0] + '.py')
38+
with open(path, "w") as output:
39+
try:
40+
decompile_file(os.path.join(root, compiled), output, showasm=False)
41+
except Exception as e:
42+
print('SKIPPING: {} (error)'.format(compiled))
43+
continue
44+
45+
decompile('imvu')
46+
decompile('main')

build-scripts/install.nsi

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
!include "FileFunc.nsh"
2+
!include "MUI2.nsh"
3+
4+
!define APPNAME "T5DE"
5+
!define IMVU_VERSION $%IMVU_VERSION%
6+
!define T5DE_VERSION $%T5DE_VERSION%
7+
!define APP_VERSION $%APP_VERSION%
8+
!define APP_EXE "IMVUClient.exe"
9+
10+
!ifndef OUTDIR
11+
!define OUTDIR ..
12+
!endif
13+
14+
!define APP_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
15+
16+
; General
17+
18+
Name "${APPNAME}"
19+
BrandingText "T5DE ${APP_VERSION}"
20+
21+
OutFile "${OUTDIR}\${APPNAME}-${APP_VERSION}.exe"
22+
Unicode true
23+
24+
InstallDir "$LOCALAPPDATA\IMVUClient"
25+
InstallDirRegKey HKCU "Software\${APPNAME}" ""
26+
27+
RequestExecutionLevel user
28+
29+
ShowInstDetails show
30+
31+
; Compiler Flags
32+
33+
SetCompressor lzma
34+
SetDateSave off
35+
36+
; Variables
37+
38+
Var SMDIR
39+
40+
; Interface Settings
41+
!define MUI_ICON "t5de.ico"
42+
!define MUI_UNICON "t5de.ico"
43+
44+
!define MUI_ABORTWARNING
45+
!define MUI_FINISHPAGE_NOAUTOCLOSE
46+
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
47+
48+
!define MUI_FINISHPAGE_SHOWREADME ""
49+
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Create Desktop Shortcut"
50+
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION CreateDesktopShortcut
51+
52+
!define MUI_FINISHPAGE_RUN "$INSTDIR\${APP_EXE}"
53+
54+
; Pages
55+
56+
!insertmacro MUI_PAGE_WELCOME
57+
!insertmacro MUI_PAGE_DIRECTORY
58+
59+
;Start Menu Folder Page Configuration
60+
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
61+
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${APPNAME}"
62+
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
63+
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${APPNAME}"
64+
65+
!insertmacro MUI_PAGE_STARTMENU Application $SMDIR
66+
67+
!insertmacro MUI_PAGE_INSTFILES
68+
!insertmacro MUI_PAGE_FINISH
69+
70+
!insertmacro MUI_UNPAGE_WELCOME
71+
!insertmacro MUI_UNPAGE_CONFIRM
72+
!insertmacro MUI_UNPAGE_INSTFILES
73+
!insertmacro MUI_UNPAGE_FINISH
74+
75+
;Languages
76+
77+
!insertmacro MUI_LANGUAGE "English"
78+
79+
; Versioning
80+
81+
VIProductVersion "${IMVU_VERSION}.0.0"
82+
VIFileVersion "${IMVU_VERSION}.0.0"
83+
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${APP_VERSION}"
84+
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "${APPNAME}"
85+
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APPNAME}"
86+
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${APP_VERSION}"
87+
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Application Installer"
88+
89+
; Sections
90+
91+
Section "${APPNAME}" SecInstall
92+
SectionIn RO
93+
94+
SetOutPath "$INSTDIR"
95+
96+
File /nonfatal /r "${OUTDIR}\IMVUClient\*"
97+
98+
WriteUninstaller "$INSTDIR\${APPNAME} Uninstall.exe"
99+
100+
${GetSize} "$INSTDIR" "" $0 $1 $2
101+
102+
WriteRegStr HKCU "Software\${APPNAME}" "" $INSTDIR
103+
104+
WriteRegStr HKLM "${APP_UNINSTALL}" "DisplayName" "${APPNAME}"
105+
WriteRegStr HKLM "${APP_UNINSTALL}" "DisplayVersion" "${APP_VERSION}"
106+
WriteRegStr HKLM "${APP_UNINSTALL}" "DisplayIcon" "$INSTDIR\${APPNAME} Uninstall.exe"
107+
WriteRegStr HKLM "${APP_UNINSTALL}" "UninstallString" "$INSTDIR\${APPNAME} Uninstall.exe"
108+
WriteRegStr HKLM "${APP_UNINSTALL}" "InstallLocation" "$INSTDIR"
109+
WriteRegDWORD HKLM "${APP_UNINSTALL}" "EstimatedSize" "$0"
110+
111+
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
112+
113+
CreateDirectory "$SMPROGRAMS\$SMDIR"
114+
CreateShortCut "$SMPROGRAMS\$SMDIR\${APPNAME}.lnk" "$INSTDIR\${APP_EXE}" "" "$INSTDIR\${APPNAME} Uninstall.exe"
115+
CreateShortCut "$SMPROGRAMS\$SMDIR\Uninstall ${APPNAME}.lnk" "$INSTDIR\${APPNAME} Uninstall.exe" "" "$INSTDIR\${APPNAME} Uninstall.exe"
116+
117+
!insertmacro MUI_STARTMENU_WRITE_END
118+
SectionEnd
119+
120+
Section "Uninstall"
121+
RMDir /r /REBOOTOK $INSTDIR
122+
123+
!insertmacro MUI_STARTMENU_GETFOLDER Application $SMDIR
124+
125+
Delete "$SMPROGRAMS\$SMDIR\${APPNAME}.lnk"
126+
Delete "$SMPROGRAMS\$SMDIR\Uninstall ${APPNAME}.lnk"
127+
Delete "$DESKTOP\${APPNAME}.lnk"
128+
129+
RMDIR "$SMPROGRAMS\$SMDIR"
130+
131+
DeleteRegKey HKCU "Software\${APPNAME}"
132+
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
133+
SectionEnd
134+
135+
Function CreateDesktopShortcut
136+
CreateShortCut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\${APP_EXE}" "" "$INSTDIR\${APPNAME} Uninstall.exe"
137+
FunctionEnd

build-scripts/t5de.ico

150 KB
Binary file not shown.

0 commit comments

Comments
 (0)