dmb2installer

by Metamorphman
Create an installer package for your game!
ID:123285
 
This utility requires NSIS.
If you're going to use this, please mention BYOND in your game.
Also, a word of warning, never execute any external applications or scripts through dmb applications unless you have seen their code or know explicitly what they do.
BYOND devs have now created a utility for making standalone executables. For more info, please see this post: http://www.byond.com/forum/?post=891692
Hey meta,
wanted to thank you for this awesome would-be tool but every time i try to use it i get a "Something went wrong" alert...
i even tried to host it on 'trusted' but nothing...

Hello Gi! Thanks for your kind words. :) Sorry for the late reply!
"Something went wrong" indicates that the NSIS script (which creates the installer) did not compile correctly. When this happens, leave dmb2installer open and navigate to the folder in which the dmb2instalelr files where downloaded to. (This is usually 'My Documents/BYOND/lib/Metamorphman/dmb2installer') Here, right click on 'script.nsi' and select 'Compile with NSIS'. The error provided by the actual nsis compiler will provide more feedback as to what went wrong.
Hello again meta, and you dont need to apologize fixing this would be well worth the wait :).
Did as you asked and got this output:
"MakeNSIS v2.46 - Copyright 1995-2009 Contributors
See the file COPYING for license details.
Credits can be found in the Users Manual.

Processing config:
Processing plugin dlls: "C:\Program Files\NSIS\Plugins\*.dll"
- AdvSplash::show
- Banner::destroy
- Banner::getWindow
- Banner::show
- BgImage::AddImage
- BgImage::AddText
- BgImage::Clear
- BgImage::Destroy
- BgImage::Redraw
- BgImage::SetBg
- BgImage::SetReturn
- BgImage::Sound
- Dialer::AttemptConnect
- Dialer::AutodialHangup
- Dialer::AutodialOnline
- Dialer::AutodialUnattended
- Dialer::GetConnectedState
- InstallOptions::dialog
- InstallOptions::initDialog
- InstallOptions::show
- LangDLL::LangDialog
- Math::Script
- NSISdl::download
- NSISdl::download_quiet
- Splash::show
- StartMenu::Init
- StartMenu::Select
- StartMenu::Show
- System::Alloc
- System::Call
- System::Copy
- System::Free
- System::Get
- System::Int64Op
- System::Store
- TypeLib::GetLibVersion
- TypeLib::Register
- TypeLib::UnRegister
- UserInfo::GetAccountType
- UserInfo::GetName
- UserInfo::GetOriginalAccountType
- VPatch::GetFileCRC32
- VPatch::GetFileMD5
- VPatch::vpatchfile
- nsDialogs::Create
- nsDialogs::CreateControl
- nsDialogs::CreateItem
- nsDialogs::CreateTimer
- nsDialogs::GetUserData
- nsDialogs::KillTimer
- nsDialogs::OnBack
- nsDialogs::OnChange
- nsDialogs::OnClick
- nsDialogs::OnNotify
- nsDialogs::SelectFileDialog
- nsDialogs::SelectFolderDialog
- nsDialogs::SetRTL
- nsDialogs::SetUserData
- nsDialogs::Show
- nsExec::Exec
- nsExec::ExecToLog
- nsExec::ExecToStack

!define: "MUI_INSERT_NSISCONF"=""

Changing directory to: "C:\Users\***\Documents\BYOND\MyHub\metamorphman\dmb2installe r"

Processing script file: "C:\Users\***\Documents\BYOND\MyHub\metamorphman\dmb2installe r\script.nsi"
!include: "C:\Program Files\NSIS\Include\nsDialogs.nsh"
!define: "NSDIALOGS_INCLUDED"=""
!include: closed: "C:\Program Files\NSIS\Include\nsDialogs.nsh"
SetCompressor: /SOLID lzma
Name: "myGame"
OutFile: "temp"
Page: instfiles
XPStyle: On
Function: ".onInit"
MessageBox: 4: "This program will install myGame onto your system. Continue?" (on IDYES goto NoAbort)
Abort: ""
FunctionEnd
Section: "Install"
File: "nsDialogs.dll"->"$PLUGINSDIR\nsDialogs.dll" 9728 bytes
Plugin Command: SelectFolderDialog Please select a location to install myGame . Disk Space required: 0 MB C:\Program Files\myGame
Pop: $INSTDIR
SetOutPath: "$INSTDIR"
File: "game.exe" 24576 bytes
File: "icon.ico" 25214 bytes
SetOutPath: "$INSTDIR\data"
File: "data.dmb" 38513 bytes
File: "data.rsc" 515898 bytes
SetOutPath: "$INSTDIR\byond\bin"
File: "data\byond\bin\*.*" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
/oname=outfile one_file_only)
Error in script "C:\Users\***\Documents\BYOND\MyHub\metamorphman\dmb2installe r\script.nsi" on line 20 -- aborting creation process"

Thanks and have a nice weekend ...
The error seems to be from this line: "File: "data\byond\bin\*.*" -> no files found."
This means the BYOND binary files didn't copy over correctly. Hmmm. In the dmb2installer config tab, does the BYOND directory point to the correct path? (Mind you, this is supposed to be where BYOND is installed on your system) Either way, pressing 'recheck' might provide a fix as it will try to re-detect the path.
If that doesn't fix it then it is still possible to do it manually.

Navigate to the BYOND binary install directory (Usually 'C:\Program Files\BYOND\bin'). Here, copy all of the files except for dreammaker.exe (cause we don't need to pack that into the installer). Once again head over to the dmb2installer download directory. Here, create a folder called 'data', inside data create a folder called 'byond' and inside that a folder called 'bin'. Paste all of the files in here.

Before you start dmb2installer though, there is one small change to the code that will need to be made. In ui.dm, underneath 'world New()' there should be a line stating 'fdel("data/")'. Place two forward slashes like so: // before this line, so now it should look like: //fdel("data/"). This will remove the effects of this line, which was going to delete any files we copy over to the data directory.

Hopefully now it should work!
this time i got this error when i ran the scrip for full debug:
File: "data\launcher.exe" -> no files found.

full report if you need it:

MakeNSIS v2.46 - Copyright 1995-2009 Contributors
See the file COPYING for license details.
Credits can be found in the Users Manual.

Processing config:
Processing plugin dlls: "C:\Program Files\NSIS\Plugins\*.dll"
- AdvSplash::show
- Banner::destroy
- Banner::getWindow
- Banner::show
- BgImage::AddImage
- BgImage::AddText
- BgImage::Clear
- BgImage::Destroy
- BgImage::Redraw
- BgImage::SetBg
- BgImage::SetReturn
- BgImage::Sound
- Dialer::AttemptConnect
- Dialer::AutodialHangup
- Dialer::AutodialOnline
- Dialer::AutodialUnattended
- Dialer::GetConnectedState
- InstallOptions::dialog
- InstallOptions::initDialog
- InstallOptions::show
- LangDLL::LangDialog
- Math::Script
- NSISdl::download
- NSISdl::download_quiet
- Splash::show
- StartMenu::Init
- StartMenu::Select
- StartMenu::Show
- System::Alloc
- System::Call
- System::Copy
- System::Free
- System::Get
- System::Int64Op
- System::Store
- TypeLib::GetLibVersion
- TypeLib::Register
- TypeLib::UnRegister
- UserInfo::GetAccountType
- UserInfo::GetName
- UserInfo::GetOriginalAccountType
- VPatch::GetFileCRC32
- VPatch::GetFileMD5
- VPatch::vpatchfile
- nsDialogs::Create
- nsDialogs::CreateControl
- nsDialogs::CreateItem
- nsDialogs::CreateTimer
- nsDialogs::GetUserData
- nsDialogs::KillTimer
- nsDialogs::OnBack
- nsDialogs::OnChange
- nsDialogs::OnClick
- nsDialogs::OnNotify
- nsDialogs::SelectFileDialog
- nsDialogs::SelectFolderDialog
- nsDialogs::SetRTL
- nsDialogs::SetUserData
- nsDialogs::Show
- nsExec::Exec
- nsExec::ExecToLog
- nsExec::ExecToStack

!define: "MUI_INSERT_NSISCONF"=""

Changing directory to: "C:\Users\***\Documents\BYOND\MyHub\metamorphman\dmb2installe r"

Processing script file: "C:\Users\***\Documents\BYOND\MyHub\metamorphman\dmb2installe r\script.nsi"
!include: "C:\Program Files\NSIS\Include\nsDialogs.nsh"
!define: "NSDIALOGS_INCLUDED"=""
!include: closed: "C:\Program Files\NSIS\Include\nsDialogs.nsh"
SetCompressor: /SOLID lzma
Name: "myGame"
OutFile: "temp"
Page: instfiles
XPStyle: On
Function: ".onInit"
MessageBox: 4: "This program will install myGame onto your system. Continue?" (on IDYES goto NoAbort)
Abort: ""
FunctionEnd
Section: "Install"
File: "nsDialogs.dll"->"$PLUGINSDIR\nsDialogs.dll" 9728 bytes
Plugin Command: SelectFolderDialog Please select a location to install myGame. Disk Space required: 8 MB C:\Program Files\myGame
Pop: $INSTDIR
SetOutPath: "$INSTDIR"
File: "game.exe" 24576 bytes
File: "icon.ico" 25214 bytes
SetOutPath: "$INSTDIR\data"
File: "data.dmb" 38513 bytes
File: "data.rsc" 515898 bytes
SetOutPath: "$INSTDIR\byond\bin"
File: "ByondStub.dll" 53248 bytes
File: "ZIP.dll" 61440 bytes
File: "byond.exe" 1011712 bytes
File: "byondcore.dll" 1957888 bytes
File: "byondext.dll" 1904640 bytes
File: "byondwin.dll" 1548288 bytes
File: "debug.bat" 23 bytes
File: "dm.exe" 24576 bytes
File: "dreamdaemon.exe" 221184 bytes
File: "dreamdeploy.exe" 24576 bytes
File: "dreamseeker.exe" 716800 bytes
File: "fmodex.dll" 381440 bytes
File: "fmodex_vc.lib" 184648 bytes
File: "libpng.dll" 106496 bytes
File: "mydream.exe" 24576 bytes
File: "npbyond.dll" 40960 bytes
File: "trace.bat" 16 bytes
SetOutPath: "$INSTDIR"
File: "data\launcher.exe" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
/oname=outfile one_file_only)
Error in script "C:\Users\***\Documents\BYOND\MyHub\metamorphman\dmb2installe r\script.nsi" on line 22 -- aborting creation process

lol maybe its not meant to be?
Hey, sorry again about the late reply.
If launcher.exe is not there that means 'layer.nsi' failed to compile. So this time, run the program and instead of "script.nsi" run "layer.nsi" in the dmb2installer folder.
here you go:

MakeNSIS v2.46 - Copyright 1995-2009 Contributors
See the file COPYING for license details.
Credits can be found in the Users Manual.

Processing config:
Processing plugin dlls: "C:\Program Files\NSIS\Plugins\*.dll"
- AdvSplash::show
- Banner::destroy
- Banner::getWindow
- Banner::show
- BgImage::AddImage
- BgImage::AddText
- BgImage::Clear
- BgImage::Destroy
- BgImage::Redraw
- BgImage::SetBg
- BgImage::SetReturn
- BgImage::Sound
- Dialer::AttemptConnect
- Dialer::AutodialHangup
- Dialer::AutodialOnline
- Dialer::AutodialUnattended
- Dialer::GetConnectedState
- InstallOptions::dialog
- InstallOptions::initDialog
- InstallOptions::show
- LangDLL::LangDialog
- Math::Script
- NSISdl::download
- NSISdl::download_quiet
- Splash::show
- StartMenu::Init
- StartMenu::Select
- StartMenu::Show
- System::Alloc
- System::Call
- System::Copy
- System::Free
- System::Get
- System::Int64Op
- System::Store
- TypeLib::GetLibVersion
- TypeLib::Register
- TypeLib::UnRegister
- UserInfo::GetAccountType
- UserInfo::GetName
- UserInfo::GetOriginalAccountType
- VPatch::GetFileCRC32
- VPatch::GetFileMD5
- VPatch::vpatchfile
- nsDialogs::Create
- nsDialogs::CreateControl
- nsDialogs::CreateItem
- nsDialogs::CreateTimer
- nsDialogs::GetUserData
- nsDialogs::KillTimer
- nsDialogs::OnBack
- nsDialogs::OnChange
- nsDialogs::OnClick
- nsDialogs::OnNotify
- nsDialogs::SelectFileDialog
- nsDialogs::SelectFolderDialog
- nsDialogs::SetRTL
- nsDialogs::SetUserData
- nsDialogs::Show
- nsExec::Exec
- nsExec::ExecToLog
- nsExec::ExecToStack

!define: "MUI_INSERT_NSISCONF"=""

Changing directory to: "C:\Users\***\Documents\BYOND\MyHub\metamorphman\dmb2installe r"

Processing script file: "C:\Users\***\Documents\BYOND\MyHub\metamorphman\dmb2installe r\layer.nsi"
OutFile: "data\launcher.exe"
SilentInstall: Silent
Icon: "icon.ico"
Section: "Install"
File: "nsExec.dll"->"$PLUGINSDIR\nsExec.dll" [compress] 3142/6656 bytes
Plugin Command: Exec taskkill /IM byond.exe
Plugin Command: Exec taskkill /IM byond.exe
Plugin Command: Exec taskkill /IM byond.exe
Exec: "game.exe" (->)
SectionEnd

Processed 1 file, writing output:
Adding plug-ins initializing function... Done!
Processing pages... Done!
Removing unused resources... Done!
Generating language tables... Done!

Output: "C:\Users\***\Documents\BYOND\MyHub\metamorphman\dmb2installe r\data\launcher.exe"
Install: 0 pages (0 bytes), 1 section (1048 bytes), 31 instructions (868 bytes), 33 strings (619 bytes), 1 language table (162 bytes).

Using zlib compression.

EXE header size: 57856 / 35840 bytes
Install code: 718 / 3025 bytes
Install data: 3146 / 6660 bytes
CRC (0x10B0CFF0): 4 / 4 bytes

Total size: 61724 / 45529 bytes (135.5%)



would this be easier if i did it on windows XP???just wondering....
Well, I don't know what to say. The log you showed me has nothing wrong with it and launcher.exe was created successfully... :P

All I can say is it is working for me and I'm running windows XP. I have no idea if it affects the process.
Ok this time i tried it on XP(hence the delay) and there were two differences:

1) There was no need to manually copy the binary files, info.bat worked

2) the error comes from this line:

MessageBox MB_YESNO "Would you like to place a shortcut to Pokemon on your dekstop?" IDYES makeshrt nvm

ideas?
Hmmm could you post the entire compiler output for this please?