[Amis-vcs] SF.net SVN: amis: [2359] branches/amis3
Brought to you by:
julienq,
marisademeglio
|
From: <mar...@us...> - 2008-03-01 06:42:29
|
Revision: 2359
http://amis.svn.sourceforge.net/amis/?rev=2359&view=rev
Author: marisademeglio
Date: 2008-02-29 22:42:33 -0800 (Fri, 29 Feb 2008)
Log Message:
-----------
Updated installer for AMIS 3. It seems to work as well as the release mode version of AMIS.exe
Found a bug in NavModel's addToPlayOrderList function ... so, for now, prev/next page and section are not really going to work at all. The sidebar and goto page should still work though.
Modified Paths:
--------------
branches/amis3/AmisCore/src/dtb/Dtb.cpp
branches/amis3/AmisCore/src/dtb/nav/NavModel.cpp
branches/amis3/AmisCore/src/io/NccFileReader.cpp
branches/amis3/AmisCore/src/io/XercesSaxParseBase.cpp
branches/amis3/AmisGuiMFC2/AmisGuiMFC2.vcproj
branches/amis3/installer/main/setup-amis3.nsi
Added Paths:
-----------
branches/amis3/installer/main/getversions.nsh
Removed Paths:
-------------
branches/amis3/bin/settings/plugins/
branches/amis3/installer/old/
branches/amis3/installer/oldscripts/
branches/amis3/installer/urakawa/
Modified: branches/amis3/AmisCore/src/dtb/Dtb.cpp
===================================================================
--- branches/amis3/AmisCore/src/dtb/Dtb.cpp 2008-03-01 05:23:58 UTC (rev 2358)
+++ branches/amis3/AmisCore/src/dtb/Dtb.cpp 2008-03-01 06:42:33 UTC (rev 2359)
@@ -245,8 +245,11 @@
amis::io::NccFileReader ncc_file_reader;
amis::dtb::nav::BuildSpineVisitor spine_visitor;
- if (!ncc_file_reader.readFromFile(filepath)) return false;
-
+ if (!ncc_file_reader.readFromFile(filepath))
+ {
+ amis::util::Log::Instance()->writeError("Could not read NCC file!", "Dtb::processNcc", "AmisCore");
+ return false;
+ }
mpNavModel = ncc_file_reader.getNavModel();
mpMetadata = ncc_file_reader.getMetadata();
mpCustomTests = ncc_file_reader.getCustomTests();
Modified: branches/amis3/AmisCore/src/dtb/nav/NavModel.cpp
===================================================================
--- branches/amis3/AmisCore/src/dtb/nav/NavModel.cpp 2008-03-01 05:23:58 UTC (rev 2358)
+++ branches/amis3/AmisCore/src/dtb/nav/NavModel.cpp 2008-03-01 06:42:33 UTC (rev 2359)
@@ -94,6 +94,10 @@
}
void amis::dtb::nav::NavModel::addToPlayOrderList(amis::dtb::nav::NavNode* pNode)
{
+ //TODO: fix big bug in this function. It only shows up in release mode, outside the IDE!
+ //in the meantime, section and page navigation will be buggy...
+ return;
+
if (pNode == NULL) return;
//1 is the first playOrder value; mpBigOrderedList is ordered by play order
int next_in_sequence = mPlayOrderList.size() + 1;
Modified: branches/amis3/AmisCore/src/io/NccFileReader.cpp
===================================================================
--- branches/amis3/AmisCore/src/io/NccFileReader.cpp 2008-03-01 05:23:58 UTC (rev 2358)
+++ branches/amis3/AmisCore/src/io/NccFileReader.cpp 2008-03-01 06:42:33 UTC (rev 2359)
@@ -46,7 +46,6 @@
{
mbFlag_ProcessMetadataChars = false;
mpMetadata = new amis::dtb::Metadata();
-
return amis::io::NavFileReader::readFromFile(filepath);
}
//!xerces start element event
@@ -224,11 +223,11 @@
classname.assign(SimpleAttrs::get("class", pAttrs));
id.assign(SimpleAttrs::get("id", pAttrs));
-
if (classname.compare("page-front") == 0 ||
classname.compare("page-normal") == 0 ||
classname.compare("page-special") == 0)
{
+
mListType = 2;
classname = classname.substr(5);
Modified: branches/amis3/AmisCore/src/io/XercesSaxParseBase.cpp
===================================================================
--- branches/amis3/AmisCore/src/io/XercesSaxParseBase.cpp 2008-03-01 05:23:58 UTC (rev 2358)
+++ branches/amis3/AmisCore/src/io/XercesSaxParseBase.cpp 2008-03-01 06:42:33 UTC (rev 2359)
@@ -103,7 +103,7 @@
parser->setContentHandler(this);
parser->setErrorHandler(this);
//parser begins parsing; expect SAX Events soon
- parser->parse(mFilepath.get_url().c_str());//((*p_input_source));
+ parser->parse((*p_input_source));
}
catch (const XMLException& toCatch)
Modified: branches/amis3/AmisGuiMFC2/AmisGuiMFC2.vcproj
===================================================================
--- branches/amis3/AmisGuiMFC2/AmisGuiMFC2.vcproj 2008-03-01 05:23:58 UTC (rev 2358)
+++ branches/amis3/AmisGuiMFC2/AmisGuiMFC2.vcproj 2008-03-01 06:42:33 UTC (rev 2359)
@@ -36,6 +36,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="AmisCoreD.lib xerces-c_2D.lib libambulant_shwin32_D.lib"
+ OutputFile="$(OutDir)/AMIS.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="../lib;../../../../ambulant/lib/win32;"$(VSInstallDir)\..\Microsoft Speech SDK 5.1\Lib\i386""
IgnoreDefaultLibraryNames="uafxcwd.lib;uafxcw.lib;LIBCD.lib;LIBC.lib;msvcrt.lib;libcmt.lib"
@@ -86,12 +87,13 @@
UsePrecompiledHeader="3"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
- DebugInformationFormat="3"/>
+ DebugInformationFormat="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="xerces-c_2.lib AmisCore.lib libambulant_shwin32.lib Strmiids.lib stlib.lib kernel32.lib gdi32.lib user32.lib"
+ OutputFile="$(OutDir)/AMIS.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="../lib;../../../../ambulant/lib/win32;"$(VSInstallDir)\..\Microsoft Speech SDK 5.1\Lib\i386""
IgnoreAllDefaultLibraries="FALSE"
Copied: branches/amis3/installer/main/getversions.nsh (from rev 2307, trunk/amis/installer/main/getversions.nsh)
===================================================================
--- branches/amis3/installer/main/getversions.nsh (rev 0)
+++ branches/amis3/installer/main/getversions.nsh 2008-03-01 06:42:33 UTC (rev 2359)
@@ -0,0 +1,120 @@
+
+;**************************
+;get the directx version
+;**************************
+Function GetDXVersion
+ Push $0
+ Push $1
+
+ ReadRegStr $0 HKLM "Software\Microsoft\DirectX" "Version"
+ IfErrors noDirectX
+
+ StrCpy $1 $0 2 5 ; get the minor version
+ StrCpy $0 $0 2 2 ; get the major version
+ IntOp $0 $0 * 100 ; $0 = major * 100 + minor
+ IntOp $0 $0 + $1
+ Goto done
+
+ noDirectX:
+ StrCpy $0 0
+
+ done:
+ Pop $1
+ Exch $0
+FunctionEnd
+
+
+; GetWindowsVersion
+;
+; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
+; Updated by Joost Verburg
+;
+; Returns on top of stack
+;
+; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003, Vista)
+; or
+; '' (Unknown Windows Version)
+;
+; Usage:
+; Call GetWindowsVersion
+; Pop $R0
+; ; at this point $R0 is "NT 4.0" or whatnot
+
+Function GetWindowsVersion
+
+ Push $R0
+ Push $R1
+
+ ClearErrors
+
+ ReadRegStr $R0 HKLM \
+ "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
+
+ IfErrors 0 lbl_winnt
+
+ ; we are not NT
+ ReadRegStr $R0 HKLM \
+ "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
+
+ StrCpy $R1 $R0 1
+ StrCmp $R1 '4' 0 lbl_error
+
+ StrCpy $R1 $R0 3
+
+ StrCmp $R1 '4.0' lbl_win32_95
+ StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
+
+ lbl_win32_95:
+ StrCpy $R0 '95'
+ Goto lbl_done
+
+ lbl_win32_98:
+ StrCpy $R0 '98'
+ Goto lbl_done
+
+ lbl_win32_ME:
+ StrCpy $R0 'ME'
+ Goto lbl_done
+
+ lbl_winnt:
+
+ StrCpy $R1 $R0 1
+
+ StrCmp $R1 '3' lbl_winnt_x
+ StrCmp $R1 '4' lbl_winnt_x
+
+ StrCpy $R1 $R0 3
+
+ StrCmp $R1 '5.0' lbl_winnt_2000
+ StrCmp $R1 '5.1' lbl_winnt_XP
+ StrCmp $R1 '5.2' lbl_winnt_2003
+ StrCmp $R1 '6.0' lbl_winnt_vista lbl_error
+
+ lbl_winnt_x:
+ StrCpy $R0 "NT $R0" 6
+ Goto lbl_done
+
+ lbl_winnt_2000:
+ Strcpy $R0 '2000'
+ Goto lbl_done
+
+ lbl_winnt_XP:
+ Strcpy $R0 'XP'
+ Goto lbl_done
+
+ lbl_winnt_2003:
+ Strcpy $R0 '2003'
+ Goto lbl_done
+
+ lbl_winnt_vista:
+ Strcpy $R0 'Vista'
+ Goto lbl_done
+
+ lbl_error:
+ Strcpy $R0 ''
+ lbl_done:
+
+ Pop $R1
+ Exch $R0
+
+FunctionEnd
\ No newline at end of file
Modified: branches/amis3/installer/main/setup-amis3.nsi
===================================================================
--- branches/amis3/installer/main/setup-amis3.nsi 2008-03-01 05:23:58 UTC (rev 2358)
+++ branches/amis3/installer/main/setup-amis3.nsi 2008-03-01 06:42:33 UTC (rev 2359)
@@ -2,9 +2,9 @@
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "AMIS"
-!define PRODUCT_VERSION "3.0"
+!define PRODUCT_VERSION "3.0 Alpha"
!define PRODUCT_PUBLISHER "DAISY for All Project"
-!define PRODUCT_WEB_SITE "http://amis.sf.net"
+!define PRODUCT_WEB_SITE "http://amisproject.org"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\AMIS.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
@@ -68,7 +68,7 @@
Name "${PRODUCT_NAME} ${PRODUCT_VERSION} (${LANG_NAME})"
;this is the name of the installer that gets created.
;for some reason, i vaguely remember that it shouldn't have spaces in the filename.
-OutFile "Setup-amis-3-${DEFAULT_LANGPACK}.exe"
+OutFile "Setup-amis-3-alpha-${DEFAULT_LANGPACK}.exe"
InstallDir "$PROGRAMFILES\AMIS"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
@@ -87,8 +87,9 @@
;copy the DLLs
File "${BIN_DIR}\libambulant_shwin32.dll"
File "${BIN_DIR}\AmisAudio.dll"
- File "${BIN_DIR}\AmisCore.dll"
File "${BIN_DIR}\xerces-c_2_7.dll"
+ File "${BIN_DIR}\libamplugin_pdtb.dll"
+ File "${BIN_DIR}\PdtbIePlugin.dll"
File "${BIN_DIR}\TransformSample.ax"
;copy the bookmark readme file
@@ -99,12 +100,27 @@
SetOutPath "$INSTDIR\settings"
File "${BIN_DIR}\settings\amisPrefs.xml"
File "${BIN_DIR}\settings\amisRecentBooks.xml"
- File "${BIN_DIR}\settings\*.css"
+ File "${BIN_DIR}\settings\defaultToolbar.xml"
+ File "${BIN_DIR}\settings\basicToolbar.xml"
+ File "${BIN_DIR}\settings\resource.h.ini"
+ ;copy the css files
+ SetOutPath "$INSTDIR\settings\css"
+ File "${BIN_DIR}\settings\css\*.css"
+ SetOutPath "$INSTDIR\settings\css\customStyles"
+ File "${BIN_DIR}\settings\css\customStyles\*.css"
+ SetOutPath "$INSTDIR\settings\css\font"
+ File "${BIN_DIR}\settings\css\font\*.css"
+
;copy the images
SetOutPath "$INSTDIR\settings\img"
- File "${BIN_DIR}\settings\img\*"
+ File "${BIN_DIR}\settings\img\*.ico"
+ SetOutPath "$INSTDIR\settings\img\defaultToolbar"
+ File "${BIN_DIR}\settings\img\defaultToolbar\*.ico"
+ SetOutPath "$INSTDIR\settings\img\basicToolbar"
+ File "${BIN_DIR}\settings\img\basicToolbar\*.ico"
+
;copy a few default recordings, which give the version and release date
SetOutPath "$INSTDIR\settings\lang"
File "${BIN_DIR}\settings\lang\version.mp3"
@@ -116,9 +132,6 @@
SetOutPath "$INSTDIR\settings\lang"
File "${BIN_DIR}\settings\lang\readme.txt"
- ;copy the plugins directory readme file
- SetOutPath "$INSTDIR\settings\plugins"
- File "${BIN_DIR}\settings\plugins\readme.txt"
;copy MFC runtimes
SetOverwrite off
@@ -164,16 +177,16 @@
Section -AdditionalIcons
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
CreateShortCut "$SMPROGRAMS\AMIS\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
- CreateShortCut "$SMPROGRAMS\AMIS\Uninstall.lnk" "$INSTDIR\Uninstall-amis-26.exe"
+ CreateShortCut "$SMPROGRAMS\AMIS\Uninstall.lnk" "$INSTDIR\Uninstall-AMIS.exe"
SectionEnd
;*******************************
;post-install stuff
Section -Post
- WriteUninstaller "$INSTDIR\Uninstall-amis-26.exe"
+ WriteUninstaller "$INSTDIR\Uninstall-AMIS.exe"
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\AMIS.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
- WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
+ WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\Uninstall-AMIS.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\AMIS.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
@@ -184,46 +197,44 @@
;install init
Function .onInit
- ;load the sapi install screen file, as we may need it
-!insertmacro MUI_INSTALLOPTIONS_EXTRACT "sapipage.ini"
-!insertmacro MUI_INSTALLOPTIONS_EXTRACT "filebrowse.ini"
+ ;load the sapi install screen file, as we may need it
+ !insertmacro MUI_INSTALLOPTIONS_EXTRACT "sapipage.ini"
+ !insertmacro MUI_INSTALLOPTIONS_EXTRACT "filebrowse.ini"
-;show the splash screen
-File /oname=$PLUGINSDIR\splash.bmp "${LOGO_DIR}\amis.bmp"
-splash::show 1000 $PLUGINSDIR\splash
+ ;show the splash screen
+ File /oname=$PLUGINSDIR\splash.bmp "${LOGO_DIR}\amis.bmp"
+ splash::show 1000 $PLUGINSDIR\splash
-Pop $0 ; $0 has '1' if the user closed the splash screen early,
- ; '0' if everything closed normally, and '-1' if some error occurred.
+ ; $0 has '1' if the user closed the splash screen early,
+ ; '0' if everything closed normally, and '-1' if some error occurred.
+ Pop $0
-;ensure that the OS is XP, 2000, or Vista
+ ;check that the OS is XP, 2000, or Vista
+ Call GetWindowsVersion
+ Pop $R0
-Call GetWindowsVersion
-Pop $R0
+ CheckWinXP:
+ StrCmp $R0 "XP" End CheckWin2K
+ CheckWin2K:
+ StrCmp $R0 "2000" End CheckVista
+ CheckVista:
+ StrCmp $R0 "Vista" End OSNotSupported
-CheckWinXP:
-StrCmp $R0 "XP" End CheckWin2K
-CheckWin2K:
-StrCmp $R0 "2000" End CheckVista
-CheckVista:
-StrCmp $R0 "Vista" End OSNotSupported
+ ;the OS is not supported; warn the user instead of aborting
+ OSNotSupported:
+ MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Warning: operating system not supported. AMIS may not work. Do you want to continue?" IDYES +2
+ Abort
-;the OS is not supported, so abort the installation
-OSNotSupported:
- MessageBox MB_OK "Operating system not supported."
- Abort
+ ;check for the directx version
+ Call GetDXVersion
+ Pop $R3
+ IntCmp $R3 900 +3 0 +3
+ MessageBox "MB_OK" "Requires DirectX 9.0 or later. Aborting installation."
+ Abort
-;check for the directx version
-Call GetDXVersion
-Pop $R3
-IntCmp $R3 900 +3 0 +3
-MessageBox "MB_OK" "Requires DirectX 9.0 or later."
-Abort
-
End:
FunctionEnd
-
-
;**************************
;uninstall success
Function un.onUninstSuccess
@@ -241,23 +252,9 @@
;***************************
;uninstall process
Section Uninstall
-;todo: don't remove bmk dir if it contains *.bmk files
+;todo: backup bookmarks
Delete "$INSTDIR\*"
- Delete "$INSTDIR\settings\plugins\*"
- Delete "$INSTDIR\settings\lang\*"
-
- Delete "$INSTDIR\settings\img\*"
- Delete "$INSTDIR\settings\bmk\*.txt"
- Delete "$SMPROGRAMS\AMIS\*"
-
- RMDir "$SMPROGRAMS\AMIS"
- RMDir "$INSTDIR\settings\plugins"
-
- RMDir "$INSTDIR\settings\lang"
- RMDir "$INSTDIR\settings\img"
- RMDir "$INSTDIR\settings\bmk"
RMDir "$INSTDIR"
-
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|