Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cho45 committed Oct 21, 2015
1 parent b1a57a4 commit 55ff328
Show file tree
Hide file tree
Showing 8 changed files with 155 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
build/
.DS_Store
node_modules/electron-builder
node_modules/.bin/electron-builder

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.3
1.0.0
29 changes: 29 additions & 0 deletions dev/Chemr.exe.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--This Id value indicates the application supports Windows Vista functionality -->
<!-- supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/ -->
<!--This Id value indicates the application supports Windows 7 functionality-->
<!-- supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" --/>
<!--This Id value indicates the application supports Windows 8 functionality-->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!--This Id value indicates the application supports Windows 8.1 functionality-->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
</application>
</compatibility>

<assemblyIdentity
type="win32"
name="net.lowreal.Chemr"
version="1.0.0.0"
/>


<asmv3:application>
<asmv3:windowsSettings
xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
103 changes: 103 additions & 0 deletions dev/installer.nsi.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
!define APP_NAME "<%= name %>"
!define APP_DIR "${APP_NAME}"

Name "${APP_NAME}"

!include "MUI2.nsh"
!define MUI_ICON "icon.ico"

!addplugindir .
!include "nsProcess.nsh"

!include "FileFunc.nsh"

# define the resulting installer's name
OutFile "<%= out %>\${APP_NAME} Setup.exe"

# set the installation directory
InstallDir "$PROGRAMFILES\${APP_NAME}\"

# app dialogs
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES

!define MUI_FINISHPAGE_RUN_TEXT "Start ${APP_NAME}"
!define MUI_FINISHPAGE_RUN "$INSTDIR\${APP_NAME}.exe"

!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"


# default section start
Section
SetShellVarContext all

# delete the installed files
RMDir /r $INSTDIR

# define the path to which the installer should install
SetOutPath $INSTDIR

# specify the files to go in the output path
File /r "<%= appPath %>\*"

# specify icon to go in the output path
File "icon.ico"

# create the uninstaller
WriteUninstaller "$INSTDIR\Uninstall ${APP_NAME}.exe"

# create shortcuts in the start menu and on the desktop
CreateDirectory "$SMPROGRAMS\${APP_DIR}"
CreateShortCut "$SMPROGRAMS\${APP_DIR}\${APP_NAME}.lnk" "$INSTDIR\${APP_NAME}.exe"
CreateShortCut "$SMPROGRAMS\${APP_DIR}\Uninstall ${APP_NAME}.lnk" "$INSTDIR\Uninstall ${APP_NAME}.exe"
CreateShortCut "$DESKTOP\${APP_NAME}.lnk" "$INSTDIR\${APP_NAME}.exe"

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"DisplayName" "${APP_NAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"UninstallString" "$INSTDIR\Uninstall ${APP_NAME}.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"DisplayIcon" "$INSTDIR\icon.ico"

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"Publisher" "${APP_NAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"InstallLocation" "$INSTDIR"

WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"VersionMajor" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"VersionMinor" 0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}" \
"Version" 0
SectionEnd

# create a section to define what the uninstaller does
Section "Uninstall"

${nsProcess::FindProcess} "${APP_NAME}.exe" $R0

${If} $R0 == 0
DetailPrint "${APP_NAME} is running. Closing it down..."
${nsProcess::KillProcess} "${APP_NAME}.exe" $R0
DetailPrint "Waiting for ${APP_NAME} to close."
Sleep 2000
${EndIf}

${nsProcess::Unload}

SetShellVarContext all

# delete the installed files
RMDir /r $INSTDIR

# delete the shortcuts
delete "$SMPROGRAMS\${APP_DIR}\${APP_NAME}.lnk"
delete "$SMPROGRAMS\${APP_DIR}\Uninstall ${APP_NAME}.lnk"
rmDir "$SMPROGRAMS\${APP_DIR}"
delete "$DESKTOP\${APP_NAME}.lnk"


DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_NAME}"
SectionEnd
17 changes: 14 additions & 3 deletions dev/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,22 @@ if [ x$SKIP_OSX != x1 ]; then
--ignore=build \
--app-version=$version

cd build/Chemr-mas-x64

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
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

cd $ROOT

# Name of your app.
APP="Chemr"
# The path of you app to sign.
APP_PATH="build/Chemr-mas-x64/Chemr.app"
# The path to the location you want to put the signed package.
RESULT_PATH="build/releases/Chemr.pkg"
# The name of certificates you requested.
APP_KEY="3rd Party Mac Developer Application: Company Name (APPIDENTITY)"
INSTALLER_KEY="3rd Party Mac Developer Installer: Company Name (APPIDENTITY)"
APP_KEY="3rd Party Mac Developer Application: Hirofumi Watanabe (877L5ULMT9)"
INSTALLER_KEY="3rd Party Mac Developer Installer: Hirofumi Watanabe (877L5ULMT9)"

FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"

Expand Down Expand Up @@ -69,10 +76,14 @@ if [ x$SKIP_WIN != x1 ]; then
--arch=ia32 \
--version=0.34.0 \
--version-string.ProductName="Chemr" \
--version-string.ProductVersion="$version" \
--ignore=build \
--app-version=$version

electron-builder \
cp dev/Chemr.exe.manifest build/Chemr-win32-ia32/
cp dev/installer.nsi.tpl node_modules/electron-builder/templates/installer.nsi.tpl

./node_modules/.bin/electron-builder \
build/Chemr-win32-ia32 \
--platform=win \
--out=build/releases \
Expand Down
3 changes: 2 additions & 1 deletion docs/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ main #indexers .list {
margin: 0 -8px;
}

main #indexers .list a:link {
main #indexers .list a:link ,
main #indexers .list a:visited {
display: block;
min-width: 10em;
padding: 8px;
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var Main = {
ready : function () {
var self = this;

self.main = new BrowserWindow({width: 1280, height: 900});
self.main = new BrowserWindow({width: 1440, height: 900});
self.main.loadUrl('file://' + __dirname + '/viewer.html');
if (config.DEBUG) self.main.openDevTools();
self.main.on('closed', function () {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
"dependencies": {
"glob": "^5.0.15",
"mkdirp": "^0.5.1"
},
"devDependencies": {
"electron-builder": "^2.0.2"
}
}

0 comments on commit 55ff328

Please sign in to comment.