Skip to content

Commit 55ff328

Browse files
committed
1.0.0
1 parent b1a57a4 commit 55ff328

File tree

8 files changed

+155
-6
lines changed

8 files changed

+155
-6
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
build/
22
.DS_Store
3+
node_modules/electron-builder
4+
node_modules/.bin/electron-builder
35

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.3
1+
1.0.0

dev/Chemr.exe.manifest

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
3+
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
4+
<application>
5+
<!--This Id value indicates the application supports Windows Vista functionality -->
6+
<!-- supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/ -->
7+
<!--This Id value indicates the application supports Windows 7 functionality-->
8+
<!-- supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" --/>
9+
<!--This Id value indicates the application supports Windows 8 functionality-->
10+
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
11+
<!--This Id value indicates the application supports Windows 8.1 functionality-->
12+
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
13+
</application>
14+
</compatibility>
15+
16+
<assemblyIdentity
17+
type="win32"
18+
name="net.lowreal.Chemr"
19+
version="1.0.0.0"
20+
/>
21+
22+
23+
<asmv3:application>
24+
<asmv3:windowsSettings
25+
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
26+
<dpiAware>true</dpiAware>
27+
</asmv3:windowsSettings>
28+
</asmv3:application>
29+
</assembly>

dev/installer.nsi.tpl

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
!define APP_NAME "<%= name %>"
2+
!define APP_DIR "${APP_NAME}"
3+
4+
Name "${APP_NAME}"
5+
6+
!include "MUI2.nsh"
7+
!define MUI_ICON "icon.ico"
8+
9+
!addplugindir .
10+
!include "nsProcess.nsh"
11+
12+
!include "FileFunc.nsh"
13+
14+
# define the resulting installer's name
15+
OutFile "<%= out %>\${APP_NAME} Setup.exe"
16+
17+
# set the installation directory
18+
InstallDir "$PROGRAMFILES\${APP_NAME}\"
19+
20+
# app dialogs
21+
!insertmacro MUI_PAGE_WELCOME
22+
!insertmacro MUI_PAGE_INSTFILES
23+
24+
!define MUI_FINISHPAGE_RUN_TEXT "Start ${APP_NAME}"
25+
!define MUI_FINISHPAGE_RUN "$INSTDIR\${APP_NAME}.exe"
26+
27+
!insertmacro MUI_PAGE_FINISH
28+
!insertmacro MUI_LANGUAGE "English"
29+
30+
31+
# default section start
32+
Section
33+
SetShellVarContext all
34+
35+
# delete the installed files
36+
RMDir /r $INSTDIR
37+
38+
# define the path to which the installer should install
39+
SetOutPath $INSTDIR
40+
41+
# specify the files to go in the output path
42+
File /r "<%= appPath %>\*"
43+
44+
# specify icon to go in the output path
45+
File "icon.ico"
46+
47+
# create the uninstaller
48+
WriteUninstaller "$INSTDIR\Uninstall ${APP_NAME}.exe"
49+
50+
# create shortcuts in the start menu and on the desktop
51+
CreateDirectory "$SMPROGRAMS\${APP_DIR}"
52+
CreateShortCut "$SMPROGRAMS\${APP_DIR}\${APP_NAME}.lnk" "$INSTDIR\${APP_NAME}.exe"
53+
CreateShortCut "$SMPROGRAMS\${APP_DIR}\Uninstall ${APP_NAME}.lnk" "$INSTDIR\Uninstall ${APP_NAME}.exe"
54+
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${APP_NAME}.exe"
55+
56+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
57+
"DisplayName" "${APP_NAME}"
58+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
59+
"UninstallString" "$INSTDIR\Uninstall ${APP_NAME}.exe"
60+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
61+
"DisplayIcon" "$INSTDIR\icon.ico"
62+
63+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
64+
"Publisher" "${APP_NAME}"
65+
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
66+
"InstallLocation" "$INSTDIR"
67+
68+
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
69+
"VersionMajor" 1
70+
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
71+
"VersionMinor" 0
72+
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
73+
"Version" 0
74+
SectionEnd
75+
76+
# create a section to define what the uninstaller does
77+
Section "Uninstall"
78+
79+
${nsProcess::FindProcess} "${APP_NAME}.exe" $R0
80+
81+
${If} $R0 == 0
82+
DetailPrint "${APP_NAME} is running. Closing it down..."
83+
${nsProcess::KillProcess} "${APP_NAME}.exe" $R0
84+
DetailPrint "Waiting for ${APP_NAME} to close."
85+
Sleep 2000
86+
${EndIf}
87+
88+
${nsProcess::Unload}
89+
90+
SetShellVarContext all
91+
92+
# delete the installed files
93+
RMDir /r $INSTDIR
94+
95+
# delete the shortcuts
96+
delete "$SMPROGRAMS\${APP_DIR}\${APP_NAME}.lnk"
97+
delete "$SMPROGRAMS\${APP_DIR}\Uninstall ${APP_NAME}.lnk"
98+
rmDir "$SMPROGRAMS\${APP_DIR}"
99+
delete "$DESKTOP\${APP_NAME}.lnk"
100+
101+
102+
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
103+
SectionEnd

dev/package.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,22 @@ if [ x$SKIP_OSX != x1 ]; then
2525
--ignore=build \
2626
--app-version=$version
2727

28+
cd build/Chemr-mas-x64
29+
30+
ruby -i -anal -e 'puts gsub(/com.github.electron/, "net.lowreal.Chemr").gsub(/Electron/, "Chemr")' Chemr.app/Contents/Frameworks/Chemr\ Helper\ EH.app/Contents/Info.plist
31+
ruby -i -anal -e 'puts gsub(/com.github.electron/, "net.lowreal.Chemr").gsub(/Electron/, "Chemr")' Chemr.app/Contents/Frameworks/Chemr\ Helper\ NP.app/Contents/Info.plist
32+
33+
cd $ROOT
34+
2835
# Name of your app.
2936
APP="Chemr"
3037
# The path of you app to sign.
3138
APP_PATH="build/Chemr-mas-x64/Chemr.app"
3239
# The path to the location you want to put the signed package.
3340
RESULT_PATH="build/releases/Chemr.pkg"
3441
# The name of certificates you requested.
35-
APP_KEY="3rd Party Mac Developer Application: Company Name (APPIDENTITY)"
36-
INSTALLER_KEY="3rd Party Mac Developer Installer: Company Name (APPIDENTITY)"
42+
APP_KEY="3rd Party Mac Developer Application: Hirofumi Watanabe (877L5ULMT9)"
43+
INSTALLER_KEY="3rd Party Mac Developer Installer: Hirofumi Watanabe (877L5ULMT9)"
3744

3845
FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"
3946

@@ -69,10 +76,14 @@ if [ x$SKIP_WIN != x1 ]; then
6976
--arch=ia32 \
7077
--version=0.34.0 \
7178
--version-string.ProductName="Chemr" \
79+
--version-string.ProductVersion="$version" \
7280
--ignore=build \
7381
--app-version=$version
7482

75-
electron-builder \
83+
cp dev/Chemr.exe.manifest build/Chemr-win32-ia32/
84+
cp dev/installer.nsi.tpl node_modules/electron-builder/templates/installer.nsi.tpl
85+
86+
./node_modules/.bin/electron-builder \
7687
build/Chemr-win32-ia32 \
7788
--platform=win \
7889
--out=build/releases \

docs/styles.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ main #indexers .list {
205205
margin: 0 -8px;
206206
}
207207

208-
main #indexers .list a:link {
208+
main #indexers .list a:link ,
209+
main #indexers .list a:visited {
209210
display: block;
210211
min-width: 10em;
211212
padding: 8px;

main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var Main = {
3434
ready : function () {
3535
var self = this;
3636

37-
self.main = new BrowserWindow({width: 1280, height: 900});
37+
self.main = new BrowserWindow({width: 1440, height: 900});
3838
self.main.loadUrl('file://' + __dirname + '/viewer.html');
3939
if (config.DEBUG) self.main.openDevTools();
4040
self.main.on('closed', function () {

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@
1212
"dependencies": {
1313
"glob": "^5.0.15",
1414
"mkdirp": "^0.5.1"
15+
},
16+
"devDependencies": {
17+
"electron-builder": "^2.0.2"
1518
}
1619
}

0 commit comments

Comments
 (0)